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. #595

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

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. 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)

@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

To document pretty_str or not?

@MicahGale MicahGale added parsers are hard Examples of where MCNP syntax is complicated and should be simplified. documentation Improvements or additions to documentation labels Dec 9, 2024
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.

I want to monkey around with this some on some complex models and see if I can break it.

Here are some comments in the meanwhile.

doc/source/changelog.rst Outdated Show resolved Hide resolved
montepy/mcnp_object.py Outdated Show resolved Hide resolved
montepy/data_inputs/data_input.py Outdated Show resolved Hide resolved
montepy/mcnp_object.py Outdated Show resolved Hide resolved
@MicahGale
Copy link
Collaborator Author

Overall from a UX perspective, do you like it @tjlaboss?

@tjlaboss
Copy link
Collaborator

Yes, at first glance, but I want to experiment with it on a practical case.

@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.

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