Skip to content

Commit

Permalink
Add a shared docs build env dependencies location
Browse files Browse the repository at this point in the history
This change adds a new dependencies list location that is compatible
with:

  * pip-tools
  * dependabot
  * pip itself

It allows us to gradually introduce support for locked build envs
with pinned versions and hashes following the best practices present
in many major projects in Python ecosystem (like PyPI) while keeping
the DX with our main (tox-oriented) dev setup seamless.

Refs:

  * https://hynek.me/articles/python-app-deps-2018/#pip-tools--everything-old-is-new-again
  * https://github.com/jazzband/pip-tools#output-file
  * https://github.com/pypa/warehouse/tree/master/requirements
  * https://dependabot.com/blog/dependabot-now-supports-pip-compile/
  * dependabot/feedback#658 (comment)
  * https://github.com/dependabot/dependabot-core/blob/20557d2/python/lib/dependabot/python/update_checker/pip_compile_version_resolver.rb#L23
  • Loading branch information
webknjaz authored and ssbarnea committed Jun 29, 2020
1 parent e659f71 commit 4be2b31
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ build:
# to build docs
python:
version: 3.8
install: []
install:
- requirements: docs/requirements.in
system_packages: false
1 change: 1 addition & 0 deletions docs/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Sphinx
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ passenv =

[testenv:docs]
basepython = python3
deps = sphinx
deps =
-r{toxinidir}/docs/requirements.in
commands =
# Generate an RST rules table from the rules in Python modules:
sh -c "{envpython} -m ansiblelint -L -f rst > rst/rules/default_rules.rst"
Expand Down

0 comments on commit 4be2b31

Please sign in to comment.