Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

USMetadata Py3 + CKAN 2.9 support #581

Closed
18 tasks done
thejuliekramer opened this issue Feb 9, 2021 · 5 comments
Closed
18 tasks done

USMetadata Py3 + CKAN 2.9 support #581

thejuliekramer opened this issue Feb 9, 2021 · 5 comments
Assignees

Comments

@thejuliekramer
Copy link
Contributor

thejuliekramer commented Feb 9, 2021

User Story

As a data.gov developer, I want 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

  • WHEN I view CI
    THEN I see a successful job testing the extension under CKAN 2.9
    AND I see a successful job testing the extension under CKAN 2.8
  • WHEN I remove the tests
    THEN I see CI fail due to test coverage being below a threshold

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:

  • Update spreadsheet to indicate the extension upgrade is in progress
  • Rename default branch -> main.
  • Remove any CKAN 2.3 tests and functionality
  • Dependencies must be python 3 compatible (run caniusepython3 -r requirements.txt from within the virtualenv) and post the results to this issue (docs)
  • Add additional CI config for CKAN 2.8 and 2.9 Update CI config. These new CI jobs do not to be required yet (docs)
    • add code coverage reporting and required threshold (example)
  • Update documentation with compatibility table (docs)
    • Features
    • "Usage" (how to use/install/configure the extension) vs "Development" (how to test etc)
    • Required extensions and dependencies
    • "Weak" dependencies or how this code interacts with other extensions
  • Update/add docker-compose environment in order to run tests locally (example)
  • Update test suite (docs)
    • consider copying tests dir to tests/nose in order to preserve existing test environment (example)
    • replace nose with pytest (example)
  • Fix Python 3 issues / futurize code (docs)
    • Install future and run futurize --both-stages --write ckanext
  • Import from core ckan using toolkit (git grep -w 'paste\|pylons' should return no imports) (docs)
  • (optional) Create Mixin plugin implementations for Pylons / Flask (docs) (example)
  • Convert controllers to flask views/blueprints (docs)
  • Migrate Paster CLI commands to Click (docs)
  • Migrate js and css assets to Web assets (docs) (example)
  • Update templates (docs) (example)
    • you may want to split the template for CKAN >=2.9 in order to keep templates readable while maintaining backwards compatibility
    • update resource tags to asset for Web Assets
    • update controller='package' -> controller='dataset' or controller='resource'
  • Update spreadsheet to indicate the extension upgrade is complete

Additional resources:

@adborden adborden changed the title Add USmetadata to CKAN 2.9 USmetadata Py3 + CKAN 2.9 support May 26, 2021
@adborden adborden changed the title USmetadata Py3 + CKAN 2.9 support USMetadata Py3 + CKAN 2.9 support May 26, 2021
@mogul
Copy link
Contributor

mogul commented Jul 22, 2021

No issues with trying to keep up with the upstream; Marina definitely isn't working on/maintaining that. We should probably just be disconnecting our fork (giving her credit).

This means there's no need to worry about resolving our 401 commits ahead of the upstream.

@nickumia-reisys
Copy link

nickumia-reisys commented Jul 28, 2021

@mogul Do we want to rename the repo to ckanext-usmetadata to follow the standard for extensions?

Also, can we rename the master branch to main

@mogul
Copy link
Contributor

mogul commented Jul 28, 2021

@mogul Do we want to rename the repo to ckanext-usmetadata to follow the standard for extensions?

Also, can we rename the master branch to main

Both done:
image

@jbrown-xentity
Copy link
Contributor

I will search and destroy all references to old repo and master branch.

@nickumia-reisys
Copy link

~/ckanext-usmetadata$ caniusepython3 -r requirements.txt
Finding and checking dependencies ...

🎉 You (potentially) have 0 projects blocking you from using Python 3!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants