Skip to content

Update tutorials - #79

Merged
BSnelling merged 13 commits into
mainfrom
update_tutorials
Sep 25, 2026
Merged

BSnelling merged 13 commits into
mainfrom
update_tutorials

Conversation

@sebapersson

@sebapersson sebapersson commented May 21, 2026 •

Copy link
Copy Markdown
Collaborator

This PR updates the PEtab-SciML tutorials to:

  1. Ensure a consistent style across tutorials.
  2. Improve clarity and completeness (wording and a few additional details).
  3. Add examples for the HDF5 utility functions used to generate array-based input
    data.

The tutorial text is ready for review. The code snippets and accompanying PEtab files are
currently outdated and will be updated once the linter is in place. This can be done at a
later stage, and the PR should not be merged until then.

This PR is related to completing #23

@sebapersson
sebapersson requested review from BSnelling and dilpath May 21, 2026 09:06
Comment thread doc/examples/getting_started/getting_started.ipynb Outdated
Comment thread doc/examples/getting_started/getting_started.ipynb Outdated
Comment thread doc/examples/getting_started/getting_started.ipynb Outdated
Comment thread doc/examples/getting_started/getting_started.ipynb Outdated
Comment thread doc/examples/getting_started/getting_started.ipynb Outdated
Comment thread doc/examples/how_to_observable/how_to_observable.ipynb Outdated
Comment thread doc/examples/how_to_observable/how_to_observable.ipynb Outdated
Comment thread doc/examples/how_to_observable/how_to_observable.ipynb Outdated
Comment thread doc/examples/how_to_neural_ode/how_to_neural_ode.ipynb Outdated
Comment thread doc/examples/how_to_neural_ode/how_to_neural_ode.ipynb Outdated

@dilpath dilpath left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! Some comments apply to all notebooks, e.g. naming of inputs/outputs in the mapping table.

Comment thread doc/examples/getting_started/getting_started.ipynb Outdated
Comment thread doc/examples/getting_started/getting_started.ipynb Outdated
Comment thread doc/examples/getting_started/getting_started.ipynb Outdated
Comment thread doc/examples/getting_started/getting_started.ipynb Outdated
Comment thread doc/examples/getting_started/getting_started.ipynb Outdated
Comment thread doc/examples/how_to_dmms/how_to_dmms.ipynb Outdated
Comment thread doc/examples/how_to_dmms/how_to_dmms.ipynb Outdated
Comment thread doc/examples/how_to_neural_ode/how_to_neural_ode.ipynb Outdated
Comment thread doc/examples/how_to_neural_ode/how_to_neural_ode.ipynb Outdated
Comment thread doc/examples/how_to_observable/how_to_observable.ipynb Outdated
@codecov-commenter

codecov-commenter commented May 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.20%. Comparing base (bdc365d) to head (72f7811).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #79      +/-   ##
==========================================
+ Coverage   95.13%   95.20%   +0.06%     
==========================================
  Files           7        7              
  Lines         370      375       +5     
==========================================
+ Hits          352      357       +5     
  Misses         18       18              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sebapersson

Copy link
Copy Markdown
Collaborator Author

Thanks for the feedback!

I have now implemented it. Lets now wait for AMICI to update, then we can update the code, and finally merge this PR.

Comment thread doc/examples/how_to_dmms/how_to_dmms.ipynb Outdated
@sebapersson sebapersson linked an issue Jun 2, 2026 that may be closed by this pull request
@sebapersson sebapersson mentioned this pull request Jun 15, 2026
@BSnelling
BSnelling requested a review from dilpath September 16, 2026 12:50

@dilpath dilpath left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good! Thanks. No need to resolve all comments in this PR -- can instead create issues and I can then resolve some of them too.

Comment on lines +189 to 201
experiment_ids = measurements["experimentId"].unique()

# experiments
# Each experiment consists of a single simulation period starting at t=0.
# No conditions are applied, so the `conditionId` column is left empty.
experiments = {
"experimentId": experiment_ids,
"time": [0] * len(experiment_ids),
"conditionId": [None] * len(experiment_ids),
}
pd.DataFrame(experiments).to_csv(
save_directory / "experiments.tsv", sep="\t", index=False
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Experiments/conditions table is optional in PEtab v2

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

#93

Comment thread doc/examples/getting_started/getting_started.ipynb Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In general we could delete all outputs of the cells in all notebooks, and only render them on readthedocs

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Opened an issue for this one: #94

At the moment the outputs from some cells are included in order to make the docs read nicely, while others are deleted because their outputs are long/don't render nicely/include warnings. It'll be a bit of work to update them so they all execute cleanly (and prettily) so I'll make that a separate PR.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah OK. Fine for me if those "ugly" cells just have their output disabled if possible in the notebook, if it's some effort to make it pretty.

Comment thread doc/examples/how_to_observable/how_to_observable.ipynb Outdated
@BSnelling
BSnelling merged commit 3a712be into main Sep 25, 2026
7 checks passed
@BSnelling
BSnelling deleted the update_tutorials branch September 25, 2026 09:40
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.

DMM tutorial multiple simulation conditions

4 participants