Skip to content

Commit

Permalink
chore: move docs deps to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
tigarmo committed Apr 16, 2024
1 parent 4c42411 commit 0eaa09a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
6 changes: 3 additions & 3 deletions docs/.readthedocs.yaml → .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
python: "3.12"

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand All @@ -20,7 +20,7 @@ sphinx:
# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .

extra_requirements:
- docs
3 changes: 3 additions & 0 deletions docs/.sphinx/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This file is used by the automatic-doc-checks CI workflow
# This is sourced the "craft-cli/docs" dir, so this installs "craft-cli[docs]"
..[docs]
5 changes: 0 additions & 5 deletions docs/requirements.txt

This file was deleted.

6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ types = [
"types-colorama",
"types-setuptools",
]
docs = [
"sphinx-toolbox==3.5.0",
"sphinx-lint==0.9.1",
"pytest>=7.0.0", # This is just because this is imported by the code
"canonical-sphinx@git+https://github.com/canonical/canonical-sphinx@CRAFT-2671-update-assets",
]

[build-system]
requires = [
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ commands =
codespell: codespell --toml {tox_root}/pyproject.toml --write-changes {posargs}

[docs] # Sphinx documentation configuration
deps =
-r{tox_root}/docs/requirements.txt
extras = docs
package = editable
no_package = true
env_dir = {work_dir}/docs
runner = ignore_env_name_mismatch
source_dir = {tox_root}/{project_name}

[testenv:build-docs]
description = Build sphinx documentation
Expand Down

0 comments on commit 0eaa09a

Please sign in to comment.