GSA / datagov-ckan-multi

Other
10 stars 6 forks source link

ckanext-dcat-usmetadata Py3 + CKAN 2.9 support #572

Closed thejuliekramer closed 3 years ago

thejuliekramer commented 3 years ago

User Story

As a data.gov developer, I want ckanext-dcat-usmetadata running with CKAN 2.9 and Python 3 so that we can move out of CKAN 2.8 and reduce our technical debt and meet compliance standards.

Acceptance Criteria

Background

CKAN 2.9 extension tracker.

Details / tasks

The goal is to support running this extension against CKAN 2.9 (Python 3) and CKAN 2.8 (Python 2) environments. Please refer to the main CKAN documentation for Python 3 extensions migration. We're not following this guide exactly. Instead of creating a long-lived py3 branch, we should be merging often. New CI test suites don't need to required or to be fully passing in order to merge. It's only important that changes don't introduce new failures or break the existing test suites.

Below are a list of tasks. Depending on the extension's functionality, not all tasks will be actionable.

Tasks:

Additional resources:

nickumia-reisys commented 3 years ago

I think I ran this correctly, but this output looks weird..

caniusepython3 -r requirements.txt

/usr/lib/ckan/lib/python2.7/site-packages/OpenSSL/crypto.py:12: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release. from cryptography import x509 [WARNING] Skipping u'-e git+https://github.com/GSA/ckan.git@inventory': could not parse requirement [WARNING] Skipping u'-e git+https://github.com/ckan/ckanext-harvest.git@13dbb1eea428e6b274f98c36bf29d42e62a70af7': could not parse requirement [WARNING] Skipping u'-e git+https://github.com/GSA/ckanext-datajson.git@main': could not parse requirement [WARNING] Skipping u'-e git+https://github.com/GSA/USMetadata.git@master': could not parse requirement [WARNING] Skipping u'-e git+https://github.com/GSA/ckanext-googleanalyticsbasic.git@main': could not parse requirement [WARNING] Skipping u'-e git+https://github.com/GSA/ckanext-saml2.git@max': could not parse requirement [WARNING] Skipping u'-e git+https://github.com/GSA/webob.git@ckan-patch': could not parse requirement [WARNING] Skipping u'-e git+https://github.com/GSA/pysaml2.git@max': could not parse requirement Finding and checking dependencies ... [ERROR] Failed to get external data for https://www.red-dove.com/pypi/projects/P/pairtree/project.json: HTTP Error 404: Not Found Traceback (most recent call last): File "/usr/lib/ckan/lib/python2.7/site-packages/distlib/util.py", line 915, in _get_external_data resp = urlopen(url) File "/usr/local/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/usr/local/lib/python2.7/urllib2.py", line 437, in open response = meth(req, response) File "/usr/local/lib/python2.7/urllib2.py", line 550, in http_response 'http', request, response, code, msg, hdrs) File "/usr/local/lib/python2.7/urllib2.py", line 475, in error return self._call_chain(args) File "/usr/local/lib/python2.7/urllib2.py", line 409, in _call_chain result = func(args) File "/usr/local/lib/python2.7/urllib2.py", line 558, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) HTTPError: HTTP Error 404: Not Found [WARNING] pairtree not found; false-negatives possible [ERROR] Failed to get external data for https://www.red-dove.com/pypi/projects/P/pyutilib-component-core/project.json: HTTP Error 404: Not Found Traceback (most recent call last): File "/usr/lib/ckan/lib/python2.7/site-packages/distlib/util.py", line 915, in _get_external_data resp = urlopen(url) File "/usr/local/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/usr/local/lib/python2.7/urllib2.py", line 437, in open response = meth(req, response) File "/usr/local/lib/python2.7/urllib2.py", line 550, in http_response 'http', request, response, code, msg, hdrs) File "/usr/local/lib/python2.7/urllib2.py", line 475, in error return self._call_chain(args) File "/usr/local/lib/python2.7/urllib2.py", line 409, in _call_chain result = func(args) File "/usr/local/lib/python2.7/urllib2.py", line 558, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) HTTPError: HTTP Error 404: Not Found [WARNING] pyutilib-component-core not found; false-negatives possible

You need 12 projects to transition to Python 3. Of those 12 projects, 12 have no direct dependencies blocking their transition:

ckantoolkit jinja2 lepl markupsafe ofs passlib pylons repoze-who-friendlyform solrpy vdm weberror webhelpers

nickumia-reisys commented 3 years ago

Updated caniusepython3 ... ~/ckanext-dcat_usmetadata$ caniusepython3 -r requirements.txt [WARNING] Skipping '-e git+https://github.com/nickumia-reisys/ckanext-harvest.git@9d1f647d247c16b6c3acba26e321e9500cafb18c': could not parse requirement [WARNING] Skipping '-e git+https://github.com/GSA/ckanext-datajson.git@a3dfe6bc183022572092ee572e557270701950a4': could not parse requirement [WARNING] Skipping '-e git+https://github.com/GSA/USMetadata.git@master': could not parse requirement [WARNING] Skipping '-e git+https://github.com/GSA/ckanext-googleanalyticsbasic.git@47cedeb771f29a812e878cf05aea6c4faf838f55': could not parse requirement [WARNING] Skipping '-e git+https://github.com/keitaroinc/ckanext-saml2auth@main': could not parse requirement [WARNING] Skipping '-e git+https://github.com/Pylons/webob': could not parse requirement Finding and checking dependencies ...

You need 2 projects to transition to Python 3. Of those 2 projects, 2 have no direct dependencies blocking their transition:

ckantoolkit lepl