From 7a4c63e62709037c8cf5d9f7880abaab73dc4f2f Mon Sep 17 00:00:00 2001 From: Jesse Vickery Date: Tue, 23 Dec 2025 20:22:11 +0000 Subject: [PATCH 1/3] feat(dev): package list; - More arguments for package list for `--all` dataset dump. --- ckanapi/cli/dump.py | 5 ++++- ckanapi/cli/main.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ckanapi/cli/dump.py b/ckanapi/cli/dump.py index b2d2d2b..a0157ad 100644 --- a/ckanapi/cli/dump.py +++ b/ckanapi/cli/dump.py @@ -57,7 +57,10 @@ def dump_things(ckan, thing, arguments, }[thing] params = dict( all_fields=False, # for user_list - ) + include_private=arguments['--include-private'], # for package_list + include_drafts=arguments['--include-drafts'], # for package_list + include_deleted=arguments['--include-deleted'], # for package_list + ) names = ckan.call_action(get_thing_list, params) else: diff --git a/ckanapi/cli/main.py b/ckanapi/cli/main.py index 04ce7f5..566d999 100644 --- a/ckanapi/cli/main.py +++ b/ckanapi/cli/main.py @@ -14,7 +14,7 @@ [[-c CONFIG] [-u USER] | -r SITE_URL [-a APIKEY] [--insecure]] ckanapi dump (datasets | groups | organizations | users | related) (ID_OR_NAME ... | --all) ([-O JSONL_OUTPUT] | [-D DIRECTORY]) - [-p PROCESSES] [-dqwzRU] + [-p PROCESSES] [-dqwzRU --include-private --include-drafts --include-deleted] [[-c CONFIG] [-u USER] | -r SITE_URL [-a APIKEY] [-g] [--insecure]] ckanapi load datasets [--upload-resources] [-I JSONL_INPUT] [-s START] [-m MAX] @@ -44,6 +44,9 @@ defaults to $CKAN_INI or development.ini -d --datastore-fields export datastore field information along with resource metadata as datastore_fields lists + --include-private include private datasets in the dump + --include-drafts include draft datasets in the dump + --include-deleted include deleted datasets in the dump -D --datapackages=DIR download resources and output as datapackages in DIR instead of metadata-only json lines -g --get-request use GET instead of POST for API calls From b151bd85b763a50ca9ed33e9d9686c5657c29bf0 Mon Sep 17 00:00:00 2001 From: Jesse Vickery Date: Tue, 23 Dec 2025 20:29:26 +0000 Subject: [PATCH 2/3] fix(lint): typing; - Fix syntax errors. --- ckanapi/cli/dump.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ckanapi/cli/dump.py b/ckanapi/cli/dump.py index a0157ad..cc10a3f 100644 --- a/ckanapi/cli/dump.py +++ b/ckanapi/cli/dump.py @@ -57,9 +57,12 @@ def dump_things(ckan, thing, arguments, }[thing] params = dict( all_fields=False, # for user_list - include_private=arguments['--include-private'], # for package_list - include_drafts=arguments['--include-drafts'], # for package_list - include_deleted=arguments['--include-deleted'], # for package_list + include_private=arguments.get( + '--include-private', False), # for package_list + include_drafts=arguments.get( + '--include-drafts', False), # for package_list + include_deleted=arguments.get( + '--include-deleted', False), # for package_list ) names = ckan.call_action(get_thing_list, params) From 51c08a7e268f69bd27d2fb8a49fcdd885f760ee3 Mon Sep 17 00:00:00 2001 From: Jesse Vickery Date: Tue, 23 Dec 2025 20:30:56 +0000 Subject: [PATCH 3/3] fix(lint): typing; - Fix syntax errors. --- ckanapi/cli/dump.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ckanapi/cli/dump.py b/ckanapi/cli/dump.py index cc10a3f..68a740d 100644 --- a/ckanapi/cli/dump.py +++ b/ckanapi/cli/dump.py @@ -57,12 +57,9 @@ def dump_things(ckan, thing, arguments, }[thing] params = dict( all_fields=False, # for user_list - include_private=arguments.get( - '--include-private', False), # for package_list - include_drafts=arguments.get( - '--include-drafts', False), # for package_list - include_deleted=arguments.get( - '--include-deleted', False), # for package_list + include_private='--include-private' in arguments, # for package_list + include_drafts='--include-drafts' in arguments, # for package_list + include_deleted='--include-deleted' in arguments, # for package_list ) names = ckan.call_action(get_thing_list, params)