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

Allow strictly finding material components #663

Open
wants to merge 20 commits into
base: alpha-test-dev
Choose a base branch
from

Conversation

MicahGale
Copy link
Collaborator

@MicahGale MicahGale commented Feb 13, 2025

Pull Request Checklist for MontePy

Description

This is a feature implementation for contains, get_containing, and find. The topline is that there is a new strict argument that switches from implicit to explicit matching. So with strict=True "H" only matches 1000 and not 1001.80c nor 1000.80c. The other main thing was adding some feedback from @gonuke.

This feedback splint contains (and get_containing) to be: contains_all and contains_any. This should be clearer to users, and be more useful. The main use case of contains_any might be:

fissile = list(problem.material.get_containing_any("U-235", "U-233", "Pu-239",...)

Fixes #642


General Checklist

  • I have performed a self-review of my own code.
  • The code follows the standards outlined in the development documentation.
  • I have formatted my code with black version 25.
  • I have added tests that prove my fix is effective or that my feature works (if applicable).

Documentation Checklist

  • I have documented all added classes and methods.
  • For infrastructure updates, I have updated the developer's guide.
  • For significant new features, I have added a section to the getting started guide.

First-Time Contributor Checklist

  • If this is your first contribution, add yourself to pyproject.toml if you wish to do so.

Additional Notes for Reviewers

Ensure that:

  • The submitted code is consistent with the merge checklist outlined here.
  • The PR covers all relevant aspects according to the development guidelines.
  • 100% coverage of the patch is achieved, or justification for a variance is given.

📚 Documentation preview 📚: https://montepy--663.org.readthedocs.build/en/663/

@MicahGale MicahGale self-assigned this Feb 13, 2025
@MicahGale MicahGale added alpha testing Issues that came up during alpha testing feature request An issue that improves the user interface. labels Feb 13, 2025
@MicahGale MicahGale added this to the release-1.0.0 milestone Feb 13, 2025
@MicahGale
Copy link
Collaborator Author

MicahGale commented Feb 13, 2025

TODO: find

resolved

@MicahGale MicahGale marked this pull request as ready for review February 26, 2025 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha testing Issues that came up during alpha testing feature request An issue that improves the user interface.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant