Skip to content

Commit beac73d

Browse files
authored
chore: update to dependency groups (#251)
1 parent 4ef32ec commit beac73d

3 files changed

Lines changed: 1281 additions & 986 deletions

File tree

pyproject.toml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,31 @@ dependencies = [
2929

3030
[project.optional-dependencies]
3131
cli = [
32-
"click~=8.1.5",
32+
"click~=8.2.0",
3333
"click-logging~=1.0.1",
3434
"tabulate~=0.9.0",
3535
"tqdm~=4.67.0",
3636
]
3737

38+
[dependency-groups]
39+
dev = [
40+
"mypy>=1.12.0",
41+
"pre-commit>=4.0.1",
42+
"pystac[validation]>=1.11.0",
43+
"pytest>=8.3.3",
44+
"pytest-asyncio>=0.24.0",
45+
"pytest-cov>=5.0.0",
46+
"pytest-recording>=0.13.2",
47+
"ruff>=0.6.9",
48+
"types-aiofiles>=24.1.0.20240626",
49+
"types-python-dateutil>=2.9.0.20241003",
50+
"types-tabulate>=0.9.0.20240106",
51+
"types-tqdm>=4.66.0.20240417",
52+
"pydata-sphinx-theme>=0.15.4",
53+
"sphinx>=8.1.3",
54+
"sphinx-click>=6.0.0",
55+
]
56+
3857
[project.scripts]
3958
stac-asset = "stac_asset._cli:cli"
4059

@@ -75,25 +94,6 @@ ignore = ["D100", "D105", "D107"]
7594
[tool.ruff.lint.pydocstyle]
7695
convention = "google"
7796

78-
[tool.uv]
79-
dev-dependencies = [
80-
"mypy>=1.12.0",
81-
"pre-commit>=4.0.1",
82-
"pystac[validation]>=1.11.0",
83-
"pytest>=8.3.3",
84-
"pytest-asyncio>=0.24.0",
85-
"pytest-cov>=5.0.0",
86-
"pytest-recording>=0.13.2",
87-
"ruff>=0.6.9",
88-
"types-aiofiles>=24.1.0.20240626",
89-
"types-python-dateutil>=2.9.0.20241003",
90-
"types-tabulate>=0.9.0.20240106",
91-
"types-tqdm>=4.66.0.20240417",
92-
"pydata-sphinx-theme>=0.15.4",
93-
"sphinx>=8.1.3",
94-
"sphinx-click>=6.0.0",
95-
]
96-
9797
[build-system]
9898
requires = ["hatchling"]
9999
build-backend = "hatchling.build"

tests/test_cli.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
from click.testing import CliRunner
77
from pystac import Item, ItemCollection
88

9-
import stac_asset._cli
9+
cli = pytest.importorskip("stac_asset._cli.cli")
1010

1111

1212
def test_download_item(tmp_path: Path, item_path: Path) -> None:
1313
runner = CliRunner()
1414
result = runner.invoke(
15-
stac_asset._cli.cli,
15+
cli,
1616
["download", str(item_path), str(tmp_path)],
1717
)
1818
assert result.exit_code == 0
@@ -25,8 +25,8 @@ def test_download_item_stdin_stdout(tmp_path: Path, item: Item) -> None:
2525
item_as_str = json.dumps(
2626
item.to_dict(include_self_link=True, transform_hrefs=False)
2727
)
28-
runner = CliRunner(mix_stderr=False)
29-
result = runner.invoke(stac_asset._cli.cli, ["download"], input=item_as_str)
28+
runner = CliRunner()
29+
result = runner.invoke(cli, ["download"], input=item_as_str)
3030
assert result.exit_code == 0, result.stdout
3131
Item.from_dict(json.loads(result.stdout))
3232
finally:
@@ -38,7 +38,7 @@ def test_download_item_collection_stdin_stdout(
3838
) -> None:
3939
runner = CliRunner()
4040
result = runner.invoke(
41-
stac_asset._cli.cli,
41+
cli,
4242
[
4343
"download",
4444
str(item_collection_path),
@@ -60,10 +60,8 @@ def test_download_item_collection_file_name(
6060
item_collection_as_str = json.dumps(
6161
item_collection.to_dict(transform_hrefs=False)
6262
)
63-
runner = CliRunner(mix_stderr=False)
64-
result = runner.invoke(
65-
stac_asset._cli.cli, ["download"], input=item_collection_as_str
66-
)
63+
runner = CliRunner()
64+
result = runner.invoke(cli, ["download"], input=item_collection_as_str)
6765
assert result.exit_code == 0, result.stdout
6866
ItemCollection.from_dict(json.loads(result.stdout))
6967
finally:
@@ -74,7 +72,7 @@ def test_download_item_collection_file_name(
7472
def test_download_item_s3_requester_pays(tmp_path: Path) -> None:
7573
runner = CliRunner()
7674
result = runner.invoke(
77-
stac_asset._cli.cli,
75+
cli,
7876
[
7977
"download",
8078
"https://landsatlook.usgs.gov/stac-server/collections/landsat-c2l2-sr/items/LC09_L2SP_092068_20230607_20230609_02_T1_SR",
@@ -93,7 +91,7 @@ def test_download_item_s3_requester_pays(tmp_path: Path) -> None:
9391
def test_info(item_path: Path) -> None:
9492
runner = CliRunner()
9593
result = runner.invoke(
96-
stac_asset._cli.cli,
94+
cli,
9795
["info", str(item_path)],
9896
)
9997
assert result.exit_code == 0, result.stdout

0 commit comments

Comments
 (0)