Skip to content

Track readiness of our BNGL PEtab linter (BnglModel adapter) #437

Description

@wshlavacek

What this tracks

The readiness/hardening of our BNGL PEtab linter — BnglModel (pybnf/petab/bngl_model.py, ADR-0026, #420 Step A): a petab Model adapter for BNGL, backed by PyBNF's own BNGL parser and registered into a running petab via register_bngl(). It gives petablint the full model-level oracle for BNGL-based PEtab v2 problems with no BNG2.pl needed for enumeration.

This is a local tracker for getting our linter solid and trustworthy — nothing more.

Explicit non-goal

Contributing or offering this to libpetab-python / the PEtab community is OUT OF SCOPE here and requires explicit maintainer approval. Nothing in this issue authorizes or plans an upstream PR. The external-contribution path, if we ever choose it, is a separate decision (criteria parked at the bottom for reference only).

Readiness checklist (our linter)

  • petab Model ABC conformance — every introspection method (parameters + values, observables, functions, species, compartments; has_entity_with_id, is_state_variable, symbol_allowed_in_observable_formula, is_valid, …) backed correctly by the parsed entity sets.
  • petablint oracle parity — representative BNGL PEtab v2 problems lint with the full CheckModel + model-cross checks (not just table-level), matching expected verdicts.
  • Grammar hardening against BNG_vscode_extension/docs/bngl-grammar.md: compartments, molecule-type/component names, seed-species $ clamp, block aliases (molecules/species/rules), function arguments.
  • is_valid behavior pinned — today it shells to BNG2.pl --check when present and degrades to True otherwise; decide/document the intended contract and test both paths.
  • Test coverage — the export oracle (tests/test_petab_export.py) exercises the full validation task set via the registered BnglModel; add fixtures for the hardened grammar cases.
  • register_bngl() robustness — clean (re)registration, no global-state leakage across tests.

Parked — applies ONLY IF we later choose to offer it upstream (separate, explicitly-approved decision)

  • Decoupling from pybnf internals so BnglModel + pybnf.petab._bngl are standalone/vendorable.
  • Upstream spec/tooling accepting bngl as a first-class language (PEtab#436).
  • Licensing / CLA / naming / module home agreed with maintainers; maintenance commitment.

Refs: #420 (Step A, the adapter), ADR-0025 / ADR-0026.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions