Skip to content

Commit 0a0a95b

Browse files
authored
chore: light dependency cleanup (#116)
* chore: light dependency cleanup * fix: more dependency stuff * fix: remove sync-with-uv * fix: typing
1 parent 8dca071 commit 0a0a95b

File tree

5 files changed

+2819
-1922
lines changed

5 files changed

+2819
-1922
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,12 @@
1-
# See https://pre-commit.com for more information
2-
# See https://pre-commit.com/hooks.html for more hooks
3-
41
repos:
5-
- repo: https://github.com/asottile/pyupgrade
6-
rev: v3.19.1
7-
hooks:
8-
- id: pyupgrade
9-
args:
10-
- --py39-plus
112
- repo: https://github.com/pre-commit/pre-commit-hooks
12-
rev: v5.0.0
3+
rev: v6.0.0
134
hooks:
145
- id: trailing-whitespace
156
- id: end-of-file-fixer
167
exclude: tests/.*\.json
178
- repo: https://github.com/astral-sh/ruff-pre-commit
18-
# Ruff version.
19-
rev: v0.11.8
9+
rev: v0.14.1
2010
hooks:
21-
# Run the linter.
2211
- id: ruff
23-
# Run the formatter.
2412
- id: ruff-format

pyproject.toml

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
[build-system]
2-
requires = ["hatchling>=1.22.2", "hatch-vcs>=0.3.0"]
3-
build-backend = "hatchling.build"
4-
51
[project]
62
name = "stac-geoparquet"
73
authors = [{ name = "Tom Augspurger", email = "[email protected]" }]
@@ -25,17 +21,13 @@ dependencies = [
2521
'typing_extensions; python_version < "3.11"',
2622
]
2723

28-
[tool.hatch.version]
29-
source = "vcs"
30-
31-
[tool.hatch.build.hooks.vcs]
32-
version-file = "stac_geoparquet/_version.py"
24+
[project.urls]
25+
Home = "https://github.com/stac-utils/stac-geoparquet"
3326

3427
[project.optional-dependencies]
3528
deltalake = [
36-
"deltalake",
29+
"deltalake<1",
3730
]
38-
3931
pgstac = [
4032
"psycopg[binary]",
4133
"psycopg-pool",
@@ -54,7 +46,7 @@ dev = [
5446
"requests",
5547
"ruff",
5648
"stac-geoparquet[deltalake]",
57-
"stac-geoparquet[pc]",
49+
"stac-geoparquet",
5850
"stac-geoparquet[pgstac]",
5951
"types-python-dateutil",
6052
"types-requests",
@@ -73,17 +65,11 @@ docs = [
7365
[tool.uv]
7466
default-groups = ["dev", "docs"]
7567

76-
77-
[project.urls]
78-
Home = "https://github.com/stac-utils/stac-geoparquet"
79-
80-
8168
[tool.pytest.ini_options]
8269
minversion = "6.0"
8370
filterwarnings = ["ignore:.*distutils Version.*:DeprecationWarning"]
8471

8572
[tool.mypy]
86-
8773
python_version = "3.10"
8874

8975
[[tool.mypy.overrides]]
@@ -99,7 +85,6 @@ module = [
9985
"shapely.*",
10086
"tqdm.*",
10187
]
102-
10388
ignore_missing_imports = true
10489

10590
[[tool.mypy.overrides]]
@@ -108,13 +93,11 @@ disallow_untyped_defs = true
10893

10994
[tool.ruff.lint]
11095
select = [
111-
# Pyflakes
11296
"F",
113-
# Pycodestyle
11497
"E",
11598
"W",
116-
# isort
11799
"I",
100+
"UP",
118101
]
119102
ignore = [
120103
"E501", # Line too long
@@ -124,3 +107,13 @@ ignore = [
124107
"__init__.py" = [
125108
"F401", # Allow unused imports in __init__.py files
126109
]
110+
111+
[build-system]
112+
requires = ["hatchling>=1.22.2", "hatch-vcs>=0.3.0"]
113+
build-backend = "hatchling.build"
114+
115+
[tool.hatch.version]
116+
source = "vcs"
117+
118+
[tool.hatch.build.hooks.vcs]
119+
version-file = "stac_geoparquet/_version.py"

stac_geoparquet/arrow/_to_arrow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def _convert_single_timestamp_column(column: pa.Array) -> pa.TimestampArray:
8282

8383
def _is_bbox_3d(bbox_col: pa.Array) -> bool:
8484
"""Infer whether the bounding box column represents 2d or 3d bounding boxes."""
85-
offsets_set = set()
85+
offsets_set: set[int] = set()
8686
offsets = bbox_col.offsets.to_numpy()
8787
offsets_set.update(np.unique(offsets[1:] - offsets[:-1]))
8888

stac_geoparquet/pgstac_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def pgstac_to_iter(
173173
args = ()
174174
curname = "".join(random.choices(string.ascii_lowercase, k=32))
175175
with psycopg.connect(conninfo) as conn:
176-
with conn.cursor(curname, row_factory=PgstacRowFactory) as cur:
176+
with conn.cursor(curname, row_factory=PgstacRowFactory) as cur: # type: ignore
177177
cur.itersize = cursor_itersize
178178
cur.execute(query, args)
179179
for rec in cur:

0 commit comments

Comments
 (0)