From e75913f6cd9b4d301975925db8d25881218f128b Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Tue, 17 Dec 2024 16:38:56 +0000 Subject: [PATCH 1/2] Rename CLI and Python packages Co-authored-by: Andy Smith --- .github/workflows/python.yml | 12 ++++++------ Cargo.lock | 4 ++-- Cargo.toml | 6 +----- {popgetter_cli => popgetter-cli}/Cargo.toml | 2 +- {popgetter_cli => popgetter-cli}/src/cli.rs | 0 {popgetter_cli => popgetter-cli}/src/display.rs | 0 {popgetter_cli => popgetter-cli}/src/main.rs | 0 {popgetter_py => popgetter-py}/.gitignore | 0 {popgetter_py => popgetter-py}/Cargo.toml | 2 +- {popgetter_py => popgetter-py}/README.md | 0 {popgetter_py => popgetter-py}/pyproject.toml | 0 {popgetter_py => popgetter-py}/src/lib.rs | 0 12 files changed, 11 insertions(+), 15 deletions(-) rename {popgetter_cli => popgetter-cli}/Cargo.toml (97%) rename {popgetter_cli => popgetter-cli}/src/cli.rs (100%) rename {popgetter_cli => popgetter-cli}/src/display.rs (100%) rename {popgetter_cli => popgetter-cli}/src/main.rs (100%) rename {popgetter_py => popgetter-py}/.gitignore (100%) rename {popgetter_py => popgetter-py}/Cargo.toml (96%) rename {popgetter_py => popgetter-py}/README.md (100%) rename {popgetter_py => popgetter-py}/pyproject.toml (100%) rename {popgetter_py => popgetter-py}/src/lib.rs (100%) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 5e5f60d..e37dbf3 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -1,7 +1,7 @@ # This file is autogenerated by maturin v1.7.1 # To update, run # -# maturin generate-ci github --manifest-path popgetter_py/Cargo.toml +# maturin generate-ci github --manifest-path popgetter-py/Cargo.toml # name: Python @@ -51,7 +51,7 @@ jobs: target: ${{ matrix.platform.target }} args: > --release - --manifest-path popgetter_py/Cargo.toml + --manifest-path popgetter-py/Cargo.toml --out dist --find-interpreter sccache: "true" @@ -99,7 +99,7 @@ jobs: # uses: PyO3/maturin-action@v1 # with: # target: ${{ matrix.platform.target }} - # args: --release --out dist --find-interpreter --manifest-path popgetter_py/Cargo.toml + # args: --release --out dist --find-interpreter --manifest-path popgetter-py/Cargo.toml # sccache: "true" # before-script-linux: | # # TODO: update with package instructions specific to target for openssl @@ -134,7 +134,7 @@ jobs: target: ${{ matrix.platform.target }} args: > --release - --manifest-path popgetter_py/Cargo.toml + --manifest-path popgetter-py/Cargo.toml --out dist --find-interpreter sccache: "true" @@ -164,7 +164,7 @@ jobs: target: ${{ matrix.platform.target }} args: > --release - --manifest-path popgetter_py/Cargo.toml + --manifest-path popgetter-py/Cargo.toml --out dist --find-interpreter sccache: "true" @@ -183,7 +183,7 @@ jobs: with: command: sdist args: > - --manifest-path popgetter_py/Cargo.toml + --manifest-path popgetter-py/Cargo.toml --out dist - name: Upload sdist uses: actions/upload-artifact@v4 diff --git a/Cargo.lock b/Cargo.lock index 68adc28..4ddfee6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2856,7 +2856,7 @@ dependencies = [ ] [[package]] -name = "popgetter_cli" +name = "popgetter-cli" version = "0.2.0" dependencies = [ "anyhow", @@ -2881,7 +2881,7 @@ dependencies = [ ] [[package]] -name = "popgetter_py" +name = "popgetter-py" version = "0.1.0" dependencies = [ "anyhow", diff --git a/Cargo.toml b/Cargo.toml index e66244f..71d5658 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,9 +1,5 @@ [workspace] -members = [ - "popgetter", - "popgetter_cli", - "popgetter_py" -] +members = ["popgetter", "popgetter-cli", "popgetter-py"] resolver = "2" diff --git a/popgetter_cli/Cargo.toml b/popgetter-cli/Cargo.toml similarity index 97% rename from popgetter_cli/Cargo.toml rename to popgetter-cli/Cargo.toml index 3eb5e07..fbfb389 100644 --- a/popgetter_cli/Cargo.toml +++ b/popgetter-cli/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "popgetter_cli" +name = "popgetter-cli" version = "0.2.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/popgetter_cli/src/cli.rs b/popgetter-cli/src/cli.rs similarity index 100% rename from popgetter_cli/src/cli.rs rename to popgetter-cli/src/cli.rs diff --git a/popgetter_cli/src/display.rs b/popgetter-cli/src/display.rs similarity index 100% rename from popgetter_cli/src/display.rs rename to popgetter-cli/src/display.rs diff --git a/popgetter_cli/src/main.rs b/popgetter-cli/src/main.rs similarity index 100% rename from popgetter_cli/src/main.rs rename to popgetter-cli/src/main.rs diff --git a/popgetter_py/.gitignore b/popgetter-py/.gitignore similarity index 100% rename from popgetter_py/.gitignore rename to popgetter-py/.gitignore diff --git a/popgetter_py/Cargo.toml b/popgetter-py/Cargo.toml similarity index 96% rename from popgetter_py/Cargo.toml rename to popgetter-py/Cargo.toml index 36c83dc..adf7b92 100644 --- a/popgetter_py/Cargo.toml +++ b/popgetter-py/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "popgetter_py" +name = "popgetter-py" version = "0.1.0" edition = "2021" diff --git a/popgetter_py/README.md b/popgetter-py/README.md similarity index 100% rename from popgetter_py/README.md rename to popgetter-py/README.md diff --git a/popgetter_py/pyproject.toml b/popgetter-py/pyproject.toml similarity index 100% rename from popgetter_py/pyproject.toml rename to popgetter-py/pyproject.toml diff --git a/popgetter_py/src/lib.rs b/popgetter-py/src/lib.rs similarity index 100% rename from popgetter_py/src/lib.rs rename to popgetter-py/src/lib.rs From 1b54a2cfc16db84704534d5d0f8ce3a9a96a63fd Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Tue, 17 Dec 2024 17:22:34 +0000 Subject: [PATCH 2/2] Rename popgetter package to popgetter-core Co-authored-by: Andy Smith --- Cargo.lock | 50 +++++++++---------- Cargo.toml | 2 +- popgetter-cli/Cargo.toml | 2 +- popgetter-cli/src/cli.rs | 2 +- popgetter-cli/src/display.rs | 2 +- popgetter-cli/src/main.rs | 2 +- {popgetter => popgetter-core}/Cargo.toml | 2 +- .../src/column_names.rs | 0 {popgetter => popgetter-core}/src/config.rs | 0 .../src/data_request_spec.rs | 0 {popgetter => popgetter-core}/src/error.rs | 0 .../src/formatters.rs | 0 {popgetter => popgetter-core}/src/geo.rs | 0 {popgetter => popgetter-core}/src/lib.rs | 0 {popgetter => popgetter-core}/src/metadata.rs | 0 {popgetter => popgetter-core}/src/parquet.rs | 0 {popgetter => popgetter-core}/src/search.rs | 0 popgetter-py/Cargo.toml | 2 +- popgetter-py/src/lib.rs | 2 +- 19 files changed, 33 insertions(+), 33 deletions(-) rename {popgetter => popgetter-core}/Cargo.toml (97%) rename {popgetter => popgetter-core}/src/column_names.rs (100%) rename {popgetter => popgetter-core}/src/config.rs (100%) rename {popgetter => popgetter-core}/src/data_request_spec.rs (100%) rename {popgetter => popgetter-core}/src/error.rs (100%) rename {popgetter => popgetter-core}/src/formatters.rs (100%) rename {popgetter => popgetter-core}/src/geo.rs (100%) rename {popgetter => popgetter-core}/src/lib.rs (100%) rename {popgetter => popgetter-core}/src/metadata.rs (100%) rename {popgetter => popgetter-core}/src/parquet.rs (100%) rename {popgetter => popgetter-core}/src/search.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 4ddfee6..6ec3641 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2827,57 +2827,57 @@ dependencies = [ ] [[package]] -name = "popgetter" -version = "0.1.0" +name = "popgetter-cli" +version = "0.2.0" dependencies = [ "anyhow", - "chrono", + "clap", + "comfy-table", "dirs", "enum_dispatch", - "flatgeobuf", - "futures", - "geo", - "geojson", - "geozero", - "httpmock", "itertools 0.13.0", "log", "nonempty", "polars", - "regex", - "reqwest 0.12.4", + "popgetter-core", + "pretty_env_logger", "serde", "serde_json", + "spinners", + "strum 0.26.2", + "strum_macros 0.26.4", "tempfile", - "thiserror", "tokio", - "wkb", - "wkt", + "toml", ] [[package]] -name = "popgetter-cli" -version = "0.2.0" +name = "popgetter-core" +version = "0.1.0" dependencies = [ "anyhow", - "clap", - "comfy-table", + "chrono", "dirs", "enum_dispatch", + "flatgeobuf", + "futures", + "geo", + "geojson", + "geozero", + "httpmock", "itertools 0.13.0", "log", "nonempty", "polars", - "popgetter", - "pretty_env_logger", + "regex", + "reqwest 0.12.4", "serde", "serde_json", - "spinners", - "strum 0.26.2", - "strum_macros 0.26.4", "tempfile", + "thiserror", "tokio", - "toml", + "wkb", + "wkt", ] [[package]] @@ -2886,7 +2886,7 @@ version = "0.1.0" dependencies = [ "anyhow", "polars", - "popgetter", + "popgetter-core", "pyo3", "pyo3-polars", "serde", diff --git a/Cargo.toml b/Cargo.toml index 71d5658..b5dff50 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = ["popgetter", "popgetter-cli", "popgetter-py"] +members = ["popgetter-core", "popgetter-cli", "popgetter-py"] resolver = "2" diff --git a/popgetter-cli/Cargo.toml b/popgetter-cli/Cargo.toml index fbfb389..3d9a75a 100644 --- a/popgetter-cli/Cargo.toml +++ b/popgetter-cli/Cargo.toml @@ -17,7 +17,7 @@ itertools = { workspace = true } log = { workspace = true } nonempty = { workspace = true, features = ["serialize"] } polars = { workspace = true, features = ["lazy", "is_in", "http", "streaming", "parquet", "polars-io", "regex", "strings", "rows"] } -popgetter = { path = "../popgetter" } +popgetter-core = { path = "../popgetter-core" } pretty_env_logger = { workspace = true } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } diff --git a/popgetter-cli/src/cli.rs b/popgetter-cli/src/cli.rs index e6f903a..0499c77 100644 --- a/popgetter-cli/src/cli.rs +++ b/popgetter-cli/src/cli.rs @@ -6,7 +6,7 @@ use enum_dispatch::enum_dispatch; use log::{debug, info}; use nonempty::nonempty; use polars::frame::DataFrame; -use popgetter::{ +use popgetter_core::{ config::Config, data_request_spec::{DataRequestSpec, RegionSpec}, formatters::{ diff --git a/popgetter-cli/src/display.rs b/popgetter-cli/src/display.rs index 8b30a48..63c0b1d 100644 --- a/popgetter-cli/src/display.rs +++ b/popgetter-cli/src/display.rs @@ -5,7 +5,7 @@ use std::sync::OnceLock; use comfy_table::{presets::NOTHING, *}; use itertools::izip; use polars::{frame::DataFrame, prelude::SortMultipleOptions}; -use popgetter::{metadata::ExpandedMetadata, search::SearchResults, COL}; +use popgetter_core::{metadata::ExpandedMetadata, search::SearchResults, COL}; static LOOKUP: OnceLock> = OnceLock::new(); diff --git a/popgetter-cli/src/main.rs b/popgetter-cli/src/main.rs index be79513..2293c64 100644 --- a/popgetter-cli/src/main.rs +++ b/popgetter-cli/src/main.rs @@ -5,7 +5,7 @@ use anyhow::Result; use clap::Parser; use cli::{Cli, RunCommand}; use log::debug; -use popgetter::config::Config; +use popgetter_core::config::Config; const DEFAULT_LOGGING_LEVEL: &str = "warn"; diff --git a/popgetter/Cargo.toml b/popgetter-core/Cargo.toml similarity index 97% rename from popgetter/Cargo.toml rename to popgetter-core/Cargo.toml index 3fede6a..43bc26d 100644 --- a/popgetter/Cargo.toml +++ b/popgetter-core/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "popgetter" +name = "popgetter-core" version = "0.1.0" edition = "2021" diff --git a/popgetter/src/column_names.rs b/popgetter-core/src/column_names.rs similarity index 100% rename from popgetter/src/column_names.rs rename to popgetter-core/src/column_names.rs diff --git a/popgetter/src/config.rs b/popgetter-core/src/config.rs similarity index 100% rename from popgetter/src/config.rs rename to popgetter-core/src/config.rs diff --git a/popgetter/src/data_request_spec.rs b/popgetter-core/src/data_request_spec.rs similarity index 100% rename from popgetter/src/data_request_spec.rs rename to popgetter-core/src/data_request_spec.rs diff --git a/popgetter/src/error.rs b/popgetter-core/src/error.rs similarity index 100% rename from popgetter/src/error.rs rename to popgetter-core/src/error.rs diff --git a/popgetter/src/formatters.rs b/popgetter-core/src/formatters.rs similarity index 100% rename from popgetter/src/formatters.rs rename to popgetter-core/src/formatters.rs diff --git a/popgetter/src/geo.rs b/popgetter-core/src/geo.rs similarity index 100% rename from popgetter/src/geo.rs rename to popgetter-core/src/geo.rs diff --git a/popgetter/src/lib.rs b/popgetter-core/src/lib.rs similarity index 100% rename from popgetter/src/lib.rs rename to popgetter-core/src/lib.rs diff --git a/popgetter/src/metadata.rs b/popgetter-core/src/metadata.rs similarity index 100% rename from popgetter/src/metadata.rs rename to popgetter-core/src/metadata.rs diff --git a/popgetter/src/parquet.rs b/popgetter-core/src/parquet.rs similarity index 100% rename from popgetter/src/parquet.rs rename to popgetter-core/src/parquet.rs diff --git a/popgetter/src/search.rs b/popgetter-core/src/search.rs similarity index 100% rename from popgetter/src/search.rs rename to popgetter-core/src/search.rs diff --git a/popgetter-py/Cargo.toml b/popgetter-py/Cargo.toml index adf7b92..e7d9a66 100644 --- a/popgetter-py/Cargo.toml +++ b/popgetter-py/Cargo.toml @@ -11,7 +11,7 @@ crate-type = ["cdylib"] [dependencies] anyhow = { workspace = true } polars = { workspace = true, features = ["lazy", "is_in", "http", "streaming", "parquet", "polars-io", "regex", "strings", "rows"] } -popgetter = { path = "../popgetter" } +popgetter-core = { path = "../popgetter-core" } pyo3 = { workspace = true, features = ["anyhow", "experimental-async"] } pyo3-polars ={ workspace = true } serde = { workspace = true } diff --git a/popgetter-py/src/lib.rs b/popgetter-py/src/lib.rs index 8c281c7..5a25bdf 100644 --- a/popgetter-py/src/lib.rs +++ b/popgetter-py/src/lib.rs @@ -1,6 +1,6 @@ use std::default::Default; -use ::popgetter::{ +use ::popgetter_core::{ config::Config, data_request_spec::DataRequestSpec, search::{