Skip to content

Beta implementation of Just In time parsing#960

Draft
MicahGale wants to merge 296 commits into
beta_rel_devfrom
jit_parse
Draft

Beta implementation of Just In time parsing#960
MicahGale wants to merge 296 commits into
beta_rel_devfrom
jit_parse

Conversation

@MicahGale

@MicahGale MicahGale commented May 29, 2026

Copy link
Copy Markdown
Collaborator

Pull Request Checklist for MontePy

Description

Please provide a summary of the change, referencing the issue it fixes, if applicable. Include relevant context and motivation.

Fixes #529


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 or 26.
  • I have added tests that prove my fix is effective or that my feature works (if applicable).

LLM Disclosure

  1. Are you?

    • A human user
    • A large language model (LLM), including ones acting on behalf of a human
  2. Were any large language models (LLM or "AI") used in to generate any of this code?

  • Yes
    • Model(s) used: Claude (Sonnet 4.6), GH Copilot (?)
  • No

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:

  • This PR fully addresses and resolves the referenced issue(s).
  • 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--960.org.readthedocs.build/en/960/

MicahGale and others added 30 commits August 30, 2025 19:55
MicahGale and others added 30 commits June 10, 2026 10:36
Six bugs prevented TallyParser (and TallySegmentParser) from ever being
used; all tally inputs silently fell back to DataParser:

1. _load_correct_parser stored a parser instance instead of the class,
   so _parse_input's self._parser() call double-instantiated it.
2. DataInput.__init__ did not propagate _prefix when full_parse() called
   it without a prefix argument, so _load_correct_parser was skipped.
3. parse_data did not pass prefix= to the final DataInput() call.
4. Input.tokenize() had no lexer_class parameter, so parser-specific
   lexers (e.g. TallyLexer) could not be selected.
5. _parse_input did not forward parser._lexer_class to tokenize().
6. DataInput._KEYS_TO_PRESERVE did not include _prefix, so the prefix
   was not guaranteed to survive the JIT-to-full-parse transition.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1. It wasn't actually being used because reverse engineering was
   skipped, and so this was ignored.
2. the `g` style formatter is used in default cases, which auto switches
   to scientific notation when needed.
`g`, and `f`/`e` formatters treat precision differently.
`g` is used when there is no reverse engineering occurring, otherwise
`f`/`e` are used. Therefore the formatter precision changes meaning.
In rounding it is treated as being the number of digits right of the
decimal. This logic updates it so when `g` is used it now represents the
number of sig figs, so the rounding truncation logic still applies.
Updated default float precision to be basically machine precision.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…-tests

Fixed deprecated test fixtures breaking tests
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.2 to 6.0.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@de0fac2...df4cb1c)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…ns/checkout-6.0.3

Bump actions/checkout from 6.0.2 to 6.0.3
Started testing against python 3.15 dev releases.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…st arg.

cell.py was missing `Annotated` in its imports despite using it directly in the
lattice_type setter annotation under `from __future__ import annotations`, and
had `true` (lowercase) instead of `True`. Also removed the `jit_parse` keyword
argument from test_arbitrary_parse that parse() never accepted.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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. performance 🐌 Issues related to speed and memory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant