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

Implemented clear for material #668

Draft
wants to merge 18 commits into
base: alpha-test-dev
Choose a base branch
from
Draft

Conversation

MicahGale
Copy link
Collaborator

@MicahGale MicahGale commented Feb 22, 2025

Pull Request Checklist for MontePy

Description

This implements clear for Material. This also fixes a bug where sometimes you would get garbled materials like m1 1001.80c 0.68016.80c 0.3. This is due to the last edge leaf of the syntax tree having no space or no padding. This fixes this by every time a nuclide or default library is added it checks if there is an existing space, and if not it adds a new line (and the requisite spaces).

Fixes #665, fixes #667, fixes #666.


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.

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--668.org.readthedocs.build/en/668/

@MicahGale MicahGale added alpha testing Issues that came up during alpha testing feature request An issue that improves the user interface. labels Feb 22, 2025
@MicahGale MicahGale added this to the release-1.0.0 milestone Feb 22, 2025
@MicahGale MicahGale requested a review from tjlaboss February 22, 2025 03:03
@MicahGale MicahGale self-assigned this Feb 22, 2025
@MicahGale MicahGale added bugs A deviation from expected behavior that does not reach the level of being reportable as an "Error". code improvement A feature request that will improve the software and its maintainability, but be invisible to users. labels Mar 4, 2025
@MicahGale MicahGale marked this pull request as ready for review March 4, 2025 23:26
@MicahGale
Copy link
Collaborator Author

I don't like that this is 92% patch coverage.

if not hasattr(p, "even_number_sequence"):
sequence = syntax_node.ListNode("number sequence")
if type(p[0]) == syntax_node.ListNode:
return p[0]
Copy link
Collaborator

Choose a reason for hiding this comment

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

pathway not tested

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Part of this path is only used with a shortcut phrase. I'm not sure if this is worth testing.

@MicahGale MicahGale requested review from tjlaboss March 5, 2025 14:51
@MicahGale MicahGale marked this pull request as draft March 5, 2025 22:14
@MicahGale
Copy link
Collaborator Author

Need to still fix #667.

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 bugs A deviation from expected behavior that does not reach the level of being reportable as an "Error". code improvement A feature request that will improve the software and its maintainability, but be invisible to users. feature request An issue that improves the user interface.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants