To get started you would need to install python3.9
and poetry
. Please follow the instructions on their official websites.
-
We use poetry to manage our python dependencies. Please make sure that poetry is added to your PATH variable after installation and you can run
poetry
command in your terminal or command prompt. -
After cloning the opensourceleg repository, please activate your virtualenv by running
poetry shell
command. This will create an isolated virtual environment for development. -
To install dependencies and prepare
pre-commit
hooks you would need to run these commands from the root of the repository:make install make pre-commit-install
Many checks are configured for this project.
- Command
make check-codestyle
will check black, isort and darglint. - Command
make lint
will check types, docstrings and security using Mypy, Darglint, Pydocstyle - Command
make check-safety
will look at the security of your code and dependencies using Safety and Bandit.
Before submitting your code please do the following steps:
- Add any changes you want
- Add tests for the new changes
- Edit documentation if you have changed something significant
- Run
make codestyle
to format your changes. - Run
make lint
to ensure that types, security and docstrings are okay. - Run
make check-safety
to ensure that your code is secure.
Your code will be checked by our CI/CD pipeline once you submit a pull request. Happy coding!
You can contribute by spreading a word about this library. It would also be a huge contribution to write a short article on how you are using this project. You can also share your best practices with us.