Repository navigation
Add support for CellML imports - #638
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
A moderate active defect remains in pathFromUrl(), which can miscompute relative-import paths when a URI query or fragment contains a slash.
1 open issue
What changed in this PR
Adds support for resolving CellML imports across local files, remote URLs, in-memory files, nested imports, cyclic dependencies, and COMBINE archives.
Changes:
- Added recursive CellML import retrieval, parsing, caching, cycle handling, and error propagation.
- Added shared URI and file-location resolution utilities for CellML and SED-ML processing.
- Expanded C++, Python, and JavaScript test coverage with imported-model fixtures and error cases.
| File | Description |
|---|---|
| VERSION.txt | Updates the project version. |
| tests/support/cellml/basictests.cpp | Adds tests for local, remote, nested, in-memory, invalid, and cyclic CellML imports. |
| tests/res/support/cellml/model_with_various_imports/other_component.cellml | Provides an imported component fixture with a nested units import. |
| tests/res/support/cellml/model_with_various_imports/model.cellml | Provides a fixture exercising multiple import paths and URL forms. |
| tests/res/support/cellml/model_with_unsupported_scheme_import.cellml | Provides a fixture containing an import with an unsupported URI scheme. |
| tests/res/support/cellml/model_with_null_character_import.cellml | Provides a fixture testing rejection of a percent-encoded null character in an import path. |
| tests/res/support/cellml/model_with_nested_imports/units.cellml | Provides units for nested import tests. |
| tests/res/support/cellml/model_with_nested_imports/model.cellml | Provides the root model for nested import tests. |
| tests/res/support/cellml/model_with_nested_imports/components/component.cellml | Provides a component with its own units import. |
| tests/res/support/cellml/model_with_invalid_xml_import.cellml | Provides a fixture testing imports that point to invalid XML. |
| tests/res/support/cellml/model_with_invalid_cellml_import/units.cellml | Provides an invalid CellML import target. |
| tests/res/support/cellml/model_with_invalid_cellml_import/model.cellml | Provides a model that imports invalid CellML. |
| tests/res/support/cellml/model_with_import_cycle/b.cellml | Defines one side of an import cycle fixture. |
| tests/res/support/cellml/model_with_import_cycle/a.cellml | Defines the other side of an import cycle fixture. |
| tests/bindings/python/test_sed_instance.py | Adds Python integration tests for executing simulations using imported CellML models. |
| tests/bindings/javascript/sed.instance.test.js | Adds JavaScript integration tests for executing simulations using imported CellML models. |
| tests/api/sed/instancetests.cpp | Adds C++ API integration tests for imported CellML models and COMBINE archives. |
| src/support/sedml/sedmlfile.cpp | Uses shared URI resolution when locating SED-ML model sources. |
| src/support/sedml/sedmlfile_p.h | Stores shared file-location metadata for SED-ML files. |
| src/support/combine/combinearchive.cpp | Defers archive child type detection until all child contents are available. |
| src/support/cellml/cellmlfile.cpp | Implements recursive CellML import retrieval, caching, parsing, registration, and resolution. |
| src/support/cellml/cellmlfile_p.h | Declares CellML import-resolution support. |
| src/misc/utils.h | Declares shared file-location and URI-resolution utilities. |
| src/misc/utils.cpp | Implements shared file-location construction and URI-reference resolution. |
Review effort: Lite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #541.