ADX-949 ADX-960 ckanext-validation upgrade #103
Merged
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
Deployment Note because we are essentially doing a 150+ commit rebase onto the latest frictionless/ckanext-validation we may want to close this PR with Git-Fu and not with a squash merge. Probably
development
should be temporarily renamed2023-08-08_development_retired
(or similar) and this branch renameddevelopment
. The same would then happen when merging to the main branch.Note I believe tests do actually pass (see #98) and that the failures here are because of the massive discrepancy between
development
and this branch.Foreign Key Validation
The main bulk of this work is foreign key validation; see ckan#86.
See ADX-960 for the main ticket on foreign-key validation.
See ckan#84 for the community discussion on foreign key validation.
Comparison between fjelltopp/ckanext-validation@development and frictionlessdata/[email protected] for context can be found here: development...frictionlessdata:ckanext-validation:v2.0.0
!BREAKING CHANGE!
Previously unaids_data_specifications used schema names for
schema["foreignKeys"][i]["reference"]["resource"]
but this didn't generalise as it very much assumes our fork of ckanext-scheming. Instead, I changed this to use what we callresource_type
... I think this has the pro that we won't have to update the our table_schemas if we updates our package_schemas - foreign keys will now always follow the package_schema whereas (theroretically) you could have had a table_schema with a foreign key using a different schema version than a package_schema, which seemed silly.relates fjelltopp/adx_deploy#350
relates fjelltopp/adx_develop#132
relates fjelltopp/ckanext-unaids#271 - Fjelltopp-specific logic and custom badges
relates fjelltopp/unaids_data_specifications#58 - potential breaking change
Checklist