Skip to content

Commit 272d329

Browse files
authored
HDXDSYS-2619 Modernise HDX Python libraries to Python 3.10 (#101)
* Modernise to Py310 * Use latest HDX Python Country and Utilities
1 parent 51730f4 commit 272d329

48 files changed

Lines changed: 1440 additions & 1658 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.pre-commit-config.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,25 @@ default_language_version:
22
python: python3.13
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v5.0.0
5+
rev: v6.0.0
66
hooks:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
99
- id: check-ast
1010
- repo: https://github.com/astral-sh/ruff-pre-commit
11-
rev: v0.12.0
11+
rev: v0.14.10
1212
hooks:
1313
# Run the linter.
1414
- id: ruff-check
1515
args: [ --fix ]
1616
# Run the formatter.
1717
- id: ruff-format
1818
- repo: https://github.com/astral-sh/uv-pre-commit
19-
rev: 0.7.14
19+
rev: 0.9.22
2020
hooks:
2121
# Run the pip compile
2222
- id: pip-compile
2323
name: pip-compile requirements.txt
2424
files: pyproject.toml
25-
args: [ pyproject.toml, --resolver=backtracking, --all-extras, --upgrade, -q, -o, requirements.txt ]
25+
args: [ pyproject.toml, --resolver=backtracking, --upgrade, -q,
26+
-o, requirements.txt ]

documentation/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ The library has detailed API documentation which can be found in the menu at the
5454

5555

5656
## Breaking Changes
57+
From 6.6.0, Python 3.10 or later is required
58+
5759
From 6.5.7, get_size_and_hash moved to HDX Python Utilities
5860

5961
From 6.5.2, remove unused `generate_qc_resource_from_rows` method.

hatch.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ run = """
3434

3535
[envs.hatch-static-analysis]
3636
config-path = "none"
37-
dependencies = ["ruff==0.12.0"]
37+
dependencies = ["ruff==0.14.10"]

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ classifiers = [
3131
"Operating System :: MacOS",
3232
"Operating System :: Microsoft :: Windows",
3333
]
34-
requires-python = ">=3.8"
34+
requires-python = ">=3.10"
3535

3636
dependencies = [
3737
"ckanapi>=4.8",
3838
"defopt>=7.0.0",
3939
"email_validator",
40-
"hdx-python-country>=3.9.8",
41-
"hdx-python-utilities>=3.9.9",
40+
"hdx-python-country>=4.0.0",
41+
"hdx-python-utilities>=4.0.0",
4242
"libhxl>=5.2.2",
4343
"makefun",
4444
"quantulum3",

requirements.txt

Lines changed: 10 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,25 @@
11
# This file was autogenerated by uv via the following command:
2-
# uv pip compile pyproject.toml --resolver=backtracking --all-extras -o requirements.txt
2+
# uv pip compile pyproject.toml --resolver=backtracking -o requirements.txt
33
annotated-types==0.7.0
44
# via pydantic
5-
astdoc==1.3.2
6-
# via mkapi
75
attrs==25.4.0
86
# via
97
# frictionless
108
# jsonlines
119
# jsonschema
1210
# referencing
13-
babel==2.17.0
14-
# via mkdocs-material
15-
backrefs==6.1
16-
# via mkdocs-material
17-
cachetools==6.2.4
18-
# via google-auth
1911
certifi==2026.1.4
2012
# via requests
21-
cfgv==3.5.0
22-
# via pre-commit
2313
chardet==5.2.0
2414
# via frictionless
2515
charset-normalizer==3.4.4
2616
# via requests
2717
ckanapi==4.9
2818
# via hdx-python-api (pyproject.toml)
2919
click==8.3.1
30-
# via
31-
# mkdocs
32-
# typer
33-
colorama==0.4.6
34-
# via mkdocs-material
35-
coverage==7.13.1
36-
# via pytest-cov
20+
# via typer
3721
defopt==7.0.0
3822
# via hdx-python-api (pyproject.toml)
39-
distlib==0.4.0
40-
# via virtualenv
4123
dnspython==2.8.0
4224
# via email-validator
4325
docopt==0.6.2
@@ -50,30 +32,16 @@ email-validator==2.3.0
5032
# via hdx-python-api (pyproject.toml)
5133
et-xmlfile==2.0.0
5234
# via openpyxl
53-
filelock==3.20.2
54-
# via virtualenv
5535
frictionless==5.18.1
5636
# via hdx-python-utilities
57-
ghp-import==2.1.0
58-
# via mkdocs
59-
google-auth==2.46.0
60-
# via
61-
# google-auth-oauthlib
62-
# gspread
63-
google-auth-oauthlib==1.2.2
64-
# via gspread
65-
gspread==6.2.1
66-
# via hdx-python-api (pyproject.toml)
67-
hdx-python-country==3.9.8
37+
hdx-python-country==4.0.0
6838
# via hdx-python-api (pyproject.toml)
69-
hdx-python-utilities==3.9.9
39+
hdx-python-utilities==4.0.0
7040
# via
7141
# hdx-python-api (pyproject.toml)
7242
# hdx-python-country
7343
humanize==4.15.0
7444
# via frictionless
75-
identify==2.6.15
76-
# via pre-commit
7745
idna==3.11
7846
# via
7947
# email-validator
@@ -82,21 +50,15 @@ ijson==3.4.0.post0
8250
# via hdx-python-utilities
8351
inflect==7.5.0
8452
# via quantulum3
85-
iniconfig==2.3.0
86-
# via pytest
8753
isodate==0.7.2
8854
# via frictionless
8955
jinja2==3.1.6
90-
# via
91-
# frictionless
92-
# mkapi
93-
# mkdocs
94-
# mkdocs-material
56+
# via frictionless
9557
jsonlines==4.0.0
9658
# via hdx-python-utilities
9759
jsonpath-ng==1.7.0
9860
# via libhxl
99-
jsonschema==4.25.1
61+
jsonschema==4.26.0
10062
# via
10163
# frictionless
10264
# tableschema-to-template
@@ -110,105 +72,39 @@ loguru==0.7.3
11072
# via hdx-python-utilities
11173
makefun==1.16.0
11274
# via hdx-python-api (pyproject.toml)
113-
markdown==3.10
114-
# via
115-
# mkdocs
116-
# mkdocs-material
117-
# pymdown-extensions
11875
markdown-it-py==4.0.0
11976
# via rich
12077
marko==2.2.2
12178
# via frictionless
12279
markupsafe==3.0.3
123-
# via
124-
# jinja2
125-
# mkdocs
80+
# via jinja2
12681
mdurl==0.1.2
12782
# via markdown-it-py
128-
mergedeep==1.3.4
129-
# via
130-
# mkdocs
131-
# mkdocs-get-deps
132-
mkapi==4.5.0
133-
# via hdx-python-api (pyproject.toml)
134-
mkdocs==1.6.1
135-
# via
136-
# mkapi
137-
# mkdocs-material
138-
mkdocs-get-deps==0.2.0
139-
# via mkdocs
140-
mkdocs-material==9.7.1
141-
# via mkapi
142-
mkdocs-material-extensions==1.3.1
143-
# via mkdocs-material
14483
more-itertools==10.8.0
14584
# via inflect
146-
nodeenv==1.10.0
147-
# via pre-commit
14885
num2words==0.5.14
14986
# via quantulum3
150-
oauthlib==3.3.1
151-
# via requests-oauthlib
15287
openpyxl==3.1.5
15388
# via hdx-python-utilities
154-
packaging==25.0
155-
# via
156-
# mkdocs
157-
# pytest
158-
paginate==0.5.7
159-
# via mkdocs-material
160-
pathspec==0.12.1
161-
# via mkdocs
16289
petl==1.7.17
16390
# via frictionless
164-
platformdirs==4.5.1
165-
# via
166-
# mkdocs-get-deps
167-
# virtualenv
168-
pluggy==1.6.0
169-
# via
170-
# pytest
171-
# pytest-cov
17291
ply==3.11
17392
# via
17493
# jsonpath-ng
17594
# libhxl
17695
pockets==0.9.1
17796
# via sphinxcontrib-napoleon
178-
pre-commit==4.5.1
179-
# via hdx-python-api (pyproject.toml)
180-
pyasn1==0.6.1
181-
# via
182-
# pyasn1-modules
183-
# rsa
184-
pyasn1-modules==0.4.2
185-
# via google-auth
18697
pydantic==2.12.5
18798
# via frictionless
18899
pydantic-core==2.41.5
189100
# via pydantic
190101
pygments==2.19.2
191-
# via
192-
# mkdocs-material
193-
# pytest
194-
# rich
195-
pymdown-extensions==10.20
196-
# via mkdocs-material
102+
# via rich
197103
pyphonetics==0.5.3
198104
# via hdx-python-utilities
199-
pytest==9.0.2
200-
# via
201-
# hdx-python-api (pyproject.toml)
202-
# pytest-check
203-
# pytest-cov
204-
pytest-check==2.6.2
205-
# via hdx-python-api (pyproject.toml)
206-
pytest-cov==7.0.0
207-
# via hdx-python-api (pyproject.toml)
208105
python-dateutil==2.9.0.post0
209106
# via
210107
# frictionless
211-
# ghp-import
212108
# hdx-python-utilities
213109
# libhxl
214110
python-io-wrapper==0.3.1
@@ -220,14 +116,7 @@ python-slugify==8.0.4
220116
pyyaml==6.0.3
221117
# via
222118
# frictionless
223-
# mkdocs
224-
# mkdocs-get-deps
225-
# pre-commit
226-
# pymdown-extensions
227-
# pyyaml-env-tag
228119
# tableschema-to-template
229-
pyyaml-env-tag==1.1
230-
# via mkdocs
231120
quantulum3==0.9.2
232121
# via hdx-python-api (pyproject.toml)
233122
ratelimit==2.2.1
@@ -242,13 +131,9 @@ requests==2.32.5
242131
# ckanapi
243132
# frictionless
244133
# libhxl
245-
# mkdocs-material
246134
# requests-file
247-
# requests-oauthlib
248135
requests-file==3.0.1
249136
# via hdx-python-utilities
250-
requests-oauthlib==2.0.0
251-
# via google-auth-oauthlib
252137
rfc3986==2.0.0
253138
# via frictionless
254139
rich==14.2.0
@@ -257,8 +142,6 @@ rpds-py==0.30.0
257142
# via
258143
# jsonschema
259144
# referencing
260-
rsa==4.9.1
261-
# via google-auth
262145
ruamel-yaml==0.19.1
263146
# via hdx-python-utilities
264147
setuptools==80.9.0
@@ -289,7 +172,7 @@ text-unidecode==1.3
289172
# via python-slugify
290173
typeguard==4.4.4
291174
# via inflect
292-
typer==0.21.0
175+
typer==0.21.1
293176
# via frictionless
294177
typing-extensions==4.15.0
295178
# via
@@ -305,16 +188,12 @@ unidecode==1.4.0
305188
# via
306189
# libhxl
307190
# pyphonetics
308-
urllib3==2.6.2
191+
urllib3==2.6.3
309192
# via
310193
# libhxl
311194
# requests
312195
validators==0.35.0
313196
# via frictionless
314-
virtualenv==20.35.4
315-
# via pre-commit
316-
watchdog==6.0.0
317-
# via mkdocs
318197
wheel==0.45.1
319198
# via libhxl
320199
xlrd==2.0.2

ruff.toml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1+
target-version = "py310"
2+
src = ["src"]
13
exclude = ["_version.py"]
24

35
[lint]
46
# List of rules: https://docs.astral.sh/ruff/rules/
5-
select = [
6-
"E", # pycodestyle - default
7-
"F", # pyflakes - default
8-
"I" # isort
7+
extend-select = [
8+
"I", # isort
9+
"UP" # Upgrade Python
910
]
10-
ignore = [
11-
"E501" # Line too long
12-
]
13-
14-
[lint.isort]
15-
known-local-folder = ["hdx"]

0 commit comments

Comments
 (0)