Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default_language_version:
python: python3.12
python: python3.13
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
Expand Down
2 changes: 1 addition & 1 deletion hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ version_scheme = "python-simplified-semver"
features = ["test"]

[[envs.hatch-test.matrix]]
python = ["3.12"]
python = ["3.13"]

[envs.hatch-test.scripts]
run = """
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ dependencies = [
"ckanapi>=4.8",
"defopt>=6.4.0",
"email_validator",
"hdx-python-country>=3.9.3",
"hdx-python-utilities>=3.8.6",
"hdx-python-country>=3.9.4",
"hdx-python-utilities>=3.8.7",
"libhxl>=5.2.2",
"makefun",
"quantulum3",
Expand Down
31 changes: 13 additions & 18 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ colorama==0.4.6
# via mkdocs-material
coverage==7.8.0
# via pytest-cov
cydifflib==1.2.0
# via hdx-python-utilities
defopt==6.4.0
# via hdx-python-api (pyproject.toml)
distlib==0.3.9
Expand Down Expand Up @@ -64,11 +62,11 @@ google-auth==2.40.1
# gspread
google-auth-oauthlib==1.2.2
# via gspread
gspread==6.2.0
gspread==6.2.1
# via hdx-python-api (pyproject.toml)
hdx-python-country==3.9.3
hdx-python-country==3.9.4
# via hdx-python-api (pyproject.toml)
hdx-python-utilities==3.8.6
hdx-python-utilities==3.8.7
# via
# hdx-python-api (pyproject.toml)
# hdx-python-country
Expand All @@ -80,7 +78,7 @@ idna==3.10
# via
# email-validator
# requests
ijson==3.3.0
ijson==3.4.0
# via hdx-python-utilities
inflect==7.5.0
# via quantulum3
Expand Down Expand Up @@ -110,7 +108,7 @@ libhxl==5.2.2
# hdx-python-country
loguru==0.7.3
# via hdx-python-utilities
makefun==1.15.6
makefun==1.16.0
# via hdx-python-api (pyproject.toml)
markdown==3.8
# via
Expand All @@ -131,15 +129,15 @@ mergedeep==1.3.4
# via
# mkdocs
# mkdocs-get-deps
mkapi==4.3.2
mkapi==4.4.0
# via hdx-python-api (pyproject.toml)
mkdocs==1.6.1
# via
# mkapi
# mkdocs-material
mkdocs-get-deps==0.2.0
# via mkdocs
mkdocs-material==9.6.12
mkdocs-material==9.6.14
# via mkapi
mkdocs-material-extensions==1.3.1
# via mkdocs-material
Expand Down Expand Up @@ -167,7 +165,7 @@ platformdirs==4.3.8
# via
# mkdocs-get-deps
# virtualenv
pluggy==1.5.0
pluggy==1.6.0
# via pytest
ply==3.11
# via
Expand Down Expand Up @@ -225,7 +223,7 @@ pyyaml==6.0.2
# pymdown-extensions
# pyyaml-env-tag
# tableschema-to-template
pyyaml-env-tag==0.1
pyyaml-env-tag==1.1
# via mkdocs
quantulum3==0.9.2
# via hdx-python-api (pyproject.toml)
Expand All @@ -252,17 +250,15 @@ rfc3986==2.0.0
# via frictionless
rich==14.0.0
# via typer
rpds-py==0.24.0
rpds-py==0.25.0
# via
# jsonschema
# referencing
rsa==4.9.1
# via google-auth
ruamel-yaml==0.18.10
# via hdx-python-utilities
ruamel-yaml-clib==0.2.12
# via ruamel-yaml
setuptools==80.3.1
setuptools==80.7.1
# via ckanapi
shellingham==1.5.4
# via typer
Expand Down Expand Up @@ -290,14 +286,13 @@ text-unidecode==1.3
# via python-slugify
typeguard==4.4.2
# via inflect
typer==0.15.3
typer==0.15.4
# via frictionless
typing-extensions==4.13.2
# via
# frictionless
# pydantic
# pydantic-core
# referencing
# typeguard
# typer
# typing-inspection
Expand All @@ -313,7 +308,7 @@ urllib3==2.4.0
# requests
validators==0.35.0
# via frictionless
virtualenv==20.31.1
virtualenv==20.31.2
# via pre-commit
watchdog==6.0.0
# via mkdocs
Expand Down
7 changes: 5 additions & 2 deletions src/hdx/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
Union,
)

from hxl.input import InputOptions, munge_url
from hxl.input import HXLIOException, InputOptions, munge_url

import hdx.data.organization as org_module
import hdx.data.resource as res_module
Expand Down Expand Up @@ -220,7 +220,10 @@ def save_to_json(self, path: str, follow_urls: bool = False):
dataset_dict = self.get_dataset_dict()
if follow_urls:
for resource in dataset_dict.get("resources", tuple()):
resource["url"] = munge_url(resource["url"], InputOptions())
try:
resource["url"] = munge_url(resource["url"], InputOptions())
except HXLIOException:
pass
save_json(dataset_dict, path)

@staticmethod
Expand Down
2 changes: 2 additions & 0 deletions tests/hdx/api/test_ckan.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def configuration(self):
)
Locations._validlocations = None
Country.countriesdata(use_live=False)
Vocabulary._approved_vocabulary = None
Vocabulary._tags_dict = None

@pytest.fixture(scope="function")
def datasetmetadata(self):
Expand Down