For local development, we recommend leveraging conda and an IDE, such as VSCode.
- Clone the repository to your local machine and
cd
into the directory. Note that you may need to prepend your token like this:git clone https://YOUR_TOKEN@REPOSITORY_URL
. - Install the package via
pip install -e '.[dev]'
. This will install all required dependencies, dev dependencies, and create a local package at the directory of interest. - Validate the install with
pip show PACKAGE_NAME
- you should see your local path in theEditable project location
field.
- Create a new branch via
git checkout -b BRANCH_NAME
- Make your changes
- Run
pytest
in the root directory to test your changes.
- Test that your code style is correct by running
make lint
from your home directory. If there are errors, you can manually resolve them and/or runmake format
. Note that not all issues can be resolved by the linter. - Run all pre-commit checks via
make check
. - Add your files to staging via
git add .
. - Commit your files via
git commit . -m "COMMIT MESSAGE"
- Push your changes via
git push
and copying and running the output push message. - Go to the repository in github and create a PR via the UI. Once your CI tests pass, request a reviewer from the team.
- After the reviewer has approved your PR, merge it and delete your branch.
- We will have strong test coverage on utilities and self-contained functions.
- We will have weak test coverage for integrations and environment-dependent functionality.
- Each independent tool will have its own folder in
src
, as shown below.- src
- tool_1
- tool_2
- ...
- utils
- tests
- tool_1
- tool_2
- ...
- utils
- src
- Variable names should be understandable and self-describing.
- Code readability will typically be more important than efficiency.