Generator: fix a couple of issues with the Python profile#1376
Open
agarny wants to merge 1 commit intocellml:mainfrom
Open
Generator: fix a couple of issues with the Python profile#1376agarny wants to merge 1 commit intocellml:mainfrom
agarny wants to merge 1 commit intocellml:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes the Python generator profile so the generated code consistently uses snake_case array names (algebraic_variables, external_variables) rather than the previously emitted camelCase identifiers, addressing #1375.
Changes:
- Update the Python generator profile’s internal array name strings (and bump the emitted
__version__string). - Regenerate/update Python golden output files under
tests/resources/generator/**to use the corrected identifiers. - Update the recorded Python generator profile SHA1.
Reviewed changes
Copilot reviewed 79 out of 81 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/resources/generator/unknown_variable_as_external_variable/model.py | Update generated Python output to use external_variables/algebraic_variables and new version string. |
| tests/resources/generator/sine_model_imports/model.py | Update generated Python output to use algebraic_variables and new version string. |
| tests/resources/generator/robertson_model_1966/model.ode.py | Update generated Python output to use algebraic_variables and new version string. |
| tests/resources/generator/robertson_model_1966/model.dae.py | Update generated Python output to use algebraic_variables and new version string. |
| tests/resources/generator/ode_unknown_var_on_rhs/model.py | Update generated Python output version string. |
| tests/resources/generator/ode_multiple_odes_with_same_name/model.py | Update generated Python output version string. |
| tests/resources/generator/ode_multiple_dependent_odes_one_component/model.py | Update generated Python output version string. |
| tests/resources/generator/ode_multiple_dependent_odes/model.py | Update generated Python output version string. |
| tests/resources/generator/ode_constant_on_rhs_one_component/model.py | Update generated Python output version string. |
| tests/resources/generator/ode_constant_on_rhs/model.py | Update generated Python output version string. |
| tests/resources/generator/ode_const_var_on_rhs_one_component/model.py | Update generated Python output version string. |
| tests/resources/generator/ode_const_var_on_rhs/model.py | Update generated Python output version string. |
| tests/resources/generator/ode_computed_var_on_rhs_one_component/model.py | Update generated Python output version string. |
| tests/resources/generator/ode_computed_var_on_rhs/model.py | Update generated Python output version string. |
| tests/resources/generator/noble_model_1962/model.py | Update generated Python output to use algebraic_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.untracked.variables.with.externals.py | Update generated Python output to use algebraic_variables/external_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.untracked.variables.py | Update generated Python output version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.untracked.constants.with.externals.py | Update generated Python output to use algebraic_variables/external_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.untracked.constants.py | Update generated Python output to use algebraic_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.untracked.computed.constants.with.externals.py | Update generated Python output to use algebraic_variables/external_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.untracked.computed.constants.py | Update generated Python output to use algebraic_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.untracked.algebraic.variables.with.externals.py | Update generated Python output to use algebraic_variables/external_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.untracked.algebraic.variables.py | Update generated Python output version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.state.py | Update generated Python output to use algebraic_variables/external_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.py | Update generated Python output to use algebraic_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.external.py | Update generated Python output to use algebraic_variables/external_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.dependent.state.py | Update generated Python output to use algebraic_variables/external_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.dependent.constant.py | Update generated Python output to use algebraic_variables/external_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.dependent.computed.constant.py | Update generated Python output to use algebraic_variables/external_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.dependent.algebraic.py | Update generated Python output to use algebraic_variables/external_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.dae.for.tracking.untracked.variables.with.externals.py | Update generated Python DAE output to use algebraic_variables/external_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.dae.for.tracking.untracked.variables.py | Update generated Python DAE output to use algebraic_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.dae.for.tracking.untracked.constants.with.externals.py | Update generated Python DAE output to use algebraic_variables/external_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.dae.for.tracking.untracked.computed.constants.with.externals.py | Update generated Python DAE output to use algebraic_variables/external_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.dae.for.tracking.untracked.computed.constants.py | Update generated Python DAE output to use algebraic_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.dae.for.tracking.untracked.algebraic.variables.with.externals.py | Update generated Python DAE output to use algebraic_variables/external_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.dae.for.tracking.untracked.algebraic.variables.py | Update generated Python DAE output to use algebraic_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.dae.for.tracking.control.with.externals.py | Update generated Python DAE control output to use algebraic_variables/external_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.dae.for.tracking.control.py | Update generated Python DAE control output to use algebraic_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.constant.py | Update generated Python output to use algebraic_variables/external_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.computed.constant.py | Update generated Python output to use algebraic_variables/external_variables and new version string. |
| tests/resources/generator/hodgkin_huxley_squid_axon_model_1952/model.algebraic.py | Update generated Python output to use algebraic_variables/external_variables and new version string. |
| tests/resources/generator/dependent_eqns/model.py | Update generated Python output to use algebraic_variables and new version string. |
| tests/resources/generator/dae_cellml_1_1_model/model.py | Update generated Python DAE output to use algebraic_variables and new version string. |
| tests/resources/generator/cellml_unit_scaling_voi_indirect/model.py | Update generated Python output version string. |
| tests/resources/generator/cellml_unit_scaling_voi_direct/model.py | Update generated Python output version string. |
| tests/resources/generator/cellml_unit_scaling_state_initialised_using_variable/model.py | Update generated Python output version string. |
| tests/resources/generator/cellml_unit_scaling_state_initialised_using_constant/model.py | Update generated Python output version string. |
| tests/resources/generator/cellml_unit_scaling_state/model.py | Update generated Python output to use algebraic_variables and new version string. |
| tests/resources/generator/cellml_unit_scaling_rate/model.py | Update generated Python output to use algebraic_variables and new version string. |
| tests/resources/generator/cellml_unit_scaling_constant/model.py | Update generated Python output version string. |
| tests/resources/generator/cellml_state_initialised_using_variable/model.py | Update generated Python output version string. |
| tests/resources/generator/cellml_slc_example/model.py | Update generated Python output version string. |
| tests/resources/generator/cellml_mappings_and_encapsulations/model.py | Update generated Python output to use algebraic_variables and new version string. |
| tests/resources/generator/cell_geometry_model/model.py | Update generated Python output version string. |
| tests/resources/generator/cell_geometry_model/model.external.py | Update generated Python output to use external_variables/algebraic_variables and new version string. |
| tests/resources/generator/algebraic_unknown_var_on_rhs/model.py | Update generated Python output version string. |
| tests/resources/generator/algebraic_system_with_various_dependencies/model.ordered.py | Update generated Python output to use algebraic_variables and new version string. |
| tests/resources/generator/algebraic_system_with_various_dependencies/model.not.ordered.py | Update generated Python output to use algebraic_variables and new version string. |
| tests/resources/generator/algebraic_system_with_three_linked_unknowns/model.py | Update generated Python output to use algebraic_variables and new version string. |
| tests/resources/generator/algebraic_system_with_three_linked_unknowns/model.external.py | Update generated Python output to use external_variables and new version string. |
| tests/resources/generator/algebraic_eqn_with_one_non_isolated_unknown/model.py | Update generated Python output to use algebraic_variables and new version string. |
| tests/resources/generator/algebraic_eqn_with_one_non_isolated_unknown/model.external.py | Update generated Python output to use algebraic_variables/external_variables and new version string. |
| tests/resources/generator/algebraic_eqn_state_var_on_rhs_one_component/model.py | Update generated Python output to use algebraic_variables and new version string. |
| tests/resources/generator/algebraic_eqn_state_var_on_rhs/model.py | Update generated Python output to use algebraic_variables and new version string. |
| tests/resources/generator/algebraic_eqn_derivative_on_rhs_one_component/model.py | Update generated Python output to use algebraic_variables and new version string. |
| tests/resources/generator/algebraic_eqn_derivative_on_rhs/model.py | Update generated Python output to use algebraic_variables and new version string. |
| tests/resources/generator/algebraic_eqn_constant_on_rhs/model.py | Update generated Python output version string. |
| tests/resources/generator/algebraic_eqn_const_var_on_rhs/model.py | Update generated Python output version string. |
| tests/resources/generator/algebraic_eqn_computed_var_on_rhs/model.py | Update generated Python output version string. |
| tests/resources/generator/algebraic_eqn_computed_var_on_rhs/model.external.py | Update generated Python output to use external_variables/algebraic_variables and new version string. |
| tests/resources/coverage/generator/model.py | Update coverage golden Python output to match new variable naming (and should match version too). |
| tests/resources/coverage/generator/model.modified.profile.py | Update coverage golden modified-profile Python output to match new variable naming (and should match version post0 too). |
| src/generatorprofilesha1values.h | Update recorded SHA1 for the Python generator profile. |
| src/generatorprofile.cpp | Fix Python profile array name strings and bump emitted Python __version__. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 #1375.