Skip to content

Commit cd751a0

Browse files
authored
Merge pull request #638 from NLeSC/593-remove-docs-from-minimum
2 parents 632f80c + 2b0be3e commit cd751a0

File tree

10 files changed

+48
-29
lines changed

10 files changed

+48
-29
lines changed

CHANGELOG.md

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## [Unreleased]
44

55
### Added
6+
67
* Keep project_setup.md for all the profiles and remove from the menu [#576](https://github.com/NLeSC/python-template/pull/576)
78
* Make contributing guidelines optional [#465](https://github.com/NLeSC/python-template/pull/465)
89
* Make linting optional [#568](https://github.com/NLeSC/python-template/pull/568)
@@ -15,9 +16,11 @@
1516
* Make SonarCloud optional [#515](https://github.com/NLeSC/python-template/pull/515)
1617
* Make citation optional [#471](https://github.com/NLeSC/python-template/pull/471)
1718
* Make online documentation optional [#476](https://github.com/NLeSC/python-template/pull/476)
19+
* Make local documentation optional [#593](https://github.com/NLeSC/python-template/pull/593)
1820
* Make local test optional [#594](https://github.com/NLeSC/python-template/pull/594)
1921

2022
### Changed
23+
2124
* Update the user documentation (README.md) of the template [#575](https://github.com/NLeSC/python-template/pull/623)
2225
* Updated .gitignore [#622](https://github.com/NLeSC/python-template/pull/622)
2326
* add extra info for sub-menus [#628](https://github.com/NLeSC/python-template/pull/628)
@@ -33,6 +36,7 @@
3336
* CHANGELOG.md is now optional ([#462](https://github.com/NLeSC/python-template/issues/462))
3437

3538
### Removed
39+
3640
* Remove the configuration of isort ([#591](https://github.com/NLeSC/python-template/pull/591)), which is no longer used since [#347](https://github.com/NLeSC/python-template/issues/347).
3741

3842
## [0.5.0]
@@ -150,7 +154,6 @@ Released on Apr 22, 2021
150154
* Drop Python 3.5 support
151155
* Removed unit tests doing the linting
152156

153-
154157
## [0.2.0]
155158

156159
Released on July 17, 2019
@@ -176,14 +179,14 @@ Released on July 17, 2019
176179
* Fix example tests that failed to run (#28)
177180
* Remove quotes from project name and project description (#27)
178181
* Update prospector configuration (#26)
179-
- Make prospector less strict
180-
- Have prospector ignore the docs directory
182+
* Make prospector less strict
183+
* Have prospector ignore the docs directory
181184
* Add `install_requires` to `setup.py` (#21)
182185
* Improved .gitignore (#22)
183186
* More detailed documentation about
184-
- Project setup
185-
- Setup instructions
186-
- NOTICE file
187+
* Project setup
188+
* Setup instructions
189+
* NOTICE file
187190

188191
### Removed
189192

@@ -196,20 +199,19 @@ Released on July 12, 2018.
196199
### Added
197200

198201
* First version of the Python project template that follows the Netherlands eScience Center software development guide, containing:
199-
- Tests,
200-
- Documentation,
201-
- Code style checking
202-
- Editorconfig
203-
- Default Travis configuration
204-
- Change log
205-
- Code of Conduct
206-
- Contributing guidelines
207-
- License
208-
- Manifest.in
209-
- README
210-
- Requirements.txt
211-
- Setup configuration
212-
202+
* Tests,
203+
* Documentation,
204+
* Code style checking
205+
* Editorconfig
206+
* Default Travis configuration
207+
* Change log
208+
* Code of Conduct
209+
* Contributing guidelines
210+
* License
211+
* Manifest.in
212+
* README
213+
* Requirements.txt
214+
* Setup configuration
213215

214216
[Unreleased]: https://github.com/NLeSC/python-template//compare/0.5.0...HEAD
215217
[0.5.0]: https://github.com/NLeSC/python-template/releases/tag/0.5.0

copier/questions/features_code_quality.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ SelectGitHubActions:
4040
type: yaml
4141
default: |-
4242
{% if template_profile == 'recommended' %}
43-
[AddGitHubActionBuild_flag, AddGitHubActionDocumentation_flag]
43+
[AddGitHubActionBuild_flag]
4444
{%- else -%}
4545
[]
4646
{%- endif %}
@@ -50,9 +50,6 @@ SelectGitHubActions:
5050
Build:
5151
value: AddGitHubActionBuild_flag
5252
# validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}"
53-
Documentation:
54-
value: AddGitHubActionDocumentation_flag
55-
# validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}"
5653
Link checker (reports broken URLs):
5754
value: AddLinkCheck_flag
5855
# validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}"
@@ -67,10 +64,6 @@ AddGitHubActionBuild:
6764
type: bool
6865
default: "{{ 'AddGitHubActionBuild_flag' in SelectGitHubActions }}"
6966
when: false
70-
AddGitHubActionDocumentation:
71-
type: bool
72-
default: "{{ 'AddGitHubActionDocumentation_flag' in SelectGitHubActions }}"
73-
when: false
7467
AddLinkCheck:
7568
type: bool
7669
default: "{{ 'AddLinkCheck_flag' in SelectGitHubActions }}"

copier/questions/features_documentation.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,31 @@ SelectDocumentationFeatures:
77
type: yaml
88
default: |-
99
{% if template_profile == 'recommended' %}
10-
[AddOnlineDocumentation_flag, AddDevDoc_flag]
10+
[AddLocalDocumentation_flag, AddOnlineDocumentation_flag, AddDevDoc_flag, AddGitHubActionDocumentation_flag]
1111
{%- else -%}
1212
[]
1313
{%- endif %}
1414
help: Select documentation features
1515
multiselect: true
1616
choices:
17+
Local documentation:
18+
value: AddLocalDocumentation_flag
19+
# validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}"
1720
Online documentation (Read the Docs):
1821
value: AddOnlineDocumentation_flag
1922
# validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}"
2023
Developer documentation:
2124
value: AddDevDoc_flag
2225
# validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}"
26+
GitHub Action to build documentation:
27+
value: AddGitHubActionDocumentation_flag
28+
# validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}"
2329

2430
# computed features
31+
AddLocalDocumentation:
32+
type: bool
33+
default: "{{ 'AddLocalDocumentation_flag' in SelectDocumentationFeatures or 'AddOnlineDocumentation_flag' in SelectDocumentationFeatures or 'AddGitHubActionDocumentation_flag' in SelectDocumentationFeatures }}"
34+
when: false
2535
AddOnlineDocumentation:
2636
type: bool
2737
default: "{{ 'AddOnlineDocumentation_flag' in SelectDocumentationFeatures }}"
@@ -30,3 +40,7 @@ AddDevDoc:
3040
type: bool
3141
default: "{{ 'AddDevDoc_flag' in SelectDocumentationFeatures }}"
3242
when: false
43+
AddGitHubActionDocumentation:
44+
type: bool
45+
default: "{{ 'AddGitHubActionDocumentation_flag' in SelectDocumentationFeatures }}"
46+
when: false

template/project_setup.md.jinja

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ help you decide which tool to use for packaging.
5050
- [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/language_guides/python?id=testing)
5151
{%- endif %}
5252

53+
{% if AddLocalDocumentation -%}
5354
## Documentation
5455

5556
- Documentation should be put in the [`docs/`](docs/) directory. The contents have been generated using `sphinx-quickstart` (Sphinx version 1.6.5).
@@ -61,6 +62,7 @@ help you decide which tool to use for packaging.
6162
- [AutoAPI](https://sphinx-autoapi.readthedocs.io/) is used to generate documentation for the package Python objects.
6263
{% if AddOnlineDocumentation %}- `.readthedocs.yaml` is the ReadTheDocs configuration file. When ReadTheDocs is building the documentation this package and its development dependencies are installed so the API reference can be rendered.{% endif -%}
6364
- [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/language_guides/python?id=writingdocumentation)
65+
{%- endif %}
6466

6567
## Coding style conventions and code quality
6668

template/pyproject.toml.jinja

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,22 @@ dev = [
5151
"pytest-cov",
5252
{%- endif %}
5353
"ruff",
54+
{%- if AddLocalDocumentation %}
5455
"sphinx",
5556
"sphinx_rtd_theme",
5657
"sphinx-autoapi",
58+
{%- endif %}
5759
"tox",
5860
"myst_parser",
5961
]
62+
{%- if AddLocalDocumentation %}
6063
docs = [
6164
"sphinx",
6265
"sphinx_rtd_theme",
6366
"sphinx-autoapi",
6467
"myst_parser",
6568
]
69+
{%- endif %}
6670
publishing = [
6771
"build",
6872
"twine",
@@ -105,7 +109,9 @@ extras = dev
105109
[tool.ruff]
106110
line-length = 120
107111
output-format = "concise"
112+
{%- if AddLocalDocumentation %}
108113
extend-exclude = ["docs"]
114+
{%- endif %}
109115

110116
[tool.ruff.lint]
111117
# Allow unused variables when underscore-prefixed.
@@ -157,5 +163,7 @@ filename = "pyproject.toml"
157163
filename = "CITATION.cff"
158164
{%- endif %}
159165

166+
{% if AddLocalDocumentation -%}
160167
[[tool.bumpversion.files]]
161168
filename = "docs/conf.py"
169+
{%- endif %}

template/docs/Makefile.jinja renamed to template/{% if AddLocalDocumentation %}docs{% endif %}/Makefile.jinja

File renamed without changes.

template/docs/_templates/.gitignore renamed to template/{% if AddLocalDocumentation %}docs{% endif %}/_templates/.gitignore

File renamed without changes.

template/docs/conf.py.jinja renamed to template/{% if AddLocalDocumentation %}docs{% endif %}/conf.py.jinja

File renamed without changes.

template/docs/index.rst.jinja renamed to template/{% if AddLocalDocumentation %}docs{% endif %}/index.rst.jinja

File renamed without changes.

template/docs/make.bat.jinja renamed to template/{% if AddLocalDocumentation %}docs{% endif %}/make.bat.jinja

File renamed without changes.

0 commit comments

Comments
 (0)