Conversation
K20shores
reviewed
May 15, 2025
K20shores
requested changes
May 29, 2025
Collaborator
Author
|
Resolved conflicts - reopening pull request |
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds a new export pathway for Mechanism via a Serializer and updates related examples and tests.
- Adds
pyyamlas a dependency for YAML export. - Implements
Serializerwithto_dict/exportonMechanismandserializestatic methods on reaction classes. - Updates example files and adds tests to verify export behavior.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Added pyyaml>=6.0.2 dependency for YAML support. |
| musica/mechanism_configuration.py | Introduced Serializer, to_dict, export and class-specific serialize methods. |
| musica/mechanism_configuration.cpp | Removed the gas_phase binding for AqueousEquilibrium to match Python changes. |
| musica/test/test_serializer.py | New tests covering exporting via export and Serializer. |
| musica/test/examples/v1/full_configuration/full_configuration.yaml | Inserted __irrelevant fields in the YAML example. |
| musica/test/examples/v1/full_configuration/full_configuration.json | Inserted __irrelevant fields in the JSON example. |
Comments suppressed due to low confidence (2)
musica/mechanism_configuration.py:1113
- The
__init__signature still includes agas_phaseparameter that is no longer assigned in the body; remove this parameter to avoid unused or misleading parameters.
def __init__(
musica/test/test_serializer.py:47
- [nitpick] Consider adding a test for unsupported file extensions (e.g.,
.txt) to ensureserialize()raises the expected exception for invalid formats.
with pytest.raises(TypeError):
Collaborator
|
The fetch content errors happen because this branch lives on a fork. We can ignore those errors. The other windows actions that are failing are the same as in #374 |
K20shores
approved these changes
Jun 16, 2025
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.
Work completed for issue #345
Items pushed to a later PR