Skip to content

Handle no interfaces case - #74

Merged
Joseph-Ellaway merged 7 commits into
mainfrom
handle-no-interfaces-case
Nov 13, 2026
Merged

Joseph-Ellaway merged 7 commits into
mainfrom
handle-no-interfaces-case

Conversation

@Joseph-Ellaway

Copy link
Copy Markdown
Member

I noticed this bug when trialling with a true monomer.

I've opened an issue to implement a feature that writes a status report, which can be read to check if an absent file indicates a true failure or a parsing error.

Write empty files. This should be reviewed once a job-status report feature is implemented
@Joseph-Ellaway Joseph-Ellaway self-assigned this Nov 13, 2026
Copilot AI balanced review requested due to automatic review settings November 13, 2026 10:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.

🟡 Changes recommended

Outstanding issues remain because the parser’s empty-results paths both produce schema-invalid JSON outputs (writing {} where required fields like interfaces, n_interfaces, and interface_types are missing) and, in the summary writer, may crash at runtime by opening gzip output in binary mode while json.dump writes text.

2 open issues
What changed in this PR

Handles “no interfaces” (e.g., true monomer) scenarios by making outputs deterministic so downstream steps can proceed when interface-derived inputs are absent.

Changes:

  • Bump project/package version to 3.5.3.
  • In post-processing, emit an empty interface table when interface summary input is empty/missing.
  • In parsers, add handling for missing/empty interface inputs to write empty JSON outputs (with warnings) instead of skipping file creation.
File Description
uv.lock Updates the lockfile to reflect the version bump and associated dependency resolution state.
pyproject.toml Bumps the project version to 3.5.3.
pisa_utils/​post_process_parsers.py Adds a guard to write an empty interface table output when the interface summary input is empty or missing.
pisa_utils/​parsers.py Adjusts parsing/summary compilation to handle missing or empty interface inputs by emitting empty JSON outputs and logging warnings.

Review effort: Balanced

Comment thread pisa_utils/parsers.py Resolved
Comment thread pisa_utils/parsers.py Resolved

@mihaitodor mihaitodor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread pisa_utils/parsers.py Resolved
@Joseph-Ellaway
Joseph-Ellaway merged commit 6d0632c into main Nov 13, 2026
8 checks passed
@Joseph-Ellaway
Joseph-Ellaway deleted the handle-no-interfaces-case branch November 13, 2026 11:40
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.

3 participants