Skip to content

Remove docs from minimum profile - #638

Merged
abelsiqueira merged 4 commits into
mainfrom
593-remove-docs-from-minimum
Aug 29, 2024
Merged

abelsiqueira merged 4 commits into
mainfrom
593-remove-docs-from-minimum

Conversation

@abelsiqueira

Copy link
Copy Markdown
Member

Checklist before requesting a review

  • I have read the contribution guidelines
  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • All user facing changes have been added to CHANGELOG.md

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

List of related issues or pull requests**

Refs:

Describe the changes made in this pull request

Introduces a question AddLocalDocumentation to control the existence of
the docs folder.

If the user selects "Online documentation", then "Local documentation"
is implied. The logic behind this approach is simply to define the
computed variable AddLocalDocumentation based on either flag.
The downside is that the generated answers will still only show the
online flag.

Instructions to review the pull request

Possible things to check:

  • If strategy=minimal, then docs are not present
  • If strategy=recommended, then docs are present
  • If strategy=ask and only Online documentation is selected, the docs are present

Install the requirements

cd $(mktemp -d --tmpdir py-tmpl-XXXXXX)
pip install pipx
pipx install copier

Create a new package using the template

copier copy --vcs-ref <YOUR_BRANCH> https://github.com/nlesc/python-template test_package
# Create a local environment to test your generated package locally
python -m venv env
source env/bin/activate
python -m pip install --upgrade pip setuptools
python -m pip install '.[dev,docs]'

Then run sphinx

sphinx-build -b html docs docs/_build/html

Introduces a question AddLocalDocumentation to control the existence of
the `docs` folder.

If the user selects "Online documentation", then "Local documentation"
is implied. The logic behind this approach is simply to define the
computed variable `AddLocalDocumentation` based on either flag.
The downside is that the generated answers will still only show the
online flag.

Related to #593
@abelsiqueira
abelsiqueira marked this pull request as ready for review August 29, 2024 13:17
@abelsiqueira
abelsiqueira requested a review from fdiblen August 29, 2024 13:17
@abelsiqueira

Copy link
Copy Markdown
Member Author

I just realised that there are some interactions with AddGitHubActionDocumentation_flag. What do you think is best, @fdiblen?

@abelsiqueira

abelsiqueira commented Aug 29, 2024 •

Copy link
Copy Markdown
Member Author

The interaction being that the action will try to build inexistent docs if we select one and not the other.

@fdiblen

fdiblen commented Aug 29, 2024

Copy link
Copy Markdown
Member

The interaction being that the action will try to build inexistent docs if we select one and not the other.

I think we can move Documentation option in SelectGitHubActions menu:

Documentation:
value: AddGitHubActionDocumentation_flag

to the documentation menu:

Move AddGitHubActionDocumentation to features_documentation.yml to enable
the flag AddLocalDocumentation when AddGitHubActionDocumentation is
selected.

Related to #593
@abelsiqueira

Copy link
Copy Markdown
Member Author

I've added a commit with that change.

Comment thread template/pyproject.toml.jinja Resolved

@fdiblen fdiblen left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks great. I have suggested a minor change. Once it is resolved, you can merge it.

🦞

Remove sphinx related packages from the dev list in pyproject
if AddLocalDocumentation is false.

Related to #593
@abelsiqueira
abelsiqueira merged commit cd751a0 into main Aug 29, 2024
@abelsiqueira

Copy link
Copy Markdown
Member Author

Merging bypassing requirements. Thanks for the review

@abelsiqueira
abelsiqueira deleted the 593-remove-docs-from-minimum branch August 29, 2024 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants