qld-gov-au / ckanext-validation

CKAN extension for validating Data Packages using Table Schema.
Other
0 stars 3 forks source link

Changes for tasks CHDEXCHAE-4, CHDEXCHAE-6, CHDEXCHAE-22 #28

Closed mutantsan closed 2 years ago

mutantsan commented 2 years ago

Overview

Changes for tasks CHDEXCHAE-4, CHDEXCHAE-6, CHDEXCHAE-22


Please preserve this line to notify @amercader (lead of this repository)

duttonw commented 2 years ago

Please enable github actions and trigger the cicd pipeline. https://github.com/DataShades/ckanext-validation/actions

duttonw commented 2 years ago

pulled into repo, tests pass https://github.com/qld-gov-au/ckanext-validation/actions/runs/3109671064/jobs/5040101518

@ThrawnCA please review.

duttonw commented 2 years ago

Hi @mutantsan ,

After correcting flake, there is heaps of broken tests on your last commit a7a2a7115a1ddb3d08fff3d7324d64fadf941877 https://github.com/qld-gov-au/ckanext-validation/actions/runs/3156611065/jobs/5136502069

duttonw commented 2 years ago

pytest-factoryboy is a 2.10 (master) edition. It is not been backported on 2.9.x. nor 2.8.x of CKAN.

https://github.com/ckan/ckan/commit/6155426914ca8efa6562a0220fffc393a1174dc9

duttonw commented 2 years ago

Hi @iaroslav13 , @mutantsan ,

It need flake8 fixes and its not 2.9.x compatible. What is being used in testing is 2.10.x onwards, its too new.

Please check out some of the tweaks I've done in trying to reduce dealta diff on logic.py to logic/action.py. (also It is missing an injection/override, is this mean to be dropped?)

https://github.com/DataShades/ckanext-validation/compare/develop...qld-gov-au:ckanext-validation:CHDEXCHAE-4_CHDEXCHAE-6_CHDEXCHAE-22-DataShades_develop?expand=1

duttonw commented 2 years ago

ERROR: Cannot install -r ./requirements.txt (line 8) and factory-boy==2.1.1 because these package versions have conflicting dependencies.

The conflict is caused by: The user requested factory-boy==2.1.1 pytest-factoryboy 2.0.3 depends on factory_boy>=2.10.0

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts Service 'ckan' failed to build: The command '/bin/sh -c ${APP_DIR}/scripts/init-ext.sh' returned a non-zero code: 1

duttonw commented 2 years ago

What ckan environment are you testing against. After fixing flake and the inte connection to data-qld extension. I can't get it to pass tests on 2.8, 2.9-py2, 2.9 and 2.10. https://github.com/qld-gov-au/ckanext-validation/actions/runs/3201692534

compare delta here

commits: fix flake8, add py2 requirements Decouple from ckanext.data_qld.utils import is_api_call lock py2 versions Enable 2.10 and run lint first