Update clap
This commit is contained in:
@@ -5,7 +5,7 @@ authors = ["Dominik Werder <dominik.werder@gmail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
tokio = { version = "1.7.1", features = ["rt-multi-thread", "io-util", "net", "time", "sync", "fs"] }
|
||||
tokio = { version = "=1.14.77", features = ["rt-multi-thread", "io-util", "net", "time", "sync", "fs"] }
|
||||
hyper = "0.14"
|
||||
http = "0.2"
|
||||
tracing = "0.1.25"
|
||||
@@ -22,7 +22,7 @@ serde_derive = "1.0"
|
||||
serde_json = "1.0"
|
||||
chrono = "0.4"
|
||||
url = "2.2.2"
|
||||
clap = "3.0.0-beta.5"
|
||||
clap = { version = "3.0.6", features = ["derive", "cargo"] }
|
||||
lazy_static = "1.4.0"
|
||||
err = { path = "../err" }
|
||||
taskrun = { path = "../taskrun" }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use clap::{crate_authors, crate_version, Parser};
|
||||
use clap::Parser;
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
#[clap(name="daqbuffer", author=crate_authors!(), version=crate_version!())]
|
||||
#[clap(name = "daqbuffer", author, version)]
|
||||
pub struct Opts {
|
||||
#[clap(short, long, parse(from_occurrences))]
|
||||
pub verbose: i32,
|
||||
|
||||
@@ -12,7 +12,7 @@ path = "src/dq.rs"
|
||||
#serde_json = "1.0"
|
||||
tokio = { version = "1.14.77", features = ["rt-multi-thread", "io-util", "net", "time", "sync", "fs"] }
|
||||
futures-util = "0.3.14"
|
||||
clap = "3.0.0-beta.5"
|
||||
clap = { version = "3.0.6", features = ["derive", "cargo"] }
|
||||
chrono = "0.4.19"
|
||||
bytes = "1.0.1"
|
||||
err = { path = "../err" }
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
use clap::{crate_version, Parser};
|
||||
use clap::Parser;
|
||||
use err::Error;
|
||||
use netpod::{timeunits::*, Nanos};
|
||||
use std::{path::PathBuf, str::FromStr};
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
#[clap(name="DAQ buffer tools", version=crate_version!())]
|
||||
#[clap(name = "DAQ buffer tools", version)]
|
||||
pub struct Opts {
|
||||
#[clap(short, long, parse(from_occurrences))]
|
||||
pub verbose: u32,
|
||||
@@ -14,28 +14,26 @@ pub struct Opts {
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
pub enum SubCmd {
|
||||
#[clap(about = "Convert a channel from the Archiver Appliance into Databuffer format.")]
|
||||
/// Convert a channel from the Archiver Appliance into Databuffer format.
|
||||
ConvertArchiverApplianceChannel(ConvertArchiverApplianceChannel),
|
||||
}
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
pub struct ConvertArchiverApplianceChannel {
|
||||
#[clap(
|
||||
long,
|
||||
about = "Prefix for keyspaces, e.g. specify `daq` to get scalar keyspace directory `daq_2`."
|
||||
)]
|
||||
/// Prefix for keyspaces, e.g. specify `daq` to get scalar keyspace directory `daq_2`.
|
||||
#[clap(long)]
|
||||
keyspace_prefix: String,
|
||||
#[clap(long, about = "Name of the channel to convert.")]
|
||||
/// Name of the channel to convert.
|
||||
#[clap(long)]
|
||||
channel_name: String,
|
||||
#[clap(long, about = "Look for archiver appliance data at given path.")]
|
||||
/// Look for archiver appliance data at given path.
|
||||
#[clap(long)]
|
||||
input_dir: PathBuf,
|
||||
#[clap(long, about = "Generate Databuffer format at given path.")]
|
||||
/// Generate Databuffer format at given path.
|
||||
#[clap(long)]
|
||||
output_dir: PathBuf,
|
||||
#[clap(
|
||||
default_value = "1d",
|
||||
long,
|
||||
about = "Size of the time-bins in the generated Databuffer format.\nUnit-suffixes: `h` (hours), `d` (days)"
|
||||
)]
|
||||
/// Size of the time-bins in the generated Databuffer format.\nUnit-suffixes: `h` (hours), `d` (days)
|
||||
#[clap(default_value = "1d", long)]
|
||||
time_bin_size: TimeBinSize,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use clap::{crate_version, Parser};
|
||||
use clap::Parser;
|
||||
//use disk::decode::EventValueShape;
|
||||
//use disk::decode::EventValuesDim0Case;
|
||||
use disk::eventchunker::EventChunkerConf;
|
||||
@@ -14,7 +14,7 @@ use tokio::fs::File;
|
||||
use tokio::io::AsyncReadExt;
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
#[clap(name="DAQ buffer tools", version=crate_version!())]
|
||||
#[clap(name = "DAQ buffer tools", version)]
|
||||
pub struct Opts {
|
||||
#[clap(short, long, parse(from_occurrences))]
|
||||
pub verbose: u32,
|
||||
|
||||
Reference in New Issue
Block a user