hdx-python-scraper 2.3.5__tar.gz → 2.3.7__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.
Files changed (131) hide show
  1. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/.config/pre-commit-config.yaml +5 -4
  2. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/.config/ruff.toml +6 -4
  3. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/.github/workflows/publish.yaml +2 -2
  4. hdx_python_scraper-2.3.7/.github/workflows/run-python-tests.yaml +66 -0
  5. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/CONTRIBUTING.md +2 -3
  6. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/PKG-INFO +5 -4
  7. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/documentation/.readthedocs.yaml +1 -0
  8. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/documentation/pydoc-markdown.yaml +1 -1
  9. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/pyproject.toml +3 -2
  10. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/requirements.txt +83 -79
  11. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/src/hdx/scraper/_version.py +2 -2
  12. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/src/hdx/scraper/base_scraper.py +3 -3
  13. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/src/hdx/scraper/utilities/reader.py +84 -17
  14. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/src/hdx/scraper/utilities/sources.py +3 -3
  15. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/hdx/scraper/conftest.py +1 -0
  16. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/hdx/scraper/test_readers.py +70 -1
  17. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/hdx/scraper/test_scrapers_custom.py +3 -3
  18. hdx_python_scraper-2.3.5/.github/workflows/run-python-tests.yaml +0 -50
  19. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/.config/coveragerc +0 -0
  20. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/.config/pytest.ini +0 -0
  21. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/.gitignore +0 -0
  22. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/LICENSE +0 -0
  23. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/README.md +0 -0
  24. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/documentation/main.md +0 -0
  25. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/src/hdx/scraper/__init__.py +0 -0
  26. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/src/hdx/scraper/configurable/__init__.py +0 -0
  27. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/src/hdx/scraper/configurable/aggregator.py +0 -0
  28. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/src/hdx/scraper/configurable/resource_downloader.py +0 -0
  29. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/src/hdx/scraper/configurable/rowparser.py +0 -0
  30. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/src/hdx/scraper/configurable/scraper.py +0 -0
  31. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/src/hdx/scraper/configurable/timeseries.py +0 -0
  32. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/src/hdx/scraper/outputs/__init__.py +0 -0
  33. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/src/hdx/scraper/outputs/base.py +0 -0
  34. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/src/hdx/scraper/outputs/excelfile.py +0 -0
  35. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/src/hdx/scraper/outputs/googlesheets.py +0 -0
  36. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/src/hdx/scraper/outputs/json.py +0 -0
  37. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/src/hdx/scraper/runner.py +0 -0
  38. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/src/hdx/scraper/utilities/__init__.py +0 -0
  39. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/src/hdx/scraper/utilities/fallbacks.py +0 -0
  40. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/src/hdx/scraper/utilities/region_lookup.py +0 -0
  41. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/src/hdx/scraper/utilities/writer.py +0 -0
  42. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/config/project_configuration.yaml +0 -0
  43. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/access_2pacx-1vrszjzuyvt9i-mkrq2hbxrul2lx2vihkthqm-lae8nyhqty70zqtcufs3pxbhzgat1l2bkoa4-daoap-pub-gid-574237756-single-true-output-csv.csv +0 -0
  44. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/additional-json.json +0 -0
  45. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/altworldindata_data-tagger-match-all-on-tagger-01-header-location-tagger-01-tag.csv +0 -0
  46. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/casualties_2pacx-1vqidedbzz0ehrc0b4fswip14r7mdtu1mpmwakuxupelsah2awcurkgalfduhjvyjul8vzzat3r1b5qg-pub-gid-0-single-true-output-csv.csv +0 -0
  47. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/cbpf-allocations-and-contributions.json +0 -0
  48. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/cbpf2-allocations-and-contributions.json +0 -0
  49. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/cerf-covid-19-allocations.json +0 -0
  50. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/cerf2-covid-19-allocations.json +0 -0
  51. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/cerf2_global_download-full-pfmb-allocations.csv +0 -0
  52. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/cerf_global_download-full-pfmb-allocations.csv +0 -0
  53. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/covax_2pacx-1vtvzu79pptfaa2syevoqfyrrjy63djwitqu0ffbxiqczoun9k9timwmrvfgg1rbsnlmgyugzseiaye2-pub-gid-992438980-single-true-output-csv.csv +0 -0
  54. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/covidtests_data-owid-covid-data.xlsx +0 -0
  55. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/education_closures_broken.xls +0 -0
  56. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/education_closures_school_closures.csv +0 -0
  57. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/education_enrolment_enrollment_data.xlsx +0 -0
  58. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/ethiopia-drought-related-key-figures.json +0 -0
  59. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/ethiopia-pin-targeted-reached-by-location-and-cluster.json +0 -0
  60. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/ethiopia_drought_affected_targeted_reached_by_cluster.csv +0 -0
  61. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/fallbacks.json +0 -0
  62. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/gam_download-unicef-who-wb-global-expanded-databases-severe-wasting.xlsx +0 -0
  63. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/gam_other_download-unicef-who-wb-global-expanded-databases-severe-wasting.xlsx +0 -0
  64. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/global-school-closures-covid19.json +0 -0
  65. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/hno_2017_sahel_nutrition.csv +0 -0
  66. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/hno_2017_sahel_people_in_need.xlsx +0 -0
  67. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/idmc-internally-displaced-persons-idps.json +0 -0
  68. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/idps_download-displacement-data.csv +0 -0
  69. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/idps_override_population-widget-id-264111-geo-id-693-population-group-54074999.json +0 -0
  70. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/idps_somalia_som_unhcr_prmn_displacement_dataset.xlsx +0 -0
  71. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/ipc_somalia_som_food_insecurity_oct_dec2022_projection.csv +0 -0
  72. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/kenya-drought-related-key-figures.json +0 -0
  73. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/kenya-pin-targeted-reached-by-location-and-cluster.json +0 -0
  74. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/kenya_drought_affected_targeted_reached_by_cluster.csv +0 -0
  75. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/key_figures_2pacx-1vrppqx8jtkkkrckmzfncmmtfecvcpkbp9pdhs1sqtuyacmbsx8tlaxpgblfce-lcehukregguxja-4s-pub-gid-0-single-true-output-csv.csv +0 -0
  76. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/key_figures_2pacx-1vrppqx8jtkkkrckmzfncmmtfecvcpkbp9pdhs1sqtuyacmbsx8tlaxpgblfce-lcehukregguxja-4s-pub-gid-1275038715-single-true-output-csv.csv +0 -0
  77. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/key_figures_2pacx-1vrppqx8jtkkkrckmzfncmmtfecvcpkbp9pdhs1sqtuyacmbsx8tlaxpgblfce-lcehukregguxja-4s-pub-gid-2015311116-single-true-output-csv.csv +0 -0
  78. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/key_figures_eth_2pacx-1vrppqx8jtkkkrckmzfncmmtfecvcpkbp9pdhs1sqtuyacmbsx8tlaxpgblfce-lcehukregguxja-4s-pub-gid-2015311116-single-true-output-csv.csv +0 -0
  79. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/key_figures_ken_2pacx-1vrppqx8jtkkkrckmzfncmmtfecvcpkbp9pdhs1sqtuyacmbsx8tlaxpgblfce-lcehukregguxja-4s-pub-gid-1275038715-single-true-output-csv.csv +0 -0
  80. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/key_figures_som_2pacx-1vrppqx8jtkkkrckmzfncmmtfecvcpkbp9pdhs1sqtuyacmbsx8tlaxpgblfce-lcehukregguxja-4s-pub-gid-0-single-true-output-csv.csv +0 -0
  81. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/ourworldindata_data-tagger-match-all-on-tagger-01-header-location-tagger-01-tag.csv +0 -0
  82. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/ourworldindata_other_data-tagger-match-all-on-tagger-01-header-location-tagger-01-tag.csv +0 -0
  83. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/oxcgrt_oxcgrt_csv.csv +0 -0
  84. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/oxford-covid-19-government-response-tracker.json +0 -0
  85. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/population.json +0 -0
  86. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/population_indicator-sp-pop-downloadformat-excel-dataformat-list-totl.xls +0 -0
  87. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/population_other_indicator-sp-pop-downloadformat-excel-dataformat-list-totl.xls +0 -0
  88. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/regions_tbl_regcov_2020_ocha.xlsx +0 -0
  89. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/resource_downloader_xlsx_ukr_border_crossings_090622.xlsx +0 -0
  90. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/sadd-countries-to-include.csv +0 -0
  91. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/sadd_covid-data-dataset-fullvars-extype-csv.csv +0 -0
  92. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/sahel-humanitarian-needs-overview.json +0 -0
  93. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/sahel-humanitarian-needs-overview_prefix.json +0 -0
  94. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/somalia-acute-food-insecurity-country-data.json +0 -0
  95. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/somalia-drought-related-key-figures.json +0 -0
  96. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/somalia-internally-displaced-persons-idps.json +0 -0
  97. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/somalia-pin-targeted-reached-by-location-and-cluster.json +0 -0
  98. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/somalia_drought_affected_targeted_reached_by_cluster.csv +0 -0
  99. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/timeseries_casualties_2pacx-1vqidedbzz0ehrc0b4fswip14r7mdtu1mpmwakuxupelsah2awcurkgalfduhjvyjul8vzzat3r1b5qg-pub-gid-0-single-true-output-csv.csv +0 -0
  100. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/total-covid-19-tests-performed-by-country.json +0 -0
  101. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/ukraine-border-crossings.json +0 -0
  102. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/ukraine-who-does-what-where-3w.json +0 -0
  103. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/unocha-office-locations.json +0 -0
  104. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/who_national2_who-covid-19-global-data.csv +0 -0
  105. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/who_national3_who-covid-19-global-data.csv +0 -0
  106. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/who_national_who-covid-19-global-data.csv +0 -0
  107. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/whowhatwhere_afg_3w_data.csv +0 -0
  108. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/input/whowhatwhere_notags_3w_data.csv +0 -0
  109. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/test_output.xlsx +0 -0
  110. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/test_scraper_all.json +0 -0
  111. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/test_scraper_other.json +0 -0
  112. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/fixtures/test_scraper_population.json +0 -0
  113. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/hdx/scraper/__init__.py +0 -0
  114. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/hdx/scraper/affected_targeted_reached.py +0 -0
  115. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/hdx/scraper/education_closures.py +0 -0
  116. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/hdx/scraper/education_enrolment.py +0 -0
  117. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/hdx/scraper/test_output.py +0 -0
  118. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/hdx/scraper/test_regionlookup.py +0 -0
  119. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/hdx/scraper/test_runner.py +0 -0
  120. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/hdx/scraper/test_scrapers_aggregation.py +0 -0
  121. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/hdx/scraper/test_scrapers_appenddata.py +0 -0
  122. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/hdx/scraper/test_scrapers_global.py +0 -0
  123. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/hdx/scraper/test_scrapers_multipleurls.py +0 -0
  124. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/hdx/scraper/test_scrapers_national.py +0 -0
  125. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/hdx/scraper/test_scrapers_regionaltoplevel.py +0 -0
  126. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/hdx/scraper/test_scrapers_resource_downloaders.py +0 -0
  127. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/hdx/scraper/test_scrapers_subnational.py +0 -0
  128. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/hdx/scraper/test_scrapers_timeseries.py +0 -0
  129. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/hdx/scraper/test_sources.py +0 -0
  130. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/tests/hdx/scraper/test_utils.py +0 -0
  131. {hdx_python_scraper-2.3.5 → hdx_python_scraper-2.3.7}/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.1.14
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/jazzband/pip-tools
21
- rev: 7.3.0
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
- ignore = [
4
- "E501" # Line too long
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@v3
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@v4
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-start location. Thus, you will need to edit your
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 ``api.rst`` as you write the documentation.
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
1
+ Metadata-Version: 2.3
2
2
  Name: hdx-python-scraper
3
- Version: 2.3.5
3
+ Version: 2.3.7
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,8 +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.2.1
30
- Requires-Dist: hdx-python-country>=3.6.4
29
+ Requires-Dist: hdx-python-api>=6.2.8
30
+ Requires-Dist: hdx-python-country>=3.7.0
31
+ Requires-Dist: hdx-python-utilities>=3.6.8
31
32
  Requires-Dist: regex
32
33
  Provides-Extra: dev
33
34
  Requires-Dist: pre-commit; extra == 'dev'
@@ -11,5 +11,6 @@ build:
11
11
  jobs:
12
12
  pre_build:
13
13
  - pip install --upgrade mkdocs
14
+ - pip install mkdocs-material
14
15
  - pip install pydoc-markdown
15
16
  - pydoc-markdown documentation/pydoc-markdown.yaml
@@ -9,7 +9,7 @@ renderer:
9
9
  output_directory: docs
10
10
  mkdocs_config:
11
11
  site_name: HDX Python Scraper
12
- theme: mkdocs
12
+ theme: material
13
13
  repo_url: "https://github.com/OCHA-DAP/hdx-python-scraper"
14
14
  markdown:
15
15
  source_linker:
@@ -34,8 +34,9 @@ classifiers = [
34
34
  requires-python = ">=3.8"
35
35
 
36
36
  dependencies = [
37
- "hdx-python-api>=6.2.1",
38
- "hdx-python-country>=3.6.4",
37
+ "hdx-python-api>=6.2.8",
38
+ "hdx-python-country>=3.7.0",
39
+ "hdx-python-utilities>=3.6.8",
39
40
  "gspread",
40
41
  "regex",
41
42
  ]
@@ -1,9 +1,5 @@
1
- #
2
- # This file is autogenerated by pip-compile with Python 3.11
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
- cachetools==5.3.2
10
+ # referencing
11
+ cachetools==5.3.3
15
12
  # via google-auth
16
- certifi==2023.11.17
13
+ certifi==2024.2.2
17
14
  # via requests
18
15
  cffi==1.16.0
19
16
  # via cryptography
@@ -23,83 +20,82 @@ chardet==5.2.0
23
20
  # via frictionless
24
21
  charset-normalizer==3.3.2
25
22
  # via requests
26
- ckanapi==4.7
23
+ ckanapi==4.8
27
24
  # via hdx-python-api
28
25
  click==8.1.7
29
26
  # via typer
30
- colorama==0.4.6
31
- # via typer
32
- coverage[toml]==7.4.1
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.5.0
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.20.1
41
+ docutils==0.21.2
49
42
  # via defopt
50
- email-validator==2.1.0.post1
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.13.1
47
+ filelock==3.14.0
55
48
  # via virtualenv
56
- frictionless==5.16.1
49
+ frictionless==5.17.0
57
50
  # via hdx-python-utilities
58
- google-auth==2.27.0
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.0.0
57
+ gspread==6.1.1
65
58
  # via hdx-python-scraper (pyproject.toml)
66
- hdx-python-api==6.2.1
59
+ hdx-python-api==6.2.8
67
60
  # via hdx-python-scraper (pyproject.toml)
68
- hdx-python-country==3.6.4
61
+ hdx-python-country==3.7.0
69
62
  # via
70
- # hdx-python-api
71
63
  # hdx-python-scraper (pyproject.toml)
72
- hdx-python-utilities==3.6.4
64
+ # hdx-python-api
65
+ hdx-python-utilities==3.6.8
73
66
  # via
67
+ # hdx-python-scraper (pyproject.toml)
74
68
  # hdx-python-api
75
69
  # hdx-python-country
76
70
  humanize==4.9.0
77
71
  # via frictionless
78
- identify==2.5.33
72
+ identify==2.5.36
79
73
  # via pre-commit
80
- idna==3.6
74
+ idna==3.7
81
75
  # via
82
76
  # email-validator
83
77
  # requests
84
78
  ijson==3.2.3
85
79
  # via hdx-python-utilities
86
- inflect==7.0.0
80
+ inflect==7.2.1
87
81
  # via quantulum3
88
82
  iniconfig==2.0.0
89
83
  # via pytest
90
84
  isodate==0.6.1
91
85
  # via frictionless
92
- jinja2==3.1.3
86
+ jinja2==3.1.4
93
87
  # via frictionless
94
88
  jsonlines==4.0.0
95
89
  # via hdx-python-utilities
96
90
  jsonpath-ng==1.6.1
97
91
  # via libhxl
98
- jsonschema==4.17.3
92
+ jsonschema==4.22.0
99
93
  # via
100
94
  # frictionless
101
95
  # tableschema-to-template
102
- libhxl==5.2
96
+ jsonschema-specifications==2023.12.1
97
+ # via jsonschema
98
+ libhxl==5.2.1
103
99
  # via
104
100
  # hdx-python-api
105
101
  # hdx-python-country
@@ -109,33 +105,35 @@ makefun==1.15.2
109
105
  # via hdx-python-api
110
106
  markdown-it-py==3.0.0
111
107
  # via rich
112
- marko==2.0.2
108
+ marko==2.0.3
113
109
  # via frictionless
114
- markupsafe==2.1.4
110
+ markupsafe==2.1.5
115
111
  # via jinja2
116
112
  mdurl==0.1.2
117
113
  # via markdown-it-py
114
+ more-itertools==10.2.0
115
+ # via inflect
118
116
  ndg-httpsclient==0.5.1
119
117
  # via hdx-python-api
120
118
  nodeenv==1.8.0
121
119
  # via pre-commit
122
120
  num2words==0.5.13
123
121
  # via quantulum3
124
- numpy==1.26.3
122
+ numpy==1.26.4
125
123
  # via pandas
126
124
  oauthlib==3.2.2
127
125
  # via requests-oauthlib
128
126
  openpyxl==3.1.2
129
127
  # via hdx-python-utilities
130
- packaging==23.2
128
+ packaging==24.0
131
129
  # via pytest
132
- pandas==2.2.0
130
+ pandas==2.2.2
133
131
  # via hdx-python-scraper (pyproject.toml)
134
- petl==1.7.14
132
+ petl==1.7.15
135
133
  # via frictionless
136
- platformdirs==4.2.0
134
+ platformdirs==4.2.2
137
135
  # via virtualenv
138
- pluggy==1.4.0
136
+ pluggy==1.5.0
139
137
  # via pytest
140
138
  ply==3.11
141
139
  # via
@@ -143,39 +141,35 @@ ply==3.11
143
141
  # libhxl
144
142
  pockets==0.9.1
145
143
  # via sphinxcontrib-napoleon
146
- pre-commit==3.6.0
144
+ pre-commit==3.7.1
147
145
  # via hdx-python-scraper (pyproject.toml)
148
- pyasn1==0.5.1
146
+ pyasn1==0.6.0
149
147
  # via
150
148
  # hdx-python-api
151
149
  # ndg-httpsclient
152
150
  # pyasn1-modules
153
151
  # rsa
154
- pyasn1-modules==0.3.0
152
+ pyasn1-modules==0.4.0
155
153
  # via google-auth
156
- pycparser==2.21
154
+ pycparser==2.22
157
155
  # via cffi
158
- pydantic==2.6.0
159
- # via
160
- # frictionless
161
- # inflect
162
- pydantic-core==2.16.1
156
+ pydantic==2.7.1
157
+ # via frictionless
158
+ pydantic-core==2.18.2
163
159
  # via pydantic
164
- pygments==2.17.2
160
+ pygments==2.18.0
165
161
  # via rich
166
- pyopenssl==24.0.0
162
+ pyopenssl==24.1.0
167
163
  # via
168
164
  # hdx-python-api
169
165
  # ndg-httpsclient
170
166
  pyphonetics==0.5.3
171
167
  # via hdx-python-country
172
- pyrsistent==0.20.0
173
- # via jsonschema
174
- pytest==8.0.0
168
+ pytest==8.2.0
175
169
  # via
176
170
  # hdx-python-scraper (pyproject.toml)
177
171
  # pytest-cov
178
- pytest-cov==4.1.0
172
+ pytest-cov==5.0.0
179
173
  # via hdx-python-scraper (pyproject.toml)
180
174
  python-dateutil==2.8.2
181
175
  # via
@@ -185,22 +179,26 @@ python-dateutil==2.8.2
185
179
  # pandas
186
180
  python-io-wrapper==0.3.1
187
181
  # via libhxl
188
- python-slugify==8.0.3
182
+ python-slugify==8.0.4
189
183
  # via
190
184
  # ckanapi
191
185
  # frictionless
192
- pytz==2023.4
186
+ pytz==2024.1
193
187
  # via pandas
194
188
  pyyaml==6.0.1
195
189
  # via
196
190
  # frictionless
197
191
  # pre-commit
198
192
  # tableschema-to-template
199
- quantulum3==0.9.0
193
+ quantulum3==0.9.1
200
194
  # via hdx-python-api
201
195
  ratelimit==2.2.1
202
196
  # via hdx-python-utilities
203
- regex==2023.12.25
197
+ referencing==0.35.1
198
+ # via
199
+ # jsonschema
200
+ # jsonschema-specifications
201
+ regex==2024.5.15
204
202
  # via hdx-python-scraper (pyproject.toml)
205
203
  requests==2.31.0
206
204
  # via
@@ -212,22 +210,32 @@ requests==2.31.0
212
210
  # requests-oauthlib
213
211
  requests-file==2.0.0
214
212
  # via hdx-python-utilities
215
- requests-oauthlib==1.3.1
213
+ requests-oauthlib==2.0.0
216
214
  # via google-auth-oauthlib
217
215
  rfc3986==2.0.0
218
216
  # via frictionless
219
- rich==13.7.0
217
+ rich==13.7.1
220
218
  # via typer
219
+ rpds-py==0.18.1
220
+ # via
221
+ # jsonschema
222
+ # referencing
221
223
  rsa==4.9
222
224
  # via google-auth
223
- ruamel-yaml==0.18.5
225
+ ruamel-yaml==0.18.6
224
226
  # via hdx-python-utilities
225
227
  ruamel-yaml-clib==0.2.8
226
228
  # via ruamel-yaml
229
+ setuptools==69.5.1
230
+ # via
231
+ # ckanapi
232
+ # nodeenv
227
233
  shellingham==1.5.4
228
234
  # via typer
229
235
  simpleeval==0.9.13
230
236
  # via frictionless
237
+ simplejson==3.19.2
238
+ # via ckanapi
231
239
  six==1.16.0
232
240
  # via
233
241
  # ckanapi
@@ -237,8 +245,6 @@ six==1.16.0
237
245
  # sphinxcontrib-napoleon
238
246
  sphinxcontrib-napoleon==0.7
239
247
  # via defopt
240
- strenum==0.4.15
241
- # via gspread
242
248
  stringcase==1.2.0
243
249
  # via frictionless
244
250
  structlog==24.1.0
@@ -249,41 +255,39 @@ tabulate==0.9.0
249
255
  # via frictionless
250
256
  text-unidecode==1.3
251
257
  # via python-slugify
252
- typer[all]==0.9.0
253
- # via
254
- # frictionless
255
- # typer
256
- typing-extensions==4.9.0
258
+ typeguard==4.2.1
259
+ # via inflect
260
+ typer==0.12.3
261
+ # via frictionless
262
+ typing-extensions==4.11.0
257
263
  # via
258
264
  # frictionless
259
265
  # inflect
260
266
  # pydantic
261
267
  # pydantic-core
268
+ # typeguard
262
269
  # typer
263
- tzdata==2023.4
270
+ tzdata==2024.1
264
271
  # via pandas
265
272
  unidecode==1.3.8
266
273
  # via
267
274
  # libhxl
268
275
  # pyphonetics
269
- urllib3==2.2.0
276
+ urllib3==2.2.1
270
277
  # via
271
278
  # libhxl
272
279
  # requests
273
- validators==0.22.0
280
+ validators==0.28.1
274
281
  # via frictionless
275
- virtualenv==20.25.0
282
+ virtualenv==20.26.2
276
283
  # via pre-commit
277
- wheel==0.42.0
284
+ wheel==0.43.0
278
285
  # via libhxl
279
286
  xlrd==2.0.1
280
287
  # via hdx-python-utilities
281
288
  xlrd3==1.1.0
282
289
  # via libhxl
283
- xlsxwriter==3.1.9
290
+ xlsxwriter==3.2.0
284
291
  # via tableschema-to-template
285
292
  xlwt==1.3.0
286
293
  # via hdx-python-utilities
287
-
288
- # The following packages are considered to be unsafe in a requirements file:
289
- # setuptools
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '2.3.5'
16
- __version_tuple__ = version_tuple = (2, 3, 5)
15
+ __version__ = version = '2.3.7'
16
+ __version_tuple__ = version_tuple = (2, 3, 7)
@@ -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
- "should_overwrite_sources"
146
- ] = should_overwrite_sources
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}