Skip to content

Commit 4e28a67

Browse files
committed
feat: refactor
1 parent 2de3756 commit 4e28a67

File tree

21 files changed

+188
-139
lines changed

21 files changed

+188
-139
lines changed

Cargo.lock

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ crate-type = ["cdylib"]
1111
duckdb = { version = "1.1.1", features = ["bundled"] }
1212
geojson = "0.24.1"
1313
pyo3 = "0.23.3"
14+
pyo3-async-runtimes = { version = "0.23.0", features = ["tokio", "tokio-runtime"] }
1415
pyo3-log = "0.12.1"
1516
pythonize = "0.23.0"
16-
serde_json = "1.0.134"
17+
serde = "1.0.217"
18+
serde_json = "1.0.135"
1719
stac = { version = "0.11.1", features = [
1820
"geoparquet-compression",
1921
"object-store-all",

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ Then:
7474
```shell
7575
git clone [email protected]:gadomski/stacrs.git
7676
cd stacrs
77-
uv sync # This will take a little while while the Rust dependencies build
78-
uv run pytest
77+
scripts/test # This will take a little while while the Rust dependencies build, especially DuckDB
7978
```
8079

8180
See [CONTRIBUTING.md](./CONTRIBUTING.md) for more information about contributing to this project.

docs/api/duckdb.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
description: Query stac-geoparquet with DuckDB
3+
---
4+
5+
# DuckDB
6+
7+
::: stacrs.DuckdbClient

docs/api/validate.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/example.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@
134134
}
135135
],
136136
"source": [
137-
"stacrs.search_to(\"items-compressed.parquet\",\n",
137+
"stacrs.search_to(\n",
138+
" \"items-compressed.parquet\",\n",
138139
" \"https://landsatlook.usgs.gov/stac-server\",\n",
139140
" collections=\"landsat-c2l2-sr\",\n",
140141
" intersects={\"type\": \"Point\", \"coordinates\": [-105.119, 40.173]},\n",

mkdocs.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ nav:
2020
- Example notebook: example.ipynb
2121
- API:
2222
- api/index.md
23+
- duckdb: api/duckdb.md
2324
- migrate: api/migrate.md
2425
- read: api/read.md
2526
- search: api/search.md
26-
- validate: api/validate.md
2727
- version: api/version.md
2828
- write: api/write.md
2929
- CONTRIBUTING.md
@@ -37,10 +37,16 @@ plugins:
3737
python:
3838
load_external_modules: false
3939
options:
40+
allow_inspection: false
41+
docstring_section_style: list
42+
docstring_style: google
43+
line_length: 80
44+
separate_signature: true
4045
show_root_heading: true
41-
show_signature: true
4246
show_signature_annotations: true
43-
separate_signature: true
47+
show_source: false
48+
show_symbol_type_toc: true
49+
signature_crossrefs: true
4450
- search
4551
- social:
4652
cards_layout_options:

pyproject.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "stacrs"
3-
description = "A no-dependency Python package for STAC, using Rust under the hood."
3+
description = "A small, no-dependency Python package for STAC, using Rust under the hood."
44
readme = "README.md"
55
authors = [{ name = "Pete Gadomski", email = "[email protected]" }]
66
requires-python = ">=3.10"
@@ -26,10 +26,17 @@ Repository = "https://github.com/gadomski/stacrs"
2626
Documentation = "https://gadom.ski/stacrs"
2727
Issues = "https://github.com/gadomski/stacrs/issues"
2828

29+
[tool.mypy]
30+
files = "**/*.py"
31+
2932
[[tool.mypy.overrides]]
3033
module = "pyarrow.*"
3134
ignore_missing_imports = true
3235

36+
[tool.pytest.ini_options]
37+
asyncio_mode = "auto"
38+
asyncio_default_fixture_loop_scope = "function"
39+
3340
[tool.uv]
3441
dev-dependencies = [
3542
"maturin>=1.7.4",
@@ -38,7 +45,10 @@ dev-dependencies = [
3845
"mkdocs-material[imaging]>=9.5.45",
3946
"mkdocstrings[python]>=0.27.0",
4047
"mypy>=1.11.2",
48+
"pyarrow>=18.0.0",
49+
"pystac[validation]>=1.11.0",
4150
"pytest>=8.3.3",
51+
"pytest-asyncio>=0.25.1",
4252
"ruff>=0.6.9",
4353
"stac-geoparquet>=0.6.0",
4454
]

scripts/format

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env sh
2+
3+
set -e
4+
5+
ruff check --fix
6+
ruff format

scripts/lint

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env sh
2+
3+
set -e
4+
5+
ruff check
6+
ruff format --check
7+
mypy

0 commit comments

Comments
 (0)