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

publish, set, actuate non-interactive cli #138

Conversation

lukasmittag
Copy link
Contributor

Adds publish actuate set from cli for kuksa.val.v1 set calls the same as publish.

calls like these are now supported:

cargo run --bin databroker-cli -- --protocol kuksa.val.v1 publish Vehicle.Speed 12
   Compiling databroker-cli v0.6.0-dev.0 (/home/imu6fe/kuksa-databroker/databroker-cli)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 7.67s
     Running `target/debug/databroker-cli --protocol kuksa.val.v1 publish Vehicle.Speed 12`
Using kuksa.val.v1
[publish]  OK  
cargo run --bin databroker-cli -- --protocol kuksa.val.v1 actuate Vehicle.ADAS.CruiseControl.SpeedSet 11
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.17s
     Running `target/debug/databroker-cli --protocol kuksa.val.v1 actuate Vehicle.ADAS.CruiseControl.SpeedSet 11`
Using kuksa.val.v1
[actuate]  OK  

same for docker:

docker run -it --rm --net=host ghcr.io/eclipse-kuksa/kuksa-databroker-cli:main --protocol kuksa.val.v1 publish Vehicle.Speed 12`
Using kuksa.val.v1
[publish]  OK  

Copy link

codecov bot commented Feb 12, 2025

Codecov Report

Attention: Patch coverage is 0% with 180 lines in your changes missing coverage. Please review.

Project coverage is 59.41%. Comparing base (d4f0ad3) to head (bc1069a).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
databroker-cli/src/kuksa_cli.rs 0.00% 151 Missing ⚠️
databroker-cli/src/sdv_cli.rs 0.00% 23 Missing ⚠️
databroker-cli/src/cli.rs 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #138      +/-   ##
==========================================
- Coverage   59.47%   59.41%   -0.07%     
==========================================
  Files          34       34              
  Lines       15112    15128      +16     
==========================================
  Hits         8988     8988              
- Misses       6124     6140      +16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lukasmittag
Copy link
Contributor Author

should write some tests but fix is needed by another person so will do a follow up PR for that.

@SebastianSchildt
Copy link
Contributor

Does it make sense to have "set" in commandline , when the CLI interface itself does not seem to have it?

@SebastianSchildt
Copy link
Contributor

Should have help text for all new options:

Usage: databroker-cli [OPTIONS] [COMMAND]

Commands:
  get      Get one or more datapoint(s)
  set      
  publish  
  actuate  
  help     Print this message or the help of the given subcommand(s)

@lukasmittag
Copy link
Contributor Author

lukasmittag commented Feb 12, 2025

No, makes no sense at least for kuksa.val.v1 because in sdv.databroker.v1 there is a set so keep it and throw an unimplemented exception.

Copy link
Contributor

@SebastianSchildt SebastianSchildt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me. lgtm 🏴‍☠️

@SebastianSchildt SebastianSchildt merged commit 74f92fe into eclipse-kuksa:main Feb 12, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants