Skip to content

Commit

Permalink
refactor: remove stacrs (#530)
Browse files Browse the repository at this point in the history
  • Loading branch information
gadomski authored Nov 22, 2024
1 parent 866299d commit 446bd09
Show file tree
Hide file tree
Showing 49 changed files with 281 additions and 4,146 deletions.
24 changes: 2 additions & 22 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,10 @@ updates:
schedule:
interval: "weekly"
- package-ecosystem: "cargo"
directory: "/stac"
schedule:
interval: "weekly"
- package-ecosystem: "cargo"
directory: "/python"
schedule:
interval: "weekly"
- package-ecosystem: "cargo"
directory: "/pgstac"
schedule:
interval: "weekly"
- package-ecosystem: "cargo"
directory: "/stac-api"
schedule:
interval: "weekly"
- package-ecosystem: "cargo"
directory: "/stac-cli"
schedule:
interval: "weekly"
- package-ecosystem: "cargo"
directory: "/stac-server"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "pip"
directory: "/scripts"
directory: "/"
schedule:
interval: "weekly"
27 changes: 3 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,30 +126,9 @@ jobs:
- name: Test
run: cargo test -p pgstac
- name: Install Python dependencies
run: uv sync --extra stac-api-validator
run: uv sync --group stac-api-validator
- name: Validate
run: uv run scripts/validate-stac-server --pgstac
test-python:
name: Test stacrs (python)
runs-on: ubuntu-latest
defaults:
run:
working-directory: python
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-python@v5
with:
python-version: 3.x
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Install
run: uv sync
- name: Check
run: uv run ruff check && uv run ruff format --check && uv run mypy .
- name: Test
run: uv run pytest
test-server:
name: Test stac-server
runs-on: ubuntu-latest
Expand All @@ -165,7 +144,7 @@ jobs:
- name: Test
run: cargo test -p stac-server --all-features
- name: Install Python dependencies
run: uv sync --extra stac-api-validator
run: uv sync --group stac-api-validator
- name: Validate
run: uv run scripts/validate-stac-server
lint:
Expand Down Expand Up @@ -218,6 +197,6 @@ jobs:
with:
enable-cache: true
- name: Install Python dependencies
run: uv sync --extra stac-geoparquet
run: uv sync --group stac-geoparquet
- name: Validate
run: uv run scripts/validate-stac-geoparquet
42 changes: 22 additions & 20 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,35 @@ name: Docs

on:
push:
tags:
- "python-v*"
workflow_dispatch:

permissions:
contents: write
pages: write
branches:
- "main"

jobs:
docs:
build:
runs-on: ubuntu-latest
env:
GIT_COMMITTER_NAME: ci-bot
GIT_COMMITTER_EMAIL: ci-bot@example.com
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # for git describe
- uses: Swatinem/rust-cache@v2
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Install Python
run: uv python install # we use uv instead of setup-python so we get python-version resolution between our two packages
- name: Sync
run: uv sync --extra docs && uv sync --no-dev --inexact --project stacrs
- name: Deploy
run: |
VERSION=$(git describe --tags --match="python-v*" --abbrev=0)
uv run mike deploy $VERSION latest --update-aliases --push
run: uv sync --group docs
- name: Build
run: uv run mkdocs build
- uses: actions/upload-pages-artifact@v3
id: deployment
with:
path: site/
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/deploy-pages@v4
id: deployment
60 changes: 0 additions & 60 deletions .github/workflows/python.yml

This file was deleted.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ members = [
"crates/pgstac",
"crates/server",
"crates/types",
"python",
]
default-members = [
"crates/api",
Expand Down
31 changes: 1 addition & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,7 @@

![Ferris the crab holding the STAC logo](./img/ferris-holding-stac-small.png)

Command Line Interface (CLI), Rust libraries, and more for the [SpatioTemporal Asset Catalog (STAC)](https://stacspec.org/) specification.

## Python

🦀 🤝 🐍

**stacrs** is a small, no-dependency Python library that uses **stac-rs** under the hood.
It is meant to supplement (not replace) existing Python STAC tooling such as [pystac](https://pystac.readthedocs.io) and [pystac-client](https://pystac-client.readthedocs.io/en/stable/).
To install:

```shell
python -m pip install stacrs
```

Then:

```python
import stacrs

stacrs.search_to("items-compressed.parquet",
"https://landsatlook.usgs.gov/stac-server",
collections="landsat-c2l2-sr",
intersects={"type": "Point", "coordinates": [-105.119, 40.173]},
sortby="-properties.datetime",
max_items=1000,
format="parquet[snappy]",
)
```

See [the Python documentation](https://stac-utils.github.io/stac-rs/latest/python/) for more information.
Command Line Interface (CLI) and Rust libraries for the [SpatioTemporal Asset Catalog (STAC)](https://stacspec.org/) specification.

## Command line interface

Expand Down
6 changes: 1 addition & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@

![Ferris holding STAC](./img/ferris-holding-stac-small.png)

Command Line Interface (CLI), Rust crates, and other libraries for the [SpatioTemporal Asset Catalog (STAC)](https://stacspec.org/) specification.

## Python documentation

Our Python package is named **stacrs** and its documentation is available [here](./python/index.md).
Command Line Interface (CLI) and Rust crates for the [SpatioTemporal Asset Catalog (STAC)](https://stacspec.org/) specification.

## Rust documentation on docs.rs

Expand Down
1 change: 0 additions & 1 deletion docs/python/.gitignore

This file was deleted.

7 changes: 0 additions & 7 deletions docs/python/api/index.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/python/api/migrate.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/python/api/read.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/python/api/search.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/python/api/validate.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/python/api/version.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/python/api/write.md

This file was deleted.

Loading

0 comments on commit 446bd09

Please sign in to comment.