-
Notifications
You must be signed in to change notification settings - Fork 4
rust(feature): Sift CLI #336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
86d2f31
to
d34d96e
Compare
rust/crates/sift_cli/Cargo.toml
Outdated
indicatif = "0.18.0" | ||
pbjson-types = { workspace = true } | ||
reqwest = "0.12.23" | ||
sift_rs = { version = "0.6.0", path = "../sift_rs" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the path here be removed before merging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch thank you. This is now referencing the workspace dep
rust/crates/sift_cli/src/cli/mod.rs
Outdated
#[arg(short = 'n', long)] | ||
pub description: Vec<String>, | ||
|
||
/// <name,key> repeated pairs e.g. "0,start,1,stop". Corresponds to the order in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should another delimiter be used to separate the key from the value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I agree this was awkward. Updated to the following:
-e, --enum-config <ENUM_CONFIG> Enum configuration pairs `<key,name>` (e.g. `"0,start|1,stop"`) for enum-type channels
-b, --bit-field-config <BIT_FIELD_CONFIG> Bit-field configuration triplets `<name,index,length>` (e.g. `"12v,0,4|led,4,4"`)
|
||
/// Column-type corresponding to ordered positioning of --channel-column | ||
#[arg(short, long)] | ||
pub data_type: Vec<DataType>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of having to redefine the enum and then convert to ChannelDataType, I think there is a way to use ChannelDataType
directly as an arg here even though it is defined in another crate. Similar comment for TimeFormat
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not been able to figure this out in a way that is less work than what I'm doing here. We can come back to this unless you know how to do it.
This PR introduces the initial bits of a CLI to improve programmatic workflows. Currently it supports two primary sub-commands:
Following this PR will be work planned to add support for:
initial
v0.1.0
release to be discussed.Config Management
CSV Import
Parquet Imports