hdx-python-scraper 2.4.0__tar.gz → 2.5.0__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.4.0 → hdx_python_scraper-2.5.0}/.config/pre-commit-config.yaml +2 -2
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/CONTRIBUTING.md +2 -2
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/PKG-INFO +4 -4
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/documentation/main.md +28 -2
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/documentation/pydoc-markdown.yaml +11 -14
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/pyproject.toml +4 -4
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/requirements.txt +37 -49
- {hdx_python_scraper-2.4.0/src/hdx/scraper → hdx_python_scraper-2.5.0/src/hdx/scraper/framework}/__init__.py +0 -0
- {hdx_python_scraper-2.4.0/src/hdx/scraper → hdx_python_scraper-2.5.0/src/hdx/scraper/framework}/_version.py +2 -2
- {hdx_python_scraper-2.4.0/src/hdx/scraper → hdx_python_scraper-2.5.0/src/hdx/scraper/framework}/outputs/googlesheets.py +1 -1
- {hdx_python_scraper-2.4.0/src/hdx/scraper → hdx_python_scraper-2.5.0/src/hdx/scraper/framework}/runner.py +4 -4
- {hdx_python_scraper-2.4.0/src/hdx/scraper → hdx_python_scraper-2.5.0/src/hdx/scraper/framework}/utilities/reader.py +1 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/config/project_configuration.yaml +2 -1
- {hdx_python_scraper-2.4.0/tests/hdx/scraper → hdx_python_scraper-2.5.0/tests/hdx/scraper/framework}/conftest.py +4 -4
- hdx_python_scraper-2.5.0/tests/hdx/scraper/framework/custom/__init__.py +0 -0
- {hdx_python_scraper-2.4.0/tests/hdx/scraper → hdx_python_scraper-2.5.0/tests/hdx/scraper/framework/custom}/affected_targeted_reached.py +2 -2
- {hdx_python_scraper-2.4.0/tests/hdx/scraper → hdx_python_scraper-2.5.0/tests/hdx/scraper/framework/custom}/education_closures.py +1 -1
- {hdx_python_scraper-2.4.0/tests/hdx/scraper → hdx_python_scraper-2.5.0/tests/hdx/scraper/framework/custom}/education_enrolment.py +1 -1
- hdx_python_scraper-2.4.0/tests/hdx/scraper/test_scrapers_custom.py → hdx_python_scraper-2.5.0/tests/hdx/scraper/framework/custom/test_custom.py +5 -5
- hdx_python_scraper-2.5.0/tests/hdx/scraper/framework/outputs/__init__.py +0 -0
- {hdx_python_scraper-2.4.0/tests/hdx/scraper → hdx_python_scraper-2.5.0/tests/hdx/scraper/framework/outputs}/test_output.py +4 -4
- hdx_python_scraper-2.5.0/tests/hdx/scraper/framework/scrapers/__init__.py +0 -0
- hdx_python_scraper-2.4.0/tests/hdx/scraper/test_scrapers_aggregation.py → hdx_python_scraper-2.5.0/tests/hdx/scraper/framework/scrapers/test_aggregation.py +5 -5
- hdx_python_scraper-2.4.0/tests/hdx/scraper/test_scrapers_appenddata.py → hdx_python_scraper-2.5.0/tests/hdx/scraper/framework/scrapers/test_appenddata.py +7 -7
- hdx_python_scraper-2.4.0/tests/hdx/scraper/test_scrapers_global.py → hdx_python_scraper-2.5.0/tests/hdx/scraper/framework/scrapers/test_global.py +4 -4
- hdx_python_scraper-2.4.0/tests/hdx/scraper/test_scrapers_multipleurls.py → hdx_python_scraper-2.5.0/tests/hdx/scraper/framework/scrapers/test_multipleurls.py +4 -4
- hdx_python_scraper-2.4.0/tests/hdx/scraper/test_scrapers_national.py → hdx_python_scraper-2.5.0/tests/hdx/scraper/framework/scrapers/test_national.py +7 -7
- hdx_python_scraper-2.4.0/tests/hdx/scraper/test_scrapers_regionaltoplevel.py → hdx_python_scraper-2.5.0/tests/hdx/scraper/framework/scrapers/test_regionaltoplevel.py +7 -7
- hdx_python_scraper-2.4.0/tests/hdx/scraper/test_scrapers_resource_downloaders.py → hdx_python_scraper-2.5.0/tests/hdx/scraper/framework/scrapers/test_resource_downloaders.py +3 -3
- hdx_python_scraper-2.4.0/tests/hdx/scraper/test_scrapers_subnational.py → hdx_python_scraper-2.5.0/tests/hdx/scraper/framework/scrapers/test_subnational.py +9 -8
- hdx_python_scraper-2.4.0/tests/hdx/scraper/test_scrapers_timeseries.py → hdx_python_scraper-2.5.0/tests/hdx/scraper/framework/scrapers/test_timeseries.py +4 -4
- {hdx_python_scraper-2.4.0/tests/hdx/scraper → hdx_python_scraper-2.5.0/tests/hdx/scraper/framework}/test_runner.py +2 -2
- hdx_python_scraper-2.5.0/tests/hdx/scraper/framework/utilities/__init__.py +0 -0
- {hdx_python_scraper-2.4.0/tests/hdx/scraper → hdx_python_scraper-2.5.0/tests/hdx/scraper/framework/utilities}/test_readers.py +1 -1
- {hdx_python_scraper-2.4.0/tests/hdx/scraper → hdx_python_scraper-2.5.0/tests/hdx/scraper/framework/utilities}/test_regionlookup.py +1 -1
- {hdx_python_scraper-2.4.0/tests/hdx/scraper → hdx_python_scraper-2.5.0/tests/hdx/scraper/framework/utilities}/test_sources.py +5 -3
- {hdx_python_scraper-2.4.0/tests/hdx/scraper → hdx_python_scraper-2.5.0/tests/hdx/scraper/framework/utilities}/test_utils.py +1 -1
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/.config/coveragerc +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/.config/pytest.ini +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/.config/ruff.toml +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/.github/workflows/publish.yaml +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/.github/workflows/run-python-tests.yaml +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/.gitignore +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/LICENSE +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/README.md +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/documentation/.readthedocs.yaml +0 -0
- {hdx_python_scraper-2.4.0/src/hdx/scraper → hdx_python_scraper-2.5.0/src/hdx/scraper/framework}/base_scraper.py +0 -0
- {hdx_python_scraper-2.4.0/src/hdx/scraper/configurable → hdx_python_scraper-2.5.0/src/hdx/scraper/framework/outputs}/__init__.py +0 -0
- {hdx_python_scraper-2.4.0/src/hdx/scraper → hdx_python_scraper-2.5.0/src/hdx/scraper/framework}/outputs/base.py +0 -0
- {hdx_python_scraper-2.4.0/src/hdx/scraper → hdx_python_scraper-2.5.0/src/hdx/scraper/framework}/outputs/excelfile.py +0 -0
- {hdx_python_scraper-2.4.0/src/hdx/scraper → hdx_python_scraper-2.5.0/src/hdx/scraper/framework}/outputs/json.py +0 -0
- {hdx_python_scraper-2.4.0/src/hdx/scraper/outputs → hdx_python_scraper-2.5.0/src/hdx/scraper/framework/scrapers}/__init__.py +0 -0
- {hdx_python_scraper-2.4.0/src/hdx/scraper/configurable → hdx_python_scraper-2.5.0/src/hdx/scraper/framework/scrapers}/aggregator.py +0 -0
- /hdx_python_scraper-2.4.0/src/hdx/scraper/configurable/scraper.py → /hdx_python_scraper-2.5.0/src/hdx/scraper/framework/scrapers/configurable_scraper.py +0 -0
- {hdx_python_scraper-2.4.0/src/hdx/scraper/configurable → hdx_python_scraper-2.5.0/src/hdx/scraper/framework/scrapers}/resource_downloader.py +0 -0
- {hdx_python_scraper-2.4.0/src/hdx/scraper/configurable → hdx_python_scraper-2.5.0/src/hdx/scraper/framework/scrapers}/rowparser.py +0 -0
- {hdx_python_scraper-2.4.0/src/hdx/scraper/configurable → hdx_python_scraper-2.5.0/src/hdx/scraper/framework/scrapers}/timeseries.py +0 -0
- {hdx_python_scraper-2.4.0/src/hdx/scraper → hdx_python_scraper-2.5.0/src/hdx/scraper/framework}/utilities/__init__.py +0 -0
- {hdx_python_scraper-2.4.0/src/hdx/scraper → hdx_python_scraper-2.5.0/src/hdx/scraper/framework}/utilities/fallbacks.py +0 -0
- {hdx_python_scraper-2.4.0/src/hdx/scraper → hdx_python_scraper-2.5.0/src/hdx/scraper/framework}/utilities/region_lookup.py +0 -0
- {hdx_python_scraper-2.4.0/src/hdx/scraper → hdx_python_scraper-2.5.0/src/hdx/scraper/framework}/utilities/sources.py +0 -0
- {hdx_python_scraper-2.4.0/src/hdx/scraper → hdx_python_scraper-2.5.0/src/hdx/scraper/framework}/utilities/writer.py +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/access_2pacx-1vrszjzuyvt9i-mkrq2hbxrul2lx2vihkthqm-lae8nyhqty70zqtcufs3pxbhzgat1l2bkoa4-daoap-pub-gid-574237756-single-true-output-csv.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/additional-json.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/altworldindata_data-tagger-match-all-on-tagger-01-header-location-tagger-01-tag.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/casualties_2pacx-1vqidedbzz0ehrc0b4fswip14r7mdtu1mpmwakuxupelsah2awcurkgalfduhjvyjul8vzzat3r1b5qg-pub-gid-0-single-true-output-csv.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/cbpf-allocations-and-contributions.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/cbpf2-allocations-and-contributions.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/cerf-covid-19-allocations.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/cerf2-covid-19-allocations.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/cerf2_global_download-full-pfmb-allocations.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/cerf_global_download-full-pfmb-allocations.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/covax_2pacx-1vtvzu79pptfaa2syevoqfyrrjy63djwitqu0ffbxiqczoun9k9timwmrvfgg1rbsnlmgyugzseiaye2-pub-gid-992438980-single-true-output-csv.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/covidtests_data-owid-covid-data.xlsx +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/education_closures_broken.xls +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/education_closures_school_closures.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/education_enrolment_enrollment_data.xlsx +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/ethiopia-drought-related-key-figures.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/ethiopia-pin-targeted-reached-by-location-and-cluster.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/ethiopia_drought_affected_targeted_reached_by_cluster.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/fallbacks.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/gam_download-unicef-who-wb-global-expanded-databases-severe-wasting.xlsx +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/gam_other_download-unicef-who-wb-global-expanded-databases-severe-wasting.xlsx +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/global-school-closures-covid19.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/hno_2017_sahel_nutrition.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/hno_2017_sahel_people_in_need.xlsx +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/idmc-internally-displaced-persons-idps.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/idps_download-displacement-data.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/idps_override_population-widget-id-264111-geo-id-693-population-group-54074999.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/idps_somalia_som_unhcr_prmn_displacement_dataset.xlsx +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/ipc_somalia_som_food_insecurity_oct_dec2022_projection.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/kenya-drought-related-key-figures.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/kenya-pin-targeted-reached-by-location-and-cluster.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/kenya_drought_affected_targeted_reached_by_cluster.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/key_figures_2pacx-1vrppqx8jtkkkrckmzfncmmtfecvcpkbp9pdhs1sqtuyacmbsx8tlaxpgblfce-lcehukregguxja-4s-pub-gid-0-single-true-output-csv.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/key_figures_2pacx-1vrppqx8jtkkkrckmzfncmmtfecvcpkbp9pdhs1sqtuyacmbsx8tlaxpgblfce-lcehukregguxja-4s-pub-gid-1275038715-single-true-output-csv.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/key_figures_2pacx-1vrppqx8jtkkkrckmzfncmmtfecvcpkbp9pdhs1sqtuyacmbsx8tlaxpgblfce-lcehukregguxja-4s-pub-gid-2015311116-single-true-output-csv.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/key_figures_eth_2pacx-1vrppqx8jtkkkrckmzfncmmtfecvcpkbp9pdhs1sqtuyacmbsx8tlaxpgblfce-lcehukregguxja-4s-pub-gid-2015311116-single-true-output-csv.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/key_figures_ken_2pacx-1vrppqx8jtkkkrckmzfncmmtfecvcpkbp9pdhs1sqtuyacmbsx8tlaxpgblfce-lcehukregguxja-4s-pub-gid-1275038715-single-true-output-csv.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/key_figures_som_2pacx-1vrppqx8jtkkkrckmzfncmmtfecvcpkbp9pdhs1sqtuyacmbsx8tlaxpgblfce-lcehukregguxja-4s-pub-gid-0-single-true-output-csv.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/ourworldindata_data-tagger-match-all-on-tagger-01-header-location-tagger-01-tag.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/ourworldindata_other_data-tagger-match-all-on-tagger-01-header-location-tagger-01-tag.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/oxcgrt_oxcgrt_csv.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/oxford-covid-19-government-response-tracker.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/population.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/population_indicator-sp-pop-downloadformat-excel-dataformat-list-totl.xls +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/population_other_indicator-sp-pop-downloadformat-excel-dataformat-list-totl.xls +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/regions_tbl_regcov_2020_ocha.xlsx +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/resource_downloader_xlsx_ukr_border_crossings_090622.xlsx +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/sadd-countries-to-include.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/sadd_covid-data-dataset-fullvars-extype-csv.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/sahel-humanitarian-needs-overview.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/sahel-humanitarian-needs-overview_prefix.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/somalia-acute-food-insecurity-country-data.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/somalia-drought-related-key-figures.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/somalia-internally-displaced-persons-idps.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/somalia-pin-targeted-reached-by-location-and-cluster.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/somalia_drought_affected_targeted_reached_by_cluster.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/timeseries_casualties_2pacx-1vqidedbzz0ehrc0b4fswip14r7mdtu1mpmwakuxupelsah2awcurkgalfduhjvyjul8vzzat3r1b5qg-pub-gid-0-single-true-output-csv.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/total-covid-19-tests-performed-by-country.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/ukraine-border-crossings.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/ukraine-who-does-what-where-3w.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/unocha-office-locations.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/who_national2_who-covid-19-global-data.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/who_national3_who-covid-19-global-data.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/who_national_who-covid-19-global-data.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/whowhatwhere_afg_3w_data.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/input/whowhatwhere_notags_3w_data.csv +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/test_output.xlsx +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/test_scraper_all.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/test_scraper_other.json +0 -0
- {hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/fixtures/test_scraper_population.json +0 -0
- {hdx_python_scraper-2.4.0/tests/hdx/scraper → hdx_python_scraper-2.5.0/tests/hdx/scraper/framework}/__init__.py +0 -0
- {hdx_python_scraper-2.4.0/tests/hdx/scraper → hdx_python_scraper-2.5.0/tests/hdx/scraper/framework/scrapers}/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.4
|
|
12
|
+
rev: v0.6.4
|
|
13
13
|
hooks:
|
|
14
14
|
# Run the linter.
|
|
15
15
|
- id: ruff
|
|
@@ -18,7 +18,7 @@ repos:
|
|
|
18
18
|
- id: ruff-format
|
|
19
19
|
args: [--config, .config/ruff.toml]
|
|
20
20
|
- repo: https://github.com/astral-sh/uv-pre-commit
|
|
21
|
-
rev: 0.
|
|
21
|
+
rev: 0.4.7
|
|
22
22
|
hooks:
|
|
23
23
|
# Run the pip compile
|
|
24
24
|
- id: pip-compile
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## Environment
|
|
4
4
|
|
|
5
|
-
Development is currently done using Python 3.
|
|
5
|
+
Development is currently done using Python 3.12. We recommend using a virtual
|
|
6
6
|
environment such as ``venv``:
|
|
7
7
|
|
|
8
|
-
python3.
|
|
8
|
+
python3.12 -m venv venv
|
|
9
9
|
source venv/bin/activate
|
|
10
10
|
|
|
11
11
|
In your virtual environment, please install all packages for
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: hdx-python-scraper
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.5.0
|
|
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>
|
|
@@ -26,9 +26,9 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
26
26
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
27
27
|
Requires-Python: >=3.8
|
|
28
28
|
Requires-Dist: gspread
|
|
29
|
-
Requires-Dist: hdx-python-api>=6.3.
|
|
30
|
-
Requires-Dist: hdx-python-country>=3.7.
|
|
31
|
-
Requires-Dist: hdx-python-utilities>=3.7.
|
|
29
|
+
Requires-Dist: hdx-python-api>=6.3.4
|
|
30
|
+
Requires-Dist: hdx-python-country>=3.7.8
|
|
31
|
+
Requires-Dist: hdx-python-utilities>=3.7.3
|
|
32
32
|
Requires-Dist: regex
|
|
33
33
|
Provides-Extra: dev
|
|
34
34
|
Requires-Dist: pre-commit; extra == 'dev'
|
|
@@ -26,6 +26,8 @@ install with:
|
|
|
26
26
|
pip install hdx-python-scraper[pandas]
|
|
27
27
|
|
|
28
28
|
## Breaking Changes
|
|
29
|
+
From 2.5.0, package names have changed to avoid name space clashes
|
|
30
|
+
|
|
29
31
|
From 2.3.0, resource name is used when available instead of creating name from
|
|
30
32
|
url so tests that use saved data from the Read class may break. file_type
|
|
31
33
|
parameters in various Read methods renamed to format.
|
|
@@ -335,7 +337,7 @@ default is:
|
|
|
335
337
|
### Custom Scrapers
|
|
336
338
|
|
|
337
339
|
It is possible to define custom scrapers written in Python which must inherit
|
|
338
|
-
[BaseScraper](https://github.com/OCHA-DAP/hdx-python-scraper/blob/main/src/hdx/scraper/base_scraper.py),
|
|
340
|
+
[BaseScraper](https://github.com/OCHA-DAP/hdx-python-scraper/blob/main/src/hdx/scraper/framework/base_scraper.py),
|
|
339
341
|
calling its constructor and providing a `run` method. Other methods where a default
|
|
340
342
|
implementation has been provided can be overridden such as `add_sources` and
|
|
341
343
|
`add_population`. There are also two hooks for running steps at particular points.
|
|
@@ -392,7 +394,7 @@ from regions to values. In this case, since national and regional each have only
|
|
|
392
394
|
header and HXL hashtag, there is only one dictionary to populate for each.
|
|
393
395
|
|
|
394
396
|
An example of a custom scraper can be seen
|
|
395
|
-
[here](https://github.com/OCHA-DAP/hdx-python-scraper/blob/main/tests/hdx/scraper/education_closures.py).
|
|
397
|
+
[here](https://github.com/OCHA-DAP/hdx-python-scraper/blob/main/tests/hdx/scraper/framework/scrapers/education_closures.py).
|
|
396
398
|
|
|
397
399
|
An example of overriding `add_sources` to customise the source information that is
|
|
398
400
|
output is as follows:
|
|
@@ -1089,6 +1091,30 @@ same HXL hashtags.
|
|
|
1089
1091
|
use_hxl: True
|
|
1090
1092
|
should_overwrite_sources: True
|
|
1091
1093
|
|
|
1094
|
+
The xlsx2csv option below converts the xlsx to csv before processing.
|
|
1095
|
+
|
|
1096
|
+
idps_somalia:
|
|
1097
|
+
dataset: "somalia-internally-displaced-persons-idps"
|
|
1098
|
+
format: "xlsx"
|
|
1099
|
+
xlsx2csv: True
|
|
1100
|
+
filter_cols:
|
|
1101
|
+
- "Reason"
|
|
1102
|
+
- "Year"
|
|
1103
|
+
prefilter: "'drought' in Reason.lower() and int(Year) in (self.today.year - 1, self.today.year)"
|
|
1104
|
+
admin:
|
|
1105
|
+
- value: "SOM"
|
|
1106
|
+
- "Current (Arrival) District"
|
|
1107
|
+
input:
|
|
1108
|
+
- "Number of Individuals"
|
|
1109
|
+
sum:
|
|
1110
|
+
- formula: "int(Number of Individuals)"
|
|
1111
|
+
mustbepopulated: True
|
|
1112
|
+
output:
|
|
1113
|
+
- "IDPs"
|
|
1114
|
+
output_hxl:
|
|
1115
|
+
- "#affected+idps+ind"
|
|
1116
|
+
source_date_format: "%Y-%m-%d"
|
|
1117
|
+
|
|
1092
1118
|
## Population Data
|
|
1093
1119
|
|
|
1094
1120
|
Population data is treated as a special class of data. By default, configurable and
|
|
@@ -3,7 +3,7 @@ loaders:
|
|
|
3
3
|
search_path:
|
|
4
4
|
- ../src
|
|
5
5
|
packages:
|
|
6
|
-
- hdx.scraper
|
|
6
|
+
- hdx.scraper.framework
|
|
7
7
|
renderer:
|
|
8
8
|
type: mkdocs
|
|
9
9
|
output_directory: docs
|
|
@@ -21,21 +21,18 @@ renderer:
|
|
|
21
21
|
source: main.md
|
|
22
22
|
- title: API Documentation
|
|
23
23
|
children:
|
|
24
|
-
- title:
|
|
24
|
+
- title: Runner
|
|
25
25
|
contents:
|
|
26
|
-
- hdx.scraper.
|
|
27
|
-
- title:
|
|
26
|
+
- hdx.scraper.framework.runner.Runner.*
|
|
27
|
+
- title: Scraper Base Class
|
|
28
28
|
contents:
|
|
29
|
-
- hdx.scraper.
|
|
30
|
-
- title:
|
|
29
|
+
- hdx.scraper.framework.base_scraper.BaseScraper.*
|
|
30
|
+
- title: Scrapers
|
|
31
31
|
contents:
|
|
32
|
-
- hdx.scraper.
|
|
33
|
-
- title: Fallbacks
|
|
34
|
-
contents:
|
|
35
|
-
- hdx.scraper.utilities.fallbacks.Fallbacks
|
|
36
|
-
- title: Run Scrapers
|
|
37
|
-
contents:
|
|
38
|
-
- hdx.scraper.runner.Runner.*
|
|
32
|
+
- hdx.scraper.framework.scrapers.*
|
|
39
33
|
- title: Outputs
|
|
40
34
|
contents:
|
|
41
|
-
- hdx.scraper.outputs.*
|
|
35
|
+
- hdx.scraper.framework.outputs.*
|
|
36
|
+
- title: Utilities
|
|
37
|
+
contents:
|
|
38
|
+
- hdx.scraper.framework.utilities.*
|
|
@@ -34,9 +34,9 @@ classifiers = [
|
|
|
34
34
|
requires-python = ">=3.8"
|
|
35
35
|
|
|
36
36
|
dependencies = [
|
|
37
|
-
"hdx-python-api>=6.3.
|
|
38
|
-
"hdx-python-country>=3.7.
|
|
39
|
-
"hdx-python-utilities>=3.7.
|
|
37
|
+
"hdx-python-api>=6.3.4",
|
|
38
|
+
"hdx-python-country>=3.7.8",
|
|
39
|
+
"hdx-python-utilities>=3.7.3",
|
|
40
40
|
"gspread",
|
|
41
41
|
"regex",
|
|
42
42
|
]
|
|
@@ -65,7 +65,7 @@ dev = ["pre-commit"]
|
|
|
65
65
|
packages = ["src/hdx"]
|
|
66
66
|
|
|
67
67
|
[tool.hatch.build.hooks.vcs]
|
|
68
|
-
version-file = "src/hdx/scraper/_version.py"
|
|
68
|
+
version-file = "src/hdx/scraper/framework/_version.py"
|
|
69
69
|
|
|
70
70
|
# Versioning
|
|
71
71
|
|
|
@@ -2,18 +2,16 @@
|
|
|
2
2
|
# uv pip compile pyproject.toml --resolver=backtracking --all-extras -o requirements.txt
|
|
3
3
|
annotated-types==0.7.0
|
|
4
4
|
# via pydantic
|
|
5
|
-
attrs==
|
|
5
|
+
attrs==24.2.0
|
|
6
6
|
# via
|
|
7
7
|
# frictionless
|
|
8
8
|
# jsonlines
|
|
9
9
|
# jsonschema
|
|
10
10
|
# referencing
|
|
11
|
-
cachetools==5.
|
|
11
|
+
cachetools==5.5.0
|
|
12
12
|
# via google-auth
|
|
13
|
-
certifi==2024.
|
|
13
|
+
certifi==2024.8.30
|
|
14
14
|
# via requests
|
|
15
|
-
cffi==1.16.0
|
|
16
|
-
# via cryptography
|
|
17
15
|
cfgv==3.4.0
|
|
18
16
|
# via pre-commit
|
|
19
17
|
chardet==5.2.0
|
|
@@ -24,10 +22,8 @@ ckanapi==4.8
|
|
|
24
22
|
# via hdx-python-api
|
|
25
23
|
click==8.1.7
|
|
26
24
|
# via typer
|
|
27
|
-
coverage==7.6.
|
|
25
|
+
coverage==7.6.1
|
|
28
26
|
# via pytest-cov
|
|
29
|
-
cryptography==42.0.8
|
|
30
|
-
# via pyopenssl
|
|
31
27
|
defopt==6.4.0
|
|
32
28
|
# via hdx-python-api
|
|
33
29
|
distlib==0.3.8
|
|
@@ -44,11 +40,11 @@ email-validator==2.2.0
|
|
|
44
40
|
# via hdx-python-api
|
|
45
41
|
et-xmlfile==1.1.0
|
|
46
42
|
# via openpyxl
|
|
47
|
-
filelock==3.
|
|
43
|
+
filelock==3.16.0
|
|
48
44
|
# via virtualenv
|
|
49
|
-
frictionless==5.17.
|
|
45
|
+
frictionless==5.17.1
|
|
50
46
|
# via hdx-python-utilities
|
|
51
|
-
google-auth==2.
|
|
47
|
+
google-auth==2.34.0
|
|
52
48
|
# via
|
|
53
49
|
# google-auth-oauthlib
|
|
54
50
|
# gspread
|
|
@@ -56,28 +52,28 @@ google-auth-oauthlib==1.2.1
|
|
|
56
52
|
# via gspread
|
|
57
53
|
gspread==6.1.2
|
|
58
54
|
# via hdx-python-scraper (pyproject.toml)
|
|
59
|
-
hdx-python-api==6.3.
|
|
55
|
+
hdx-python-api==6.3.4
|
|
60
56
|
# via hdx-python-scraper (pyproject.toml)
|
|
61
|
-
hdx-python-country==3.7.
|
|
57
|
+
hdx-python-country==3.7.8
|
|
62
58
|
# via
|
|
63
59
|
# hdx-python-scraper (pyproject.toml)
|
|
64
60
|
# hdx-python-api
|
|
65
|
-
hdx-python-utilities==3.7.
|
|
61
|
+
hdx-python-utilities==3.7.3
|
|
66
62
|
# via
|
|
67
63
|
# hdx-python-scraper (pyproject.toml)
|
|
68
64
|
# hdx-python-api
|
|
69
65
|
# hdx-python-country
|
|
70
66
|
humanize==4.10.0
|
|
71
67
|
# via frictionless
|
|
72
|
-
identify==2.6.
|
|
68
|
+
identify==2.6.1
|
|
73
69
|
# via pre-commit
|
|
74
|
-
idna==3.
|
|
70
|
+
idna==3.10
|
|
75
71
|
# via
|
|
76
72
|
# email-validator
|
|
77
73
|
# requests
|
|
78
74
|
ijson==3.3.0
|
|
79
75
|
# via hdx-python-utilities
|
|
80
|
-
inflect==7.
|
|
76
|
+
inflect==7.4.0
|
|
81
77
|
# via quantulum3
|
|
82
78
|
iniconfig==2.0.0
|
|
83
79
|
# via pytest
|
|
@@ -111,15 +107,13 @@ markupsafe==2.1.5
|
|
|
111
107
|
# via jinja2
|
|
112
108
|
mdurl==0.1.2
|
|
113
109
|
# via markdown-it-py
|
|
114
|
-
more-itertools==10.
|
|
110
|
+
more-itertools==10.5.0
|
|
115
111
|
# via inflect
|
|
116
|
-
ndg-httpsclient==0.5.1
|
|
117
|
-
# via hdx-python-api
|
|
118
112
|
nodeenv==1.9.1
|
|
119
113
|
# via pre-commit
|
|
120
114
|
num2words==0.5.13
|
|
121
115
|
# via quantulum3
|
|
122
|
-
numpy==2.
|
|
116
|
+
numpy==2.1.1
|
|
123
117
|
# via pandas
|
|
124
118
|
oauthlib==3.2.2
|
|
125
119
|
# via requests-oauthlib
|
|
@@ -131,7 +125,7 @@ pandas==2.2.2
|
|
|
131
125
|
# via hdx-python-scraper (pyproject.toml)
|
|
132
126
|
petl==1.7.15
|
|
133
127
|
# via frictionless
|
|
134
|
-
platformdirs==4.
|
|
128
|
+
platformdirs==4.3.3
|
|
135
129
|
# via virtualenv
|
|
136
130
|
pluggy==1.5.0
|
|
137
131
|
# via pytest
|
|
@@ -141,31 +135,23 @@ ply==3.11
|
|
|
141
135
|
# libhxl
|
|
142
136
|
pockets==0.9.1
|
|
143
137
|
# via sphinxcontrib-napoleon
|
|
144
|
-
pre-commit==3.
|
|
138
|
+
pre-commit==3.8.0
|
|
145
139
|
# via hdx-python-scraper (pyproject.toml)
|
|
146
|
-
pyasn1==0.6.
|
|
140
|
+
pyasn1==0.6.1
|
|
147
141
|
# via
|
|
148
|
-
# hdx-python-api
|
|
149
|
-
# ndg-httpsclient
|
|
150
142
|
# pyasn1-modules
|
|
151
143
|
# rsa
|
|
152
|
-
pyasn1-modules==0.4.
|
|
144
|
+
pyasn1-modules==0.4.1
|
|
153
145
|
# via google-auth
|
|
154
|
-
|
|
155
|
-
# via cffi
|
|
156
|
-
pydantic==2.8.2
|
|
146
|
+
pydantic==2.9.1
|
|
157
147
|
# via frictionless
|
|
158
|
-
pydantic-core==2.
|
|
148
|
+
pydantic-core==2.23.3
|
|
159
149
|
# via pydantic
|
|
160
150
|
pygments==2.18.0
|
|
161
151
|
# via rich
|
|
162
|
-
pyopenssl==24.1.0
|
|
163
|
-
# via
|
|
164
|
-
# hdx-python-api
|
|
165
|
-
# ndg-httpsclient
|
|
166
152
|
pyphonetics==0.5.3
|
|
167
153
|
# via hdx-python-country
|
|
168
|
-
pytest==8.
|
|
154
|
+
pytest==8.3.3
|
|
169
155
|
# via
|
|
170
156
|
# hdx-python-scraper (pyproject.toml)
|
|
171
157
|
# pytest-cov
|
|
@@ -183,9 +169,9 @@ python-slugify==8.0.4
|
|
|
183
169
|
# via
|
|
184
170
|
# ckanapi
|
|
185
171
|
# frictionless
|
|
186
|
-
pytz==2024.
|
|
172
|
+
pytz==2024.2
|
|
187
173
|
# via pandas
|
|
188
|
-
pyyaml==6.0.
|
|
174
|
+
pyyaml==6.0.2
|
|
189
175
|
# via
|
|
190
176
|
# frictionless
|
|
191
177
|
# pre-commit
|
|
@@ -198,7 +184,7 @@ referencing==0.35.1
|
|
|
198
184
|
# via
|
|
199
185
|
# jsonschema
|
|
200
186
|
# jsonschema-specifications
|
|
201
|
-
regex==2024.
|
|
187
|
+
regex==2024.9.11
|
|
202
188
|
# via hdx-python-scraper (pyproject.toml)
|
|
203
189
|
requests==2.32.3
|
|
204
190
|
# via
|
|
@@ -214,9 +200,9 @@ requests-oauthlib==2.0.0
|
|
|
214
200
|
# via google-auth-oauthlib
|
|
215
201
|
rfc3986==2.0.0
|
|
216
202
|
# via frictionless
|
|
217
|
-
rich==13.
|
|
203
|
+
rich==13.8.1
|
|
218
204
|
# via typer
|
|
219
|
-
rpds-py==0.
|
|
205
|
+
rpds-py==0.20.0
|
|
220
206
|
# via
|
|
221
207
|
# jsonschema
|
|
222
208
|
# referencing
|
|
@@ -226,13 +212,13 @@ ruamel-yaml==0.18.6
|
|
|
226
212
|
# via hdx-python-utilities
|
|
227
213
|
ruamel-yaml-clib==0.2.8
|
|
228
214
|
# via ruamel-yaml
|
|
229
|
-
setuptools==
|
|
215
|
+
setuptools==75.0.0
|
|
230
216
|
# via ckanapi
|
|
231
217
|
shellingham==1.5.4
|
|
232
218
|
# via typer
|
|
233
219
|
simpleeval==0.9.13
|
|
234
220
|
# via frictionless
|
|
235
|
-
simplejson==3.19.
|
|
221
|
+
simplejson==3.19.3
|
|
236
222
|
# via ckanapi
|
|
237
223
|
six==1.16.0
|
|
238
224
|
# via
|
|
@@ -245,7 +231,7 @@ sphinxcontrib-napoleon==0.7
|
|
|
245
231
|
# via defopt
|
|
246
232
|
stringcase==1.2.0
|
|
247
233
|
# via frictionless
|
|
248
|
-
structlog==24.
|
|
234
|
+
structlog==24.4.0
|
|
249
235
|
# via libhxl
|
|
250
236
|
tableschema-to-template==0.0.13
|
|
251
237
|
# via hdx-python-utilities
|
|
@@ -255,7 +241,7 @@ text-unidecode==1.3
|
|
|
255
241
|
# via python-slugify
|
|
256
242
|
typeguard==4.3.0
|
|
257
243
|
# via inflect
|
|
258
|
-
typer==0.12.
|
|
244
|
+
typer==0.12.5
|
|
259
245
|
# via frictionless
|
|
260
246
|
typing-extensions==4.12.2
|
|
261
247
|
# via
|
|
@@ -270,20 +256,22 @@ unidecode==1.3.8
|
|
|
270
256
|
# via
|
|
271
257
|
# libhxl
|
|
272
258
|
# pyphonetics
|
|
273
|
-
urllib3==2.2.
|
|
259
|
+
urllib3==2.2.3
|
|
274
260
|
# via
|
|
275
261
|
# libhxl
|
|
276
262
|
# requests
|
|
277
|
-
validators==0.
|
|
263
|
+
validators==0.34.0
|
|
278
264
|
# via frictionless
|
|
279
|
-
virtualenv==20.26.
|
|
265
|
+
virtualenv==20.26.4
|
|
280
266
|
# via pre-commit
|
|
281
|
-
wheel==0.
|
|
267
|
+
wheel==0.44.0
|
|
282
268
|
# via libhxl
|
|
283
269
|
xlrd==2.0.1
|
|
284
270
|
# via hdx-python-utilities
|
|
285
271
|
xlrd3==1.1.0
|
|
286
272
|
# via libhxl
|
|
273
|
+
xlsx2csv==0.8.3
|
|
274
|
+
# via hdx-python-utilities
|
|
287
275
|
xlsxwriter==3.2.0
|
|
288
276
|
# via tableschema-to-template
|
|
289
277
|
xlwt==1.3.0
|
|
File without changes
|
|
@@ -5,11 +5,11 @@ from traceback import format_exc
|
|
|
5
5
|
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
|
|
6
6
|
|
|
7
7
|
from .base_scraper import BaseScraper
|
|
8
|
-
from .configurable.aggregator import Aggregator
|
|
9
|
-
from .configurable.resource_downloader import ResourceDownloader
|
|
10
|
-
from .configurable.scraper import ConfigurableScraper
|
|
11
|
-
from .configurable.timeseries import TimeSeries
|
|
12
8
|
from .outputs.base import BaseOutput
|
|
9
|
+
from .scrapers.aggregator import Aggregator
|
|
10
|
+
from .scrapers.configurable_scraper import ConfigurableScraper
|
|
11
|
+
from .scrapers.resource_downloader import ResourceDownloader
|
|
12
|
+
from .scrapers.timeseries import TimeSeries
|
|
13
13
|
from .utilities import get_startend_dates_from_time_period
|
|
14
14
|
from .utilities.fallbacks import Fallbacks
|
|
15
15
|
from .utilities.reader import Read
|
|
@@ -215,6 +215,7 @@ class Read(Retrieve):
|
|
|
215
215
|
kwargs["fill_merged_cells"] = True
|
|
216
216
|
elif "fill_merged_cells" not in kwargs:
|
|
217
217
|
kwargs["fill_merged_cells"] = False
|
|
218
|
+
kwargs["xlsx2csv"] = datasetinfo.get("xlsx2csv", False)
|
|
218
219
|
if sheet:
|
|
219
220
|
kwargs["sheet"] = sheet
|
|
220
221
|
kwargs["headers"] = headers
|
{hdx_python_scraper-2.4.0 → hdx_python_scraper-2.5.0}/tests/config/project_configuration.yaml
RENAMED
|
@@ -1049,10 +1049,11 @@ scraper_subnational:
|
|
|
1049
1049
|
idps_somalia:
|
|
1050
1050
|
dataset: "somalia-internally-displaced-persons-idps"
|
|
1051
1051
|
format: "xlsx"
|
|
1052
|
+
xlsx2csv: True
|
|
1052
1053
|
filter_cols:
|
|
1053
1054
|
- "Reason"
|
|
1054
1055
|
- "Year"
|
|
1055
|
-
prefilter: "'drought' in Reason.lower() and Year in (self.today.year - 1, self.today.year)"
|
|
1056
|
+
prefilter: "'drought' in Reason.lower() and int(Year) in (self.today.year - 1, self.today.year)"
|
|
1056
1057
|
admin:
|
|
1057
1058
|
- value: "SOM"
|
|
1058
1059
|
- "Current (Arrival) District"
|
|
@@ -8,10 +8,10 @@ from . import bool_assert
|
|
|
8
8
|
from hdx.api.configuration import Configuration
|
|
9
9
|
from hdx.api.locations import Locations
|
|
10
10
|
from hdx.location.country import Country
|
|
11
|
-
from hdx.scraper.base_scraper import BaseScraper
|
|
12
|
-
from hdx.scraper.utilities import string_params_to_dict
|
|
13
|
-
from hdx.scraper.utilities.fallbacks import Fallbacks
|
|
14
|
-
from hdx.scraper.utilities.reader import Read
|
|
11
|
+
from hdx.scraper.framework.base_scraper import BaseScraper
|
|
12
|
+
from hdx.scraper.framework.utilities import string_params_to_dict
|
|
13
|
+
from hdx.scraper.framework.utilities.fallbacks import Fallbacks
|
|
14
|
+
from hdx.scraper.framework.utilities.reader import Read
|
|
15
15
|
from hdx.utilities.dateparse import parse_date
|
|
16
16
|
|
|
17
17
|
|
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
|
|
3
|
-
from hdx.scraper.base_scraper import BaseScraper
|
|
4
|
-
from hdx.scraper.utilities.sources import Sources
|
|
3
|
+
from hdx.scraper.framework.base_scraper import BaseScraper
|
|
4
|
+
from hdx.scraper.framework.utilities.sources import Sources
|
|
5
5
|
from hdx.utilities.dateparse import default_date
|
|
6
6
|
from hdx.utilities.dictandlist import dict_of_lists_add
|
|
7
7
|
from hdx.utilities.text import number_format
|
|
@@ -3,18 +3,18 @@ from datetime import datetime, timezone
|
|
|
3
3
|
|
|
4
4
|
import pytest
|
|
5
5
|
|
|
6
|
+
from ..conftest import check_scraper, check_scrapers
|
|
6
7
|
from .affected_targeted_reached import AffectedTargetedReached
|
|
7
|
-
from .conftest import check_scraper, check_scrapers
|
|
8
8
|
from .education_closures import EducationClosures
|
|
9
9
|
from .education_enrolment import EducationEnrolment
|
|
10
10
|
from hdx.location.adminlevel import AdminLevel
|
|
11
|
-
from hdx.scraper.base_scraper import BaseScraper
|
|
12
|
-
from hdx.scraper.runner import Runner
|
|
13
|
-
from hdx.scraper.utilities.reader import Read
|
|
11
|
+
from hdx.scraper.framework.base_scraper import BaseScraper
|
|
12
|
+
from hdx.scraper.framework.runner import Runner
|
|
13
|
+
from hdx.scraper.framework.utilities.reader import Read
|
|
14
14
|
from hdx.utilities.dateparse import parse_date
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
class
|
|
17
|
+
class TestCustom:
|
|
18
18
|
hapi_values_closure = {
|
|
19
19
|
"hdx_id": "6a41be98-75b9-4365-9ea3-e33d0dd2668b",
|
|
20
20
|
"hdx_stub": "global-school-closures-covid19",
|
|
File without changes
|
|
@@ -6,10 +6,10 @@ import numpy as np
|
|
|
6
6
|
import pandas
|
|
7
7
|
import pytest
|
|
8
8
|
|
|
9
|
-
from hdx.scraper.outputs.base import BaseOutput
|
|
10
|
-
from hdx.scraper.outputs.excelfile import ExcelFile
|
|
11
|
-
from hdx.scraper.outputs.googlesheets import GoogleSheets
|
|
12
|
-
from hdx.scraper.outputs.json import JsonFile
|
|
9
|
+
from hdx.scraper.framework.outputs.base import BaseOutput
|
|
10
|
+
from hdx.scraper.framework.outputs.excelfile import ExcelFile
|
|
11
|
+
from hdx.scraper.framework.outputs.googlesheets import GoogleSheets
|
|
12
|
+
from hdx.scraper.framework.outputs.json import JsonFile
|
|
13
13
|
from hdx.utilities.path import temp_dir
|
|
14
14
|
|
|
15
15
|
|
|
File without changes
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
from
|
|
2
|
-
from hdx.scraper.base_scraper import BaseScraper
|
|
3
|
-
from hdx.scraper.runner import Runner
|
|
4
|
-
from hdx.scraper.utilities.sources import Sources
|
|
1
|
+
from ..conftest import run_check_scraper, run_check_scrapers
|
|
2
|
+
from hdx.scraper.framework.base_scraper import BaseScraper
|
|
3
|
+
from hdx.scraper.framework.runner import Runner
|
|
4
|
+
from hdx.scraper.framework.utilities.sources import Sources
|
|
5
5
|
from hdx.utilities.dateparse import parse_date
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
class
|
|
8
|
+
class TestAggregation:
|
|
9
9
|
def test_get_aggregation_hxl(self, configuration):
|
|
10
10
|
BaseScraper.population_lookup = {}
|
|
11
11
|
today = parse_date("2020-10-01")
|
|
@@ -2,19 +2,19 @@ from copy import deepcopy
|
|
|
2
2
|
|
|
3
3
|
import pytest
|
|
4
4
|
|
|
5
|
-
from
|
|
5
|
+
from ..conftest import run_check_scrapers
|
|
6
6
|
from hdx.location.country import Country
|
|
7
|
-
from hdx.scraper.base_scraper import BaseScraper
|
|
8
|
-
from hdx.scraper.outputs.json import JsonFile
|
|
9
|
-
from hdx.scraper.runner import Runner
|
|
10
|
-
from hdx.scraper.utilities.sources import Sources
|
|
11
|
-
from hdx.scraper.utilities.writer import Writer
|
|
7
|
+
from hdx.scraper.framework.base_scraper import BaseScraper
|
|
8
|
+
from hdx.scraper.framework.outputs.json import JsonFile
|
|
9
|
+
from hdx.scraper.framework.runner import Runner
|
|
10
|
+
from hdx.scraper.framework.utilities.sources import Sources
|
|
11
|
+
from hdx.scraper.framework.utilities.writer import Writer
|
|
12
12
|
from hdx.utilities.dateparse import parse_date
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
# Test that scrapers can add to output from previous scrapers
|
|
16
16
|
# Also test producing sources per admin unit eg. #targeted+total+eth
|
|
17
|
-
class
|
|
17
|
+
class TestAppendData:
|
|
18
18
|
@pytest.fixture
|
|
19
19
|
def iso3s(self):
|
|
20
20
|
return (
|
|
@@ -2,10 +2,10 @@ import logging
|
|
|
2
2
|
|
|
3
3
|
import pytest
|
|
4
4
|
|
|
5
|
-
from
|
|
6
|
-
from hdx.scraper.base_scraper import BaseScraper
|
|
7
|
-
from hdx.scraper.runner import Runner
|
|
8
|
-
from hdx.scraper.utilities.sources import Sources
|
|
5
|
+
from ..conftest import run_check_scraper
|
|
6
|
+
from hdx.scraper.framework.base_scraper import BaseScraper
|
|
7
|
+
from hdx.scraper.framework.runner import Runner
|
|
8
|
+
from hdx.scraper.framework.utilities.sources import Sources
|
|
9
9
|
from hdx.utilities.dateparse import parse_date
|
|
10
10
|
|
|
11
11
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
from
|
|
2
|
-
from hdx.scraper.base_scraper import BaseScraper
|
|
3
|
-
from hdx.scraper.runner import Runner
|
|
1
|
+
from ..conftest import run_check_scraper
|
|
2
|
+
from hdx.scraper.framework.base_scraper import BaseScraper
|
|
3
|
+
from hdx.scraper.framework.runner import Runner
|
|
4
4
|
from hdx.utilities.dateparse import parse_date
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
class
|
|
7
|
+
class TestMultipleURLs:
|
|
8
8
|
def test_get_key_figures(self, configuration):
|
|
9
9
|
BaseScraper.population_lookup = {}
|
|
10
10
|
today = parse_date("2020-10-01")
|