Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: more cli flaling #633

Merged
merged 18 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,14 @@ jobs:
run: |
wget https://github.com/duckdb/duckdb/releases/download/v1.1.3/libduckdb-linux-amd64.zip
unzip libduckdb-linux-amd64.zip -d /opt/duckdb
- name: Lint
run: scripts/lint
- name: Format
run: cargo fmt --check
- name: Clippy
run: cargo clippy --workspace --no-default-features -- -D warnings
- name: Build # need to build first to get the executable for CLI tests
run: cargo build --all-features
run: cargo build --no-default-features
- name: Test
run: cargo test --all-features
run: cargo test --no-default-features
- name: Validate stac-server
run: uv run --group stac-api-validator scripts/validate-stac-server
- name: Validate stac-geoparquet
Expand Down
180 changes: 0 additions & 180 deletions .github/workflows/python-cli.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Our command line interface (CLI) can query STAC APIs, validate STAC, and more.
Install:

```shell
pip install stacrs-cli
pip install stacrs
# or
cargo install stac-cli
```
Expand Down
4 changes: 4 additions & 0 deletions crates/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

- Always bundle DuckDB (again) ([#631](https://github.com/stac-utils/stac-rs/pull/631))

### Removed

- **stacrs-cli** (moved to <https://github.com/stac-utils/stacrs>) ([#633](https://github.com/stac-utils/stac-rs/pull/633))

## [0.5.0] - 2025-01-31

### Changed
Expand Down
12 changes: 4 additions & 8 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "stac-cli"
description = "Command line interface for stac-rs"
version = "0.5.1-rc.3"
version = "0.5.1"
keywords = ["geospatial", "stac", "metadata", "geo", "raster"]
authors.workspace = true
edition.workspace = true
Expand All @@ -12,21 +12,17 @@ categories.workspace = true
rust-version.workspace = true

[features]
default = ["pgstac"]
default = ["duckdb-bundled", "pgstac"]
pgstac = ["stac-server/pgstac", "dep:tokio-postgres"]
python = ["dep:pyo3", "pgstac"]
duckdb-bundled = ["duckdb/bundled"]

[dependencies]
anyhow.workspace = true
axum.workspace = true
clap = { workspace = true, features = ["derive"] }
duckdb = { workspace = true, features = ["bundled"] }
duckdb = { workspace = true }
libduckdb-sys = { workspace = true }
object_store.workspace = true
pyo3 = { workspace = true, optional = true, features = [
"abi3-py39",
"extension-module",
] }
reqwest.workspace = true
serde.workspace = true
serde_json.workspace = true
Expand Down
7 changes: 0 additions & 7 deletions crates/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ Command Line Interface (CLI) for [STAC](https://stacspec.org/), named `stacrs`.

## Installation

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

Or:

```sh
cargo install stac-cli
```
Expand Down Expand Up @@ -64,7 +58,6 @@ Use the `--help` flag to see all available options for the CLI and the subcomman
This crate has two features:

- `pgstac`: enable a [pgstac](https://github.com/stac-utils/pgstac) backend for `stacrs serve` (enabled by default)
- `python`: create an entrypoint that can be called from Python (used to enable `python -m pip install stacrs-cli`)

## Other info

Expand Down
35 changes: 0 additions & 35 deletions crates/cli/pyproject.toml

This file was deleted.

1 change: 0 additions & 1 deletion crates/cli/release.toml

This file was deleted.

5 changes: 1 addition & 4 deletions crates/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ use std::{collections::HashMap, io::Write, str::FromStr};
use tokio::{io::AsyncReadExt, net::TcpListener, runtime::Handle};
use tracing::metadata::Level;

#[cfg(feature = "python")]
mod python;

/// stacrs: A command-line interface for the SpatioTemporal Asset Catalog (STAC)
#[derive(Debug, Parser)]
pub struct Stacrs {
Expand Down Expand Up @@ -372,7 +369,7 @@ impl Stacrs {
}
#[cfg(not(feature = "pgstac"))]
{
return Err(anyhow!("stacrs is not compiled with pgstac support"));
Err(anyhow!("stacrs is not compiled with pgstac support"))
}
} else {
let backend = stac_server::MemoryBackend::new();
Expand Down
42 changes: 0 additions & 42 deletions crates/cli/src/python.rs

This file was deleted.

2 changes: 1 addition & 1 deletion docs/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cargo install stac-cli
If you have Python, use `pip`:

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

The CLI is called **stacrs**:
Expand Down