Skip to content

Commit

Permalink
sphinx-tabs followup: readthedocs install requirements/docs.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasha10 committed Dec 20, 2022
1 parent 97467e6 commit d02a0c1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ python:
install:
- method: pip
path: .
- requirements: requirements/docs.txt
11 changes: 7 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
nox.options.error_on_missing_interpreters = True


def deps(session: Session, editable_install: bool) -> None:
def deps(
session: Session, editable_install: bool, requirements: str = "requirements/dev.txt"
) -> None:
session.install("--upgrade", "setuptools", "pip")
extra_flags = ["-e"] if editable_install else []
session.install("-r", "requirements/dev.txt", *extra_flags, ".", silent=True)
session.install("-r", requirements, *extra_flags, ".", silent=True)


@nox.session(python=PYTHON_VERSIONS) # type: ignore
Expand All @@ -32,10 +34,11 @@ def benchmark(session: Session) -> None:

@nox.session # type: ignore
def docs(session: Session) -> None:
deps(session, editable_install=True)
deps(session, False, "requirements/docs.txt")
session.chdir("docs")
session.run("sphinx-build", "-W", "-b", "doctest", "source", "build")
session.run("sphinx-build", "-W", "-b", "html", "source", "build")
session.install("pytest") # required for `sphinx-build -b doctest`:
session.run("sphinx-build", "-W", "-b", "doctest", "source", "build")


@nox.session(python=PYTHON_VERSIONS) # type: ignore
Expand Down
3 changes: 1 addition & 2 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
-r base.txt
-r docs.txt
black
build
coveralls
Expand All @@ -12,8 +13,6 @@ pytest
pytest-benchmark
pytest-lazy-fixture
pytest-mock
sphinx
sphinx-tabs
towncrier
twine
pydevd
Expand Down
2 changes: 2 additions & 0 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sphinx
sphinx-tabs

0 comments on commit d02a0c1

Please sign in to comment.