-
Notifications
You must be signed in to change notification settings - Fork 2
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
CLI for reboost #36
CLI for reboost #36
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #36 +/- ##
==========================================
- Coverage 67.16% 57.76% -9.41%
==========================================
Files 21 21
Lines 1395 1501 +106
==========================================
- Hits 937 867 -70
- Misses 458 634 +176 ☔ View full report in Codecov by Sentry. |
I agree that |
the args name is rewritten to (This of course does not only affect the three lines I marked in my review, but all other arguments in your CLI, too) |
Ahh ok didn't realise, I can change it |
I find it useful, its common to get bugs with wrong argparsing (eg specifiying False for a bool argument) and these are not so verbose
________________________________
From: Luigi Pertoldi ***@***.***>
Sent: Tuesday, February 4, 2025 10:52 AM
To: legend-exp/reboost ***@***.***>
Cc: Dixon, Toby ***@***.***>; Author ***@***.***>
Subject: Re: [legend-exp/reboost] CLI for reboost (PR #36)
⚠ Caution: External sender
@gipert commented on this pull request.
________________________________
In src/reboost/cli.py<#36 (comment)>:
+ args = parser.parse_args()
+
+ log_level = (None, logging.INFO, logging.DEBUG)[min(args.verbose, 2)]
+ setup_log(log_level)
+
+ if args.command == "build-glm":
+ # catch some cases
+ glm_files = get_file_list(args.glm_file, threads=args.threads)
+ stp_files = get_file_list(args.stp_file, threads=args.threads)
+
+ _check_input_file(parser, stp_files)
+
+ if args.overwrite is False:
+ _check_output_file(parser, glm_files)
+
+ msg = "Running build_glm with arguments: \n"
I don't think these printouts are particularly useful? I would remove or downgrade to debug if you really like them.
—
Reply to this email directly, view it on GitHub<#36 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ANSET456NZKQB3QE5ROKR4T2OCEXNAVCNFSM6AAAAABWNF4MXCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKOJSGI4TGNJVGA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
This is ready now. I think we can argue about the logging later, once we see how the full logging the user gets will look. |
Co-authored-by: Luigi Pertoldi <gipert@pm.me>
Co-authored-by: Manuel Huber <ManuelHu@users.noreply.github.com>
Sorry Toby for being pedantic, but I realized that it would be much better if the test suite writes files to a temporary location, deleted on test success. I implemented this in pygama, could you just copy this code in You can then use the test directory in this way: |
Hopefully this works |
Oops I just realised that now a lot of my tests dont get run? Do you know why @gipert , maybe because they are marked as fixtures |
Ah yes, if you don't use fixtures they don't get run. |
Also I moved the files into a seperate
AttrsDict
, in future we could support more operations (eg. passing wildcards).But I think if we have merging of inputs in remage its not so useful.
Some minor effect on the optmap cli @ManuelHu might want to check (I just moved some functions into utils to share them)