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

Run Examples in CI. #578

Merged
merged 33 commits into from
Nov 12, 2024
Merged

Run Examples in CI. #578

merged 33 commits into from
Nov 12, 2024

Conversation

MicahGale
Copy link
Collaborator

@MicahGale MicahGale commented Oct 22, 2024

Description

This implemented testing of (almost) all example code blocks. This includes:

  • README.md
  • doc/source/*.rst
  • All docstring examples (there are none currently)
  • demo/*.ipynb

This also fixed all bugs found. The only code that wasn't tested is ones where the output are multiline statements. This is too complicated to work with sphinx-doctest.

Fixes #575, fixes #571

Checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

@MicahGale MicahGale added bugs A deviation from expected behavior that does not reach the level of being reportable as an "Error". CI/CD PyOpenSci / JOSS labels Oct 22, 2024
@MicahGale MicahGale self-assigned this Oct 22, 2024
@MicahGale MicahGale linked an issue Oct 22, 2024 that may be closed by this pull request
Fixed typo.
@MicahGale
Copy link
Collaborator Author

Using doctest, sphinx-doctest, and papermill to run these tests.

@MicahGale
Copy link
Collaborator Author

TODO: figure out what to do with code-block

@MicahGale
Copy link
Collaborator Author

phmutest README.md --replmode --log https://stackoverflow.com/a/76924724

@MicahGale MicahGale marked this pull request as ready for review October 31, 2024 16:13
@MicahGale
Copy link
Collaborator Author

I'm thinking we should override the changelog test.

@MicahGale MicahGale mentioned this pull request Nov 2, 2024
2 tasks
Copy link
Collaborator

@tjlaboss tjlaboss left a comment

Choose a reason for hiding this comment

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

Changelog test ok.

This is a testing and documentation update. We should make the following changes:

doc/source/starting.rst Outdated Show resolved Hide resolved
doc/source/starting.rst Outdated Show resolved Hide resolved
doc/source/starting.rst Outdated Show resolved Hide resolved
montepy/cell.py Outdated Show resolved Hide resolved
doc/source/starting.rst Outdated Show resolved Hide resolved
doc/source/starting.rst Outdated Show resolved Hide resolved
Copy link
Collaborator

@tjlaboss tjlaboss left a comment

Choose a reason for hiding this comment

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

Let's add surface coefficients and then merge.

@MicahGale MicahGale merged commit e43bad8 into develop Nov 12, 2024
20 of 21 checks passed
@MicahGale MicahGale deleted the 575-run-examples-in-ci branch November 12, 2024 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugs A deviation from expected behavior that does not reach the level of being reportable as an "Error". CI/CD PyOpenSci / JOSS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run Examples in CI "Parametric sweep" in demo/demo.ipynb fails (v0.4.1)
2 participants