Skip to content

Commit

Permalink
Create a scaffold for a search app. (#188)
Browse files Browse the repository at this point in the history
* Merge main.

* Fix format.

* Start providing baseline UI to improve.

* Add search widget that does nothing just yet.

* Very poorly written attribute search.

* Format.

* Better scaffold and set up of search UI.  Lots of comments for someone to follow along.  Also some help on lifetime associations with registry.

* finish cleanup, copy of old code from laurent and document ideas and things to hopefully get someone else to implement a richer UI.

* Cargo fmt

* Add regular command-line version of search.

* Cargo Fmt and Clippy

* Fix spelling.

* Fix clippy.
  • Loading branch information
jsuereth authored Jul 17, 2024
1 parent 7cbf1e1 commit b20b678
Show file tree
Hide file tree
Showing 4 changed files with 596 additions and 8 deletions.
197 changes: 197 additions & 0 deletions Cargo.lock

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

7 changes: 5 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ weaver_forge = { path = "crates/weaver_forge" }
weaver_checker = { path = "crates/weaver_checker" }

clap = { version = "4.5.9", features = ["derive"] }
rayon = "1.10.0"
ratatui = { version = "0.26.3", features=["serde"] }
crossterm = { version = "0.27.0", features = ["serde"] }
tui-textarea = "0.4.0"

# workspace dependencies
serde.workspace = true
Expand All @@ -86,8 +90,7 @@ include_dir.workspace = true
thiserror.workspace = true
miette.workspace = true
schemars.workspace = true

rayon = "1.10.0"
itertools.workspace = true

[dev-dependencies]
weaver_diff = { path = "crates/weaver_diff" }
Expand Down
7 changes: 5 additions & 2 deletions src/registry/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pub enum RegistrySubCommand {
/// The process exits with a code of 0 if the resolution is successful.
#[clap(verbatim_doc_comment)]
Resolve(RegistryResolveArgs),
/// Searches a registry (not yet implemented).
/// Searches a registry (Note: Experimental and subject to change).
Search(RegistrySearchArgs),
/// Calculate a set of general statistics on a semantic convention registry.
Stats(RegistryStatsArgs),
Expand Down Expand Up @@ -181,7 +181,10 @@ pub fn semconv_registry(log: impl Logger + Sync + Clone, command: &RegistryComma
resolve::command(log.clone(), &cache, args),
Some(args.diagnostic.clone()),
),
RegistrySubCommand::Search(_) => unimplemented!(),
RegistrySubCommand::Search(args) => CmdResult::new(
search::command(log.clone(), &cache, args),
Some(args.diagnostic.clone()),
),
RegistrySubCommand::UpdateMarkdown(args) => CmdResult::new(
update_markdown::command(log.clone(), &cache, args),
Some(args.diagnostic.clone()),
Expand Down
Loading

0 comments on commit b20b678

Please sign in to comment.