Skip to content

Commit 1194952

Browse files
committed
Prepare 0.3.0
1 parent 78f0f89 commit 1194952

File tree

16 files changed

+163
-135
lines changed

16 files changed

+163
-135
lines changed

Cargo.lock

Lines changed: 98 additions & 61 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[workspace]
2-
resolver = "2"
2+
resolver = "3"
33

44
members = [
55
"ogcapi",
@@ -17,7 +17,7 @@ default-members = ["ogcapi"]
1717
license = "MIT OR Apache-2.0"
1818
repository = "https://github.com/georust/ogcapi"
1919
edition = "2024"
20-
categories = ["science::geospatial"]
20+
categories = ["science::geo"]
2121
keywords = ["geography", "geo", "geospatial", "gis", "api"]
2222

2323
[workspace.dependencies]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ cargo run -p data-loader -- --input data/ne_110m_admin_0_countries.geojson --col
6363
cargo run -p demo-service
6464

6565
# Run tests
66-
cargo test --workspace --all-features
66+
cargo test --workspace --all-features --all-targets
6767

6868
# Open Documentation
6969
cargo doc --workspace --all-features --no-deps --open
@@ -76,7 +76,7 @@ cargo doc --workspace --all-features --no-deps --open
7676
cargo fmt
7777

7878
# Clippy
79-
cargo clippy --workspace --all-features --examples --tests
79+
cargo clippy --workspace --all-features --all-targets
8080
```
8181

8282
### Teamengine

examples/data-loader/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dotenvy = "0.15.7"
2121
gdal = { version = "0.18.0", optional = true, features = ["bindgen"] }
2222
geo = { version = "0.30.0", optional = true }
2323
geojson = { workspace = true, optional = true, features = ["geo-types"] }
24-
osmpbfreader = { version = "0.17.0", optional = true }
24+
osmpbfreader = { version = "0.18.0", optional = true }
2525
serde_json = { workspace = true }
2626
sqlx = { version = "0.8.3", features = ["runtime-tokio-rustls", "postgres"] }
2727
tokio = { version = "1.44", features = ["full"] }
@@ -31,7 +31,7 @@ url = { workspace = true, features = ["serde"] }
3131
wkb = { version = "0.8.0", optional = true }
3232

3333

34-
ogcapi = { path = "../../ogcapi", version = "0.2", features = [
34+
ogcapi = { path = "../../ogcapi", version = "0.3", features = [
3535
"common",
3636
"types",
3737
"drivers",

examples/demo-service/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ tokio = { version = "1.44", features = ["full"] }
1414
tracing = "0.1.41"
1515
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
1616

17-
ogcapi = { path = "../../ogcapi", version = "0.2", features = [
17+
ogcapi = { path = "../../ogcapi", version = "0.3", features = [
1818
"services",
1919
"common",
2020
"features",

ogcapi-client/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ogcapi-client"
3-
version = "0.2.0"
3+
version = "0.3.0"
44
description = "Client to access OGC API Feature and STAC endpoints."
55
license.workspace = true
66
repository.workspace = true
@@ -24,5 +24,5 @@ serde_qs = { workspace = true }
2424
thiserror = { workspace = true }
2525
url = { workspace = true, features = ["serde"] }
2626

27-
ogcapi-types = { path = "../ogcapi-types", version = "0.2" }
28-
ogcapi-processes = { path = "../ogcapi-processes", version = "0.2", optional = true }
27+
ogcapi-types = { path = "../ogcapi-types", version = "0.3" }
28+
ogcapi-processes = { path = "../ogcapi-processes", version = "0.3", optional = true }

ogcapi-client/src/processes.rs

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,13 @@ impl Client {
5757

5858
#[cfg(test)]
5959
mod tests {
60-
// use ogcapi_processes::gdal_loader::GdalLoaderOutputs;
60+
use ogcapi_processes::gdal_loader::GdalLoaderOutputs;
6161
use ogcapi_types::processes::Execute;
6262

6363
use super::*;
6464

6565
#[test]
66+
#[ignore = "needs running demo service"]
6667
fn execute_greeter() {
6768
use ogcapi_processes::{
6869
Processor,
@@ -88,33 +89,34 @@ mod tests {
8889
assert_eq!(output.greeting, "Hello, client!\n")
8990
}
9091

91-
// #[test]
92-
// fn execute_gdal_loader() {
93-
// use ogcapi_processes::{
94-
// Processor,
95-
// gdal_loader::{GdalLoader, GdalLoaderInputs},
96-
// };
97-
98-
// let endpoint = "http://0.0.0.0:8484/";
99-
// let client = Client::new(endpoint).unwrap();
100-
101-
// let input = GdalLoaderInputs {
102-
// input: "/data/ne_10m_railroads_north_america.geojson".to_owned(),
103-
// collection: "streets".to_string(),
104-
// filter: None,
105-
// s_srs: None,
106-
// database_url: "postgresql://postgres:password@db:5432/ogcapi".to_string(),
107-
// };
108-
109-
// let execute = Execute {
110-
// inputs: input.execute_input(),
111-
// outputs: GdalLoaderOutputs::execute_output(),
112-
// ..Default::default()
113-
// };
114-
115-
// let response = client.execute(GdalLoader {}.id(), &execute).unwrap();
116-
117-
// let output: GdalLoaderOutputs = response.try_into().unwrap();
118-
// dbg!(output);
119-
// }
92+
#[test]
93+
#[ignore = "needs running demo service"]
94+
fn execute_gdal_loader() {
95+
use ogcapi_processes::{
96+
Processor,
97+
gdal_loader::{GdalLoader, GdalLoaderInputs},
98+
};
99+
100+
let endpoint = "http://0.0.0.0:8484/";
101+
let client = Client::new(endpoint).unwrap();
102+
103+
let input = GdalLoaderInputs {
104+
input: "/data/ne_10m_railroads_north_america.geojson".to_owned(),
105+
collection: "streets".to_string(),
106+
filter: None,
107+
s_srs: None,
108+
database_url: "postgresql://postgres:password@db:5432/ogcapi".to_string(),
109+
};
110+
111+
let execute = Execute {
112+
inputs: input.execute_input(),
113+
outputs: GdalLoaderOutputs::execute_output(),
114+
..Default::default()
115+
};
116+
117+
let response = client.execute(GdalLoader {}.id(), &execute).unwrap();
118+
119+
let output: GdalLoaderOutputs = response.try_into().unwrap();
120+
dbg!(output);
121+
}
120122
}

ogcapi-drivers/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ogcapi-drivers"
3-
version = "0.2.0"
3+
version = "0.3.0"
44
description = "Driver traits and implementations"
55
license.workspace = true
66
repository.workspace = true
@@ -45,4 +45,4 @@ sqlx = { version = "0.8.3", optional = true, features = [
4545
] }
4646
url = { workspace = true, optional = true }
4747

48-
ogcapi-types = { path = "../ogcapi-types", version = "0.2" }
48+
ogcapi-types = { path = "../ogcapi-types", version = "0.3" }

ogcapi-processes/Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[package]
22
name = "ogcapi-processes"
3-
version = "0.2.0"
3+
version = "0.3.0"
4+
description = "Processor trait and implementations"
45
license.workspace = true
56
repository.workspace = true
67
edition.workspace = true
@@ -31,5 +32,5 @@ url = { workspace = true }
3132
sqlx = { version = "0.8.3", optional = true }
3233
wkb = { version = "0.8.0", optional = true }
3334

34-
ogcapi-types = { path = "../ogcapi-types", version = "0.2", features = ["processes"] }
35-
ogcapi-drivers = { path = "../ogcapi-drivers", version = "0.2", optional = true, features = ["postgres", "common"] }
35+
ogcapi-types = { path = "../ogcapi-types", version = "0.3", features = ["processes"] }
36+
ogcapi-drivers = { path = "../ogcapi-drivers", version = "0.3", optional = true, features = ["postgres", "common"] }

ogcapi-processes/src/gdal_loader.rs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,6 @@ impl Processor for GdalLoader {
366366

367367
#[cfg(test)]
368368
mod tests {
369-
use std::time::Instant;
370-
371369
use ogcapi_types::processes::Execute;
372370

373371
use crate::{
@@ -387,7 +385,7 @@ mod tests {
387385

388386
let input = GdalLoaderInputs {
389387
input: "../data/ne_10m_railroads_north_america.geojson".to_owned(),
390-
collection: "streets".to_string(),
388+
collection: "streets-gdal".to_string(),
391389
filter: None,
392390
s_srs: None,
393391
database_url: "postgresql://postgres:password@localhost:5433/ogcapi".to_string(),
@@ -398,17 +396,7 @@ mod tests {
398396
..Default::default()
399397
};
400398

401-
let now = Instant::now();
402-
403399
let output: GdalLoaderOutputs = loader.execute(execute).await.unwrap().try_into().unwrap();
404-
println!("{}", output.collection);
405-
406-
// stats
407-
let count = 121895;
408-
let elapsed = now.elapsed().as_secs_f64();
409-
println!(
410-
"Loaded {count} features in {elapsed:.3} seconds ({:.2}/s)",
411-
count as f64 / elapsed
412-
);
400+
assert_eq!(output.collection, "streets-gdal");
413401
}
414402
}

0 commit comments

Comments
 (0)