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

Fix bug with how new material components are exported. #598

Merged

Conversation

MicahGale
Copy link
Collaborator

@MicahGale MicahGale commented Dec 2, 2024

Pull Request Checklist for MontePy

Description

This fixes a bug that made it so that added componenents are not properly exported in multiple ways. The ways it broke:

  1. is_atom_fraction was not reflected in the sign of the fractions on export.
  2. No additional space between components was sometimes possible.

Fixes:

  1. When updating, and if a component's fraction doesn't end in padding, and it's not the end, add a space.
  2. Update the is_negative attribute for all fractions on export.

Fixes #597


General Checklist

  • I have performed a self-review of my own code.
  • The code follows the standards outlined in the development documentation.
  • 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 tests pass locally before CI checks.
  • The PR covers all relevant aspects according to the development guidelines.
    """

@MicahGale MicahGale added bugs A deviation from expected behavior that does not reach the level of being reportable as an "Error". critical An issue that seriously limits user adoption or hampers current use. labels Dec 2, 2024
@MicahGale MicahGale self-assigned this Dec 2, 2024
@MicahGale MicahGale linked an issue Dec 2, 2024 that may be closed by this pull request
@MicahGale
Copy link
Collaborator Author

@AlphonseM91 could you check the updated test in this PR to see if you think this test is effective for replicating #597, or if you have any other tests you think should be included?

@MicahGale MicahGale requested a review from tjlaboss December 3, 2024 15:29
@MicahGale MicahGale marked this pull request as ready for review December 3, 2024 15:29
@MicahGale
Copy link
Collaborator Author

@tjlaboss, when you are back, please review this one first. We need to release 0.5.3 ASAP.

tests/test_material.py Outdated Show resolved Hide resolved
@MicahGale MicahGale requested a review from tjlaboss December 10, 2024 20:42
@MicahGale MicahGale merged commit 6b8b859 into develop Dec 11, 2024
23 checks passed
@MicahGale MicahGale deleted the 597-montepy-is_atomic_fraction-does-not-work-as-expected branch December 11, 2024 14:37
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". critical An issue that seriously limits user adoption or hampers current use.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Montepy is_atomic_fraction does not work as expected
2 participants