From 6e9908c70b42ba20a53aeb660fa3f8f14864be72 Mon Sep 17 00:00:00 2001 From: Marco Heinemann Date: Thu, 23 Oct 2025 11:49:24 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9A=20Docs=20for=20updating=20requirem?= =?UTF-8?q?ents?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BUILD | 8 ++++---- src/README.md | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/BUILD b/src/BUILD index 43394098..ddf506de 100644 --- a/src/BUILD +++ b/src/BUILD @@ -53,11 +53,11 @@ py_library( visibility = ["//visibility:public"], ) -# In order to update the requirements, change the `requirements.txt` file and run: -# `bazel run //src:requirements`. -# This will update the `requirements_lock.txt` file. +# In order to update the requirements, change the `requirements.in` file and run: +# `bazel run //src:requirements.update`. +# This will update the `requirements.txt` file. # To upgrade all dependencies to their latest versions, run: -# `bazel run //src:requirements -- --upgrade`. +# `bazel run //src:requirements.update -- --upgrade`. compile_pip_requirements( name = "requirements", srcs = [ diff --git a/src/README.md b/src/README.md index 2a0ba8a6..e84f9279 100644 --- a/src/README.md +++ b/src/README.md @@ -80,6 +80,23 @@ Find everything related to testing and how to add your on test suite [here](/too > If you want to develop your own sphinx extension, check out the [extensions guide](/src/extensions/README.md) +## Updating dependencies + +The file [requirements.in](./requirements.in) is a [PIP requirements file](https://pip.pypa.io/en/stable/reference/requirements-file-format/) that describe first level dependencies. + +The file [requirements.txt](./requirements.txt) is a [pip-compile lock file](https://pip-tools.readthedocs.io/en/latest/cli/pip-compile/) that holds +the pinned dependency tree calculated from [requirements.in](./requirements.in). + +To update dependencies (e.g. after adding a dependency), run: +``` +bazel run //src:requirements.update +``` + +To update the full dependency tree, run +``` +bazel run //src:requirements.update -- --upgrade +``` + ## Best Practices 1. **Documentation**