Skip to content

Commit b1c2cd4

Browse files
authored
Merge pull request #27 from Spatialnode/release/0.2.0
Prepare 0.2.0 Rust and Python release
2 parents 5082840 + cb0fa38 commit b1c2cd4

27 files changed

Lines changed: 493 additions & 238 deletions

File tree

‎.github/workflows/CI.yml‎

Lines changed: 94 additions & 176 deletions
Original file line numberDiff line numberDiff line change
@@ -1,181 +1,99 @@
1-
# # This file is autogenerated by maturin v1.7.4
2-
# # To update, run
3-
# #
4-
# # maturin generate-ci github
5-
# #
6-
# name: CI
1+
name: Package checks
72

8-
# on:
9-
# push:
10-
# branches:
11-
# - main
12-
# - master
13-
# tags:
14-
# - '*'
15-
# pull_request:
16-
# workflow_dispatch:
3+
on:
4+
pull_request:
5+
paths: ['crates/**', 'Cargo.toml', 'Cargo.lock', 'scripts/**', '.github/workflows/CI.yml', '.github/workflows/publish.yml']
6+
push:
7+
branches: [main]
8+
paths: ['crates/**', 'Cargo.toml', 'Cargo.lock', 'scripts/**', '.github/workflows/CI.yml', '.github/workflows/publish.yml']
9+
workflow_dispatch:
10+
workflow_call:
1711

18-
# permissions:
19-
# contents: read
12+
permissions:
13+
contents: read
2014

21-
# jobs:
22-
# linux:
23-
# runs-on: ${{ matrix.platform.runner }}
24-
# strategy:
25-
# matrix:
26-
# platform:
27-
# - runner: ubuntu-latest
28-
# target: x86_64
29-
# - runner: ubuntu-latest
30-
# target: x86
31-
# - runner: ubuntu-latest
32-
# target: aarch64
33-
# - runner: ubuntu-latest
34-
# target: armv7
35-
# - runner: ubuntu-latest
36-
# target: s390x
37-
# - runner: ubuntu-latest
38-
# target: ppc64le
39-
# steps:
40-
# - uses: actions/checkout@v4
41-
# - uses: actions/setup-python@v5
42-
# with:
43-
# python-version: 3.x
44-
# - name: Build wheels
45-
# uses: PyO3/maturin-action@v1
46-
# with:
47-
# target: ${{ matrix.platform.target }}
48-
# args: --release --out dist --find-interpreter
49-
# sccache: 'true'
50-
# manylinux: auto
51-
# - name: Upload wheels
52-
# uses: actions/upload-artifact@v4
53-
# with:
54-
# name: wheels-linux-${{ matrix.platform.target }}
55-
# path: dist
15+
jobs:
16+
rust:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.12'
23+
- run: python scripts/check-release-version.py
24+
- uses: dtolnay/rust-toolchain@master
25+
with:
26+
toolchain: '1.88.0'
27+
- uses: Swatinem/rust-cache@v2
28+
- run: cargo test --workspace --exclude superstac-python --locked
5629

