Skip to content

Collapse repeated commas in action normalization#90

Open
wshlavacek wants to merge 1 commit into
RuleWorld:mainfrom
wshlavacek:modelapi-b4-collapse-double-commas
Open

Collapse repeated commas in action normalization#90
wshlavacek wants to merge 1 commit into
RuleWorld:mainfrom
wshlavacek:modelapi-b4-collapse-double-commas

Conversation

@wshlavacek
Copy link
Copy Markdown
Contributor

Summary

  • extend _normalize_action_text() to collapse repeated commas that appear outside quoted strings
  • preserve repeated commas inside quoted strings
  • add focused regression coverage in tests/test_bng_parsing.py

Why

BNG2.pl tolerates malformed action text like n_steps=>20,,print_functions=>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

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