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

Do not warn about comments that go over the line length #658

Conversation

MicahGale
Copy link
Collaborator

@MicahGale MicahGale commented Feb 8, 2025

Pull Request Checklist for MontePy

Description

This is probably the most requested feature (whether they say so or not). LineOverrunWarnings and LineExpansionWarnings are no longer created for comments.

This does the following:

  1. Filters out comments from raising warnings, and un-truncate them.
  2. If a line is wrapped on export check if it has a comment.
    3. If it's a c comment do nothing; do not wrap.
    4. If it has a $ comment wrap the uncommented part, and then add the comment to the end.

Fixes #188


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

@MicahGale MicahGale added alpha testing Issues that came up during alpha testing feature request An issue that improves the user interface. labels Feb 8, 2025
@MicahGale MicahGale added this to the release-1.0.0 milestone Feb 8, 2025
@MicahGale MicahGale marked this pull request as ready for review February 8, 2025 03:15
@MicahGale MicahGale requested a review from tjlaboss February 8, 2025 03:15
@MicahGale MicahGale self-assigned this Feb 8, 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.

Ahh, this is a relief. Code changes look good, test looks good, and I can confirm that it works on real models.

A couple minor fixes before merging:

montepy/__init__.py Show resolved Hide resolved
tests/inputs/test.imcnp Show resolved Hide resolved
montepy/input_parser/input_syntax_reader.py Outdated Show resolved Hide resolved
montepy/input_parser/input_syntax_reader.py Outdated Show resolved Hide resolved
montepy/__init__.py Show resolved Hide resolved
@MicahGale MicahGale requested a review from tjlaboss February 8, 2025 17:30
@tjlaboss tjlaboss merged commit 6e5a313 into alpha-test-dev Feb 8, 2025
24 checks passed
@tjlaboss tjlaboss deleted the 188-do-not-warn-about-comments-that-go-over-the-line-length branch February 8, 2025 17:45
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.

2 participants