-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make tool dependencies more manageable
- Loading branch information
Showing
20 changed files
with
1,052 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,4 @@ htmlcov/ | |
.coverage* | ||
.idea/ | ||
.venv/ | ||
poetry.lock | ||
/poetry.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
changelog.d/20240328_075816_kurtmckee_manageable_dependencies.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Development | ||
----------- | ||
|
||
* Move tool dependencies into separate ``requirements.txt`` files. | ||
* Add a tox label, ``update``, so it's easy to update tool dependencies. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
``requirements/`` | ||
################# | ||
|
||
This directory contains the files that manage dependencies for the project. | ||
|
||
At the time of writing, Poetry supports discrete dependency groups | ||
but always resolves dependencies coherently across all groups. | ||
However, in some cases, dependencies do not need to be coherently resolved; | ||
for example, mypy's dependencies do not need to be resolved | ||
together with Sphinx's dependencies. | ||
|
||
Each subdirectory in this directory contains a ``pyproject.toml`` file | ||
with purpose-specific dependencies listed. | ||
|
||
|
||
How it's used | ||
============= | ||
|
||
Tox is configured to use the exported ``requirements.txt`` files as needed. | ||
In addition, Read the Docs is configured to use ``docs/requirements.txt``. | ||
This helps ensure reproducible testing, linting, and documentation builds. | ||
|
||
|
||
How it's updated | ||
================ | ||
|
||
A tox label, ``update``, ensures that dependencies can be easily updated, | ||
and that ``requirements.txt`` files are consistently re-exported. | ||
|
||
This can be invoked by running: | ||
|
||
.. code-block:: | ||
tox run -m update | ||
How to add dependencies | ||
======================= | ||
|
||
New dependencies can be added to a given subdirectory's ``pyproject.toml`` | ||
by either manually modifying the file, or by running a command like: | ||
|
||
.. code-block:: | ||
poetry add --lock --directory "requirements/$DIR" $DEPENDENCY_NAME | ||
Either way, the dependencies must be re-exported: | ||
|
||
.. code-block:: | ||
tox run -m update |
Oops, something went wrong.