Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pickling, hash & equality details #849

Merged
merged 12 commits into from
Feb 5, 2022
Merged

Pickling, hash & equality details #849

merged 12 commits into from
Feb 5, 2022

Conversation

MichaelClerx
Copy link
Member

@MichaelClerx MichaelClerx commented Feb 4, 2022

See #842

  • Pickling an expression now raises an error which suggests an alternative way to serialise expressions.
  • myokit.parse_expression() now accepts a model as a context.
  • model comparison with == is now back to the default is implementation. The old == overload is available as Model.is_similar
  • Model.get() and Component.get() raise errors if objects from a different model are passed in
  • Hashes for equation and quantity were fixed, equations are now immutable.

@codecov
Copy link

codecov bot commented Feb 4, 2022

Codecov Report

Merging #849 (e469f09) into main (7742f84) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #849   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          104       104           
  Lines        20335     20345   +10     
=========================================
+ Hits         20335     20345   +10     
Impacted Files Coverage Δ
myokit/_protocol.py 100.00% <ø> (ø)
myokit/_expressions.py 100.00% <100.00%> (ø)
myokit/_model_api.py 100.00% <100.00%> (ø)
myokit/_parsing.py 100.00% <100.00%> (ø)
myokit/_unit.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7742f84...e469f09. Read the comment docs.

…tive way to serialise expressions. myokit.parse_expression() now accepts a model as a context. Closes #842.
@MichaelClerx MichaelClerx merged commit f2f381c into main Feb 5, 2022
@MichaelClerx MichaelClerx deleted the 842-pickle-expr branch February 5, 2022 13:51
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.

1 participant