-
Notifications
You must be signed in to change notification settings - Fork 3
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
Make CLI plot script a proper Python file #312
Conversation
Actually, after a bit more thinking I believe we can do even more, i.e. almost what I want:
|
There are a bit too many changes doing different things in here, which make reviewing and fixing the tests difficult. Could you please focus first on one goal, namely making |
mmmmm ... [grummel] ... the commits so far are the minimal changes I would say, i.e. they make also I want to largely iterate the Python file to make it easier to maintain, to ban all the globals, and to make the plot functions reusable. Actually I already started on the process, but now I don't know whether to commit (and whether my last hour was wasted ...) |
So, I committed nevertheless (because I don't want to loose my work). I would say: if you want to have a smaller PR break this PR at 51a5d53. Now that may still be difficult too review, but this is because the previous state was bad - I'm 100% confident that this PR improves the situation. Yes, even that change can and may break the pheno paper plots, but then we can wait until that paper is out to merge - or maybe this PR reaches a state first, where whatever hacks were needed so far there are no longer needed. If you wish we can put the commits after the one mentioned into a separate PR - where I want to change lots of things. Speaking of questionable content: what exactly is the purpose of |
I agree that the previous version of the script was in a lousy state and I think that we should fix this once and for all here. Hence I believe it would be reasonable to expect a few changes. Skimming through I think @felixhekhorn's changes are going in the right direction and it seems that to make the tests pass it will suffice to "copy" the contents of
AFAIA, the pheno paper is not relying on this at all. PS: I will have to wait for this to resume #310. |
@alecandido Maybe this comment belongs to #309? |
Ah, yes, I confused two open tabs, sorry 😅 |
Is there anything missing here? If not, I'll fix the tests and merge it into master. |
Not as far as I know. Things LGTM. |
@felixhekhorn Can you confirm? |
I still want to copy the file to pineappl_py, but this can also be done later, if you want to merge this quickly (to not block other PRs) (as I'm not sure how quickly I can come back to this). Then at a later stage, I'd still like to improve the script as a whole and actually now that I'm thinking about it - some part of that will need to take place together with the move, i.e. it is not trivial, so let's postpone ... |
@cschwan In case you've not worked on this yet I've fixed the tests locally that I could push (if it helps). |
Yes, please do! |
Are there any immediate concerns that should be addressed? Otherwise I'm going to merge this into |
This actually could be merged. |
Closes #249
given the constraints here #310 (comment), this is the best we can do - however, I still believe this is a step forward, because at least
plot.py
is now a genuine Python file. It also needs no longer (Rust) formatting, but just a plain find and replace.@cschwan since you may know the answer straight away (in contrast to me): can you help me with:
pineappl/pineappl_cli/src/plot.rs
Lines 549 to 550 in 300f3c6
also note that the plot script itself is badly documented, i.e. there is no documentation, just some matplotlib magic going on, which is hard to understand
I also ran
ruff
on it, which generates more changes