Repository navigation
enh: use dcor_group_list_for_user for listing user collections - #122
Merged
paulmueller merged 1 commit intoOct 23, 2026
Merged
Conversation
`APIInterrogator.get_collections_user` now uses the new API action `dcor_group_list_for_user` (ckanext-dcor_schemas >= 1.2.0), which returns the collections a user is a member of in a single request. If the server does not know the action, DCOR-Aid falls back to checking the members of all collections (one request per collection). Closes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
paulmueller-agent
force-pushed
the
feat-group-list-for-user
branch
from
October 23, 2026 10:38
a74f99f to
f3a64bd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #108. Client side of DCOR-dev/ckanext-dcor_schemas#41 (merged).
Changes
APIInterrogator.get_collections_user()(used for "shared with me" datasets and cached byCachedAPIInterrogator):dcor_group_list_for_user, which returns the user's collections in any capacity in one request.APIBadRequestwith "Action name not known" (servers without ckanext-dcor_schemas 1.2.0), it logs an INFO message and falls back to the previous behaviour: page through all collections and checkmember_listfor each one.APIBadRequestis raised as before, so real errors don't silently trigger the slow path.[]without any request.The action returns the same collection dictionaries (via
group_list_dictize) asgroup_listwithall_fields=True, which the fallback returns.Tests
tests/test_dbmodel_api_lists.py(offline, mocked API):test_get_collections_user: the server supports the action, so only one request is madetest_get_collections_user_fallback: the server answers "Action name not known", so it falls back tomember_listfor all 40 collections and gives the same resulttest_get_collections_user_other_bad_request: other bad requests are raisedtest_dbmodel_api.pyandtest_dbmodel_api_cache.pypass via the fallback (6 passed). Once dcor-dev runs ckanext-dcor_schemasmaster, the same tests exercise the new action.#121 also adds a CHANGELOG line; whichever of the two is merged second needs a trivial rebase.
🤖 Generated with Claude Code