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

Introduce CKAN versions to support CKAN API changes #215

Open
3 tasks
florianm opened this issue May 29, 2024 · 0 comments
Open
3 tasks

Introduce CKAN versions to support CKAN API changes #215

florianm opened this issue May 29, 2024 · 0 comments

Comments

@florianm
Copy link
Contributor

The CKAN API has deprecated some endpoints which are still active in ckanr, e.g.
packages_activity_list works at demo.ckan.org but is replated in CKAN 2.10 by recently_changed_packages_activity_list.

Run against a local CKAN 2.10: localhost:5000/api/3/action/package_activity_list?id=ckanr_test_dataset returns "Bad request - Action name not known: package_activity_list"

From the CKAN 2.7 release notes:

The activity stream related actions ending with *_list (eg package_activity_list) and *_html (eg package_activity_list_html) will be removed in CKAN 2.8 in favour of more efficient alternatives and are now deprecated.

To support older and newer CKAN versions, ckanr could

  • Add a ckanr_setup variable "CKAN_VERSION" with getters and setters
  • Alternatively, retrieve/confirm the CKAN version somehow (can't find in CKAN docs) from the running CKAN
  • Toggle functions depending on get_ckan_version() between working and warning ("This function has been deprecated/added in CKAN v2.x and is no longer / not yet available in the configured CKAN {CKAN_URL}, version {CKAN_VERSION}")
florianm added a commit to florianm/ckanr that referenced this issue May 29, 2024
* See ropensci#215: support multiple CKAN versions
* Disable tests for deprecated API endpoints as of CKAN 2.10
* Introduce a default for get_test_url and get_test_behaviour
* Format ckanr_settings
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

No branches or pull requests

1 participant