-
Notifications
You must be signed in to change notification settings - Fork 12
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
Option for stored data in jf job list
#228
base: develop
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #228 +/- ##
===========================================
- Coverage 73.18% 73.15% -0.03%
===========================================
Files 48 48
Lines 6347 6348 +1
Branches 1012 1013 +1
===========================================
- Hits 4645 4644 -1
- Misses 1341 1342 +1
- Partials 361 362 +1
|
Hi @FabiPi3, sorry for the delay, but I did not have much time to dedicate to jobflow-remote in the last days. I think the option for the In any case, for all the features that will be added I will also ask you to implement a test in https://github.com/Matgenix/jobflow-remote/blob/develop/tests/db/cli/test_job.py before merging. |
I think you should upgrade the minimal typer version. I have troubles running the tests with typer 0.9.0, but newer versions does work. In the CI for python 3.12 typer version 0.12.something is used. |
I have added an option to explicitly specify all columns that will be displayed. This can also be set in the config file. I had to rewrite the formatting table function to make it more dynamic. Let me know what you think. I have also added a small test, would that be sufficient? I was just wondering about to how to specify the columns in the terminal. Right now I use the list option from typer, which can be quite lengthy to type: Maybe is would be better to just pass a string: |
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.
Hi @FabiPi3,
thanks a lot for implementing the additional options! I think the implementation is fine. I left some minor comments on the code.
I agree with you that repeating the option multiple times is really inconvenient for this kind of field. I think it would be good to switch to a single string, as you suggested. But I would use a ,
as a separator, rather than a &
. It seems more standard and usually easier to type on the keyboard.
The test is fine, but can you also add one where it fails by passing an option that does not exist? You can pass error=True
to run_check_cli
and check that (part of) the error message is present in the output.
Also, if you add the error for incompatible options and that -v overrides the configuration, it would be good to have tests for those use cases as well.
Hi Guido, thanks for your feedback. I tried implementing all of it. I have also changed my code a bit. I added a unit to the run time field as it felt necessary to me. What do you think? Regarding the tests, I added two failing tests. I am not sure how to modify the SETTINGS object for the test to test this. Do you have a standard procedure? |
Thanks for the updates.
Aside from this and adjusting the description of |
Added your comments. I agree, the failing tests seemed unrelated to my changes. |
Add the option to display data from the
stored_data
field in theResponse
object. A User can select a key or multiple keys to display those values.On a sidenote, another option was added to not display the uuid of the jobs. I typically don't gain much from this information since the db_id already gives me the unique information I need to find the job in the database.
Things to discuss:
none
Example:
See the attached screenshot.
Maybe closes #227