Skip to content

Commit

Permalink
chore: bump zenoh version (#144)
Browse files Browse the repository at this point in the history
* chore: bump zenoh version

* chore: update branch
  • Loading branch information
wyfo committed Jul 3, 2024
1 parent 04e0ef8 commit 5306505
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 66 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ jobs:
rustup component add rustfmt clippy
- name: Code format check
run: cargo fmt --check

run: cargo fmt --check -- --config "unstable_features=true,imports_granularity=Crate,group_imports=StdExternalCrate"
- name: Clippy
run: cargo clippy --all --examples -- -D warnings

Expand Down
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
repos:
- repo: local
hooks:
- id: fmt
name: fmt
entry: cargo fmt -- --config "unstable_features=true,imports_granularity=Crate,group_imports=StdExternalCrate"
language: system
types: [rust]
52 changes: 26 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ zenoh = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.
"plugins"
] }
zenoh_backend_traits = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "dev/1.0.0" }
zenoh-plugin-trait = { version = "0.11.0-dev", git = "htttps://github.com/eclipse-zenoh/zenoh", branch = "dev/1.0.0" }
zenoh-plugin-trait = { version = "0.11.0-dev", git = "htttps://github.com/eclipse-zenoh/zenoh.git", branch = "dev/1.0.0" }
34 changes: 19 additions & 15 deletions v1/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,33 @@
// ZettaScale Zenoh Team, <zenoh@zettascale.tech>
//

use std::{
convert::{TryFrom, TryInto},
str::FromStr,
time::{Duration, Instant},
};

use async_std::task;
use async_trait::async_trait;
use base64::{engine::general_purpose::STANDARD as b64_std_engine, Engine};
use influxdb::{
Client, ReadQuery as InfluxRQuery, Timestamp as InfluxTimestamp, WriteQuery as InfluxWQuery,
};
use serde::Deserialize;
use std::convert::{TryFrom, TryInto};
use std::str::FromStr;
use std::time::{Duration, Instant};
use tracing::{debug, error, warn};
use uuid::Uuid;
use zenoh::encoding::Encoding;
use zenoh::internal::{bail, buffers::ZBuf, zerror, Timed, TimedEvent, TimedHandle, Timer, Value};
use zenoh::key_expr::KeyExpr;
use zenoh::key_expr::{keyexpr, OwnedKeyExpr};
use zenoh::selector::{Parameters, TimeBound, TimeExpr, TimeRange};
use zenoh::time::Timestamp;
use zenoh::{try_init_log_from_env, Error, Result as ZResult};
use zenoh_backend_traits::config::{
PrivacyGetResult, PrivacyTransparentGet, StorageConfig, VolumeConfig,
use zenoh::{
bytes::Encoding,
internal::{bail, buffers::ZBuf, zerror, Timed, TimedEvent, TimedHandle, Timer, Value},
key_expr::{keyexpr, KeyExpr, OwnedKeyExpr},
query::{Parameters, TimeBound, TimeExpr, TimeRange},
time::Timestamp,
try_init_log_from_env, Error, Result as ZResult,
};
use zenoh_backend_traits::{
config::{PrivacyGetResult, PrivacyTransparentGet, StorageConfig, VolumeConfig},
StorageInsertionResult, *,
};
use zenoh_backend_traits::StorageInsertionResult;
use zenoh_backend_traits::*;
use zenoh_plugin_trait::{plugin_long_version, plugin_version, Plugin};

// Properties used by the Backend
Expand Down Expand Up @@ -922,8 +925,9 @@ fn clauses_from_parameters(p: &str) -> ZResult<String> {
}

fn write_timeexpr(s: &mut String, t: TimeExpr) {
use humantime::format_rfc3339;
use std::fmt::Write;

use humantime::format_rfc3339;
match t {
TimeExpr::Fixed(t) => write!(s, "'{}'", format_rfc3339(t)),
TimeExpr::Now { offset_secs } => write!(s, "now(){offset_secs:+}s"),
Expand Down
48 changes: 26 additions & 22 deletions v2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,39 @@
// ZettaScale Zenoh Team, <zenoh@zettascale.tech>
//

use std::{
convert::{TryFrom, TryInto},
str::FromStr,
time::{Duration, Instant, UNIX_EPOCH},
};

use async_std::task;
use async_trait::async_trait;
use base64::{engine::general_purpose::STANDARD as b64_std_engine, Engine};
use chrono::{NaiveDateTime, SecondsFormat};
use futures::prelude::*;
use influxdb2::api::buckets::ListBucketsRequest;
use influxdb2::models::Query;
use influxdb2::models::{DataPoint, PostBucketRequest};
use influxdb2::Client;
use influxdb2::FromDataPoint;
use std::convert::{TryFrom, TryInto};
use std::str::FromStr;
use std::time::{Duration, Instant, UNIX_EPOCH};
use influxdb2::{
api::buckets::ListBucketsRequest,
models::{DataPoint, PostBucketRequest, Query},
Client, FromDataPoint,
};
use uuid::Uuid;
use zenoh::encoding::Encoding;
use zenoh::internal::{
bail,
buffers::{SplitBuffer, ZBuf},
zerror, Timed, TimedEvent, TimedHandle, Timer, Value,
use zenoh::{
bytes::Encoding,
internal::{
bail,
buffers::{SplitBuffer, ZBuf},
zerror, Timed, TimedEvent, TimedHandle, Timer, Value,
},
key_expr::{keyexpr, OwnedKeyExpr},
query::{Parameters, TimeExpr},
time::{new_timestamp, Timestamp},
try_init_log_from_env, Error, Result as ZResult,
};
use zenoh::key_expr::{keyexpr, OwnedKeyExpr};
use zenoh::selector::{Parameters, TimeExpr};
use zenoh::time::{new_timestamp, Timestamp};
use zenoh::{try_init_log_from_env, Error, Result as ZResult};
use zenoh_backend_traits::config::{
PrivacyGetResult, PrivacyTransparentGet, StorageConfig, VolumeConfig,
use zenoh_backend_traits::{
config::{PrivacyGetResult, PrivacyTransparentGet, StorageConfig, VolumeConfig},
StorageInsertionResult, *,
};
use zenoh_backend_traits::StorageInsertionResult;
use zenoh_backend_traits::*;
use zenoh_plugin_trait::{plugin_long_version, plugin_version, Plugin};

// Properties used by the Backend
Expand Down Expand Up @@ -847,7 +851,7 @@ fn key_exprs_to_influx_regex(path_exprs: &[&keyexpr]) -> String {
}

fn timerange_from_parameters(p: &str) -> ZResult<Option<String>> {
use zenoh::selector::{TimeBound, TimeRange};
use zenoh::query::{TimeBound, TimeRange};
let time_range = TimeRange::from_str(p);
let mut result = String::new();
match time_range {
Expand Down

0 comments on commit 5306505

Please sign in to comment.