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

Assertions #8

Merged
merged 19 commits into from
Dec 18, 2024
Merged

Assertions #8

merged 19 commits into from
Dec 18, 2024

Conversation

Jorgelmh
Copy link
Collaborator

This PR introduces the possibility to automate the process of running tests in the form of assertions after running one or more cases. Assertions will be evaluated after running the simulation and the results will be displayed by the CLI:

image

The format to write the assertions can be viewed from the examples, but in principle it could be checking values at a certain point in time or check that a value complies with a temporal specification inspired by Signal Temporal Logic. This is how the assertions look like in the cases file:

image

src/sim_explorer/models.py Show resolved Hide resolved
src/sim_explorer/cli/display_results.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@ClaasRostock ClaasRostock left a comment

Choose a reason for hiding this comment

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

Looks good! We can consider to lift the code quality a bit in general (e.g. with regard to typing), but this is independent of your PR :-)
Great idea with the rich console, and great work!

@Jorgelmh Jorgelmh merged commit ad2ccb0 into main Dec 18, 2024
9 checks passed
@Jorgelmh Jorgelmh deleted the feature/assertions branch December 18, 2024 08:08
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.

3 participants