- In order to contribute you will need to clone/fork the repo and install the test requirements locally.
pip install -r test_requirements.txt
pip install -r doc_requirements.txt
- Install pre-commit.
pip install pre-commit
pre-commit install
-
Create and checkout new feature branch for your work.
-
Make changes, add awesome code!
-
Build docs locally and inspect the new html pages in
docs/
folder.
cd docs_source
python make.py --local --smv_branch_whitelist <your_current_branch_name>
Open docs/index.html
and see if the docs are rendered correctly.
- Stage docs
git add docs
- Run code-style requirement checks using pre-commit.
pre-commit run --all-files -v
Fix all documentation and typing issues shown in the output.
- Run tests locally.
./.run_local_tests.sh
-
Git re-stage the files after fixing the errors and commit. When you commit,
pre-commit
will run once again but only on the changed files -
Push to remote. Create a PR if your feature is completed.
We use flake8
and black
for code formatting and darglint
for checking doc-strings.