Beta implementation of Just In time parsing#960
Draft
MicahGale wants to merge 296 commits into
Draft
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
blackversion 25 or 26.LLM Disclosure
Are you?
Were any large language models (LLM or "AI") used in to generate any of this code?
Documentation Checklist
First-Time Contributor Checklist
pyproject.tomlif you wish to do so.Additional Notes for Reviewers
Ensure that:
📚 Documentation preview 📚: https://montepy--960.org.readthedocs.build/en/960/