Skip to content

Strip stray unquoted backslashes in action normalization - #89

Merged
jrfaeder merged 1 commit into
RuleWorld:mainfrom
wshlavacek:modelapi-b4-strip-unquoted-backslashes
May 12, 2026
Merged

Strip stray unquoted backslashes in action normalization#89
jrfaeder merged 1 commit into
RuleWorld:mainfrom
wshlavacek:modelapi-b4-strip-unquoted-backslashes

Conversation

@wshlavacek

Copy link
Copy Markdown
Contributor

Summary

  • extend _normalize_action_text() to drop stray \ characters outside quoted strings
  • preserve backslashes inside quoted strings
  • add focused regression coverage in tests/test_bng_parsing.py

Why

BNG2.pl tolerates typo residue like ,\log_scale=>1, but the pyparsing action parser does not.

Testing

  • uv run python -m pytest -q tests/test_bng_parsing.py
  • uvx black --check bionetgen/modelapi/bngparser.py tests/test_bng_parsing.py

@jrfaeder
jrfaeder merged commit 763888c into RuleWorld:main May 12, 2026
17 checks passed
@wshlavacek
wshlavacek deleted the modelapi-b4-strip-unquoted-backslashes branch May 15, 2026 15:14
jrfaeder pushed a commit that referenced this pull request Jul 20, 2026
…89)

* Fix nbopen standard output and error handling in notebook generation

Co-authored-by: akutuva21 <44119804+akutuva21@users.noreply.github.com>

* chore: PR #89 remove forbidden artifacts and run black

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
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.

2 participants