Repository navigation
HDXTABLE-147 Add datapusher+ and dictionary methods to HDX Python API - #120
Merged
Merged
Conversation
- Resource.submit_to_datapusher (datapusher_submit) and Resource.get_datapusher_status (datapusher_status) - Resource.update_hdx_data_dictionary: merges into or replaces hdx_data_dictionary via resource_patch, then updates datastore field labels/descriptions via datastore_create without reloading data. last_modified is unchanged so no dataset update notifications are sent.
mcarans
force-pushed
the
datapusher-data-dictionary
branch
from
October 15, 2026 03:21
751f400 to
a9a51de
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.
Summary
Resource.submit_to_datapusher(ignore_hash=False)wrapsdatapusher_submit.last_modifiedis unchanged.Falseif the job wasn't submitted, e.g. one is already pending.Resource.get_datapusher_status()wrapsdatapusher_statusand returnsNoneif the resource has no job.Resource.update_hdx_data_dictionary(data_dictionary, replace=False, update_datastore=True):fieldinto the existinghdx_data_dictionary, or replaces it withreplace=True.resource_patchwith onlyidandhdx_data_dictionary.datastore_create(resource_id,force,fields), keeping otherinfokeys such astype_override. This is the same call CKAN 2.11's Data Dictionary editor makes (ckanext/datastore/blueprint.pyDictionaryView.post), so no data is reloaded.Notifications
Dataset update notifications come from gisrestlayer's change detection, which emits
resource-data-changedwhen a resource'slast_modifiedchanges.hdx_data_dictionaryis not in itsRESOURCE_FIELDS, so neither the patch nordatastore_createproduces a notified event. Patchinghdx_data_dictionaryas well as the datastore stops the next DataPusher+ run from reverting the labels.Testing
test_datapusherandtest_update_hdx_data_dictionary.datastore_createbodies.d90385d3-…):update_hdx_data_dictionary(..., replace=True)restored the original dictionary.total(8410) andlast_modifiedwere unchanged.datastore_createis unverified.