adafruit/Adafruit_CircuitPython_OV5640

Add Auto Focus

Closed this issue · 3 comments

I've been working on adding Auto focus support and have it working OK in the jerryn_af branch on my fork
https://github.com/jerryneedell/Adafruit_CircuitPython_OV5640/tree/jerryn_af

I need to add a file to the repository that is used for initializing the auto focus
ov5640_autofocus.bin
ov5640_autofocus.bin.license

but pre-commit fails in the "reuse" check when these files are added to my branch.

black................................................(no files to check)Skipped
reuse....................................................................Failed
- hook id: reuse
- exit code: 1

# MISSING LICENSES

'GPL-2.0-only' found in:
* ov5640_autofocus.bin


# SUMMARY

* Bad licenses:
* Deprecated licenses:
* Licenses without file extension:
* Missing licenses: GPL-2.0-only
* Unused licenses:
* Used licenses: CC-BY-4.0, GPL-2.0-only, MIT, Unlicense
* Read errors: 0
* Files with copyright information: 30 / 30
* Files with license information: 30 / 30

Unfortunately, your project is not compliant with version 3.0 of the REUSE Specification :-(

check yaml...........................................(no files to check)Skipped
fix end of files.........................................................Passed
trim trailing whitespace.................................................Passed
pylint (library code)................................(no files to check)Skipped
pylint (example code)................................(no files to check)Skipped
pylint (test code)...................................(no files to check)Skipped

these same files are used in the pycamera library
https://github.com/adafruit/Adafruit_CircuitPython_PyCamera/tree/main/adafruit_pycamera

where it is set up as a package.

Do I need to set this up as a package as well for it to pass?
I suppose that will make it cleaner to install.

Ah -- I fixed the issue with the license.
Still not sure how best to organize this. Would it be better as a "package" so the ov5640_autofocus.bin file is more easily included?

Ya, I guess that the bundling code expects source files to be in the package folder. I'm not exactly sure how CPython normally does this.

standard python can use importlib.resources.files() but porting this to CircuitPython would be a lot of work, compared to the simple string manipulation method of finding a filename next to a .py file in a package.