Skip to content

Commit

Permalink
Switch from optional-dependencies to dedicated requirements.txt files
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg committed Feb 18, 2022
1 parent c97bc89 commit 8a6b51c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 20 deletions.
5 changes: 1 addition & 4 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,4 @@ sphinx:

python:
install:
- method: pip
path: .
extra_requirements:
- doc
- requirements: docs/requirements.txt
5 changes: 5 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
myst-parser
sphinx-copybutton
sphinx-design
sphinx-inline-tabs
sphinx-tabs
7 changes: 4 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,17 @@ def get_release_versions(version_file):
#
@nox.session(reuse_venv=True)
def docs(session):
# Generate relevant files prior to installation
session.install(".[doc]")
session.install("-r", "docs/requirements.txt")
session.install(".")

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


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

# Generate documentation into `build/docs`
session.run("stb", "serve", "docs/")
Expand Down
13 changes: 0 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,5 @@ classifiers = [
"Topic :: Software Development :: Documentation",
]

[project.optional-dependencies]
test = [
"pytest",
"pytest-cov",
"pytest-xdist",
]
doc = [
"myst-parser",
"sphinx-copybutton",
"sphinx-design",
"sphinx-inline-tabs",
]

[project.entry-points]
"sphinx.html_themes" = {furo = "furo"}

0 comments on commit 8a6b51c

Please sign in to comment.