Skip to content

Commit

Permalink
Merge pull request #387 from NLeSC/317-separate-docs-dependencies
Browse files Browse the repository at this point in the history
Add extra optional-dependencies section for documentation requirements
  • Loading branch information
sjvrijn committed Jul 8, 2024
2 parents fc8f91b + 938be17 commit 780e6a4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* Docstring for function
* Intersphinx to documentation
* Coverage and doctest commands for documentation [#97](https://github.com/NLeSC/python-template/issues/97)
* Added new 'docs' section in extra dependencies [#317](https://github.com/NLeSC/python-template/issues/317)

### Changed

Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.directory_name}}/.readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ python:
- method: pip
path: .
extra_requirements:
- dev
- docs
2 changes: 2 additions & 0 deletions {{cookiecutter.directory_name}}/README.dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ python -m pip install --upgrade pip setuptools
python -m pip install --no-cache-dir --editable .
# install development dependencies
python -m pip install --no-cache-dir --editable .[dev]
# install documentation dependencies only
python -m pip install --no-cache-dir --editable .[docs]
```

Afterwards check that the install directory is present in the `PATH` environment variable.
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.directory_name}}/project_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ of the
guide](https://guide.esciencecenter.nl/#/best_practices/language_guides/python?id=dependencies-and-package-management).

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

## Packaging/One command install

Expand Down
6 changes: 6 additions & 0 deletions {{cookiecutter.directory_name}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ dev = [
"tox",
"myst_parser",
]
docs = [
"sphinx",
"sphinx_rtd_theme",
"sphinx-autoapi",
"myst_parser",
]
publishing = [
"build",
"twine",
Expand Down

0 comments on commit 780e6a4

Please sign in to comment.