Skip to content

Collapse repeated commas in action normalization#90

Merged
jrfaeder merged 1 commit into
RuleWorld:mainfrom
wshlavacek:modelapi-b4-collapse-double-commas
May 12, 2026
Merged

Collapse repeated commas in action normalization#90
jrfaeder merged 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

@jrfaeder
Copy link
Copy Markdown
Contributor

@wshlavacek : This branch has conflicts. Please resolve them and let me know when it's ready to go.

@wshlavacek
Copy link
Copy Markdown
Contributor Author

@jrfaeder conflicts resolved and the branch has been rebased onto current main. It should be ready for another look.

@wshlavacek wshlavacek force-pushed the modelapi-b4-collapse-double-commas branch from 1642d9e to 8f505e9 Compare May 12, 2026 17:08
@jrfaeder jrfaeder merged commit e9c3e5e into RuleWorld:main May 12, 2026
17 checks passed
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