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

Feature/corpus model validation #1266

Merged
merged 7 commits into from
Sep 26, 2023
Merged

Conversation

lukavdplas
Copy link
Contributor

@lukavdplas lukavdplas commented Sep 13, 2023

Add more validation functions to corpus models. This includes a few "soft checks" where the validator raises a warning instead of an error.

I also corrected one genuine error in the definition of DBNL.

addresses this point

@lukavdplas lukavdplas added code quality code & performance improvements that do not affect user functionality backend changes to the django backend corpus changes to corpus definitions or new corpora labels Sep 13, 2023
Copy link
Contributor

@JeltevanBoheemen JeltevanBoheemen left a comment

Choose a reason for hiding this comment

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

Nice work, well documented and tested.

backend/addcorpus/constants.py Show resolved Hide resolved
backend/addcorpus/filters.py Outdated Show resolved Hide resolved
backend/addcorpus/validators.py Outdated Show resolved Hide resolved
- change mapping types to enum values
- move forbidden field names to constants

Co-Authored-By: Jelte van Boheemen <[email protected]>
@lukavdplas lukavdplas force-pushed the feature/corpus-model-validation branch from 97283d4 to ceba0fb Compare September 14, 2023 09:29
@lukavdplas lukavdplas added the affects-elasticsearch-index changes that require re-indexing elasticsearch data label Sep 26, 2023
@lukavdplas
Copy link
Contributor Author

Labelled "affects elasticsearch index" because the DBNL mapping is adjusted and requires re-indexing. This should be possible without extracting from source data.

@lukavdplas lukavdplas merged commit fcba57a into develop Sep 26, 2023
1 check passed
@lukavdplas lukavdplas deleted the feature/corpus-model-validation branch September 26, 2023 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-elasticsearch-index changes that require re-indexing elasticsearch data backend changes to the django backend code quality code & performance improvements that do not affect user functionality corpus changes to corpus definitions or new corpora
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants