Skip to content
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

Fix completion generation #264

Merged
merged 2 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ jobs:
clippy_flags: --all-features --release

- name: Run tests
run: cargo test --release
run: cargo test --release --all

# Clap has specific debug asserts when generating completions
- name: Run Completion generation test
run: cargo test generating_completions --bin fp

- name: Generate manifest
run: target/release/fp version -o json > manifest.json
Expand Down
7 changes: 5 additions & 2 deletions src/views.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ struct CreateArguments {
description: Option<String>,

/// The color the resulting view should be displayed as in Fiberplane Studio
#[clap(value_parser = clap::value_parser!(i16).range(0..10))]
#[clap(long, value_parser = clap::value_parser!(i16).range(0..10))]
color: i16,

/// Labels which are associated with this newly created view
#[clap(long, short)]
labels: Vec<KeyValueArgument>,

/// Time range value in either seconds, minutes, hours or days (without suffix).
Expand All @@ -76,13 +77,15 @@ struct CreateArguments {
time_range_value: Option<i64>,

/// Time range unit. Used in conjunction with `time_range_value`
#[clap(requires = "time_range_value")]
#[clap(requires = "time_range_value", value_enum)]
time_range_unit: Option<TimeUnit>,

/// What the notebooks displayed in the view should be sorted by, by default
#[clap(value_enum)]
sort_by: Option<NotebookSortFields>,

/// Sort direction displayed by default when opening the view
#[clap(value_enum)]
sort_direction: Option<SortDirection>,

/// Workspace in which this view lives
Expand Down