Skip to content

Commit

Permalink
HDXDSYS-1630 Update dependents of HDX Python Utilities and API (#64)
Browse files Browse the repository at this point in the history
* Phonetics moved to HDX Python Utilities
* Update requirements
  • Loading branch information
mcarans authored Jan 12, 2025
1 parent aad65b8 commit c07226f
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 85 deletions.
4 changes: 2 additions & 2 deletions .config/pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repos:
- id: end-of-file-fixer
- id: check-ast
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.0
rev: v0.8.6
hooks:
# Run the linter.
- id: ruff
Expand All @@ -17,7 +17,7 @@ repos:
- id: ruff-format
args: [--config, .config/ruff.toml]
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.4.24
rev: 0.5.15
hooks:
# Run the pip compile
- id: pip-compile
Expand Down
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ classifiers = [
requires-python = ">=3.8"

dependencies = [
"hdx-python-utilities>=3.7.4",
"hdx-python-utilities>=3.8.0",
"libhxl>=5.2.2",
"pyphonetics",
"tenacity",
]
dynamic = ["version"]
Expand Down Expand Up @@ -65,6 +64,9 @@ packages = ["src/hdx"]
[tool.hatch.build.hooks.vcs]
version-file = "src/hdx/location/_version.py"

[tool.hatch.metadata]
allow-direct-references = true

# Versioning

[tool.hatch.version]
Expand All @@ -90,7 +92,7 @@ run = """
"""

[tool.hatch.envs.hatch-static-analysis]
dependencies = ["ruff==0.7.0"]
dependencies = ["ruff==0.8.6"]

[tool.hatch.envs.hatch-static-analysis.scripts]
format-check = ["ruff format --config .config/ruff.toml --check --diff {args:.}",]
Expand Down
42 changes: 21 additions & 21 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
# uv pip compile pyproject.toml --resolver=backtracking --all-extras -o requirements.txt
annotated-types==0.7.0
# via pydantic
attrs==24.2.0
attrs==24.3.0
# via
# frictionless
# jsonlines
# jsonschema
# referencing
certifi==2024.8.30
certifi==2024.12.14
# via requests
cfgv==3.4.0
# via pre-commit
chardet==5.2.0
# via frictionless
charset-normalizer==3.4.0
charset-normalizer==3.4.1
# via requests
click==8.1.7
click==8.1.8
# via typer
coverage==7.6.7
coverage==7.6.10
# via pytest-cov
distlib==0.3.9
# via virtualenv
Expand All @@ -28,11 +28,11 @@ filelock==3.16.1
# via virtualenv
frictionless==5.18.0
# via hdx-python-utilities
hdx-python-utilities==3.7.4
hdx-python-utilities==3.8.0
# via hdx-python-country (pyproject.toml)
humanize==4.11.0
# via frictionless
identify==2.6.2
identify==2.6.5
# via pre-commit
idna==3.10
# via requests
Expand All @@ -42,7 +42,7 @@ iniconfig==2.0.0
# via pytest
isodate==0.7.2
# via frictionless
jinja2==3.1.4
jinja2==3.1.5
# via frictionless
jsonlines==4.0.0
# via hdx-python-utilities
Expand All @@ -56,7 +56,7 @@ jsonschema-specifications==2024.10.1
# via jsonschema
libhxl==5.2.2
# via hdx-python-country (pyproject.toml)
loguru==0.7.2
loguru==0.7.3
# via hdx-python-utilities
markdown-it-py==3.0.0
# via rich
Expand Down Expand Up @@ -84,15 +84,15 @@ ply==3.11
# libhxl
pre-commit==4.0.1
# via hdx-python-country (pyproject.toml)
pydantic==2.9.2
pydantic==2.10.5
# via frictionless
pydantic-core==2.23.4
pydantic-core==2.27.2
# via pydantic
pygments==2.18.0
pygments==2.19.1
# via rich
pyphonetics==0.5.3
# via hdx-python-country (pyproject.toml)
pytest==8.3.3
# via hdx-python-utilities
pytest==8.3.4
# via
# hdx-python-country (pyproject.toml)
# pytest-cov
Expand Down Expand Up @@ -129,19 +129,19 @@ rfc3986==2.0.0
# via frictionless
rich==13.9.4
# via typer
rpds-py==0.21.0
rpds-py==0.22.3
# via
# jsonschema
# referencing
ruamel-yaml==0.18.6
ruamel-yaml==0.18.10
# via hdx-python-utilities
ruamel-yaml-clib==0.2.12
# via ruamel-yaml
shellingham==1.5.4
# via typer
simpleeval==1.0.3
# via frictionless
six==1.16.0
six==1.17.0
# via python-dateutil
stringcase==1.2.0
# via frictionless
Expand All @@ -155,7 +155,7 @@ tenacity==9.0.0
# via hdx-python-country (pyproject.toml)
text-unidecode==1.3
# via python-slugify
typer==0.13.1
typer==0.15.1
# via frictionless
typing-extensions==4.12.2
# via
Expand All @@ -167,15 +167,15 @@ unidecode==1.3.8
# via
# libhxl
# pyphonetics
urllib3==2.2.3
urllib3==2.3.0
# via
# libhxl
# requests
validators==0.34.0
# via frictionless
virtualenv==20.27.1
virtualenv==20.28.1
# via pre-commit
wheel==0.45.0
wheel==0.45.1
# via libhxl
xlrd==2.0.1
# via hdx-python-utilities
Expand Down
4 changes: 2 additions & 2 deletions src/hdx/location/adminlevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
from hxl.input import HXLIOException

from hdx.location.country import Country
from hdx.location.phonetics import Phonetics
from hdx.utilities.base_downloader import DownloadError
from hdx.utilities.dictandlist import dict_of_sets_add
from hdx.utilities.matching import Phonetics, multiple_replace
from hdx.utilities.retriever import Retrieve
from hdx.utilities.text import multiple_replace, normalise
from hdx.utilities.text import normalise
from hdx.utilities.typehint import ListTuple

logger = logging.getLogger(__name__)
Expand Down
56 changes: 0 additions & 56 deletions src/hdx/location/phonetics.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/hdx/location/test_adminlevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ def test_adminlevel_with_url(self, config, url, fixtures_dir):
adminone = AdminLevel(config)
adminone.setup_from_url()
assert adminone.get_admin_level("YEM") == 1
assert len(adminone.get_pcode_list()) == 2526
assert len(adminone.get_pcode_list()) == 2527
assert adminone.get_pcode_length("YEM") == 4
assert adminone.get_pcode("YEM", "YE30", logname="test") == (
"YE30",
Expand Down

0 comments on commit c07226f

Please sign in to comment.