Skip to content

Commit 8a6b51c

Browse files
committed
Switch from optional-dependencies to dedicated requirements.txt files
1 parent c97bc89 commit 8a6b51c

File tree

4 files changed

+10
-20
lines changed

4 files changed

+10
-20
lines changed

.readthedocs.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,4 @@ sphinx:
1010

1111
python:
1212
install:
13-
- method: pip
14-
path: .
15-
extra_requirements:
16-
- doc
13+
- requirements: docs/requirements.txt

docs/requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
myst-parser
2+
sphinx-copybutton
3+
sphinx-design
4+
sphinx-inline-tabs
5+
sphinx-tabs

noxfile.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,17 @@ def get_release_versions(version_file):
6666
#
6767
@nox.session(reuse_venv=True)
6868
def docs(session):
69-
# Generate relevant files prior to installation
70-
session.install(".[doc]")
69+
session.install("-r", "docs/requirements.txt")
70+
session.install(".")
7171

7272
# Generate documentation into `build/docs`
7373
session.run("sphinx-build", "-b", "dirhtml", "-v", "docs/", "build/docs")
7474

7575

7676
@nox.session(name="docs-live", reuse_venv=True)
7777
def docs_live(session):
78-
session.install("-e", ".[doc]", "sphinx-theme-builder[cli]")
78+
session.install("-r", "docs/requirements.txt")
79+
session.install("-e", ".", "sphinx-theme-builder[cli]")
7980

8081
# Generate documentation into `build/docs`
8182
session.run("stb", "serve", "docs/")

pyproject.toml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,5 @@ classifiers = [
4343
"Topic :: Software Development :: Documentation",
4444
]
4545

46-
[project.optional-dependencies]
47-
test = [
48-
"pytest",
49-
"pytest-cov",
50-
"pytest-xdist",
51-
]
52-
doc = [
53-
"myst-parser",
54-
"sphinx-copybutton",
55-
"sphinx-design",
56-
"sphinx-inline-tabs",
57-
]
58-
5946
[project.entry-points]
6047
"sphinx.html_themes" = {furo = "furo"}

0 commit comments

Comments
 (0)