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

Update doctests that were not being run until a recent pytest bugfix #2332

Merged
merged 3 commits into from Sep 8, 2023

Conversation

namurphy
Copy link
Member

@namurphy namurphy commented Sep 8, 2023

This PR fixes a few doctests that just started failing.

One thing that's strange... The doctests are now failing both for the newly pinned dependencies as well as the minimal dependencies. This should not be the case.

@github-actions github-actions bot added docs PlasmaPy Docs at http://docs.plasmapy.org requirements Related to updating requirements labels Sep 8, 2023
@github-actions
Copy link

github-actions bot commented Sep 8, 2023

Thank you for submitting a pull request (PR) to PlasmaPy! ✨ The future of the project depends on contributors like you, so we deeply appreciate it! 🌱

Our contributor guide has information on:

The bottom of this page shows several checks that are run for every PR. Don't worry if something broke! We break stuff all the time. 😺 Click on "Details" to learn why a check didn't pass. Please also feel free to ask for help. We do that all the time as well. 🌸 You can find us in our chat room or weekly community meeting & office hours. Here are some tips:

  • Try fixing CI / Python 3.11 test failures first.
  • Most pre-commit.ci - pr failures can be automagically fixed by commenting pre-commit.ci autofix below, followed by a git pull to bring the changes back to your computer.
  • If pre-commit.ci - pr says that a function is too long or complex, try breaking up that function into multiple short functions that each do one thing. See also these tips on writing clean scientific software.
  • If the CI / Documentation check ends with a cryptic error message, check out our documentation troubleshooting guide.
  • For a documentation preview, click on Details next to docs/readthedocs.org:plasmapy.

If this PR is marked as ready for review, someone should stop by to provide a code review and offer suggestions soon. ✅ If you don't get a review within a few days, please feel free to send us a reminder.

Please also use SI units within PlasmaPy, except when there is strong justification otherwise or in some examples.

We thank you once again!

@namurphy
Copy link
Member Author

namurphy commented Sep 8, 2023

Okay, the reason why it started failing in all of the above is because pytest was skipping doctests if something was decorated with @cached_property (pytest-dev/pytest#11237). That bug just got fixed in the newest release of pytest.

At times like these, I'm glad I spent a couple hours a few years ago setting up an RSS feed of PyPI releases for pretty much every package that PlasmaPy depends on...yeesh. Being able to see the changes in requirements.txt is pretty handy too.

@namurphy namurphy changed the title Skip doctests that recently began failing Update doctests that recently began failing Sep 8, 2023
@github-actions github-actions bot added the plasmapy.formulary Related to the plasmapy.formulary subpackage label Sep 8, 2023
@namurphy namurphy added the priority: very high Issues & PRs of the highest urgency (e.g., broken CI and critical bug fixes) label Sep 8, 2023
@namurphy namurphy marked this pull request as ready for review September 8, 2023 01:02
@namurphy namurphy requested a review from a team as a code owner September 8, 2023 01:02
@namurphy namurphy requested review from JaydenR2305 and removed request for a team September 8, 2023 01:02
Comment on lines +36 to +37
# Add Sphinx extension module names here. When extensions are removed or
# added, please update the corresponding section in docs/doc_guide.rst.
Copy link
Member Author

Choose a reason for hiding this comment

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

The only substantive change to this file is rewording this comment. Otherwise, I was just moving things around.

@namurphy namurphy changed the title Update doctests that recently began failing Update doctests that were not being run until a recent pytest bugfix Sep 8, 2023
@codecov
Copy link

codecov bot commented Sep 8, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (6e63ba4) 98.35% compared to head (82b66e3) 98.35%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2332   +/-   ##
=======================================
  Coverage   98.35%   98.35%           
=======================================
  Files         100      100           
  Lines        8567     8567           
=======================================
  Hits         8426     8426           
  Misses        141      141           
Files Changed Coverage Δ
plasmapy/formulary/collisions/frequencies.py 100.00% <ø> (ø)

☔ View full report in Codecov by Sentry.

📢 Have feedback on the report? Share it here.

Copy link
Contributor

@ejohnson-96 ejohnson-96 left a comment

Choose a reason for hiding this comment

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

👍

@namurphy namurphy merged commit 68cd7b6 into PlasmaPy:main Sep 8, 2023
13 checks passed
@namurphy namurphy deleted the skip-some-doctests branch March 31, 2024 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs PlasmaPy Docs at http://docs.plasmapy.org no changelog entry needed plasmapy.formulary Related to the plasmapy.formulary subpackage priority: very high Issues & PRs of the highest urgency (e.g., broken CI and critical bug fixes) requirements Related to updating requirements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants