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

Add list source reference order validation #243

Merged
merged 19 commits into from
Jun 20, 2024

Conversation

petechd
Copy link
Contributor

@petechd petechd commented Jun 4, 2024

What is the context of this PR?

Adds validation of sources referencing lists, no longer list source for a given list can be referenced in a section that precedes the section in which the list collector itself for that list is set.

How to review

New invalid schema added and new unit test that checks the error message.

Checklist

  • eq-translations updated to support any new schema keys which need translation

@petechd petechd changed the title Add list source referenced validation Add list source reference order validation Jun 11, 2024
Copy link
Contributor

@liamtoozer liamtoozer left a comment

Choose a reason for hiding this comment

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

Looks great to me, and thanks for guiding me through the changes! Just had some extra questions

app/error_messages.py Outdated Show resolved Hide resolved
app/validators/questionnaire_schema.py Outdated Show resolved Hide resolved
app/validators/questionnaire_schema.py Outdated Show resolved Hide resolved
app/validators/questionnaire_schema.py Outdated Show resolved Hide resolved
app/validators/questionnaire_validator.py Outdated Show resolved Hide resolved
tests/test_questionnaire_validator.py Outdated Show resolved Hide resolved
app/validators/questionnaire_schema.py Outdated Show resolved Hide resolved
app/error_messages.py Outdated Show resolved Hide resolved
Copy link
Contributor

@Yuyuutsu Yuyuutsu left a comment

Choose a reason for hiding this comment

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

Validation works as expected, LGTM !

@petechd petechd merged commit 5b25ba8 into main Jun 20, 2024
3 checks passed
@petechd petechd deleted the list-source-referenced-before-created-validation branch June 20, 2024 13:34
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.

4 participants