hdx-python-api 6.5.0__tar.gz → 6.5.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/PKG-INFO +2 -2
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/pyproject.toml +1 -1
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/requirements.txt +5 -5
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/api/_version.py +2 -2
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/api/utilities/filestore_helper.py +8 -3
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/data/dataset.py +4 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/data/resource.py +9 -1
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/api/utilities/test_filestore_helper.py +13 -4
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/data/test_resource.py +3 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/.coveragerc +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/.github/workflows/publish.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/.github/workflows/run-python-tests.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/.gitignore +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/.pre-commit-config.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/CONTRIBUTING.md +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/LICENSE +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/README.md +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/documentation/.readthedocs.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/documentation/index.md +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/documentation/mkdocs.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/hatch.toml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/pytest.ini +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/ruff.toml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/api/__init__.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/api/configuration.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/api/hdx_base_configuration.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/api/locations.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/api/remotehdx.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/api/utilities/__init__.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/api/utilities/dataset_title_helper.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/api/utilities/date_helper.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/api/utilities/hdx_error_handler.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/api/utilities/hdx_state.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/api/utilities/size_hash.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/data/__init__.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/data/hdx_datasource_topline.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/data/hdxobject.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/data/indicator_resource_view_template.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/data/organization.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/data/resource_matcher.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/data/resource_view.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/data/showcase.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/data/user.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/data/vocabulary.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/facades/__init__.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/facades/infer_arguments.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/facades/keyword_arguments.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/facades/simple.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/__init__.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/Accepted_Tags.csv +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/CKAN/hdx_dataset_static.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/Tag_Mapping.csv +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/Tag_Mapping_ChainRuleError.csv +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/empty.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_base_config.json +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_base_config.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_config.json +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_config.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_dataset_static.json +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_dataset_static.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_datasource_topline.json +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_datasource_topline.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_email_configuration.json +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_email_configuration.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_missing_site_config.json +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_organization_static.json +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_organization_static.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_resource_static.json +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_resource_static.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_resource_view_static.json +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_resource_view_static.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_showcase_static.json +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_showcase_static.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_user_static.json +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_user_static.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_vocabulary_static.json +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_vocabulary_static.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/project_configuration.json +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/project_configuration.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/user_agent_config.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/user_agent_config2.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/user_agent_config3.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/user_agent_config_wrong.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/dataset_search_results.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/empty.csv +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/gen_resource/conflict_data_alg.csv +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/gen_resource/min_qc_conflict_data_alg.csv +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/gen_resource/qc_conflict_data_alg.csv +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/gen_resource/test_data_no_data.csv +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/gen_resource/test_data_no_years.csv +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/organization_show_results.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/qc_from_rows/qc_conflict_data_alg.csv +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/qc_from_rows/qc_conflict_data_alg_one_col.csv +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/resource_formats.json +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/showcase_all_search_results.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/size_hash/ACLED-All-Africa-File_20170101-to-20170708.xlsx +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/state/analysis_dates.txt +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/state/last_build_date.txt +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/test_data.csv +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/test_data.zip +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/update_dataset_resources/dem_data_zwe.csv +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/update_dataset_resources/dem_indicatorlist_zwe.csv +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/update_dataset_resources/expected_resources_to_update.json +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/update_dataset_resources/opri_data_zwe.csv +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/update_dataset_resources/opri_indicatorlist_zwe.csv +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/update_dataset_resources/opri_metadata_zwe.csv +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/update_dataset_resources/qc_sdg_data_zwe.csv +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/update_dataset_resources/sdg_data_zwe.csv +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/update_dataset_resources/sdg_indicatorlist_zwe.csv +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/update_dataset_resources/sdg_metadata_zwe.csv +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/update_dataset_resources/unesco_dataset.json +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/update_dataset_resources/unesco_update_dataset.json +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/update_logic/update_logic_resources.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/update_logic/update_logic_resources_new.yaml +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/__init__.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/api/__init__.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/api/test_ckan.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/api/test_configuration.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/api/test_locations.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/api/utilities/__init__.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/api/utilities/test_dataset_title_helper.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/api/utilities/test_hdx_error_handler.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/api/utilities/test_hdx_state.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/api/utilities/test_size_hash.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/conftest.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/data/__init__.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/data/test_dataset_add_hapi_error.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/data/test_dataset_core.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/data/test_dataset_noncore.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/data/test_dataset_resource_generation.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/data/test_organization.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/data/test_resource_view.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/data/test_showcase.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/data/test_update_dataset_resources.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/data/test_update_logic.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/data/test_user.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/data/test_vocabulary.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/facades/__init__.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/facades/test_infer_arguments.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/facades/test_keyword_arguments.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/facades/test_simple.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/workingexample/my_code.py +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/workingexample/my_resource.csv +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/workingexample/my_resource.xlsx +0 -0
- {hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/workingexample/run.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hdx-python-api
|
|
3
|
-
Version: 6.5.
|
|
3
|
+
Version: 6.5.1
|
|
4
4
|
Summary: HDX Python API for interacting with the Humanitarian Data Exchange
|
|
5
5
|
Project-URL: Homepage, https://github.com/OCHA-DAP/hdx-python-api
|
|
6
6
|
Author: Michael Rans
|
|
@@ -29,7 +29,7 @@ Requires-Dist: ckanapi>=4.8
|
|
|
29
29
|
Requires-Dist: defopt>=7.0.0
|
|
30
30
|
Requires-Dist: email-validator
|
|
31
31
|
Requires-Dist: hdx-python-country>=3.9.6
|
|
32
|
-
Requires-Dist: hdx-python-utilities>=3.9.
|
|
32
|
+
Requires-Dist: hdx-python-utilities>=3.9.1
|
|
33
33
|
Requires-Dist: libhxl>=5.2.2
|
|
34
34
|
Requires-Dist: makefun
|
|
35
35
|
Requires-Dist: quantulum3
|
|
@@ -33,7 +33,7 @@ click==8.2.1
|
|
|
33
33
|
# typer
|
|
34
34
|
colorama==0.4.6
|
|
35
35
|
# via mkdocs-material
|
|
36
|
-
coverage==7.10.
|
|
36
|
+
coverage==7.10.6
|
|
37
37
|
# via pytest-cov
|
|
38
38
|
defopt==7.0.0
|
|
39
39
|
# via hdx-python-api (pyproject.toml)
|
|
@@ -67,7 +67,7 @@ gspread==6.2.1
|
|
|
67
67
|
# via hdx-python-api (pyproject.toml)
|
|
68
68
|
hdx-python-country==3.9.6
|
|
69
69
|
# via hdx-python-api (pyproject.toml)
|
|
70
|
-
hdx-python-utilities==3.9.
|
|
70
|
+
hdx-python-utilities==3.9.1
|
|
71
71
|
# via
|
|
72
72
|
# hdx-python-api (pyproject.toml)
|
|
73
73
|
# hdx-python-country
|
|
@@ -142,7 +142,7 @@ mkdocs-material==9.6.18
|
|
|
142
142
|
# via mkapi
|
|
143
143
|
mkdocs-material-extensions==1.3.1
|
|
144
144
|
# via mkdocs-material
|
|
145
|
-
more-itertools==10.
|
|
145
|
+
more-itertools==10.8.0
|
|
146
146
|
# via inflect
|
|
147
147
|
nodeenv==1.9.1
|
|
148
148
|
# via pre-commit
|
|
@@ -254,7 +254,7 @@ rfc3986==2.0.0
|
|
|
254
254
|
# via frictionless
|
|
255
255
|
rich==14.1.0
|
|
256
256
|
# via typer
|
|
257
|
-
rpds-py==0.27.
|
|
257
|
+
rpds-py==0.27.1
|
|
258
258
|
# via
|
|
259
259
|
# jsonschema
|
|
260
260
|
# referencing
|
|
@@ -292,7 +292,7 @@ text-unidecode==1.3
|
|
|
292
292
|
# via python-slugify
|
|
293
293
|
typeguard==4.4.4
|
|
294
294
|
# via inflect
|
|
295
|
-
typer==0.
|
|
295
|
+
typer==0.17.3
|
|
296
296
|
# via frictionless
|
|
297
297
|
typing-extensions==4.15.0
|
|
298
298
|
# via
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '6.5.
|
|
32
|
-
__version_tuple__ = version_tuple = (6, 5,
|
|
31
|
+
__version__ = version = '6.5.1'
|
|
32
|
+
__version_tuple__ = version_tuple = (6, 5, 1)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -85,6 +85,7 @@ class FilestoreHelper:
|
|
|
85
85
|
resource_data_to_update: "Resource",
|
|
86
86
|
filestore_resources: Dict[int, str],
|
|
87
87
|
resource_index: int,
|
|
88
|
+
**kwargs: Any,
|
|
88
89
|
) -> int:
|
|
89
90
|
"""Helper method to merge updated resource from dataset into HDX resource read from HDX including filestore.
|
|
90
91
|
Returns status code where:
|
|
@@ -101,17 +102,21 @@ class FilestoreHelper:
|
|
|
101
102
|
resource_data_to_update (Resource): Updated resource from dataset
|
|
102
103
|
filestore_resources (Dict[int, str]): List of (index of resources, file to upload)
|
|
103
104
|
resource_index (int): Index of resource
|
|
105
|
+
**kwargs: Any,
|
|
104
106
|
|
|
105
107
|
Returns:
|
|
106
108
|
int: Status code
|
|
107
109
|
"""
|
|
108
110
|
file_to_upload = resource_data_to_update.get_file_to_upload()
|
|
109
111
|
if file_to_upload:
|
|
112
|
+
force_update = kwargs.pop("force_update", False)
|
|
110
113
|
file_format = resource_data_to_update.get("format", "").lower()
|
|
111
114
|
size, hash = get_size_and_hash(file_to_upload, file_format)
|
|
112
|
-
if
|
|
113
|
-
|
|
114
|
-
|
|
115
|
+
if (
|
|
116
|
+
not force_update
|
|
117
|
+
and size == original_resource_data.get("size")
|
|
118
|
+
and hash == original_resource_data.get("hash")
|
|
119
|
+
):
|
|
115
120
|
logger.warning(
|
|
116
121
|
f"Not updating filestore for resource {original_resource_data['name']} as size and hash unchanged!"
|
|
117
122
|
)
|
|
@@ -927,6 +927,7 @@ class Dataset(HDXObject):
|
|
|
927
927
|
resource_data_to_update,
|
|
928
928
|
filestore_resources,
|
|
929
929
|
i,
|
|
930
|
+
**kwargs,
|
|
930
931
|
)
|
|
931
932
|
statuses[resource_name] = status
|
|
932
933
|
resources_to_update.append(resource_data_to_update)
|
|
@@ -970,6 +971,7 @@ class Dataset(HDXObject):
|
|
|
970
971
|
resource_data_to_update,
|
|
971
972
|
filestore_resources,
|
|
972
973
|
i,
|
|
974
|
+
**kwargs,
|
|
973
975
|
)
|
|
974
976
|
statuses[updated_resource_name] = status
|
|
975
977
|
else:
|
|
@@ -1117,6 +1119,7 @@ class Dataset(HDXObject):
|
|
|
1117
1119
|
keep_crisis_tags (bool): Whether to keep existing crisis tags. Defaults to True.
|
|
1118
1120
|
updated_by_script (str): String to identify your script. Defaults to your user agent.
|
|
1119
1121
|
batch (str): A string you can specify to show which datasets are part of a single batch update
|
|
1122
|
+
force_update (bool): Forces files to be updated even if they haven't changed
|
|
1120
1123
|
|
|
1121
1124
|
Returns:
|
|
1122
1125
|
Dict: Status codes of resources
|
|
@@ -1184,6 +1187,7 @@ class Dataset(HDXObject):
|
|
|
1184
1187
|
keep_crisis_tags (bool): Whether to keep existing crisis tags. Defaults to True.
|
|
1185
1188
|
updated_by_script (str): String to identify your script. Defaults to your user agent.
|
|
1186
1189
|
batch (str): A string you can specify to show which datasets are part of a single batch update
|
|
1190
|
+
force_update (bool): Forces files to be updated even if they haven't changed
|
|
1187
1191
|
|
|
1188
1192
|
Returns:
|
|
1189
1193
|
Dict: Status codes of resources
|
|
@@ -402,6 +402,7 @@ class Resource(HDXObject):
|
|
|
402
402
|
**kwargs: See below
|
|
403
403
|
operation (str): Operation to perform eg. patch. Defaults to update.
|
|
404
404
|
data_updated (bool): If True, set last_modified to now. Defaults to False.
|
|
405
|
+
force_update (bool): Force file to be updated even if it hasn't changed. Defaults to False.
|
|
405
406
|
|
|
406
407
|
Returns:
|
|
407
408
|
int: Status code
|
|
@@ -409,9 +410,14 @@ class Resource(HDXObject):
|
|
|
409
410
|
data_updated = kwargs.pop("data_updated", self._data_updated)
|
|
410
411
|
files = {}
|
|
411
412
|
if self._file_to_upload:
|
|
413
|
+
force_update = kwargs.pop("force_update", False)
|
|
412
414
|
file_format = self._old_data.get("format", "").lower()
|
|
413
415
|
size, hash = get_size_and_hash(self._file_to_upload, file_format)
|
|
414
|
-
if
|
|
416
|
+
if (
|
|
417
|
+
not force_update
|
|
418
|
+
and size == self.data.get("size")
|
|
419
|
+
and hash == self.data.get("hash")
|
|
420
|
+
):
|
|
415
421
|
logger.warning(
|
|
416
422
|
f"Not updating filestore for resource {self.data['name']} as size and hash unchanged!"
|
|
417
423
|
)
|
|
@@ -474,6 +480,7 @@ class Resource(HDXObject):
|
|
|
474
480
|
operation (string): Operation to perform eg. patch. Defaults to update.
|
|
475
481
|
data_updated (bool): If True, set last_modified to now. Defaults to False.
|
|
476
482
|
date_data_updated (datetime): Date to use for last_modified. Default to None.
|
|
483
|
+
force_update (bool): Force file to be updated even if it hasn't changed. Defaults to False.
|
|
477
484
|
|
|
478
485
|
Returns:
|
|
479
486
|
int: Status code
|
|
@@ -504,6 +511,7 @@ class Resource(HDXObject):
|
|
|
504
511
|
**kwargs: See below
|
|
505
512
|
data_updated (bool): If True, set last_modified to now. Defaults to False.
|
|
506
513
|
date_data_updated (datetime): Date to use for last_modified. Default to None.
|
|
514
|
+
force_update (bool): Force file to be updated even if it hasn't changed. Defaults to False.
|
|
507
515
|
|
|
508
516
|
Returns:
|
|
509
517
|
int: Status code
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/api/utilities/test_filestore_helper.py
RENAMED
|
@@ -21,9 +21,10 @@ class TestFilestoreHelper:
|
|
|
21
21
|
orig_resource = Resource(resource_data_copy)
|
|
22
22
|
resource = Resource(resource_data_copy)
|
|
23
23
|
filestore_resources = {}
|
|
24
|
-
FilestoreHelper.dataset_update_filestore_resource(
|
|
24
|
+
status = FilestoreHelper.dataset_update_filestore_resource(
|
|
25
25
|
orig_resource, resource, filestore_resources, 0
|
|
26
26
|
)
|
|
27
|
+
assert status == 1
|
|
27
28
|
assert resource == {
|
|
28
29
|
"description": "My Resource",
|
|
29
30
|
"format": "xlsx",
|
|
@@ -36,9 +37,10 @@ class TestFilestoreHelper:
|
|
|
36
37
|
assert filestore_resources == {}
|
|
37
38
|
|
|
38
39
|
resource.set_file_to_upload(test_data)
|
|
39
|
-
FilestoreHelper.dataset_update_filestore_resource(
|
|
40
|
+
status = FilestoreHelper.dataset_update_filestore_resource(
|
|
40
41
|
orig_resource, resource, filestore_resources, 0
|
|
41
42
|
)
|
|
43
|
+
assert status == 2
|
|
42
44
|
assert resource == {
|
|
43
45
|
"description": "My Resource",
|
|
44
46
|
"format": "xlsx",
|
|
@@ -53,9 +55,15 @@ class TestFilestoreHelper:
|
|
|
53
55
|
assert filestore_resources == {0: test_data}
|
|
54
56
|
|
|
55
57
|
filestore_resources = {}
|
|
56
|
-
FilestoreHelper.dataset_update_filestore_resource(
|
|
58
|
+
status = FilestoreHelper.dataset_update_filestore_resource(
|
|
59
|
+
resource, resource, filestore_resources, 0, force_update=True
|
|
60
|
+
)
|
|
61
|
+
assert status == 2
|
|
62
|
+
filestore_resources = {}
|
|
63
|
+
status = FilestoreHelper.dataset_update_filestore_resource(
|
|
57
64
|
resource, resource, filestore_resources, 0
|
|
58
65
|
)
|
|
66
|
+
assert status == 3
|
|
59
67
|
assert resource == {
|
|
60
68
|
"description": "My Resource",
|
|
61
69
|
"format": "xlsx",
|
|
@@ -71,9 +79,10 @@ class TestFilestoreHelper:
|
|
|
71
79
|
|
|
72
80
|
resource._file_to_upload = None
|
|
73
81
|
resource.mark_data_updated()
|
|
74
|
-
FilestoreHelper.dataset_update_filestore_resource(
|
|
82
|
+
status = FilestoreHelper.dataset_update_filestore_resource(
|
|
75
83
|
orig_resource, resource, filestore_resources, 0
|
|
76
84
|
)
|
|
85
|
+
assert status == 0
|
|
77
86
|
regex = r"^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d.\d\d\d\d\d\d$"
|
|
78
87
|
assert re.match(regex, resource["last_modified"])
|
|
79
88
|
assert filestore_resources == {}
|
|
@@ -878,6 +878,9 @@ class TestResource:
|
|
|
878
878
|
assert status == 3
|
|
879
879
|
resource["id"] = "74b74ae1-df0c-4716-829f-4f939a046817"
|
|
880
880
|
resource.set_file_to_upload(test_data, guess_format_from_suffix=True)
|
|
881
|
+
status = resource.update_in_hdx(force_update=True)
|
|
882
|
+
assert status == 2
|
|
883
|
+
resource.set_file_to_upload(test_data, guess_format_from_suffix=True)
|
|
881
884
|
status = resource.update_in_hdx()
|
|
882
885
|
assert status == 4
|
|
883
886
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/src/hdx/data/indicator_resource_view_template.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_datasource_topline.json
RENAMED
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_datasource_topline.yaml
RENAMED
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_email_configuration.json
RENAMED
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_email_configuration.yaml
RENAMED
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_missing_site_config.json
RENAMED
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_organization_static.json
RENAMED
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_organization_static.yaml
RENAMED
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_resource_static.json
RENAMED
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_resource_static.yaml
RENAMED
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_resource_view_static.json
RENAMED
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_resource_view_static.yaml
RENAMED
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_showcase_static.json
RENAMED
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_showcase_static.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_vocabulary_static.json
RENAMED
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/hdx_vocabulary_static.yaml
RENAMED
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/project_configuration.json
RENAMED
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/project_configuration.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/config/user_agent_config_wrong.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/gen_resource/conflict_data_alg.csv
RENAMED
|
File without changes
|
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/gen_resource/qc_conflict_data_alg.csv
RENAMED
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/gen_resource/test_data_no_data.csv
RENAMED
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/gen_resource/test_data_no_years.csv
RENAMED
|
File without changes
|
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/qc_from_rows/qc_conflict_data_alg.csv
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/fixtures/showcase_all_search_results.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/api/utilities/test_dataset_title_helper.py
RENAMED
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/api/utilities/test_hdx_error_handler.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/data/test_dataset_resource_generation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hdx_python_api-6.5.0 → hdx_python_api-6.5.1}/tests/hdx/data/test_update_dataset_resources.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|