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

CLI for reboost #36

Merged
merged 11 commits into from
Feb 4, 2025
Merged

CLI for reboost #36

merged 11 commits into from
Feb 4, 2025

Conversation

tdixon97
Copy link
Collaborator

@tdixon97 tdixon97 commented Feb 3, 2025

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)

@tdixon97 tdixon97 requested a review from ManuelHu February 3, 2025 22:38
Copy link

codecov bot commented Feb 3, 2025

Codecov Report

Attention: Patch coverage is 10.76923% with 116 lines in your changes missing coverage. Please review.

Project coverage is 57.76%. Comparing base (3da9603) to head (66389c7).
Report is 24 commits behind head on main.

Files with missing lines Patch % Lines
src/reboost/cli.py 8.69% 63 Missing ⚠️
src/reboost/build_glm.py 3.12% 31 Missing ⚠️
src/reboost/utils.py 29.16% 17 Missing ⚠️
src/reboost/build_hit.py 0.00% 4 Missing ⚠️
src/reboost/optmap/cli.py 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

@tdixon97
Copy link
Collaborator Author

tdixon97 commented Feb 3, 2025

I agree that stp-file etc. is a nicer interface, but then we cannot access from the args in python?

@ManuelHu
Copy link
Collaborator

ManuelHu commented Feb 3, 2025

I agree that stp-file etc. is a nicer interface, but then we cannot access from the args in python?

the args name is rewritten to stp_file automatically.

(This of course does not only affect the three lines I marked in my review, but all other arguments in your CLI, too)

@tdixon97
Copy link
Collaborator Author

tdixon97 commented Feb 3, 2025

Ahh ok didn't realise, I can change it

@tdixon97
Copy link
Collaborator Author

tdixon97 commented Feb 4, 2025 via email

@tdixon97
Copy link
Collaborator Author

tdixon97 commented Feb 4, 2025

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.

tdixon97 and others added 2 commits February 4, 2025 18:52
Co-authored-by: Luigi Pertoldi <gipert@pm.me>
Co-authored-by: Manuel Huber <ManuelHu@users.noreply.github.com>
@gipert
Copy link
Member

gipert commented Feb 4, 2025

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 conftest.py:

https://github.com/legend-exp/pygama/blob/fd3569f313da76ae58f7c09b22ff10ba8734908d/tests/conftest.py#L14-L27

You can then use the test directory in this way:

https://github.com/legend-exp/pygama/blob/fd3569f313da76ae58f7c09b22ff10ba8734908d/tests/conftest.py#L38-L39

@tdixon97
Copy link
Collaborator Author

tdixon97 commented Feb 4, 2025

Hopefully this works

@gipert gipert merged commit 65452da into legend-exp:main Feb 4, 2025
12 of 13 checks passed
@tdixon97
Copy link
Collaborator Author

tdixon97 commented Feb 4, 2025

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

@gipert
Copy link
Member

gipert commented Feb 4, 2025

Ah yes, if you don't use fixtures they don't get run.

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