Skip to content

Handle Omitted Hypthetical Solid Solutions in EQ3 Output - #194

Merged
dglmoore merged 4 commits into
devfrom
187-no-hypothetical-solid-solutions
Jul 13, 2026
Merged

Handle Omitted Hypthetical Solid Solutions in EQ3 Output#194
dglmoore merged 4 commits into
devfrom
187-no-hypothetical-solid-solutions

Conversation

@dglmoore

Copy link
Copy Markdown
Contributor

Summary

OutputParser3 failed to parse EQ3 (.3o) output files that omit the hypothetical solid
solutions
and fugacities sections. read_product_phases raised a PARSER_ERROR when the
"Saturation States of Hypothetical Solid Solutions" header was not found before EOF, even though
both sections are optional.

These two sections are optional but always appear together, with the hypothetical solid solutions
preceding the fugacities. parse() now probes for the leading header and only reads both sections
when it is present, skipping both when it is absent. The change is scoped to OutputParser3; the
shared base-class helpers (read_product_phases, read_fugacities) are untouched.

Closes #187.

Type of Change

  • Bug fix

Testing

Added test_can_parse_3o_without_hypothetical_solid_solutions, backed by a new
no-hypothetical-solid-solutions.3o fixture that omits both sections. The full parser suite passes,
including the existing fixtures that do contain the sections.

  • Existing tests pass (pytest)
  • New tests added to cover this change
  • Manually verified against a real EQ3/6 run (if applicable)

Checklist

  • Code follows the style guides (ruff check, ruff format, basedpyright)
  • Pre-commit hooks pass (pre-commit run --all-files)
  • Public functions and methods have type annotations and docstrings
  • CHANGELOG.md updated under [Unreleased] (for user-facing changes)

dglmoore added 4 commits July 13, 2026 13:46
The `consume_to_header` method leaves the parser state exactly where it
needs to be for the subsequent `read_product_phases`, so there's no
reason to rewind.
@dglmoore
dglmoore merged commit ab95eb0 into dev Jul 13, 2026
5 checks passed
@dglmoore
dglmoore deleted the 187-no-hypothetical-solid-solutions branch July 13, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant