Skip to content

Commit

Permalink
Merge pull request #638 from NLeSC/593-remove-docs-from-minimum
Browse files Browse the repository at this point in the history
  • Loading branch information
abelsiqueira committed Aug 29, 2024
2 parents 632f80c + 2b0be3e commit cd751a0
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 29 deletions.
42 changes: 22 additions & 20 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## [Unreleased]

### Added

* Keep project_setup.md for all the profiles and remove from the menu [#576](https://github.com/NLeSC/python-template/pull/576)
* Make contributing guidelines optional [#465](https://github.com/NLeSC/python-template/pull/465)
* Make linting optional [#568](https://github.com/NLeSC/python-template/pull/568)
Expand All @@ -15,9 +16,11 @@
* Make SonarCloud optional [#515](https://github.com/NLeSC/python-template/pull/515)
* Make citation optional [#471](https://github.com/NLeSC/python-template/pull/471)
* Make online documentation optional [#476](https://github.com/NLeSC/python-template/pull/476)
* Make local documentation optional [#593](https://github.com/NLeSC/python-template/pull/593)
* Make local test optional [#594](https://github.com/NLeSC/python-template/pull/594)

### Changed

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

### Removed

* 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).

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


## [0.2.0]

Released on July 17, 2019
Expand All @@ -176,14 +179,14 @@ Released on July 17, 2019
* Fix example tests that failed to run (#28)
* Remove quotes from project name and project description (#27)
* Update prospector configuration (#26)
- Make prospector less strict
- Have prospector ignore the docs directory
* Make prospector less strict
* Have prospector ignore the docs directory
* Add `install_requires` to `setup.py` (#21)
* Improved .gitignore (#22)
* More detailed documentation about
- Project setup
- Setup instructions
- NOTICE file
* Project setup
* Setup instructions
* NOTICE file

### Removed

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

* First version of the Python project template that follows the Netherlands eScience Center software development guide, containing:
- Tests,
- Documentation,
- Code style checking
- Editorconfig
- Default Travis configuration
- Change log
- Code of Conduct
- Contributing guidelines
- License
- Manifest.in
- README
- Requirements.txt
- Setup configuration

* Tests,
* Documentation,
* Code style checking
* Editorconfig
* Default Travis configuration
* Change log
* Code of Conduct
* Contributing guidelines
* License
* Manifest.in
* README
* Requirements.txt
* Setup configuration

[Unreleased]: https://github.com/NLeSC/python-template//compare/0.5.0...HEAD
[0.5.0]: https://github.com/NLeSC/python-template/releases/tag/0.5.0
Expand Down
9 changes: 1 addition & 8 deletions copier/questions/features_code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ SelectGitHubActions:
type: yaml
default: |-
{% if template_profile == 'recommended' %}
[AddGitHubActionBuild_flag, AddGitHubActionDocumentation_flag]
[AddGitHubActionBuild_flag]
{%- else -%}
[]
{%- endif %}
Expand All @@ -50,9 +50,6 @@ SelectGitHubActions:
Build:
value: AddGitHubActionBuild_flag
# validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}"
Documentation:
value: AddGitHubActionDocumentation_flag
# validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}"
Link checker (reports broken URLs):
value: AddLinkCheck_flag
# validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}"
Expand All @@ -67,10 +64,6 @@ AddGitHubActionBuild:
type: bool
default: "{{ 'AddGitHubActionBuild_flag' in SelectGitHubActions }}"
when: false
AddGitHubActionDocumentation:
type: bool
default: "{{ 'AddGitHubActionDocumentation_flag' in SelectGitHubActions }}"
when: false
AddLinkCheck:
type: bool
default: "{{ 'AddLinkCheck_flag' in SelectGitHubActions }}"
Expand Down
16 changes: 15 additions & 1 deletion copier/questions/features_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,31 @@ SelectDocumentationFeatures:
type: yaml
default: |-
{% if template_profile == 'recommended' %}
[AddOnlineDocumentation_flag, AddDevDoc_flag]
[AddLocalDocumentation_flag, AddOnlineDocumentation_flag, AddDevDoc_flag, AddGitHubActionDocumentation_flag]
{%- else -%}
[]
{%- endif %}
help: Select documentation features
multiselect: true
choices:
Local documentation:
value: AddLocalDocumentation_flag
# validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}"
Online documentation (Read the Docs):
value: AddOnlineDocumentation_flag
# validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}"
Developer documentation:
value: AddDevDoc_flag
# validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}"
GitHub Action to build documentation:
value: AddGitHubActionDocumentation_flag
# validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}"

# computed features
AddLocalDocumentation:
type: bool
default: "{{ 'AddLocalDocumentation_flag' in SelectDocumentationFeatures or 'AddOnlineDocumentation_flag' in SelectDocumentationFeatures or 'AddGitHubActionDocumentation_flag' in SelectDocumentationFeatures }}"
when: false
AddOnlineDocumentation:
type: bool
default: "{{ 'AddOnlineDocumentation_flag' in SelectDocumentationFeatures }}"
Expand All @@ -30,3 +40,7 @@ AddDevDoc:
type: bool
default: "{{ 'AddDevDoc_flag' in SelectDocumentationFeatures }}"
when: false
AddGitHubActionDocumentation:
type: bool
default: "{{ 'AddGitHubActionDocumentation_flag' in SelectDocumentationFeatures }}"
when: false
2 changes: 2 additions & 0 deletions template/project_setup.md.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ help you decide which tool to use for packaging.
- [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/language_guides/python?id=testing)
{%- endif %}

{% if AddLocalDocumentation -%}
## Documentation

- Documentation should be put in the [`docs/`](docs/) directory. The contents have been generated using `sphinx-quickstart` (Sphinx version 1.6.5).
Expand All @@ -61,6 +62,7 @@ help you decide which tool to use for packaging.
- [AutoAPI](https://sphinx-autoapi.readthedocs.io/) is used to generate documentation for the package Python objects.
{% 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 -%}
- [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/language_guides/python?id=writingdocumentation)
{%- endif %}

## Coding style conventions and code quality

Expand Down
8 changes: 8 additions & 0 deletions template/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,22 @@ dev = [
"pytest-cov",
{%- endif %}
"ruff",
{%- if AddLocalDocumentation %}
"sphinx",
"sphinx_rtd_theme",
"sphinx-autoapi",
{%- endif %}
"tox",
"myst_parser",
]
{%- if AddLocalDocumentation %}
docs = [
"sphinx",
"sphinx_rtd_theme",
"sphinx-autoapi",
"myst_parser",
]
{%- endif %}
publishing = [
"build",
"twine",
Expand Down Expand Up @@ -105,7 +109,9 @@ extras = dev
[tool.ruff]
line-length = 120
output-format = "concise"
{%- if AddLocalDocumentation %}
extend-exclude = ["docs"]
{%- endif %}

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

{% if AddLocalDocumentation -%}
[[tool.bumpversion.files]]
filename = "docs/conf.py"
{%- endif %}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit cd751a0

Please sign in to comment.