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

ADX-949 ckanext-validation upgrade #132

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ celerybeat-schedule
# Environments
.env
.venv
venv
env/
venv/
ENV/
Expand Down
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
[submodule "ckan-extensions/ckanext-unaids"]
path = submodules/ckanext-unaids
url = git@github.com:/fjelltopp/ckanext-unaids.git
[submodule "ckan-extensions/ckanext-validation"]
path = submodules/ckanext-validation
url = git@github.com:/fjelltopp/ckanext-validation.git
[submodule "ckan-extensions/ckanext-blob-storage"]
path = submodules/ckanext-blob-storage
url = git@github.com:/fjelltopp/ckanext-blob-storage.git
Expand All @@ -46,3 +43,6 @@
[submodule "submodules/giftless"]
path = submodules/giftless
url = git@github.com:/fjelltopp/giftless.git
[submodule "ckan-extensions/ckanext-validation"]
path = submodules/ckanext-validation
url = git@github.com:fjelltopp/ckanext-validation.git
11 changes: 7 additions & 4 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@ fanstatic = "==1.1"
feedgen = "==0.9.0"
flask-babel = "==1.0.0"
flask-multistatic = "==1.0"
flask = "==1.1.1"
flask = "~=1.1.1"
funcsigs = "==1.0.2"
idna = "==3.3"
itsdangerous = "==1.1.0"
jinja2 = "==2.11"
lxml = ">=2.3"
mako = "==1.1.5"
markdown = "==2.6.7"
markupsafe = "==1.1.1"
markupsafe = "==2.0.1"
nose = "==1.3.7"
passlib = "==1.6.5"
polib = "==1.0.7"
Expand Down Expand Up @@ -86,7 +85,7 @@ importlib-resources = "*"
cffi = "==1.14.5"
cryptography = "~=3.4.7"
pycparser = "==2.20"
typing-extensions = "==4.2.0"
typing-extensions = "~=4.3.0"
typing = "==3.7.4.3"
ckantoolkit = ">=0.0.3"
python-slugify = "==4.0.0"
Expand All @@ -105,6 +104,10 @@ python-dotenv = "==1.0.0"
python-jose = "==3.3.0"
setuptools = "==67.2.0"
raven = "==6.10.0"
frictionless = {editable = true, ref = "jinja2_2_10_1", git = "https://github.com/fjelltopp/frictionless-py", extras=["ckan"]}
frictionless-geojson = {editable = true, ref = "v1.1.0rc1", git = "https://github.com/fjelltopp/frictionless-geojson"}
jinja2 = "==2.10.1"
tableschema = "==1.20.2"

[dev-packages]
beautifulsoup4 = "==4.9.1"
Expand Down
1,048 changes: 580 additions & 468 deletions Pipfile.lock

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions ckan/adx_config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,14 @@ ckanext.authz_service.jwt_private_key = -----BEGIN RSA PRIVATE KEY-----
ckanext.authz_service.jwt_public_key_file = /etc/ckan/jwt_public_key.pem
ckanext.bulk_file_uploader_default_fields = {"restricted_allowed_orgs": "unaids"}

ckanext.validation.schema_directory = /usr/lib/adx/submodules/unaids_data_specifications/table_schemas
ckanext.unaids.schema_directory = /usr/lib/adx/submodules/unaids_data_specifications/table_schemas
ckanext.validation.run_on_create_async = True
ckanext.validation.run_on_update_async = True
ckanext.validation.run_on_create_sync = False
ckanext.validation.run_on_update_sync = False
ckanext.validation.allow_invalid_data = True
ckanext.validation.default_validation_options = {"row_limit": 50000, "error_limit": 100, "skip_checks": ["extra-header"] }
ckanext.validation.formats = csv xlsx xls shp geojson
ckanext.validation.formats = csv xlsx xls geojson
ckanext.validation.default_validation_options = {"limit_rows": 50000, "limit_errors": 100, "skip_errors": ["extra-header"], "schema_sync": true}

