Skip to content

Commit

Permalink
Revert "feat: add a basic tree structure (#504)"
Browse files Browse the repository at this point in the history
This reverts commit 8d70a20.
  • Loading branch information
gadomski committed Oct 31, 2024
1 parent 8d70a20 commit 8f1a6a7
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 312 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Test
run: cargo test -p stac stac-types --all-features
run: cargo test -p stac --all-features
check-features-core:
name: Check stac features
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ object_store = "0.11.0"
openssl = { version = "0.10.68", features = ["vendored"] }
openssl-src = "=300.3.1" # joinked from https://github.com/iopsystems/rpc-perf/commit/705b290d2105af6f33150da04b217422c6d68701#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542R41 to cross-compile Python
parquet = { version = "52.2", default-features = false }
path-slash = "0.2.1"
pgstac = { version = "0.2.1", path = "crates/pgstac" }
pyo3 = "0.22.3"
pythonize = "0.22.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/src/subcommand/serve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl Run for Args {
}
Value::Collection(mut collection) => {
if self.load_collection_items {
collection.make_links_absolute()?;
collection.make_relative_links_absolute()?;
for link in collection.iter_item_links() {
let href = link.href.to_string();
let input = input.with_href(href);
Expand Down
5 changes: 0 additions & 5 deletions crates/core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Added

- `version` ([#476](https://github.com/stac-utils/stac-rs/pull/476))
- `Node` and friends ([#504](https://github.com/stac-utils/stac-rs/pull/504))

### Changed

- `make_links_absolute` instead of `make_relative_links_absolute`, `make_links_relative` instead of `make_absolute_links_relative` ([#504](https://github.com/stac-utils/stac-rs/pull/504))
- Permissive deserialization ([#505](https://github.com/stac-utils/stac-rs/pull/505))

### Removed
Expand Down
1 change: 0 additions & 1 deletion crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ jsonschema = { workspace = true, optional = true }
log.workspace = true
object_store = { workspace = true, optional = true }
parquet = { workspace = true, optional = true }
path-slash.workspace = true
reqwest = { workspace = true, features = ["json", "blocking"], optional = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true, features = ["preserve_order"] }
Expand Down
5 changes: 2 additions & 3 deletions crates/core/src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
use crate::{Asset, Assets, Bbox, Error, Fields, Link, Result, Version, STAC_VERSION};
use chrono::{DateTime, FixedOffset, Utc};
use geojson::{feature::Id, Feature, Geometry};
use path_slash::PathBufExt;
use serde::{Deserialize, Serialize};
use serde_json::{Map, Value};
use stac_derive::{Href, Links, Migrate};
use std::{collections::HashMap, path::PathBuf};
use std::{collections::HashMap, path::Path};
use url::Url;

const TOP_LEVEL_ATTRIBUTES: [&str; 8] = [
Expand Down Expand Up @@ -286,7 +285,7 @@ impl Builder {
let mut item = Item::new(self.id);
for (key, mut asset) in self.assets {
if Url::parse(&asset.href).is_err() && self.canonicalize_paths {
asset.href = PathBuf::from_slash(&asset.href)
asset.href = Path::new(&asset.href)
.canonicalize()?
.to_string_lossy()
.into_owned();
Expand Down
2 changes: 0 additions & 2 deletions crates/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ mod item_asset;
mod item_collection;
mod json;
mod ndjson;
mod node;
mod statistics;
#[cfg(feature = "validate")]
mod validate;
Expand Down Expand Up @@ -197,7 +196,6 @@ pub use {
item_collection::ItemCollection,
json::{FromJson, ToJson},
ndjson::{FromNdjson, ToNdjson},
node::Node,
statistics::Statistics,
value::Value,
};
Expand Down
240 changes: 0 additions & 240 deletions crates/core/src/node.rs

This file was deleted.

1 change: 0 additions & 1 deletion crates/types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ rust-version.workspace = true

[dependencies]
mime.workspace = true
path-slash.workspace = true
serde = { workspace = true, features = ["derive"] }
serde_json.workspace = true
thiserror.workspace = true
Expand Down
Loading

0 comments on commit 8f1a6a7

Please sign in to comment.