This document outlines the steps required to add a new Python package as a dependency in our codebase.
Open pyproject.toml file --> Add the package to its correct location (dev, transform, etc.). Guidance:
- Freeze (set explicit versions e.g.
my-lib==1.2.3) versions of doc deps as version updates changes how the doc pages are rendered, files are formatted, etc. - Freeze versions for deps that don't do a great job of maintaining in their wheels what libs / libraries they are compatible with - this is a problem with packages like tensorflow.
- Everything else, let it auto resolve so we can keep flexibility for GiGL lib users.
Run uv lock to generate a new uv.lock file, and create a PR with the changes.
- Navigate to GiGL's Actions tab and find the build-base-docker-images workflow.
- Run the workflow with the PR# (You may need to ask a repo maintainer to do this). You can leave the branch name as
main. - Navigate back to your PR, you should see a message from
github-actions[bot]specifying that your docker images are being built. The bot will push a new commit to the PR once it is done.
To test that everything is working correctly, you should pre-emptively run tests to ensure that everything is still working.