ckanext.unaids.auth0_domain =
ckanext.unaids.oauth2_api_audience =
Expand Down
2 changes: 1 addition & 1 deletion submodules/ckanext-blob-storage
Submodule ckanext-blob-storage updated from 22ec1c to 184327
2 changes: 1 addition & 1 deletion submodules/ckanext-dhis2harvester
Submodule ckanext-dhis2harvester updated from ec7b84 to 2de503
2 changes: 1 addition & 1 deletion submodules/ckanext-emailasusername
Submodule ckanext-emailasusername updated from 1666a2 to 624da7
2 changes: 1 addition & 1 deletion submodules/ckanext-fork
Submodule ckanext-fork updated from 59a69e to 784ef4
2 changes: 1 addition & 1 deletion submodules/ckanext-restricted
Submodule ckanext-restricted updated from f0012f to 81924c
2 changes: 1 addition & 1 deletion submodules/ckanext-unaids
Submodule ckanext-unaids updated from 6f5168 to 8d6bcd
2 changes: 1 addition & 1 deletion submodules/ckanext-validation
Submodule ckanext-validation updated 92 files
+32 −43 .github/workflows/test.yml
+1 −6 .gitignore
+0 −1 LEAD.md
+226 −81 README.md
+0 −70 bin/travis-build.bash
+0 −14 bin/travis-run.sh
+0 −23 ckanext/validation/assets/css/validation.css
+0 −15 ckanext/validation/assets/js/module-validation-report.js
+0 −55 ckanext/validation/assets/js/validation-badge.js
+0 −241 ckanext/validation/assets/vendor/goodtables-ui/goodtables-ui.css
+0 −6,308 ckanext/validation/assets/vendor/goodtables-ui/goodtables-ui.js
+0 −2 ckanext/validation/assets/vendor/goodtables-ui/goodtables-ui.min.css
+0 −3 ckanext/validation/assets/vendor/goodtables-ui/goodtables-ui.min.js
+0 −51 ckanext/validation/assets/webassets.yml
+8 −11 ckanext/validation/cli.py
+3 −0 ckanext/validation/commands.py
+1 −1 ckanext/validation/controller.py
+0 −682 ckanext/validation/custom_checks.py
+20 −139 ckanext/validation/helpers.py
+ ckanext/validation/i18n/fr/LC_MESSAGES/ckanext-validation.mo
+53 −1,084 ckanext/validation/i18n/fr/LC_MESSAGES/ckanext-validation.po
+ ckanext/validation/i18n/pt_PT/LC_MESSAGES/ckanext-validation.mo
+50 −962 ckanext/validation/i18n/pt_PT/LC_MESSAGES/ckanext-validation.po
+188 −497 ckanext/validation/jobs.py
+108 −112 ckanext/validation/logic.py
+1 −2 ckanext/validation/model.py
+106 −100 ckanext/validation/plugin/__init__.py
+0 −6 ckanext/validation/presets.json
+ ckanext/validation/public/images/badges/ValidationBadges.odg
+ ckanext/validation/public/images/badges/en-error.gif
+ ckanext/validation/public/images/badges/en-failure.gif
+ ckanext/validation/public/images/badges/en-success.gif
+ ckanext/validation/public/images/badges/en-unknown.gif
+ ckanext/validation/public/images/badges/fr-error.gif
+ ckanext/validation/public/images/badges/fr-failure.gif
+ ckanext/validation/public/images/badges/fr-success.gif
+ ckanext/validation/public/images/badges/fr-unknown.gif
+ ckanext/validation/public/images/badges/pt_PT-error.gif
+ ckanext/validation/public/images/badges/pt_PT-failure.gif
+ ckanext/validation/public/images/badges/pt_PT-success.gif
+ ckanext/validation/public/images/badges/pt_PT-unknown.gif
+10 −3 ckanext/validation/templates/package/resource_read.html
+11 −9 ckanext/validation/templates/package/snippets/resource_item.html
+0 −37 ckanext/validation/templates/scheming/form_snippets/foreign_keys.html
+6 −3 ckanext/validation/templates/scheming/form_snippets/resource_schema.html
+0 −30 ckanext/validation/templates/scheming/form_snippets/validators.html
+4 −2 ckanext/validation/templates/scheming/snippets/errors.html
+1 −0 ckanext/validation/templates/validation/snippets/validation_asset.html
+7 −3 ckanext/validation/templates/validation/snippets/validation_report_dialog.html
+6 −4 ckanext/validation/templates/validation/snippets/validation_report_dialog_bs2.html
+1 −0 ckanext/validation/templates/validation/snippets/validation_resource.html
+13 −22 ckanext/validation/templates/validation/validation_read.html
+0 −6 ckanext/validation/tests/__init__.py
+0 −37 ckanext/validation/tests/conftest.py
+18 −0 ckanext/validation/tests/fixtures.py
+12 −25 ckanext/validation/tests/helpers.py
+0 −53 ckanext/validation/tests/test_custom_checks.py
+317 −346 ckanext/validation/tests/test_form.py
+70 −65 ckanext/validation/tests/test_helpers.py
+61 −74 ckanext/validation/tests/test_interfaces.py
+183 −192 ckanext/validation/tests/test_jobs.py
+468 −416 ckanext/validation/tests/test_logic.py
+145 −230 ckanext/validation/tests/test_plugin.py
+51 −52 ckanext/validation/tests/test_utils.py
+11 −12 ckanext/validation/tests/test_validators.py
+1 −1 ckanext/validation/utils.py
+6 −6 ckanext/validation/validators.py
+47 −0 ckanext/validation/views.py
+0 −0 ckanext/validation/webassets/.gitignore
+0 −0 ckanext/validation/webassets/css/validation-report-form.css
+0 −0 ckanext/validation/webassets/css/validation-report.css
+3 −0 ckanext/validation/webassets/css/validation.css
+3 −2 ckanext/validation/webassets/js/module-modal-dialog.js
+4 −2 ckanext/validation/webassets/js/module-resource-schema.js
+14 −0 ckanext/validation/webassets/js/module-validation-report.js
+25 −0 ckanext/validation/webassets/resource.config
+1,482 −0 ckanext/validation/webassets/vendor/frictionless-components/frictionless-components.css
+6,981 −0 ckanext/validation/webassets/vendor/frictionless-components/frictionless-components.js
+1,484 −0 ckanext/validation/webassets/vendor/frictionless-components/frictionless-components.min.css
+1 −0 ckanext/validation/webassets/vendor/frictionless-components/frictionless-components.min.css.map
+53 −0 ckanext/validation/webassets/vendor/frictionless-components/frictionless-components.min.js
+ ckanext/validation/webassets/vendor/frictionless-components/frictionless-components.min.js.gz
+1 −0 ckanext/validation/webassets/vendor/frictionless-components/frictionless-components.min.js.map
+1 −0 ckanext/validation/webassets/vendor/frictionless-components/zigzag.svg
+1 −0 ckanext/validation/webassets/vendor/frictionless-components/zigzagmask.svg
+47 −0 ckanext/validation/webassets/webassets.yml
+5 −0 conftest.py
+3 −0 dev-requirements-py2.txt
+1 −2 dev-requirements.txt
+0 −6 requirements.py3.txt
+4 −5 requirements.txt
+6 −4 setup.py
2 changes: 1 addition & 1 deletion submodules/giftless
Submodule giftless updated from d1dbbc to 3a0576
2 changes: 1 addition & 1 deletion submodules/unaids_data_specifications
Submodule unaids_data_specifications updated from e1a135 to 412701
Loading