Skip to content

Conversation

kovalch
Copy link
Contributor

@kovalch kovalch commented Jul 1, 2025

Make ckanext-switzerland python3 and CKAN2.11 compatible

Todo:

  • Fix group snippets that used to rely on having access to c.group_dict
  • Update controllers to blueprints:
    • perma
    • organization
    • group
  • Update tests
    • test_blueprints.py
    • test_date_helpers.py
    • test_date_validators.py
    • test_decorators.py
    • test_format_utils.py
    • test_helpers_backend.py
    • test_helpers_frontend.py
    • test_helpers_localize.py
    • test_helpers_terms_of_use.py
    • test_logic.py
    • test_middleware.py
    • test_plugin_utils.py
    • test_search.py
    • test_subscription_emails.py
    • test_validators.py
  • Require the updated-to-CKAN 2.11 version of ckanext-subscribe for the github tests, until we have merged that to main (Upgrade to python 3  ckanext-subscribe#9)
  • Fix bug that stops us saving datasets to Solr because the datetimes are in the wrong format (isoformat but no Z at the end). This is presumably due to a change in date handling in CKAN core that we are skipping or overriding in our code.
  • Adapt to new version of ckanext-hierarchy to make sure we always include child organisations when searching their parent organisation
  • Set up database migrations for ogdch_subscribe plugin (see CKAN 2.11: Handling migrations for a plugin that extends another plugin ckan/ckan#9047)
  • Figure out why search tests don't work on Github (are we setting up the Solr container wrong?)
  • ...

Still to check for templates:

  • macros
  • scheming
  • showcase
  • source
  • subscribe
  • user
  • xloader

kovalch and others added 30 commits July 1, 2025 08:59
Using flynt, ignoring line length.
…ode-using-2to3

Feat/update to python 3 code using 2to3
bellisk and others added 30 commits August 6, 2025 10:57
Applying migrations is now included in db init, which is an alias for db migrate.
…an-2.11

Feat/small updates for ckan 2.11
Also remove unneeded passing around of the userobj.
Update how we get the current user
In CKAN 2.11 we get a warning when config options are used that are not declared.
The file config_declarations.yaml contains config options used in several different plugins, but we can only load it once in total or we get an error (ValueError: ckanext.switzerland.foo already defined).
Also remove the pip command for the requirements.txt, as it is empty.
Add ignore_missing to the validators lists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants