Skip to content

Generator: fix a couple of issues with the Python profile#1376

Open
agarny wants to merge 1 commit intocellml:mainfrom
agarny:issue1375
Open

Generator: fix a couple of issues with the Python profile#1376
agarny wants to merge 1 commit intocellml:mainfrom
agarny:issue1375

Conversation

@agarny
Copy link
Copy Markdown
Contributor

@agarny agarny commented Apr 17, 2026

Fixes #1375.

Copilot AI review requested due to automatic review settings April 17, 2026 21:06
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

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.

Generator: fix a couple of issues with the Python profile

2 participants