Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-46019: Document the new dependency method #1082

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions docs/dev/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,38 @@ Slashes will be replaced with underscores.
By default, this means the branch name must begin with ``tickets/``.
You can change this in :file:`.github/workflows/ci.yaml` under the ``build`` step.

Updating dependencies
=====================

Runtime Python dependencies for Gafaelfawr are recorded in :file:`pyproject.toml` like a regular Python package.
Development dependencies are separately recorded in :file:`requirements/dev.in`.
Dependencies needed to run :command:`tox` are recorded in :file:`requirements/tox.in`.

After changing any of those files, run :command:`make update-deps` to rebuild the frozen dependency files in :file:`requirements/*.txt`.
Those frozen dependency files are used to build the release Docker image, and are used as the dependencies in tox environments for testing, documentation builds, and other checks.

:command:`make update-deps` should also be run as part of the release process to update frozen dependencies to their latest versions.

Temporary Git dependencies
--------------------------

By default, :command:`make update-deps` records the hashes of all dependencies.
It therefore cannot be used for Git dependencies, which are sometimes convenient during development.
If you need to depend on, for example, a Git version of Safir, change the ``safir`` dependency in :file:`pyproject.toml` to something like:

.. code-block:: toml

dependencies = [
# ...
"safir[db,kubernetes] @ git+https://github.com/lsst-sqre/safir@main#subdirectory=safir",
# ...
]

Then, run :command:`make update-deps-no-hashes` instead to generate frozen dependencies without the hashes.

Do not release new non-alpha versions of Gafaelfawr with Git dependencies.
The other package should be released first before a new version of Gafaelfawr is released.

.. _db-migrations:

Creating database migrations
Expand Down
40 changes: 0 additions & 40 deletions requirements/main.in

This file was deleted.

Loading