Skip to content

Additional error handling and testing#17

Merged
SBlokhuizen merged 26 commits intodevelopfrom
feature/additional-error-handling
Feb 14, 2025
Merged

Additional error handling and testing#17
SBlokhuizen merged 26 commits intodevelopfrom
feature/additional-error-handling

Conversation

@SBlokhuizen
Copy link
Copy Markdown
Collaborator

  • Added additional checks for the annotations objects of the tendencies. Currently it is only checked if the annotations are empty if we do not expect an error, and filled if we do expect an error. This can be done more rigorously in the future if we settle on specific error messages.
  • tests for waveform.py and annotations.py are introduced.
  • There were issues with the interpolated values of derivatives of piecewise tendencies, which are now fixed and tested.
  • Gaps and overlapping tendencies are now explicitly handled and tested. Gaps between tendencies are interpolated, whilst derivatives at gaps are set to 0.
  • The read_yaml_from_file method is updated to also use annotations.
  • Issue is solved where the first tendency of a repeated tendency would give an error, as it's previous tendency is set to the last tendency in the repeated tendency, causing the start to be later than previous' end.

@SBlokhuizen SBlokhuizen self-assigned this Feb 13, 2025
prev_tendency: The tendency precedes the current tendency.
"""
self.prev_tendency = prev_tendency
# If the tendency is the first tendency of a repeated tendency, it is linked to
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hmm, by doing this only during set_previous_tendency, we lose the declarative nature of updating the user_ parameters and let everything update itself (without re-instantiating all objects).

Though this is the case for all error handling (because any issue is just added to the existing annotations)...

Let's discuss? It works now, but the mix of some declarative logic (e.g. _calc_times) mixed with imperative logic (e.g. this method) could be confusing

@SBlokhuizen SBlokhuizen force-pushed the feature/additional-error-handling branch from e9d1ae6 to 0f4b788 Compare February 14, 2025 08:37
@SBlokhuizen SBlokhuizen merged commit 29201d6 into develop Feb 14, 2025
4 checks passed
@SBlokhuizen SBlokhuizen deleted the feature/additional-error-handling branch February 14, 2025 13:25
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.

2 participants