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

Create an ab initio parse method to quickly make new objects from an MCNP string. #595

Merged
merged 46 commits into from
Jan 13, 2025

Conversation

MicahGale
Copy link
Collaborator

@MicahGale MicahGale commented Nov 22, 2024

Description

This feature adds the ability to parse MCNP inputs arbitrarily. All MCNP_Object now accepts and parses str. This also introduces MCNP_Problem.parse which is a convenience function that just parses, and goes. The append option controls if this new object is added to the problem or not. This also adds the ability to pass a number to a constructor to simplify the build.

Fixes #88

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)

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

@MicahGale MicahGale self-assigned this Nov 22, 2024
@MicahGale MicahGale added 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. alpha testing Issues that came up during alpha testing labels Nov 22, 2024
@MicahGale MicahGale changed the base branch from develop to alpha-test-dev November 22, 2024 16:55
@MicahGale MicahGale requested a review from tjlaboss November 22, 2024 17:23
@MicahGale MicahGale marked this pull request as ready for review November 22, 2024 17:23
@MicahGale
Copy link
Collaborator Author

Also an open question is: if this should ship for 0.6 or 1.0

@MicahGale
Copy link
Collaborator Author

Also keep in mind this is merging into alpha-test and not dev. So trying it out can be part of alpha testing.

@MicahGale MicahGale requested a review from tjlaboss December 14, 2024 05:11
@MicahGale
Copy link
Collaborator Author

I deleted the tests from #597. I think the testing from mat_redesign already catches these edge cases.

@MicahGale MicahGale changed the title Create an ab initio parse method. Create an ab initio parse method to quickly make new objects from an MCNP string. Jan 6, 2025
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.

A very nice and useful feature.

See the comments below for one thing to fix, some necessary documentation, and one question.

montepy/surfaces/surface.py Show resolved Hide resolved
montepy/mcnp_problem.py Outdated Show resolved Hide resolved
doc/source/starting.rst Show resolved Hide resolved
@MicahGale MicahGale requested a review from tjlaboss January 11, 2025 21:46
I figure that 0.2.0 was really the second major release,
so marking the changes from the first to second major release now that
we are on the third is no longer necessary.
@MicahGale MicahGale added this to the M&C workshop milestone Jan 11, 2025
@MicahGale MicahGale merged commit 57aaac5 into alpha-test-dev Jan 13, 2025
24 checks passed
@MicahGale MicahGale deleted the parse_method branch January 13, 2025 17:14
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 code improvement A feature request that will improve the software and its maintainability, but be invisible to users. documentation Improvements or additions to documentation feature request An issue that improves the user interface. parsers are hard Examples of where MCNP syntax is complicated and should be simplified.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve ab initio DataCard __init__
2 participants