Skip to content

Commit

Permalink
Add fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarans committed Mar 5, 2025
1 parent eaaa754 commit ffea17d
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/fixtures/input/datasets_0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"archived": false, "batch": "6b9f4a8c-f5c8-411a-937f-8cf2354130cb", "caveats": "The WHO sitrep provide updated data for countries with an active Ebola outbreak. The WHO declared Senegal, Nigeria, Spain United States of America, Mali, the United Kingdom, Liberia, Sierra Leone and Guineato be Ebola free on 17 October, 20 October, 2 December, mid December 2014, 18 January 2015, 10 March 2015, 9 May 2015, 7 November 2015 and 29 December 2015 respectively. Although not reported in the sitrep, the cumulative figures from these countries are presented in the dataset for convenience. On 14 November 2014, Liberia has fewer deaths than the last update on 12 November due to reclassification. Data are based on official information reported by ministries of health, through WHO country offices. These numbers are subject to change due to ongoing reclassification, retrospective investigation and availability of laboratory results.", "creator_user_id": "7d7f5f8d-7e3b-483a-8de1-2b122010c1eb", "data_update_frequency": "-1", "dataset_date": "[2014-08-29T00:00:00 TO 2016-03-23T23:59:59]", "dataset_preview": "first_resource", "dataset_source": "WHO", "has_geodata": false, "has_quickcharts": false, "has_showcases": true, "id": "0d089fa0-3567-4b01-9c03-39d340ff34e3", "is_requestdata_type": false, "isopen": false, "last_modified": "2019-11-10T08:12:59", "license_id": "hdx-other", "license_other": "The information in the various pages of the WHO web site is issued by the World Health Organization for general distribution. The information presented is protected under the Berne Convention for the Protection of Literature and Artistic works, under other international conventions and under national laws on copyright and neighboring rights. Extracts of the information in the web site may be reviewed, reproduced or translated for research or private study but not for sale or for use in conjunction with commercial purposes. See http://www.who.int/about/copyright/en/", "license_title": "Other", "maintainer": "7d7f5f8d-7e3b-483a-8de1-2b122010c1eb", "metadata_created": "2014-09-04T21:24:40.916754", "metadata_modified": "2025-02-25T18:27:58.104176", "methodology": "Other", "methodology_other": "Data are based on official information reported by ministries of health. These numbers are subject to change due to ongoing reclassification, retrospective investigation and availability of laboratory results. The fewer cases reported this week compared with the Situation Report of 29 October is due to a change in the use of data sources. In this report, the cumulative total numbers of cases and deaths nationally and by district are identical to those presented in situation reports compiled by ministries of health and WHO country offices. Previously, these totals were derived from a combination of patient databases and country situation reports. The revised approach unifies the totals presented in this report with those given in national reports.", "name": "ebola-cases-2014", "notes": "Total number of probable, confirmed and suspected Ebola cases and deaths in Guinea, Liberia, Sierra Leone, Nigeria, Senegal, Mali, Spain USA, UK and Italy according to [Ebola Data and Statistics](http://apps.who.int/ebola/ebola-situation-reports). \r\n\r\n* The resources contain two references to Liberia: Liberia and Liberia 2. Liberia contain reported before May 9, 2015. **Liberia 2 refers to cases reported after May 9, 2015.**\r\n* The resources contain two references to Guinea: Guinea and Guinea 2. Guinea contain reported before May 9, 2015. **Guinea 2 refers to cases reported after March 23, 2016.**", "num_resources": 3, "num_tags": 3, "organization": {"id": "hdx", "name": "hdx", "title": "HDX", "type": "organization", "description": "The Humanitarian Data Exchange (HDX) is an open data sharing platform managed by the United Nations Office for the Coordination of Humanitarian Affairs. The HDX organization is managed by the HDX data team and is used to share data on behalf of a number of partners", "image_url": "http://labs.reliefweb.int/img/rw-thumbnail-hdx.png", "created": "2014-04-02T12:19:44.486326", "is_organization": true, "approval_status": "approved", "state": "active"}, "owner_org": "hdx", "package_creator": "godfrey", "pageviews_last_14_days": 86, "private": false, "qa_completed": false, "solr_additions": "{\"countries\": [\"Guinea\", \"Italy\", \"Liberia\", \"Mali\", \"Nigeria\", \"Senegal\", \"Sierra Leone\", \"Spain\", \"United Kingdom\", \"United States\"]}", "state": "active", "subnational": "0", "title": "Number of Ebola Cases and Deaths in Affected Countries", "total_res_downloads": 9166, "type": "dataset", "url": null, "version": null, "groups": [{"description": "", "display_name": "Guinea", "id": "gin", "image_display_url": "", "name": "gin", "title": "Guinea"}, {"description": "", "display_name": "Italy", "id": "ita", "image_display_url": "", "name": "ita", "title": "Italy"}, {"description": "", "display_name": "Liberia", "id": "lbr", "image_display_url": "", "name": "lbr", "title": "Liberia"}, {"description": "", "display_name": "Mali", "id": "mli", "image_display_url": "", "name": "mli", "title": "Mali"}, {"description": "", "display_name": "Nigeria", "id": "nga", "image_display_url": "", "name": "nga", "title": "Nigeria"}, {"description": "", "display_name": "Senegal", "id": "sen", "image_display_url": "", "name": "sen", "title": "Senegal"}, {"description": "", "display_name": "Sierra Leone", "id": "sle", "image_display_url": "", "name": "sle", "title": "Sierra Leone"}, {"description": "", "display_name": "Spain", "id": "esp", "image_display_url": "", "name": "esp", "title": "Spain"}, {"description": "", "display_name": "United Kingdom", "id": "gbr", "image_display_url": "", "name": "gbr", "title": "United Kingdom"}, {"description": "", "display_name": "United States", "id": "usa", "image_display_url": "", "name": "usa", "title": "United States"}], "tags": [{"display_name": "disease", "id": "2a4e3877-8487-4a62-b010-8dafdc1ba6d8", "name": "disease", "state": "active", "vocabulary_id": "b891512e-9516-4bf5-962a-7a289772a2a1"}, {"display_name": "epidemics-outbreaks", "id": "2c7a64e9-6c0f-4879-b259-0680987ec1c7", "name": "epidemics-outbreaks", "state": "active", "vocabulary_id": "b891512e-9516-4bf5-962a-7a289772a2a1"}, {"display_name": "health", "id": "26fe3d20-9de7-436b-b47a-4f7f2e4547d0", "name": "health", "state": "active", "vocabulary_id": "b891512e-9516-4bf5-962a-7a289772a2a1"}], "relationships_as_subject": [], "relationships_as_object": [], "resources": [{"alt_url": "https://data.humdata.org/dataset/0d089fa0-3567-4b01-9c03-39d340ff34e3/resource/76defd41-cca7-4dda-8363-2d2d51d6e877/download/", "cache_last_updated": null, "cache_url": null, "created": "2014-09-08T20:10:21.665010", "datastore_active": false, "description": "Extracted from latest WHO Ebola Response Roadmap Situation Report", "download_url": "https://data.humdata.org/dataset/0d089fa0-3567-4b01-9c03-39d340ff34e3/resource/76defd41-cca7-4dda-8363-2d2d51d6e877/download/ebola-cases-and-deaths-who-gar-sitrep.xls", "format": "XLS", "hash": "", "hdx_rel_url": "/dataset/0d089fa0-3567-4b01-9c03-39d340ff34e3/resource/76defd41-cca7-4dda-8363-2d2d51d6e877/download/ebola-cases-and-deaths-who-gar-sitrep.xls", "id": "76defd41-cca7-4dda-8363-2d2d51d6e877", "last_modified": "2019-11-10T07:51:16", "metadata_modified": "2025-02-25T18:27:43.955565", "microdata": false, "mimetype": null, "mimetype_inner": null, "name": "ebola-cases-and-deaths-who-gar-sitrep.xls", "p_coded": false, "package_id": "0d089fa0-3567-4b01-9c03-39d340ff34e3", "position": 0, "resource_type": "file.upload", "resource_uploader": "godfrey", "size": 392704, "state": "active", "url": "https://data.humdata.org/dataset/0d089fa0-3567-4b01-9c03-39d340ff34e3/resource/76defd41-cca7-4dda-8363-2d2d51d6e877/download/ebola-cases-and-deaths-who-gar-sitrep.xls", "url_type": "upload"}, {"cache_last_updated": null, "cache_url": null, "created": "2014-10-02T16:38:57.294741", "datastore_active": false, "description": "Ebola data in record format with indicator, country, date and value.", "download_url": "https://data.humdata.org/dataset/0d089fa0-3567-4b01-9c03-39d340ff34e3/resource/a8b51b81-1fa7-499d-a9f2-3d0bce06b5b5/download/ebola_data_db_format.xlsx", "format": "XLSX", "hash": "", "hdx_rel_url": "/dataset/0d089fa0-3567-4b01-9c03-39d340ff34e3/resource/a8b51b81-1fa7-499d-a9f2-3d0bce06b5b5/download/ebola_data_db_format.xlsx", "id": "a8b51b81-1fa7-499d-a9f2-3d0bce06b5b5", "last_modified": "2019-11-10T08:04:26", "metadata_modified": "2025-02-25T18:27:50.185450", "microdata": false, "mimetype": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "mimetype_inner": null, "name": "ebola_data_db_format.xlsx", "p_coded": false, "package_id": "0d089fa0-3567-4b01-9c03-39d340ff34e3", "position": 1, "resource_type": "api", "resource_uploader": "godfrey", "size": 357102, "state": "active", "url": "https://data.humdata.org/dataset/0d089fa0-3567-4b01-9c03-39d340ff34e3/resource/a8b51b81-1fa7-499d-a9f2-3d0bce06b5b5/download/ebola_data_db_format.xlsx", "url_type": "upload"}, {"cache_last_updated": null, "cache_url": null, "created": "2015-02-20T15:28:37.226776", "datastore_active": false, "description": "Ebola data in record format with indicator, country, date and value.", "download_url": "https://data.humdata.org/dataset/0d089fa0-3567-4b01-9c03-39d340ff34e3/resource/c59b5722-ca4b-41ca-a446-472d6d824d01/download/ebola_data_db_format.csv", "format": "CSV", "hash": "", "hdx_rel_url": "/dataset/0d089fa0-3567-4b01-9c03-39d340ff34e3/resource/c59b5722-ca4b-41ca-a446-472d6d824d01/download/ebola_data_db_format.csv", "id": "c59b5722-ca4b-41ca-a446-472d6d824d01", "last_modified": "2019-11-10T08:12:59", "metadata_modified": "2025-02-25T18:27:58.134276", "microdata": false, "mimetype": "text/csv", "mimetype_inner": null, "name": "ebola_data_db_format.csv", "p_coded": false, "package_id": "0d089fa0-3567-4b01-9c03-39d340ff34e3", "position": 2, "resource_type": "api", "resource_uploader": "luiscape", "size": 1422467, "state": "active", "url": "https://data.humdata.org/dataset/0d089fa0-3567-4b01-9c03-39d340ff34e3/resource/c59b5722-ca4b-41ca-a446-472d6d824d01/download/ebola_data_db_format.csv", "url_type": "upload"}]}
1 change: 1 addition & 0 deletions tests/fixtures/input/datasets_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"archived": true, "batch": "a0d62608-340f-40dc-8496-6e402193fcb9", "caveats": "", "creator_user_id": "7d7f5f8d-7e3b-483a-8de1-2b122010c1eb", "data_update_frequency": "-1", "dataset_date": "[2015-12-01T00:00:00 TO 2015-12-01T23:59:59]", "dataset_preview": "first_resource", "dataset_source": "Nepal Ministry of Home Affairs", "has_geodata": false, "has_quickcharts": false, "has_showcases": true, "id": "95982e94-8567-491c-bee5-33e562f4897a", "indicator": "0", "is_requestdata_type": false, "isopen": false, "last_modified": "2015-04-29T21:54:15.414068", "license_id": "cc-by-igo", "license_title": "Creative Commons Attribution for Intergovernmental Organisations", "license_url": "http://creativecommons.org/licenses/by/3.0/igo/legalcode", "maintainer": "7d7f5f8d-7e3b-483a-8de1-2b122010c1eb", "metadata_created": "2015-04-29T21:52:52.350432", "metadata_modified": "2025-02-03T00:16:26.586099", "methodology": "Census", "name": "nepal-government-geo-portal", "notes": "This dataset contains a link to the geonode instance maintained by the Ministry of Home Affairs of the Government of Nepal. The geonode contains layers such as administrative level boundaries, drought models and elevation.", "num_resources": 1, "num_tags": 2, "organization": {"id": "hdx", "name": "hdx", "title": "HDX", "type": "organization", "description": "The Humanitarian Data Exchange (HDX) is an open data sharing platform managed by the United Nations Office for the Coordination of Humanitarian Affairs. The HDX organization is managed by the HDX data team and is used to share data on behalf of a number of partners", "image_url": "http://labs.reliefweb.int/img/rw-thumbnail-hdx.png", "created": "2014-04-02T12:19:44.486326", "is_organization": true, "approval_status": "approved", "state": "active"}, "owner_org": "hdx", "package_creator": "godfrey", "pageviews_last_14_days": 2, "private": false, "qa_completed": false, "solr_additions": "{\"countries\": [\"Nepal\", \"Nepal Earthquake\"]}", "state": "active", "subnational": "1", "title": "Nepal Government Geo-Portal", "total_res_downloads": 58, "type": "dataset", "url": null, "version": null, "groups": [{"description": "", "display_name": "Nepal", "id": "npl", "image_display_url": "", "name": "npl", "title": "Nepal"}, {"description": "This will be a placeholder for all information related to the earthquake in Nepal.", "display_name": "Nepal Earthquake", "id": "fba94eb6-a73b-407d-8acd-c16e61e4f0dc", "image_display_url": "", "name": "nepal-earthquake", "title": "Nepal Earthquake"}], "tags": [{"display_name": "earthquake-tsunami", "id": "ec3e650b-06d4-410d-915f-213d6156b1b6", "name": "earthquake-tsunami", "state": "active", "vocabulary_id": "b891512e-9516-4bf5-962a-7a289772a2a1"}, {"display_name": "geodata", "id": "2d27d72f-af37-4b38-b05e-dddc6929bd13", "name": "geodata", "state": "active", "vocabulary_id": "b891512e-9516-4bf5-962a-7a289772a2a1"}], "relationships_as_subject": [], "relationships_as_object": [], "resources": [{"broken_link": true, "cache_last_updated": null, "cache_url": null, "created": "2015-04-29T21:54:15.444129", "datastore_active": false, "description": "Link to geonode", "download_url": "http://drm.moha.gov.np/layers/", "format": "Web App", "hash": "", "hdx_rel_url": "http://drm.moha.gov.np/layers/", "id": "e0ec0d4c-6664-4472-99d4-dbe1a5ec9d40", "last_modified": "2015-04-29T21:54:15.414068", "metadata_modified": "2023-09-29T00:56:07.824838", "microdata": false, "mimetype": null, "mimetype_inner": null, "name": "drm.moha.gov.np", "package_id": "95982e94-8567-491c-bee5-33e562f4897a", "position": 0, "resource_type": "api", "resource_uploader": "godfrey", "size": null, "state": "active", "url": "http://drm.moha.gov.np/layers/", "url_type": "api"}]}
1 change: 1 addition & 0 deletions tests/fixtures/input/datasets_10.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"archived": false, "batch": "079a4c9d-5d2d-4353-86f3-c1f819121ef0", "creator_user_id": "e780fabb-29f0-4c65-92a9-ed8896f7faf6", "data_update_frequency": "-2", "dataset_date": "[2021-03-12T00:00:00 TO 2021-03-12T23:59:59]", "dataset_preview": "first_resource", "dataset_source": "OCHA, Center for Disaster Protection", "has_geodata": false, "has_quickcharts": false, "has_showcases": false, "id": "9d303f4b-6293-4a53-9cdb-7142fcf7f6dc", "is_requestdata_type": false, "isopen": true, "last_modified": "2021-04-07T01:01:13.552519", "license_id": "cc-by", "license_title": "Creative Commons Attribution International", "license_url": "http://www.opendefinition.org/licenses/cc-by", "maintainer": "7d7f5f8d-7e3b-483a-8de1-2b122010c1eb", "metadata_created": "2020-06-16T09:34:19.584619", "metadata_modified": "2025-02-04T12:35:48.600381", "methodology": "Registry", "name": "compilation-of-international-financial-institution-and-economic-data", "notes": "Compilation of international financial institution and economic data", "num_resources": 1, "num_tags": 3, "organization": {"id": "hdx", "name": "hdx", "title": "HDX", "type": "organization", "description": "The Humanitarian Data Exchange (HDX) is an open data sharing platform managed by the United Nations Office for the Coordination of Humanitarian Affairs. The HDX organization is managed by the HDX data team and is used to share data on behalf of a number of partners", "image_url": "http://labs.reliefweb.int/img/rw-thumbnail-hdx.png", "created": "2014-04-02T12:19:44.486326", "is_organization": true, "approval_status": "approved", "state": "active"}, "owner_org": "hdx", "package_creator": "marindi", "pageviews_last_14_days": 3, "private": false, "qa_completed": false, "solr_additions": "{\"countries\": [\"Afghanistan\", \"Albania\", \"Angola\", \"Argentina\", \"Armenia\", \"Bangladesh\", \"Belarus\", \"Belize\", \"Benin\", \"Bhutan\", \"Bolivia (Plurinational State of)\", \"Bosnia and Herzegovina\", \"Brazil\", \"Burkina Faso\", \"Burundi\", \"Cambodia\", \"Cameroon\"]}", "state": "active", "subnational": "1", "title": "Compilation of International Financial Institution and Economic Data", "total_res_downloads": 235, "type": "dataset", "updated_by_script": "HDXPythonLibrary/5.4.8-test (2022-01-04T21:39:53.659149)", "url": null, "version": null, "groups": [{"description": "", "display_name": "Afghanistan", "id": "afg", "image_display_url": "", "name": "afg", "title": "Afghanistan"}, {"description": "", "display_name": "Albania", "id": "alb", "image_display_url": "", "name": "alb", "title": "Albania"}, {"description": "", "display_name": "Angola", "id": "ago", "image_display_url": "", "name": "ago", "title": "Angola"}, {"description": "", "display_name": "Argentina", "id": "arg", "image_display_url": "", "name": "arg", "title": "Argentina"}, {"description": "", "display_name": "Armenia", "id": "arm", "image_display_url": "", "name": "arm", "title": "Armenia"}, {"description": "test", "display_name": "Bangladesh", "id": "bgd", "image_display_url": "", "name": "bgd", "title": "Bangladesh"}, {"description": "", "display_name": "Belarus", "id": "blr", "image_display_url": "", "name": "blr", "title": "Belarus"}, {"description": "", "display_name": "Belize", "id": "blz", "image_display_url": "", "name": "blz", "title": "Belize"}, {"description": "", "display_name": "Benin", "id": "ben", "image_display_url": "", "name": "ben", "title": "Benin"}, {"description": "", "display_name": "Bhutan", "id": "btn", "image_display_url": "", "name": "btn", "title": "Bhutan"}, {"description": "", "display_name": "Bolivia (Plurinational State of)", "id": "bol", "image_display_url": "", "name": "bol", "title": "Bolivia (Plurinational State of)"}, {"description": "", "display_name": "Bosnia and Herzegovina", "id": "bih", "image_display_url": "", "name": "bih", "title": "Bosnia and Herzegovina"}, {"description": "", "display_name": "Brazil", "id": "bra", "image_display_url": "", "name": "bra", "title": "Brazil"}, {"description": "", "display_name": "Burkina Faso", "id": "bfa", "image_display_url": "", "name": "bfa", "title": "Burkina Faso"}, {"description": "", "display_name": "Burundi", "id": "bdi", "image_display_url": "", "name": "bdi", "title": "Burundi"}, {"description": "", "display_name": "Cambodia", "id": "khm", "image_display_url": "", "name": "khm", "title": "Cambodia"}, {"description": "", "display_name": "Cameroon", "id": "cmr", "image_display_url": "", "name": "cmr", "title": "Cameroon"}], "tags": [{"display_name": "covid-19", "id": "4c4c6a4e-00b0-49b0-a1a5-e5082f91f6e6", "name": "covid-19", "state": "active", "vocabulary_id": "b891512e-9516-4bf5-962a-7a289772a2a1"}, {"display_name": "economics", "id": "f58b7aa5-284f-4e1c-ae35-3ded0f2a4555", "name": "economics", "state": "active", "vocabulary_id": "b891512e-9516-4bf5-962a-7a289772a2a1"}, {"display_name": "socioeconomics", "id": "a64218ff-64ff-4777-a664-6b0a331ab605", "name": "socioeconomics", "state": "active", "vocabulary_id": "b891512e-9516-4bf5-962a-7a289772a2a1"}], "relationships_as_subject": [], "relationships_as_object": [], "resources": [{"cache_last_updated": null, "cache_url": null, "created": "2020-06-16T09:34:22.612807", "datastore_active": false, "description": "Compilation of international financial institution and economic data", "download_url": "https://drive.google.com/uc?export=download&id=1yK5olSSLBKmfE0T_EgTP_d8l-lTFfz1I", "format": "CSV", "hash": "", "hdx_rel_url": "https://drive.google.com/uc?export=download&id=1yK5olSSLBKmfE0T_EgTP_d8l-lTFfz1I", "id": "959e78d6-fece-4a35-a0ec-d4aef3405d4f", "last_modified": "2021-04-07T01:01:13.552519", "metadata_modified": "2025-02-04T12:35:48.620312", "microdata": false, "mimetype": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "mimetype_inner": null, "name": "Financing flows", "originalHash": "1027011641", "package_id": "9d303f4b-6293-4a53-9cdb-7142fcf7f6dc", "position": 0, "resource_type": "api", "size": 0, "state": "active", "url": "https://drive.google.com/uc?export=download&id=1yK5olSSLBKmfE0T_EgTP_d8l-lTFfz1I", "url_type": "api"}]}
1 change: 1 addition & 0 deletions tests/fixtures/input/datasets_11.json

Large diffs are not rendered by default.

Loading

0 comments on commit ffea17d

Please sign in to comment.