hdx-python-scraper 2.3.5__tar.gz → 2.3.6__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_scraper-2.3.5 → hdx_python_scraper-2.3.6}/.config/pre-commit-config.yaml +5 -4
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/.config/ruff.toml +6 -4
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/.github/workflows/publish.yaml +2 -2
- hdx_python_scraper-2.3.6/.github/workflows/run-python-tests.yaml +66 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/CONTRIBUTING.md +2 -3
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/PKG-INFO +2 -2
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/documentation/.readthedocs.yaml +1 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/documentation/pydoc-markdown.yaml +1 -1
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/requirements.txt +82 -79
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/src/hdx/scraper/_version.py +2 -2
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/src/hdx/scraper/base_scraper.py +3 -3
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/src/hdx/scraper/utilities/reader.py +84 -17
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/src/hdx/scraper/utilities/sources.py +3 -3
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/hdx/scraper/conftest.py +1 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/hdx/scraper/test_readers.py +70 -1
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/hdx/scraper/test_scrapers_custom.py +3 -3
- hdx_python_scraper-2.3.5/.github/workflows/run-python-tests.yaml +0 -50
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/.config/coveragerc +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/.config/pytest.ini +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/.gitignore +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/LICENSE +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/README.md +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/documentation/main.md +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/pyproject.toml +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/src/hdx/scraper/__init__.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/src/hdx/scraper/configurable/__init__.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/src/hdx/scraper/configurable/aggregator.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/src/hdx/scraper/configurable/resource_downloader.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/src/hdx/scraper/configurable/rowparser.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/src/hdx/scraper/configurable/scraper.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/src/hdx/scraper/configurable/timeseries.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/src/hdx/scraper/outputs/__init__.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/src/hdx/scraper/outputs/base.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/src/hdx/scraper/outputs/excelfile.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/src/hdx/scraper/outputs/googlesheets.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/src/hdx/scraper/outputs/json.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/src/hdx/scraper/runner.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/src/hdx/scraper/utilities/__init__.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/src/hdx/scraper/utilities/fallbacks.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/src/hdx/scraper/utilities/region_lookup.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/src/hdx/scraper/utilities/writer.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/config/project_configuration.yaml +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/access_2pacx-1vrszjzuyvt9i-mkrq2hbxrul2lx2vihkthqm-lae8nyhqty70zqtcufs3pxbhzgat1l2bkoa4-daoap-pub-gid-574237756-single-true-output-csv.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/additional-json.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/altworldindata_data-tagger-match-all-on-tagger-01-header-location-tagger-01-tag.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/casualties_2pacx-1vqidedbzz0ehrc0b4fswip14r7mdtu1mpmwakuxupelsah2awcurkgalfduhjvyjul8vzzat3r1b5qg-pub-gid-0-single-true-output-csv.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/cbpf-allocations-and-contributions.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/cbpf2-allocations-and-contributions.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/cerf-covid-19-allocations.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/cerf2-covid-19-allocations.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/cerf2_global_download-full-pfmb-allocations.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/cerf_global_download-full-pfmb-allocations.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/covax_2pacx-1vtvzu79pptfaa2syevoqfyrrjy63djwitqu0ffbxiqczoun9k9timwmrvfgg1rbsnlmgyugzseiaye2-pub-gid-992438980-single-true-output-csv.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/covidtests_data-owid-covid-data.xlsx +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/education_closures_broken.xls +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/education_closures_school_closures.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/education_enrolment_enrollment_data.xlsx +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/ethiopia-drought-related-key-figures.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/ethiopia-pin-targeted-reached-by-location-and-cluster.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/ethiopia_drought_affected_targeted_reached_by_cluster.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/fallbacks.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/gam_download-unicef-who-wb-global-expanded-databases-severe-wasting.xlsx +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/gam_other_download-unicef-who-wb-global-expanded-databases-severe-wasting.xlsx +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/global-school-closures-covid19.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/hno_2017_sahel_nutrition.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/hno_2017_sahel_people_in_need.xlsx +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/idmc-internally-displaced-persons-idps.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/idps_download-displacement-data.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/idps_override_population-widget-id-264111-geo-id-693-population-group-54074999.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/idps_somalia_som_unhcr_prmn_displacement_dataset.xlsx +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/ipc_somalia_som_food_insecurity_oct_dec2022_projection.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/kenya-drought-related-key-figures.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/kenya-pin-targeted-reached-by-location-and-cluster.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/kenya_drought_affected_targeted_reached_by_cluster.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/key_figures_2pacx-1vrppqx8jtkkkrckmzfncmmtfecvcpkbp9pdhs1sqtuyacmbsx8tlaxpgblfce-lcehukregguxja-4s-pub-gid-0-single-true-output-csv.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/key_figures_2pacx-1vrppqx8jtkkkrckmzfncmmtfecvcpkbp9pdhs1sqtuyacmbsx8tlaxpgblfce-lcehukregguxja-4s-pub-gid-1275038715-single-true-output-csv.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/key_figures_2pacx-1vrppqx8jtkkkrckmzfncmmtfecvcpkbp9pdhs1sqtuyacmbsx8tlaxpgblfce-lcehukregguxja-4s-pub-gid-2015311116-single-true-output-csv.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/key_figures_eth_2pacx-1vrppqx8jtkkkrckmzfncmmtfecvcpkbp9pdhs1sqtuyacmbsx8tlaxpgblfce-lcehukregguxja-4s-pub-gid-2015311116-single-true-output-csv.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/key_figures_ken_2pacx-1vrppqx8jtkkkrckmzfncmmtfecvcpkbp9pdhs1sqtuyacmbsx8tlaxpgblfce-lcehukregguxja-4s-pub-gid-1275038715-single-true-output-csv.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/key_figures_som_2pacx-1vrppqx8jtkkkrckmzfncmmtfecvcpkbp9pdhs1sqtuyacmbsx8tlaxpgblfce-lcehukregguxja-4s-pub-gid-0-single-true-output-csv.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/ourworldindata_data-tagger-match-all-on-tagger-01-header-location-tagger-01-tag.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/ourworldindata_other_data-tagger-match-all-on-tagger-01-header-location-tagger-01-tag.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/oxcgrt_oxcgrt_csv.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/oxford-covid-19-government-response-tracker.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/population.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/population_indicator-sp-pop-downloadformat-excel-dataformat-list-totl.xls +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/population_other_indicator-sp-pop-downloadformat-excel-dataformat-list-totl.xls +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/regions_tbl_regcov_2020_ocha.xlsx +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/resource_downloader_xlsx_ukr_border_crossings_090622.xlsx +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/sadd-countries-to-include.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/sadd_covid-data-dataset-fullvars-extype-csv.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/sahel-humanitarian-needs-overview.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/sahel-humanitarian-needs-overview_prefix.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/somalia-acute-food-insecurity-country-data.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/somalia-drought-related-key-figures.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/somalia-internally-displaced-persons-idps.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/somalia-pin-targeted-reached-by-location-and-cluster.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/somalia_drought_affected_targeted_reached_by_cluster.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/timeseries_casualties_2pacx-1vqidedbzz0ehrc0b4fswip14r7mdtu1mpmwakuxupelsah2awcurkgalfduhjvyjul8vzzat3r1b5qg-pub-gid-0-single-true-output-csv.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/total-covid-19-tests-performed-by-country.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/ukraine-border-crossings.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/ukraine-who-does-what-where-3w.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/unocha-office-locations.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/who_national2_who-covid-19-global-data.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/who_national3_who-covid-19-global-data.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/who_national_who-covid-19-global-data.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/whowhatwhere_afg_3w_data.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/input/whowhatwhere_notags_3w_data.csv +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/test_output.xlsx +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/test_scraper_all.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/test_scraper_other.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/fixtures/test_scraper_population.json +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/hdx/scraper/__init__.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/hdx/scraper/affected_targeted_reached.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/hdx/scraper/education_closures.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/hdx/scraper/education_enrolment.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/hdx/scraper/test_output.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/hdx/scraper/test_regionlookup.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/hdx/scraper/test_runner.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/hdx/scraper/test_scrapers_aggregation.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/hdx/scraper/test_scrapers_appenddata.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/hdx/scraper/test_scrapers_global.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/hdx/scraper/test_scrapers_multipleurls.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/hdx/scraper/test_scrapers_national.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/hdx/scraper/test_scrapers_regionaltoplevel.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/hdx/scraper/test_scrapers_resource_downloaders.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/hdx/scraper/test_scrapers_subnational.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/hdx/scraper/test_scrapers_timeseries.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/hdx/scraper/test_sources.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/hdx/scraper/test_utils.py +0 -0
- {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.6}/tests/hdx/scraper/unhcr_myanmar_idps.py +0 -0
|
@@ -9,7 +9,7 @@ repos:
|
|
|
9
9
|
exclude: test_scraper_.*\.json
|
|
10
10
|
- id: check-ast
|
|
11
11
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
12
|
-
rev: v0.
|
|
12
|
+
rev: v0.4.4
|
|
13
13
|
hooks:
|
|
14
14
|
# Run the linter.
|
|
15
15
|
- id: ruff
|
|
@@ -17,10 +17,11 @@ repos:
|
|
|
17
17
|
# Run the formatter.
|
|
18
18
|
- id: ruff-format
|
|
19
19
|
args: [--config, .config/ruff.toml]
|
|
20
|
-
- repo: https://github.com/
|
|
21
|
-
rev:
|
|
20
|
+
- repo: https://github.com/astral-sh/uv-pre-commit
|
|
21
|
+
rev: 0.1.44
|
|
22
22
|
hooks:
|
|
23
|
+
# Run the pip compile
|
|
23
24
|
- id: pip-compile
|
|
24
25
|
name: pip-compile requirements.txt
|
|
25
26
|
files: pyproject.toml
|
|
26
|
-
args: [pyproject.toml, --resolver=backtracking, --all-extras, --upgrade, -q, -o, requirements.txt]
|
|
27
|
+
args: [ pyproject.toml, --resolver=backtracking, --all-extras, --upgrade, -q, -o, requirements.txt ]
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
line-length = 79
|
|
2
2
|
exclude = ["_version.py"]
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
]
|
|
3
|
+
|
|
4
|
+
[lint]
|
|
6
5
|
# List of rules: https://docs.astral.sh/ruff/rules/
|
|
7
6
|
select = [
|
|
8
7
|
"E", # pycodestyle - default
|
|
9
8
|
"F", # pyflakes - default
|
|
10
9
|
"I" # isort
|
|
11
10
|
]
|
|
11
|
+
ignore = [
|
|
12
|
+
"E501" # Line too long
|
|
13
|
+
]
|
|
12
14
|
|
|
13
|
-
[isort]
|
|
15
|
+
[lint.isort]
|
|
14
16
|
known-local-folder = ["hdx"]
|
|
@@ -9,13 +9,13 @@ jobs:
|
|
|
9
9
|
runs-on: ubuntu-latest
|
|
10
10
|
|
|
11
11
|
steps:
|
|
12
|
-
- uses: actions/checkout@
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
13
|
- name: Get history and tags for versioning to work
|
|
14
14
|
run: |
|
|
15
15
|
git fetch --prune --unshallow
|
|
16
16
|
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
|
|
17
17
|
- name: Set up Python
|
|
18
|
-
uses: actions/setup-python@
|
|
18
|
+
uses: actions/setup-python@v5
|
|
19
19
|
with:
|
|
20
20
|
python-version: '3.x'
|
|
21
21
|
- name: Install dependencies
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# This workflow will install Python dependencies, lint and run tests
|
|
2
|
+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
|
3
|
+
|
|
4
|
+
name: Run tests
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
workflow_dispatch: # add run button in github
|
|
8
|
+
push:
|
|
9
|
+
branches-ignore:
|
|
10
|
+
- gh-pages
|
|
11
|
+
- 'dependabot/**'
|
|
12
|
+
pull_request:
|
|
13
|
+
branches-ignore:
|
|
14
|
+
- gh-pages
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
build:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
|
|
20
|
+
services:
|
|
21
|
+
postgres:
|
|
22
|
+
image: postgres:14-alpine
|
|
23
|
+
env:
|
|
24
|
+
POSTGRES_USER: postgres
|
|
25
|
+
POSTGRES_PASSWORD: postgres
|
|
26
|
+
POSTGRES_DB: hapitest
|
|
27
|
+
ports:
|
|
28
|
+
- 5432:5432
|
|
29
|
+
options: >-
|
|
30
|
+
--health-cmd pg_isready
|
|
31
|
+
--health-interval 10s
|
|
32
|
+
--health-timeout 5s
|
|
33
|
+
--health-retries 5
|
|
34
|
+
--name postgres-container
|
|
35
|
+
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/checkout@v4
|
|
38
|
+
- name: Set up Python
|
|
39
|
+
uses: actions/setup-python@v5
|
|
40
|
+
with:
|
|
41
|
+
python-version: '3.x'
|
|
42
|
+
- name: Install dependencies
|
|
43
|
+
run: |
|
|
44
|
+
python -m pip install --upgrade pip
|
|
45
|
+
pip install --upgrade hatch
|
|
46
|
+
- name: Test with hatch/pytest
|
|
47
|
+
env:
|
|
48
|
+
GSHEET_AUTH: ${{ secrets.GSHEET_AUTH }}
|
|
49
|
+
run: |
|
|
50
|
+
hatch run test:test
|
|
51
|
+
- name: Check styling
|
|
52
|
+
if: always()
|
|
53
|
+
run: |
|
|
54
|
+
hatch run lint:style
|
|
55
|
+
- name: Publish Unit Test Results
|
|
56
|
+
uses: EnricoMi/publish-unit-test-result-action@v2
|
|
57
|
+
if: always()
|
|
58
|
+
with:
|
|
59
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
60
|
+
junit_files: test-results.xml
|
|
61
|
+
- name: Publish in Coveralls
|
|
62
|
+
uses: coverallsapp/github-action@v2
|
|
63
|
+
with:
|
|
64
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
65
|
+
flag-name: tests
|
|
66
|
+
format: lcov
|
|
@@ -21,14 +21,13 @@ you make a git commit:
|
|
|
21
21
|
pre-commit install
|
|
22
22
|
|
|
23
23
|
The configuration file for this project is in a
|
|
24
|
-
non-
|
|
24
|
+
non-standard location. Thus, you will need to edit your
|
|
25
25
|
`.git/hooks/pre-commit` file to reflect this. Change
|
|
26
26
|
the line that begins with `ARGS` to:
|
|
27
27
|
|
|
28
28
|
ARGS=(hook-impl --config=.config/pre-commit-config.yaml --hook-type=pre-commit)
|
|
29
29
|
|
|
30
30
|
With pre-commit, all code is formatted according to
|
|
31
|
-
[black]("https://github.com/psf/black") and
|
|
32
31
|
[ruff]("https://github.com/charliermarsh/ruff") guidelines.
|
|
33
32
|
|
|
34
33
|
To check if your changes pass pre-commit without committing, run:
|
|
@@ -41,7 +40,7 @@ To run the tests and view coverage, execute:
|
|
|
41
40
|
|
|
42
41
|
pytest -c .config/pytest.ini --cov hdx --cov-config .config/coveragerc
|
|
43
42
|
|
|
44
|
-
Follow the example set out already in ``
|
|
43
|
+
Follow the example set out already in ``documentation/main.md`` as you write the documentation.
|
|
45
44
|
|
|
46
45
|
## Packages
|
|
47
46
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: hdx-python-scraper
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.6
|
|
4
4
|
Summary: HDX Python scraper utilities to assemble data from multiple sources
|
|
5
5
|
Project-URL: Homepage, https://github.com/OCHA-DAP/hdx-python-scraper
|
|
6
6
|
Author-email: Michael Rans <rans@email.com>
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# by the following command:
|
|
4
|
-
#
|
|
5
|
-
# pip-compile --all-extras --output-file=requirements.txt pyproject.toml
|
|
6
|
-
#
|
|
1
|
+
# This file was autogenerated by uv via the following command:
|
|
2
|
+
# uv pip compile pyproject.toml --resolver=backtracking --all-extras -o requirements.txt
|
|
7
3
|
annotated-types==0.6.0
|
|
8
4
|
# via pydantic
|
|
9
5
|
attrs==23.2.0
|
|
@@ -11,9 +7,10 @@ attrs==23.2.0
|
|
|
11
7
|
# frictionless
|
|
12
8
|
# jsonlines
|
|
13
9
|
# jsonschema
|
|
14
|
-
|
|
10
|
+
# referencing
|
|
11
|
+
cachetools==5.3.3
|
|
15
12
|
# via google-auth
|
|
16
|
-
certifi==
|
|
13
|
+
certifi==2024.2.2
|
|
17
14
|
# via requests
|
|
18
15
|
cffi==1.16.0
|
|
19
16
|
# via cryptography
|
|
@@ -23,83 +20,81 @@ chardet==5.2.0
|
|
|
23
20
|
# via frictionless
|
|
24
21
|
charset-normalizer==3.3.2
|
|
25
22
|
# via requests
|
|
26
|
-
ckanapi==4.
|
|
23
|
+
ckanapi==4.8
|
|
27
24
|
# via hdx-python-api
|
|
28
25
|
click==8.1.7
|
|
29
26
|
# via typer
|
|
30
|
-
|
|
31
|
-
# via
|
|
32
|
-
|
|
33
|
-
# via
|
|
34
|
-
# coverage
|
|
35
|
-
# pytest-cov
|
|
36
|
-
cryptography==42.0.2
|
|
27
|
+
coverage==7.5.1
|
|
28
|
+
# via pytest-cov
|
|
29
|
+
cryptography==42.0.7
|
|
37
30
|
# via pyopenssl
|
|
38
31
|
defopt==6.4.0
|
|
39
32
|
# via hdx-python-api
|
|
40
33
|
distlib==0.3.8
|
|
41
34
|
# via virtualenv
|
|
42
|
-
dnspython==2.
|
|
35
|
+
dnspython==2.6.1
|
|
43
36
|
# via email-validator
|
|
44
37
|
docopt==0.6.2
|
|
45
38
|
# via
|
|
46
39
|
# ckanapi
|
|
47
40
|
# num2words
|
|
48
|
-
docutils==0.
|
|
41
|
+
docutils==0.21.2
|
|
49
42
|
# via defopt
|
|
50
|
-
email-validator==2.1.
|
|
43
|
+
email-validator==2.1.1
|
|
51
44
|
# via hdx-python-api
|
|
52
45
|
et-xmlfile==1.1.0
|
|
53
46
|
# via openpyxl
|
|
54
|
-
filelock==3.
|
|
47
|
+
filelock==3.14.0
|
|
55
48
|
# via virtualenv
|
|
56
|
-
frictionless==5.
|
|
49
|
+
frictionless==5.17.0
|
|
57
50
|
# via hdx-python-utilities
|
|
58
|
-
google-auth==2.
|
|
51
|
+
google-auth==2.29.0
|
|
59
52
|
# via
|
|
60
53
|
# google-auth-oauthlib
|
|
61
54
|
# gspread
|
|
62
55
|
google-auth-oauthlib==1.2.0
|
|
63
56
|
# via gspread
|
|
64
|
-
gspread==6.
|
|
57
|
+
gspread==6.1.1
|
|
65
58
|
# via hdx-python-scraper (pyproject.toml)
|
|
66
|
-
hdx-python-api==6.2.
|
|
59
|
+
hdx-python-api==6.2.8
|
|
67
60
|
# via hdx-python-scraper (pyproject.toml)
|
|
68
|
-
hdx-python-country==3.
|
|
61
|
+
hdx-python-country==3.7.0
|
|
69
62
|
# via
|
|
70
|
-
# hdx-python-api
|
|
71
63
|
# hdx-python-scraper (pyproject.toml)
|
|
72
|
-
hdx-python-
|
|
64
|
+
# hdx-python-api
|
|
65
|
+
hdx-python-utilities==3.6.8
|
|
73
66
|
# via
|
|
74
67
|
# hdx-python-api
|
|
75
68
|
# hdx-python-country
|
|
76
69
|
humanize==4.9.0
|
|
77
70
|
# via frictionless
|
|
78
|
-
identify==2.5.
|
|
71
|
+
identify==2.5.36
|
|
79
72
|
# via pre-commit
|
|
80
|
-
idna==3.
|
|
73
|
+
idna==3.7
|
|
81
74
|
# via
|
|
82
75
|
# email-validator
|
|
83
76
|
# requests
|
|
84
77
|
ijson==3.2.3
|
|
85
78
|
# via hdx-python-utilities
|
|
86
|
-
inflect==7.
|
|
79
|
+
inflect==7.2.1
|
|
87
80
|
# via quantulum3
|
|
88
81
|
iniconfig==2.0.0
|
|
89
82
|
# via pytest
|
|
90
83
|
isodate==0.6.1
|
|
91
84
|
# via frictionless
|
|
92
|
-
jinja2==3.1.
|
|
85
|
+
jinja2==3.1.4
|
|
93
86
|
# via frictionless
|
|
94
87
|
jsonlines==4.0.0
|
|
95
88
|
# via hdx-python-utilities
|
|
96
89
|
jsonpath-ng==1.6.1
|
|
97
90
|
# via libhxl
|
|
98
|
-
jsonschema==4.
|
|
91
|
+
jsonschema==4.22.0
|
|
99
92
|
# via
|
|
100
93
|
# frictionless
|
|
101
94
|
# tableschema-to-template
|
|
102
|
-
|
|
95
|
+
jsonschema-specifications==2023.12.1
|
|
96
|
+
# via jsonschema
|
|
97
|
+
libhxl==5.2.1
|
|
103
98
|
# via
|
|
104
99
|
# hdx-python-api
|
|
105
100
|
# hdx-python-country
|
|
@@ -109,33 +104,35 @@ makefun==1.15.2
|
|
|
109
104
|
# via hdx-python-api
|
|
110
105
|
markdown-it-py==3.0.0
|
|
111
106
|
# via rich
|
|
112
|
-
marko==2.0.
|
|
107
|
+
marko==2.0.3
|
|
113
108
|
# via frictionless
|
|
114
|
-
markupsafe==2.1.
|
|
109
|
+
markupsafe==2.1.5
|
|
115
110
|
# via jinja2
|
|
116
111
|
mdurl==0.1.2
|
|
117
112
|
# via markdown-it-py
|
|
113
|
+
more-itertools==10.2.0
|
|
114
|
+
# via inflect
|
|
118
115
|
ndg-httpsclient==0.5.1
|
|
119
116
|
# via hdx-python-api
|
|
120
117
|
nodeenv==1.8.0
|
|
121
118
|
# via pre-commit
|
|
122
119
|
num2words==0.5.13
|
|
123
120
|
# via quantulum3
|
|
124
|
-
numpy==1.26.
|
|
121
|
+
numpy==1.26.4
|
|
125
122
|
# via pandas
|
|
126
123
|
oauthlib==3.2.2
|
|
127
124
|
# via requests-oauthlib
|
|
128
125
|
openpyxl==3.1.2
|
|
129
126
|
# via hdx-python-utilities
|
|
130
|
-
packaging==
|
|
127
|
+
packaging==24.0
|
|
131
128
|
# via pytest
|
|
132
|
-
pandas==2.2.
|
|
129
|
+
pandas==2.2.2
|
|
133
130
|
# via hdx-python-scraper (pyproject.toml)
|
|
134
|
-
petl==1.7.
|
|
131
|
+
petl==1.7.15
|
|
135
132
|
# via frictionless
|
|
136
|
-
platformdirs==4.2.
|
|
133
|
+
platformdirs==4.2.2
|
|
137
134
|
# via virtualenv
|
|
138
|
-
pluggy==1.
|
|
135
|
+
pluggy==1.5.0
|
|
139
136
|
# via pytest
|
|
140
137
|
ply==3.11
|
|
141
138
|
# via
|
|
@@ -143,39 +140,35 @@ ply==3.11
|
|
|
143
140
|
# libhxl
|
|
144
141
|
pockets==0.9.1
|
|
145
142
|
# via sphinxcontrib-napoleon
|
|
146
|
-
pre-commit==3.
|
|
143
|
+
pre-commit==3.7.1
|
|
147
144
|
# via hdx-python-scraper (pyproject.toml)
|
|
148
|
-
pyasn1==0.
|
|
145
|
+
pyasn1==0.6.0
|
|
149
146
|
# via
|
|
150
147
|
# hdx-python-api
|
|
151
148
|
# ndg-httpsclient
|
|
152
149
|
# pyasn1-modules
|
|
153
150
|
# rsa
|
|
154
|
-
pyasn1-modules==0.
|
|
151
|
+
pyasn1-modules==0.4.0
|
|
155
152
|
# via google-auth
|
|
156
|
-
pycparser==2.
|
|
153
|
+
pycparser==2.22
|
|
157
154
|
# via cffi
|
|
158
|
-
pydantic==2.
|
|
159
|
-
# via
|
|
160
|
-
|
|
161
|
-
# inflect
|
|
162
|
-
pydantic-core==2.16.1
|
|
155
|
+
pydantic==2.7.1
|
|
156
|
+
# via frictionless
|
|
157
|
+
pydantic-core==2.18.2
|
|
163
158
|
# via pydantic
|
|
164
|
-
pygments==2.
|
|
159
|
+
pygments==2.18.0
|
|
165
160
|
# via rich
|
|
166
|
-
pyopenssl==24.
|
|
161
|
+
pyopenssl==24.1.0
|
|
167
162
|
# via
|
|
168
163
|
# hdx-python-api
|
|
169
164
|
# ndg-httpsclient
|
|
170
165
|
pyphonetics==0.5.3
|
|
171
166
|
# via hdx-python-country
|
|
172
|
-
|
|
173
|
-
# via jsonschema
|
|
174
|
-
pytest==8.0.0
|
|
167
|
+
pytest==8.2.0
|
|
175
168
|
# via
|
|
176
169
|
# hdx-python-scraper (pyproject.toml)
|
|
177
170
|
# pytest-cov
|
|
178
|
-
pytest-cov==
|
|
171
|
+
pytest-cov==5.0.0
|
|
179
172
|
# via hdx-python-scraper (pyproject.toml)
|
|
180
173
|
python-dateutil==2.8.2
|
|
181
174
|
# via
|
|
@@ -185,22 +178,26 @@ python-dateutil==2.8.2
|
|
|
185
178
|
# pandas
|
|
186
179
|
python-io-wrapper==0.3.1
|
|
187
180
|
# via libhxl
|
|
188
|
-
python-slugify==8.0.
|
|
181
|
+
python-slugify==8.0.4
|
|
189
182
|
# via
|
|
190
183
|
# ckanapi
|
|
191
184
|
# frictionless
|
|
192
|
-
pytz==
|
|
185
|
+
pytz==2024.1
|
|
193
186
|
# via pandas
|
|
194
187
|
pyyaml==6.0.1
|
|
195
188
|
# via
|
|
196
189
|
# frictionless
|
|
197
190
|
# pre-commit
|
|
198
191
|
# tableschema-to-template
|
|
199
|
-
quantulum3==0.9.
|
|
192
|
+
quantulum3==0.9.1
|
|
200
193
|
# via hdx-python-api
|
|
201
194
|
ratelimit==2.2.1
|
|
202
195
|
# via hdx-python-utilities
|
|
203
|
-
|
|
196
|
+
referencing==0.35.1
|
|
197
|
+
# via
|
|
198
|
+
# jsonschema
|
|
199
|
+
# jsonschema-specifications
|
|
200
|
+
regex==2024.5.15
|
|
204
201
|
# via hdx-python-scraper (pyproject.toml)
|
|
205
202
|
requests==2.31.0
|
|
206
203
|
# via
|
|
@@ -212,22 +209,32 @@ requests==2.31.0
|
|
|
212
209
|
# requests-oauthlib
|
|
213
210
|
requests-file==2.0.0
|
|
214
211
|
# via hdx-python-utilities
|
|
215
|
-
requests-oauthlib==
|
|
212
|
+
requests-oauthlib==2.0.0
|
|
216
213
|
# via google-auth-oauthlib
|
|
217
214
|
rfc3986==2.0.0
|
|
218
215
|
# via frictionless
|
|
219
|
-
rich==13.7.
|
|
216
|
+
rich==13.7.1
|
|
220
217
|
# via typer
|
|
218
|
+
rpds-py==0.18.1
|
|
219
|
+
# via
|
|
220
|
+
# jsonschema
|
|
221
|
+
# referencing
|
|
221
222
|
rsa==4.9
|
|
222
223
|
# via google-auth
|
|
223
|
-
ruamel-yaml==0.18.
|
|
224
|
+
ruamel-yaml==0.18.6
|
|
224
225
|
# via hdx-python-utilities
|
|
225
226
|
ruamel-yaml-clib==0.2.8
|
|
226
227
|
# via ruamel-yaml
|
|
228
|
+
setuptools==69.5.1
|
|
229
|
+
# via
|
|
230
|
+
# ckanapi
|
|
231
|
+
# nodeenv
|
|
227
232
|
shellingham==1.5.4
|
|
228
233
|
# via typer
|
|
229
234
|
simpleeval==0.9.13
|
|
230
235
|
# via frictionless
|
|
236
|
+
simplejson==3.19.2
|
|
237
|
+
# via ckanapi
|
|
231
238
|
six==1.16.0
|
|
232
239
|
# via
|
|
233
240
|
# ckanapi
|
|
@@ -237,8 +244,6 @@ six==1.16.0
|
|
|
237
244
|
# sphinxcontrib-napoleon
|
|
238
245
|
sphinxcontrib-napoleon==0.7
|
|
239
246
|
# via defopt
|
|
240
|
-
strenum==0.4.15
|
|
241
|
-
# via gspread
|
|
242
247
|
stringcase==1.2.0
|
|
243
248
|
# via frictionless
|
|
244
249
|
structlog==24.1.0
|
|
@@ -249,41 +254,39 @@ tabulate==0.9.0
|
|
|
249
254
|
# via frictionless
|
|
250
255
|
text-unidecode==1.3
|
|
251
256
|
# via python-slugify
|
|
252
|
-
|
|
253
|
-
# via
|
|
254
|
-
|
|
255
|
-
#
|
|
256
|
-
typing-extensions==4.
|
|
257
|
+
typeguard==4.2.1
|
|
258
|
+
# via inflect
|
|
259
|
+
typer==0.12.3
|
|
260
|
+
# via frictionless
|
|
261
|
+
typing-extensions==4.11.0
|
|
257
262
|
# via
|
|
258
263
|
# frictionless
|
|
259
264
|
# inflect
|
|
260
265
|
# pydantic
|
|
261
266
|
# pydantic-core
|
|
267
|
+
# typeguard
|
|
262
268
|
# typer
|
|
263
|
-
tzdata==
|
|
269
|
+
tzdata==2024.1
|
|
264
270
|
# via pandas
|
|
265
271
|
unidecode==1.3.8
|
|
266
272
|
# via
|
|
267
273
|
# libhxl
|
|
268
274
|
# pyphonetics
|
|
269
|
-
urllib3==2.2.
|
|
275
|
+
urllib3==2.2.1
|
|
270
276
|
# via
|
|
271
277
|
# libhxl
|
|
272
278
|
# requests
|
|
273
|
-
validators==0.
|
|
279
|
+
validators==0.28.1
|
|
274
280
|
# via frictionless
|
|
275
|
-
virtualenv==20.
|
|
281
|
+
virtualenv==20.26.2
|
|
276
282
|
# via pre-commit
|
|
277
|
-
wheel==0.
|
|
283
|
+
wheel==0.43.0
|
|
278
284
|
# via libhxl
|
|
279
285
|
xlrd==2.0.1
|
|
280
286
|
# via hdx-python-utilities
|
|
281
287
|
xlrd3==1.1.0
|
|
282
288
|
# via libhxl
|
|
283
|
-
xlsxwriter==3.
|
|
289
|
+
xlsxwriter==3.2.0
|
|
284
290
|
# via tableschema-to-template
|
|
285
291
|
xlwt==1.3.0
|
|
286
292
|
# via hdx-python-utilities
|
|
287
|
-
|
|
288
|
-
# The following packages are considered to be unsafe in a requirements file:
|
|
289
|
-
# setuptools
|
|
@@ -141,9 +141,9 @@ class BaseScraper(ABC):
|
|
|
141
141
|
"should_overwrite_sources"
|
|
142
142
|
)
|
|
143
143
|
if should_overwrite_sources is not None:
|
|
144
|
-
self.source_configuration[
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
self.source_configuration["should_overwrite_sources"] = (
|
|
145
|
+
should_overwrite_sources
|
|
146
|
+
)
|
|
147
147
|
source = self.datasetinfo["source"]
|
|
148
148
|
if isinstance(source, str):
|
|
149
149
|
source = {"default_source": source}
|