Documentation index, known-issues catalogue and MATLAB back-port doc#10
Merged
Conversation
read_yaml_model now opens+parses the file then delegates the post-parse work (capturing per-entry side-fields onto notes, restoring legacy metaData id/name, stashing unknown top-level sections onto model.notes['_yaml_sections']) to a new model_from_yaml_data(raw: dict) helper. This lets downstream packages that need to pre-normalise their YAML before cobra reads it (e.g. geckopy, which lifts legacy MATLAB ec-model quirks like top-level per-metabolite `smiles` into `annotation` and merges bare-`-` sequence-of-single-key-maps back to a mapping) hand the cleaned dict directly to the post-parse pipeline, without round-tripping through a temp file. Both functions are exported from raven_python.io.yaml. Pure refactor on the read side; no behaviour change for existing read_yaml_model callers.
cobra's model_to_dict serialises model.notes verbatim into the output doc as the 'notes' section. write_yaml_model already pops these three management keys from a local copy of model.notes to use them as top-level YAML fields, but the originals remained on model.notes and therefore also leaked into doc['notes'], producing duplicate sections in the file (the legitimate top-level emit AND a nested copy inside notes). Strip them from doc['notes'] post-model_to_dict and drop the notes section entirely when nothing else is left. Discovered while round-tripping a geckopy ecModel (it stashes ec-rxns / ec-enzymes / gecko_light on model.notes['_yaml_sections']); was visible as duplicated GECKO sections in the written YAML.
…d-matlab-docs # Conflicts: # src/raven_python/io/yaml.py
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.
The reader-facing documentation: the docs index, the function-by-function RAVEN→raven-python migration map, the CHANGELOG, the closed known-issues catalogue (sections A–F with regression-test pointers), and a consolidated list of fixes and improvements proposed for back-port into MATLAB RAVEN.
Base: feature/localization.