If you want to contribute to `LenslessPiCam and make it better, your help is very welcome. Contributing is also a great way to learn more about the package itself.
- File bug reports, or suggest improvements / feature requests by opening an "Issue".
- Opening a "Pull request" (see below).
We use Black to format the code.
First install the library:
pip install black
You can then run the formatting script we've prepared:
./format_code.sh
As much as possible, it is good practice to write unit tests to make sure code does not break when adding new functionality. We have prepared a few which can be run with pytest.
First install the library:
pip install pytest
And then run
pytest test/
to run all tests.
- Create a personal fork of the project.
- Clone the fork on your local machine.
- Create a new branch to work on. Give it a new that reflects the bug / feature you will work on. It is recommended to keep the main branch "clean" and in sync with the original repository's main branch!
- Implement / fix your feature, comment your code.
- Write or adapt tests as needed.
- Add or change the documentation as needed.
- Format the code (see above).
- Push your new branch to your fork.
- Open a pull request with the original repository.
After merging to the main
branch and from the main
branch (!):
- Edit the
version
field insetup.py
. - Create new tag.
git tag -a vX.X.X -m "Description." git push origin vX.X.X
- Create package and upload to Pypi (
pip install twine
if not already done).python setup.py sdist python -m twine upload dist/lensless-X.X.X.tar.gz
- On GitHub set the new tag by (1) clicking "..." and selecting "Create release" and (2) at the bottom pressing "Publish release".
- Update
CHANGELOG.md
with new release version.