Skip to content

Use nox for some testing environments in GitHub workflows - #2656

Merged
namurphy merged 24 commits into
PlasmaPy:mainfrom
namurphy:nox-in-ci
May 3, 2024
Merged

namurphy merged 24 commits into
PlasmaPy:mainfrom
namurphy:nox-in-ci

Conversation

@namurphy

@namurphy namurphy commented May 2, 2024 •

Copy link
Copy Markdown
Member

This PR switches some GitHub workflows from being run with tox to being run with nox, including:

  • Documentation
  • mypy
  • linkcheck

Motivation

Presently, our tox configuration file is difficult to understand and maintain. Using nox lets us have a configuration file that is written in Python.

Related issues

This PR is a follow-up on #2654. See also #1734 & #1735.

@github-actions github-actions Bot added testing CI Related to continuous integration GitHub Actions A continuous integration platform for automating tests and other tasks (see .github/ directory) labels May 2, 2024
@codecov

codecov Bot commented May 2, 2024 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.22%. Comparing base (9e0e94a) to head (c2755f6).

❗ Current head c2755f6 differs from pull request most recent head f87e3f3. Consider uploading reports for the commit f87e3f3 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2656   +/-   ##
=======================================
  Coverage   95.22%   95.22%           
=======================================
  Files         103      103           
  Lines        9401     9401           
  Branches     2151     2151           
=======================================
  Hits         8952     8952           
  Misses        274      274           
  Partials      175      175           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions Bot added the docs PlasmaPy Docs at http://docs.plasmapy.org label May 2, 2024
@github-actions github-actions Bot added the packaging Related to packaging or distribution label May 2, 2024
@namurphy namurphy added the perform linkcheck in CI Add this label to PRs in order to check hyperlink validity after a documentation build. 🔗 label May 2, 2024
@namurphy
namurphy marked this pull request as ready for review May 2, 2024 21:39
@namurphy
namurphy requested a review from a team as a code owner May 2, 2024 21:39
@namurphy
namurphy requested review from ejohnson-96 and removed request for a team May 2, 2024 21:39
@namurphy namurphy removed the perform linkcheck in CI Add this label to PRs in order to check hyperlink validity after a documentation build. 🔗 label May 2, 2024
For nox.thea.codes
@namurphy namurphy added perform linkcheck in CI Add this label to PRs in order to check hyperlink validity after a documentation build. 🔗 and removed perform linkcheck in CI Add this label to PRs in order to check hyperlink validity after a documentation build. 🔗 labels May 2, 2024
Comment thread .github/workflows/ci.yml
workflow_dispatch:

env:
DOC_TROUBLESHOOTING: "Warnings like 'reference target not found' occur when Sphinx tries to interpret text as a Python object, but is unable to do so. This warning can often be fixed by surrounding text in double back ticks instead of single back ticks (e.g., by changing `y` to ``y``) so that it gets formatted as an in-line literal. For more information about addressing documentation build failures, please check out the documentation troubleshooting guide at: https://docs.plasmapy.org/en/latest/contributing/doc_guide.html#troubleshooting"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

📌 In a follow-up PR, I'm wondering if it would be worth including this in its own file. Alternatively, it could be included in the nox environment itself. 🤔

Comment thread .github/workflows/ci.yml
Comment on lines +92 to +93
- name: Build documentation with Sphinx
run: nox -e docs -- -q

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The -q makes the documentation build quiet, which makes it easier to find warnings and errors.

Comment thread docs/about/citation.rst

All public releases of PlasmaPy are openly archived in the `PlasmaPy
Community <https://zenodo.org/communities/plasmapy>`__ on |Zenodo|.
Community <https://zenodo.org/communities/plasmapy/records>`__ on |Zenodo|.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🏕️ I updated a few redirects since I was running linkcheck anyway.

@ejohnson-96 ejohnson-96 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@namurphy
namurphy merged commit 5cddbad into PlasmaPy:main May 3, 2024
@namurphy
namurphy deleted the nox-in-ci branch May 3, 2024 18:28
@namurphy namurphy added the nox Related to the nox automation software label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Related to continuous integration contributor guide docs PlasmaPy Docs at http://docs.plasmapy.org GitHub Actions A continuous integration platform for automating tests and other tasks (see .github/ directory) nox Related to the nox automation software packaging Related to packaging or distribution testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants