Skip to content

Commit b842e14

Browse files
committed
chore: enable stable PyPI workflow, fix dtype claim in README
- Uncomment pypi.yaml with tightened tag pattern 'v[0-9]+.[0-9]+.[0-9]+' so rc/dev tags only trigger TestPyPI, never production PyPI. - Fix README 'Native dtypes' bullet: clarify uint16 stays uint16 in TorchGeo tensors; xarray promotes only when NaN fill required. Signed-off-by: print-sid8 sidsub94@gmail.com
1 parent 859d44e commit b842e14

File tree

2 files changed

+41
-26
lines changed

2 files changed

+41
-26
lines changed

.github/workflows/pypi.yaml

Lines changed: 40 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,46 @@
1-
# name: Publish to PyPI
1+
name: Publish to PyPI
22

3-
# on:
4-
# push:
5-
# tags:
6-
# - 'v*.*.*'
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+' # stable only: v0.3.0, v1.0.0 — no rc/dev suffix
77

8-
# jobs:
9-
# pypi-publish:
10-
# name: Upload release to PyPI
11-
# runs-on: ubuntu-latest
12-
# environment:
13-
# name: pypi
14-
# url: https://pypi.org/project/rasteret
15-
# permissions:
16-
# id-token: write
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
1714

18-
# steps:
19-
# - name: Checkout repository
20-
# uses: actions/checkout@v4
15+
- name: Set up uv
16+
uses: astral-sh/setup-uv@v5
17+
with:
18+
python-version: "3.12"
2119

22-
# - name: Set up uv
23-
# uses: astral-sh/setup-uv@v5
24-
# with:
25-
# python-version: "3.12"
20+
- name: Build package
21+
run: uv build
2622

27-
# - name: Build package
28-
# run: uv build
23+
- name: Store distribution packages
24+
uses: actions/upload-artifact@v4
25+
with:
26+
name: python-package-distributions
27+
path: dist/
2928

30-
# - name: Publish package distributions to PyPI
31-
# uses: pypa/gh-action-pypi-publish@release/v1
29+
publish-to-pypi:
30+
name: Publish to PyPI
31+
needs: build
32+
runs-on: ubuntu-latest
33+
environment:
34+
name: pypi
35+
url: https://pypi.org/p/rasteret
36+
permissions:
37+
id-token: write
38+
steps:
39+
- name: Download distribution packages
40+
uses: actions/download-artifact@v4
41+
with:
42+
name: python-package-distributions
43+
path: dist/
44+
45+
- name: Publish to PyPI
46+
uses: pypa/gh-action-pypi-publish@release/v1

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ own reader fetches pixels concurrently with no GDAL in the path.
2929
- **Zero downloads** - work with terabytes of imagery while storing only megabytes of metadata
3030
- **No STAC at training time** - query once at setup; zero API calls during training
3131
- **Reproducible** - same Parquet index = same records = same results
32-
- **Native dtypes** - uint16 stays uint16; no silent float32 promotion in the read path
32+
- **Native dtypes** - uint16 stays uint16 in TorchGeo tensors; xarray promotes only when NaN fill requires it
3333
- **Shareable cache** - a 5 MB index captures scene selection, band metadata, and split assignments
3434

3535
Rasteret is an **opt-in accelerator**. Your TorchGeo samplers, DataLoader,

0 commit comments

Comments
 (0)