ckan / ckanext-validation

CKAN extension for validating Data Packages using Table Schema.
MIT License
28 stars 33 forks source link

Support foreign key validation #86

Open ChasNelson1990 opened 1 year ago

ChasNelson1990 commented 1 year ago

Description

closes #84

Basically, I have rewritten _validate_table to use the frictionless Package object, instead of the Resource object.

This allows us to then pass in multiple resources and do the following:

Testing

TODO - I am working on these.

Documentation

I have updated the documentation to explain how to use foreign keys. It's fairly brief at the moment but probably in line with other similar parts.

ChasNelson1990 commented 1 year ago

I think the lint failure is kinda incorrect - the lint Action is using Python 3.7.16 (which, as flake8 is saying, did not have the walrus operator); however, the minimum Python version for ckan with Python 3 is 3.8 (as documented here: https://docs.ckan.org/en/2.10/maintaining/installing/install-from-source.html) and Python 3.8 introduced the walrus operator.

So I have pushed a small commit to this branch that brings the lint GitHub Action in line with the CKAN-chosen python version 3.8. I have tested locally using act (using the nektos/act-environments-ubuntu:18.04 image) as I don't have the permissions to dispatch on Github.

ChasNelson1990 commented 1 year ago

@amercader - I appreciate you haven't had chance to review this yet but I was wondering if you could approve the workflow so that I can check my lint action change is fully working? Thanks!