Skip to content

Resource View & DataStore Fields for Loading Objects#229

Merged
wardi merged 17 commits into
ckan:masterfrom
JVickery-TBS:feature/resource-options
May 23, 2026
Merged

Resource View & DataStore Fields for Loading Objects#229
wardi merged 17 commits into
ckan:masterfrom
JVickery-TBS:feature/resource-options

Conversation

@JVickery-TBS
Copy link
Copy Markdown
Contributor

Adds the ability to load the resource_views and datastore_fields from the CKANAPI dump options.

cc: @wardi

- Load resource views from ckanapi dump.
- Load resource datastore fields from ckanapi dump.
- Update the cli help text.
- Update the cli help text.
- Update the cli help text.
Comment thread ckanapi/cli/main.py Outdated
Comment thread ckanapi/cli/load.py
Comment thread ckanapi/cli/load.py Outdated
Comment thread ckanapi/cli/load.py Outdated
Comment thread ckanapi/cli/load.py Outdated
- Update the cli help text.
- Update the cli help text.
@JVickery-TBS JVickery-TBS requested a review from wardi May 11, 2026 15:34
@JVickery-TBS
Copy link
Copy Markdown
Contributor Author

@wardi okay I believe I have achieved everything here now

Comment thread ckanapi/cli/load.py Outdated
Comment thread ckanapi/cli/load.py
Comment thread ckanapi/cli/load.py Outdated
@wardi
Copy link
Copy Markdown
Contributor

wardi commented May 15, 2026

Tests can be added by creating mocks for the actions. We should at least cover the happy path and exceptions from each action to make sure they're handled.

@JVickery-TBS
Copy link
Copy Markdown
Contributor Author

Just working on the tests now for this. oh and adding the documentation for expected resource IDs...

- Test coverage for resource view loading.
- Test coverage for datastore field loading.
- Test coverage for datastore field loading.
@JVickery-TBS
Copy link
Copy Markdown
Contributor Author

@wardi okay I think I have covered everything in the new tests now. There were a lot of new things from this, so lots in the tests :/

@JVickery-TBS JVickery-TBS requested a review from wardi May 22, 2026 13:47
@JVickery-TBS
Copy link
Copy Markdown
Contributor Author

TODO: exclude resource id (& package id?) from the resource_view dumpy. And then just use the wrapped resource id for loading.

- Test coverage for datastore field loading.
@JVickery-TBS
Copy link
Copy Markdown
Contributor Author

@wardi as discussed I have popped out the resource_id and package_id from the view dicts. And then just using the parent resource id in the load

- Test coverage for datastore field loading.
- Test coverage for datastore field loading.
@wardi
Copy link
Copy Markdown
Contributor

wardi commented May 23, 2026

This could be improved with support for table designer fields, indexes etc but it's useful so I'll merge it as is.

@wardi wardi force-pushed the feature/resource-options branch from 70e9f4f to f56aca4 Compare May 23, 2026 14:26
@wardi wardi force-pushed the feature/resource-options branch from f56aca4 to 39ca38d Compare May 23, 2026 14:35
@wardi wardi merged commit 94b8c24 into ckan:master May 23, 2026
6 checks passed
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.

2 participants