57-
# musllinux:
58-
# runs-on: ${{ matrix.platform.runner }}
59-
# strategy:
60-
# matrix:
61-
# platform:
62-
# - runner: ubuntu-latest
63-
# target: x86_64
64-
# - runner: ubuntu-latest
65-
# target: x86
66-
# - runner: ubuntu-latest
67-
# target: aarch64
68-
# - runner: ubuntu-latest
69-
# target: armv7
70-
# steps:
71-
# - uses: actions/checkout@v4
72-
# - uses: actions/setup-python@v5
73-
# with:
74-
# python-version: 3.x
75-
# - name: Build wheels
76-
# uses: PyO3/maturin-action@v1
77-
# with:
78-
# target: ${{ matrix.platform.target }}
79-
# args: --release --out dist --find-interpreter
80-
# sccache: 'true'
81-
# manylinux: musllinux_1_2
82-
# - name: Upload wheels
83-
# uses: actions/upload-artifact@v4
84-
# with:
85-
# name: wheels-musllinux-${{ matrix.platform.target }}
86-
# path: dist
30+
wheels:
31+
name: Wheel (${{ matrix.target }})
32+
runs-on: ${{ matrix.runner }}
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
include:
37+
- runner: ubuntu-24.04
38+
target: x86_64-unknown-linux-gnu
39+
- runner: ubuntu-24.04-arm
40+
target: aarch64-unknown-linux-gnu
41+
- runner: macos-15-intel
42+
target: x86_64-apple-darwin
43+
- runner: macos-14
44+
target: aarch64-apple-darwin
45+
- runner: windows-latest
46+
target: x86_64-pc-windows-msvc
47+
steps:
48+
- uses: actions/checkout@v4
49+
- uses: actions/setup-python@v5
50+
with:
51+
python-version: '3.12'
52+
- uses: PyO3/maturin-action@v1
53+
with:
54+
target: ${{ matrix.target }}
55+
rust-toolchain: '1.88.0'
56+
maturin-version: '1.13.3'
57+
manylinux: '2_28'
58+
args: --release --locked --manifest-path crates/python/Cargo.toml --out dist
59+
- name: Check and install the wheel
60+
shell: bash
61+
run: |
62+
python -m pip install twine
63+
python -m twine check --strict dist/*
64+
python -m pip install --no-deps --force-reinstall dist/*.whl
65+
- name: Test the installed wheel
66+
run: python -m unittest discover -s crates/python/tests -v
67+
- uses: actions/upload-artifact@v4
68+
with:
69+
name: wheels-${{ matrix.target }}
70+
path: dist/*.whl
71+
if-no-files-found: error
8772

88-
# windows:
89-
# runs-on: ${{ matrix.platform.runner }}
90-
# strategy:
91-
# matrix:
92-
# platform:
93-
# - runner: windows-latest
94-
# target: x64
95-
# - runner: windows-latest
96-
# target: x86
97-
# steps:
98-
# - uses: actions/checkout@v4
99-
# - uses: actions/setup-python@v5
100-
# with:
101-
# python-version: 3.x
102-
# architecture: ${{ matrix.platform.target }}
103-
# - name: Build wheels
104-
# uses: PyO3/maturin-action@v1
105-
# with:
106-
# target: ${{ matrix.platform.target }}
107-
# args: --release --out dist --find-interpreter
108-
# sccache: 'true'
109-
# - name: Upload wheels
110-
# uses: actions/upload-artifact@v4
111-
# with:
112-
# name: wheels-windows-${{ matrix.platform.target }}
113-
# path: dist
114-
115-
# macos:
116-
# runs-on: ${{ matrix.platform.runner }}
117-
# strategy:
118-
# matrix:
119-
# platform:
120-
# - runner: macos-12
121-
# target: x86_64
122-
# - runner: macos-14
123-
# target: aarch64
124-
# steps:
125-
# - uses: actions/checkout@v4
126-
# - uses: actions/setup-python@v5
127-
# with:
128-
# python-version: 3.x
129-
# - name: Build wheels
130-
# uses: PyO3/maturin-action@v1
131-
# with:
132-
# target: ${{ matrix.platform.target }}
133-
# args: --release --out dist --find-interpreter
134-
# sccache: 'true'
135-
# - name: Upload wheels
136-
# uses: actions/upload-artifact@v4
137-
# with:
138-
# name: wheels-macos-${{ matrix.platform.target }}
139-
# path: dist
140-
141-
# sdist:
142-
# runs-on: ubuntu-latest
143-
# steps:
144-
# - uses: actions/checkout@v4
145-
# - name: Build sdist
146-
# uses: PyO3/maturin-action@v1
147-
# with:
148-
# command: sdist
149-
# args: --out dist
150-
# - name: Upload sdist
151-
# uses: actions/upload-artifact@v4
152-
# with:
153-
# name: wheels-sdist
154-
# path: dist
155-
156-
# release:
157-
# name: Release
158-
# runs-on: ubuntu-latest
159-
# if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
160-
# needs: [linux, musllinux, windows, macos, sdist]
161-
# permissions:
162-
# # Use to sign the release artifacts
163-
# id-token: write
164-
# # Used to upload release artifacts
165-
# contents: write
166-
# # Used to generate artifact attestation
167-
# attestations: write
168-
# steps:
169-
# - uses: actions/download-artifact@v4
170-
# - name: Generate artifact attestation
171-
# uses: actions/attest-build-provenance@v1
172-
# with:
173-
# subject-path: 'wheels-*/*'
174-
# - name: Publish to PyPI
175-
# if: "startsWith(github.ref, 'refs/tags/')"
176-
# uses: PyO3/maturin-action@v1
177-
# env:
178-
# MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
179-
# with:
180-
# command: upload
181-
# args: --non-interactive --skip-existing wheels-*/*
73+
sdist:
74+
runs-on: ubuntu-latest
75+
steps:
76+
- uses: actions/checkout@v4
77+
- uses: actions/setup-python@v5
78+
with:
79+
python-version: '3.9'
80+
- uses: dtolnay/rust-toolchain@master
81+
with:
82+
toolchain: '1.88.0'
83+
- uses: PyO3/maturin-action@v1
84+
with:
85+
command: sdist
86+
maturin-version: '1.13.3'
87+
args: --manifest-path crates/python/Cargo.toml --out dist
88+
- name: Build and test from the source archive on Python 3.9
89+
run: |
90+
python -m pip install twine
91+
python -m twine check --strict dist/*
92+
python -m pip wheel --no-deps --wheel-dir rebuilt dist/*.tar.gz
93+
python -m pip install --no-deps rebuilt/*.whl
94+
python -m unittest discover -s crates/python/tests -v
95+
- uses: actions/upload-artifact@v4
96+
with:
97+
name: python-sdist
98+
path: dist/*.tar.gz
99+
if-no-files-found: error

‎.github/workflows/publish.yml‎

Lines changed: 57 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,62 @@
1-
# name: Publish to PyPI
1+
name: Publish packages
22

3-
# on:
4-
# push:
5-
# tags:
6-
# - "v*.*.*"
3+
on:
4+
release:
5+
types: [published]
76

8-
# jobs:
9-
# build:
10-
# runs-on: ubuntu-latest
11-
# steps:
12-
# - uses: actions/checkout@v4
7+
permissions:
8+
contents: read
139

14-
# - name: Install uv
15-
# run: curl -LsSf https://astral.sh/uv/install.sh | sh
10+
concurrency:
11+
group: publish-packages
12+
cancel-in-progress: false
1613

17-
# - name: Build package
18-
# run: uv build
14+
jobs:
15+
checks:
16+
uses: ./.github/workflows/CI.yml
1917

20-
# - name: Publish to PyPI
21-
# uses: pypa/gh-action-pypi-publish@release/v1
22-
# with:
23-
# password: ${{ secrets.PYPI_API_TOKEN }}
18+
crates:
19+
needs: checks
20+
runs-on: ubuntu-latest
21+
environment: crates-io
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: actions/setup-python@v5
25+
with:
26+
python-version: '3.12'
27+
- uses: dtolnay/rust-toolchain@master
28+
with:
29+
toolchain: '1.88.0'
30+
- name: Publish Rust crates in dependency order
31+
env:
32+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
33+
run: |
34+
test -n "$CARGO_REGISTRY_TOKEN" || { echo 'Set CARGO_REGISTRY_TOKEN in Actions secrets'; exit 1; }
35+
python scripts/check-release-version.py
36+
python scripts/publish-crates.py
37+
38+
pypi:
39+
needs: [checks, crates]
40+
runs-on: ubuntu-latest
41+
environment:
42+
name: pypi
43+
url: https://pypi.org/p/superstac
44+
permissions:
45+
id-token: write
46+
steps:
47+
- uses: actions/download-artifact@v4
48+
with:
49+
pattern: wheels-*
50+
merge-multiple: true
51+
path: dist
52+
- uses: actions/download-artifact@v4
53+
with:
54+
name: python-sdist
55+
path: dist
56+
- name: Publish Python distributions
57+
uses: pypa/gh-action-pypi-publish@release/v1
58+
with:
59+
# Omit the secret to use PyPI Trusted Publishing; existing API tokens also work.
60+
password: ${{ secrets.PYPI_API_TOKEN }}
61+
skip-existing: true
62+
attestations: false

‎CHANGELOG.md‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,26 @@ releases.
77

88
## [Unreleased]
99

10+
## [0.2.0] - 2026-09-27
11+
12+
### Added
13+
- First Rust-backed Python distribution with synchronous `Client`, `AsyncClient`,
14+
native dictionary results, configuration, discovery, and search metadata.
15+
- Documentation at https://spatialnode.com/superstac, with Python, Rust, CLI,
16+
configuration guides, and a runnable notebook.
17+
- Release automation for Python wheels, a source distribution, and Rust crates.
18+
19+
### Changed
20+
- The PyPI package replaces the legacy 0.1.0a2 Python implementation. This is a
21+
breaking migration; use the new client API rather than assuming compatibility.
22+
- Python requires CPython 3.9+. Maturin is a build dependency only.
23+
- All Rust crate versions advance together to 0.2.0 and link to the docs site.
24+
25+
### Fixed
26+
- Python bindings import configuration types from their current Rust module.
27+
- Python `Search` now returns an iterator from `__iter__`.
28+
- Python type hints include constructor keyword options and `to_geojson()`.
29+
1030
## [0.1.0] - 2026-05-21
1131

1232
Initial public release.

0 commit comments

Comments
 (0)