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

[ASP-5649] Enable positional arguments on "get-one" commands on Jobbergate-cli #636

Conversation

fschuch
Copy link
Member

@fschuch fschuch commented Oct 18, 2024

What

All the Jobbergate commands that select one entry do it by command line options like --id, or --identifier, for instance:

jobbergate applications get-one --id <application_id> ...
jobbergate applications get-one --identifier <application_identifier> ...

Since the identification is required when selecting a given entry, it can be changed to a positional argument. In this way, it can be provided right after the command with no need to type --id or --identifier every time. For instance:

jobbergate applications get-one <application_id> ...
jobbergate applications get-one <application_identifier> ...

This was just an example on jobbergate applications get-one, but this enhancement can also be extended to many other commands.

Why

As a Jobbergate user, I want a simplified way to select entries on the jobbergate commands, so that my experience using the cli is less typing intensive.

Task: https://jira.scania.com/browse/ASP-5649


Peer Review

Please follow the upstream omnivector documentation concerning
peer-review guidelines.

Copy link

codecov bot commented Oct 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.54%. Comparing base (273dfe3) to head (ec1f41e).
Report is 15 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #636      +/-   ##
==========================================
+ Coverage   92.09%   92.54%   +0.44%     
==========================================
  Files          83       84       +1     
  Lines        4426     4478      +52     
==========================================
+ Hits         4076     4144      +68     
+ Misses        350      334      -16     
Flag Coverage Δ
agent 92.82% <ø> (ø)
api 95.29% <ø> (+0.20%) ⬆️
cli 88.57% <ø> (+0.86%) ⬆️
core 96.32% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Member

@dusktreader dusktreader left a comment

Choose a reason for hiding this comment

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

Cool work, here. Added some comments for you.

jobbergate-cli/jobbergate_cli/subapps/job_scripts/app.py Outdated Show resolved Hide resolved
jobbergate-cli/jobbergate_cli/subapps/tools.py Outdated Show resolved Hide resolved
jobbergate-cli/jobbergate_cli/subapps/tools.py Outdated Show resolved Hide resolved
jobbergate-cli/jobbergate_cli/subapps/tools.py Outdated Show resolved Hide resolved
@fschuch fschuch force-pushed the fschuch/ASP-5649--enable-positional-arguments-to-select-one-on-the-cli branch from d172cee to 33777a8 Compare October 30, 2024 14:15
@fschuch fschuch merged commit ec236fe into main Oct 31, 2024
13 checks passed
@fschuch fschuch deleted the fschuch/ASP-5649--enable-positional-arguments-to-select-one-on-the-cli branch October 31, 2024 11:18
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.

3 participants