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

Adds more testing/error verbosity, fixes nested previous records bug #25

Merged
merged 3 commits into from
Nov 19, 2024

Conversation

echeng06
Copy link
Collaborator

@echeng06 echeng06 commented Nov 19, 2024

Mostly just testing for weird situations, but also makes two algorithmic updates:

  • Fixes issue where datastore was not being set for the temp validator in _check_subschema_valid, causing nested conditions with previous records to not evaluate correctly (e.g. A1 EDUC case, where compare_with previous record was nested inside a temporalrules)
    • Fix was to just assume any sub-validator will use the same datastore/primary_key and set it
  • Updates compatibility errors to be more verbose - before we were not reporting what the then/else conditions were and so it was impossible to tell what was wrong if a then/else condition failed. Unfortunately that does mean the error messages are longer/uglier though.
    • Before there were also two COMPATIBILITY_FALSE and COMPATIBILITY_TRUE error messages that appeared to be the exact same thing, so I changed one of them to be COMPATIBILITY_ELSE to report when an else condition failed

@echeng06 echeng06 requested a review from hewanadun November 19, 2024 00:14
@echeng06 echeng06 changed the title Adds tests and fixes/update edge cases Adds more testing/error verbosity, fixes datastore bug Nov 19, 2024
@echeng06 echeng06 changed the title Adds more testing/error verbosity, fixes datastore bug Adds more testing/error verbosity, fixes nested previous records bug Nov 19, 2024
Copy link
Collaborator

@hewanadun hewanadun 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!

@echeng06 echeng06 merged commit a9e3555 into main Nov 19, 2024
1 check passed
@echeng06 echeng06 deleted the feature/add-tests branch November 21, 2024 00:43
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