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

Starting the armi.testing modules #2028

Merged
merged 8 commits into from
Dec 29, 2024
Merged

Starting the armi.testing modules #2028

merged 8 commits into from
Dec 29, 2024

Conversation

john-science
Copy link
Member

@john-science john-science commented Dec 6, 2024

What is the change?

Here I am starting the armi.testing module.

Basically, I just move loadTestReactor() from armi.reactor.test.test_reactor to armi.testing.

Why is the change being made?

Right now, every single ARMI unit test is importable as part of the API. But that can't last forever. ARMI 1.0.0 will have a more usual API, without less importable noise.

A better paradigm to follow would be numpy. The NumPy team does not let you import their unit tests, that's madness.

Instead, they provide import numpy.testing, which houses a small set of high-quality testing utilities for people to use when testing NumPy-based code. So, we will follow NumPy's example.

progress on #1867


Checklist

  • The release notes have been updated if necessary.
  • The documentation is still up-to-date in the doc folder.
  • The dependencies are still up-to-date in pyproject.toml.

@john-science john-science added testing Related to tests feature request Smaller user request labels Dec 6, 2024
@john-science
Copy link
Member Author

Again, @opotowsky, I'm sorry this touches so many files. BUT, the only two non-trivial files changes are armi/testing/__init__.py and armi/reactor/tests/test_reactor.py. I move the loadTestReactor() function from one to the other.

The rest is just me making use of the new location.

But the change is still backward compatible for projects outside ARMI, because test_reactors.py still imports loadTestReactor().

Sorry for the PR onslaught!

Copy link
Member

@opotowsky opotowsky left a comment

Choose a reason for hiding this comment

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

I merged the ruff PR so you have a number of merge conflicts here. But feel free to merge this once those are handled!

doc/release/0.5.rst Outdated Show resolved Hide resolved
@john-science john-science merged commit 66551d5 into main Dec 29, 2024
17 checks passed
@john-science john-science deleted the create_testing branch December 29, 2024 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Smaller user request testing Related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants