Skip to content

Commit 780e6a4

Browse files
authored
Merge pull request #387 from NLeSC/317-separate-docs-dependencies
Add extra optional-dependencies section for documentation requirements
2 parents fc8f91b + 938be17 commit 780e6a4

File tree

5 files changed

+11
-2
lines changed

5 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* Docstring for function
1010
* Intersphinx to documentation
1111
* Coverage and doctest commands for documentation [#97](https://github.com/NLeSC/python-template/issues/97)
12+
* Added new 'docs' section in extra dependencies [#317](https://github.com/NLeSC/python-template/issues/317)
1213

1314
### Changed
1415

{{cookiecutter.directory_name}}/.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ python:
44
- method: pip
55
path: .
66
extra_requirements:
7-
- dev
7+
- docs

{{cookiecutter.directory_name}}/README.dev.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ python -m pip install --upgrade pip setuptools
1919
python -m pip install --no-cache-dir --editable .
2020
# install development dependencies
2121
python -m pip install --no-cache-dir --editable .[dev]
22+
# install documentation dependencies only
23+
python -m pip install --no-cache-dir --editable .[docs]
2224
```
2325

2426
Afterwards check that the install directory is present in the `PATH` environment variable.

{{cookiecutter.directory_name}}/project_setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ of the
2929
guide](https://guide.esciencecenter.nl/#/best_practices/language_guides/python?id=dependencies-and-package-management).
3030

3131
- Runtime dependencies should be added to `pyproject.toml` in the `dependencies` list under `[project]`.
32-
- Development dependencies should be added to `pyproject.toml` in one of the lists under `[project.optional-dependencies]`.
32+
- Development dependencies, such as for testing or documentation, should be added to `pyproject.toml` in one of the lists under `[project.optional-dependencies]`.
3333

3434
## Packaging/One command install
3535

{{cookiecutter.directory_name}}/pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ dev = [
5656
"tox",
5757
"myst_parser",
5858
]
59+
docs = [
60+
"sphinx",
61+
"sphinx_rtd_theme",
62+
"sphinx-autoapi",
63+
"myst_parser",
64+
]
5965
publishing = [
6066
"build",
6167
"twine",

0 commit comments

Comments
 (0)