Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

456-make online documentation optional #476

Merged
merged 11 commits into from
Aug 21, 2024
Merged

Conversation

fdiblen
Copy link
Member

@fdiblen fdiblen commented Aug 20, 2024

Description

This PR makes online documentation (Read the Docs) optional.

Related issues:

Instructions to review the pull request

Install the requirements

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

Test 1:
Run the command below and say 'yes' to citation question

copier copy --vcs-ref 456_online_documentation https://github.com/nlesc/python-template test_yes

Test 2:
Run the command below and say 'no' to citation question

copier copy --vcs-ref 456_online_documentation https://github.com/nlesc/python-template test_no

You should see the files below only when you say 'yes':

  • .github/workflows/next_steps_online_documentation.yml
  • .readthedocs.yaml

Test 3:

  • Push the generated package to a GitHub repository
  • Check if next_steps_online_documentation.yml workflow runs
  • Check if a Github issue about Read the Docs is created

@fdiblen fdiblen marked this pull request as ready for review August 20, 2024 16:01
Copy link
Contributor

@sjvrijn sjvrijn left a comment

Choose a reason for hiding this comment

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

Looks good to me, except for the echo erroring in the action

id: readthedocs
- name: List created issues
run: |
echo 'Created issues that must be completed to have fully working Python package:
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing ' at the end of the line

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

Copy link
Member

@sverhoeven sverhoeven left a comment

Choose a reason for hiding this comment

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

Would be nice to remove Create readthedocs issue step in .github/workflows/next_steps.yml workflow.

In README.md there is a badge for rtd that should be surrounded with if clause.

In project_setup.md there is mention of rtd that should be surrounded with if clause.

permissions:
contents: write
issues: write
name: Create issues for next steps
Copy link
Member

Choose a reason for hiding this comment

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

Both next_steps*.yml workflows have same name. Please make unique

Suggested change
name: Create issues for next steps
name: Create readthedocs issue for next steps

Copy link
Member Author

Choose a reason for hiding this comment

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

already done

@sverhoeven
Copy link
Member

The 'Next step: Read the Docs' issue was created in my new repo.

@sverhoeven
Copy link
Member

On saying no the .github/next_steps/03_readthedocs.md should not be present.

@fdiblen fdiblen mentioned this pull request Aug 21, 2024
3 tasks
Copy link
Member

@sverhoeven sverhoeven left a comment

Choose a reason for hiding this comment

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

Looks ok. I added some - to not have empty newlines when you say no.

@fdiblen
Copy link
Member Author

fdiblen commented Aug 21, 2024

Thank you for reviewing, @sverhoeven and @sjvrijn!

@fdiblen fdiblen merged commit 977268c into main Aug 21, 2024
16 checks passed
@fdiblen fdiblen deleted the 456_online_documentation branch August 21, 2024 11:22
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.

3 participants