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

test: saving and loading StateDataClass objects #55

Merged
merged 86 commits into from
Nov 30, 2023

Conversation

hollandjg
Copy link
Member

@hollandjg hollandjg commented Nov 20, 2023

Description

Add robust testing of saving and loading StateDataClass objects using the following modules:

  • pickle (default)
  • dill
  • pyyaml

either saving to and loading from a:

  • byte-string, or
  • file on disk

Not included here:

Type of change

  • test: Adding missing tests or correcting existing tests

Features

  • add hypothesis tests of:
    • StateDataClass
    • Variable (required by StateDataClass)
    • VariableCollection (required by StateDataClass)
  • Add new ValueType for boolean and integer (for completeness)

ToDo:

  • Fix errors due to too slow

@hollandjg
Copy link
Member Author

Issue: need to speed up example generation for the state object so we can reintroduce the too_slow health check

@hollandjg hollandjg self-assigned this Nov 22, 2023
@hollandjg hollandjg marked this pull request as ready for review November 29, 2023 19:02
Copy link
Contributor

@younesStrittmatter younesStrittmatter left a comment

Choose a reason for hiding this comment

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

Loving this. To be honest, I don't have the expertise to review this super throughly but I ran it and read through the code. I think I have a grasp on it and understand it, but would not be able to spot errors easily. We should work on adapt this to other parts of autora though (at least to core contributions).

@hollandjg hollandjg added this pull request to the merge queue Nov 30, 2023
Merged via the queue into main with commit 24478cf Nov 30, 2023
16 checks passed
@hollandjg hollandjg deleted the test/saving-loading-states branch November 30, 2023 20:44
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.

test: add robust testing of the State
2 participants