Skip to content

Rename compartment-backed PySB mapping IDs to _c, fixes #113#115

Open
FFroehlich with Copilot wants to merge 6 commits into
mainfrom
copilot/fix-mapping-table-errors
Open

Rename compartment-backed PySB mapping IDs to _c, fixes #113#115
FFroehlich with Copilot wants to merge 6 commits into
mainfrom
copilot/fix-mapping-table-errors

Conversation

Copilot AI commented Jul 4, 2026

Copy link
Copy Markdown

This updates the affected PySB v2 cases to use _c for mapping IDs that point to compartment-scaled species values.

  • Mapping ID cleanup

    • Renames compartment-backed mapping IDs in PySB cases 0010, 0011, 0013, and 0017:
      • AA_c
      • BB_c
    • Updates the corresponding condition-table references to keep the PEtab entities aligned with the mapping table.
  • Regenerated checked-in case artifacts

    • Refreshes the generated _conditions.tsv and _mapping.tsv files for those four cases so the checked-in artifacts match the source definitions.

Example of the intended rename:

problem.add_condition("c0", B_c=2)
problem.add_mapping("A_c", "A_() ** compartment")
problem.add_mapping("B_c", "B_() ** compartment")

Copilot AI changed the title [WIP] Fix invalid mapping table entries for PySB test cases Fix PySB observable/mapping name conflicts in test cases 0010, 0011, 0013, 0017 Jul 4, 2026
Copilot AI requested a review from FFroehlich July 4, 2026 14:30
Copilot AI changed the title Fix PySB observable/mapping name conflicts in test cases 0010, 0011, 0013, 0017 Revert unnecessary DEFAULT_PYSB_FILE changes and remove generated local model files Jul 4, 2026
Copilot AI changed the title Revert unnecessary DEFAULT_PYSB_FILE changes and remove generated local model files Rename compartment-backed PySB mapping IDs to _c and remove unintended model-file churn Jul 4, 2026
@FFroehlich FFroehlich changed the title Rename compartment-backed PySB mapping IDs to _c and remove unintended model-file churn Rename compartment-backed PySB mapping IDs to _c Jul 4, 2026
@FFroehlich FFroehlich requested a review from dweindl July 4, 2026 15:07
@FFroehlich FFroehlich changed the title Rename compartment-backed PySB mapping IDs to _c Rename compartment-backed PySB mapping IDs to _c, fixes #133 Jul 4, 2026
@FFroehlich FFroehlich changed the title Rename compartment-backed PySB mapping IDs to _c, fixes #133 Rename compartment-backed PySB mapping IDs to _c, fixes #113 Jul 4, 2026
@FFroehlich FFroehlich marked this pull request as ready for review July 4, 2026 21:03
Copilot AI review requested due to automatic review settings July 4, 2026 21:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This pull request standardizes PEtab v2 PySB case mapping identifiers for compartment-scaled species by renaming A/B mapping IDs to A_c/B_c in the affected cases, and adds a regression test to ensure all v2 cases pass PEtab linting.

Changes:

  • Renamed compartment-backed mapping IDs (AA_c, BB_c) and updated condition references in PySB v2 cases 0010, 0011, 0013, and 0017.
  • Regenerated checked-in _mapping.tsv and _conditions.tsv artifacts for those cases to match the updated source definitions.
  • Added a pytest regression test that lints all v2.0.0 cases for both SBML and PySB formats.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/test_general.py Adds a regression test to lint all v2.0.0 cases (sbml + pysb).
petabtests/cases/v2.0.0/pysb/0010/0010.py Updates condition keys and mapping IDs to use _c suffix.
petabtests/cases/v2.0.0/pysb/0010/_mapping.tsv Renames mapping entity IDs to A_c/B_c.
petabtests/cases/v2.0.0/pysb/0010/_conditions.tsv Updates condition target IDs to B_c.
petabtests/cases/v2.0.0/pysb/0011/0011.py Updates condition keys and mapping IDs to use _c suffix.
petabtests/cases/v2.0.0/pysb/0011/_mapping.tsv Renames mapping entity IDs to A_c/B_c.
petabtests/cases/v2.0.0/pysb/0011/_conditions.tsv Updates condition target IDs to B_c.
petabtests/cases/v2.0.0/pysb/0013/0013.py Updates condition keys and mapping IDs to use _c suffix.
petabtests/cases/v2.0.0/pysb/0013/_mapping.tsv Renames mapping entity IDs to A_c/B_c.
petabtests/cases/v2.0.0/pysb/0013/_conditions.tsv Updates condition target IDs to B_c.
petabtests/cases/v2.0.0/pysb/0017/0017.py Updates condition keys and mapping IDs to use _c suffix.
petabtests/cases/v2.0.0/pysb/0017/_mapping.tsv Renames mapping entity IDs to A_c/B_c.
petabtests/cases/v2.0.0/pysb/0017/_conditions.tsv Updates condition target IDs to A_c/B_c.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

Invalid (?) mapping table entries for PySB test cases

3 participants