Expand constraint coverage and document audit decisions for #14#28
Open
Abhishek-Kumar-Rai5 wants to merge 1 commit intoPecanProject:mainfrom
Open
Conversation
Author
|
@dlebauer sir, please have a look into this whenever you have a second and provide your review and suggestions on this. |
13 tasks
d74da8e to
97bc47a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Expands constraint coverage for Issue #14 by adding high-value data integrity constraints derived from the BETYdb constraint audit, extending validation logic and tests, and documenting explicit coverage decisions for implemented vs deferred constraints.
This PR includes:
Expanded Frictionless-native constraints in
datapackage.jsonfor:Expanded custom constraints in
inst/extdata/custom_constraints.yamlfor:Additional candidate constraints were reviewed and explicitly deferred after empirical validation (rather than silently omitted), including management event uniqueness and prior uniqueness keys.
Added/expanded validation logic and tests in:
R/validate.RR/validate_custom.Rtests/testthat/test_constraints.RAdded documentation:
docs/constraint-validation.mddocs/constraint-decisions.mdRemoved duplicate obsolete constraint source:
data-raw/custom_constraints.yamlBuild-time filtering/quarantine in
make-data.Ris intentionally retained and documented, but not redesigned in this PR.Note:
A pre-existing legacy test expecting
traitsview > 40000rows continues to fail locally because current packaged data contains ~18010 filtered/public records; this is unrelated to the constraint additions in this PR.Related Issue(s)
Closes #14
Also fulfills and supersedes the machine-readable constraint definition work in #22, now extending that schema foundation with validation logic, tests, and coverage documentation.
Type of Change
Checklist
devtools::check()with no errors or warnings(
devtools::test()passes except for one unrelated pre-existing row-count test)Data Changes (if applicable)
data-raw/make-data.RAdditional Notes
Scope intentionally focuses on high-value constraints for shipped tables and documents deferred constraints with rationale, rather than attempting exhaustive migration of all historical BETYdb constraints.
Two candidate uniqueness constraints were intentionally moved from proposed implementation to deferred status after validation against shipped data showed current uniqueness assumptions were too broad.
This PR includes both implementation and coverage-decision documentation in response to review comments requesting explicit treatment of constraints not migrated.