-
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
Use PyO3 functionality to remove Python files #302
Conversation
Thank you for taking care of this, @Radonirinaunimi! Whenever you need help, let me know! |
same here! |
Although:
are still to be done, this is mostly ready (in that it passes all the tests) so I think you can already have a look. There are only a few things that are not exactly the same as before (and that we may or may not want to address):
PS: I could not force-push so please ignore the commit history 😇 |
That's perfectly fine, and quite happy that we can get away with so few changes actually.
I've disabled force-push for the time being since I'm not convinced about it being a good idea. |
I think this is acceptable - but makes this a breaking change.
this is quite "rusty" and not "pythonic", if we can't find a way around we can keep it to honour our underlying language - but if possible I'd like to avoid. Can we do something with the |
I've had a look at this a bit and not only it could become really complicated but also messy. What would be the reasons we should avoid the current approach (apart from breaking changes)? It is basically a difference between doing: set_subgrid(order, bin, lumi, subgrid.into()) vs before when it was re-wrapped inside: pineappl/pineappl_py/pineappl/grid.py Lines 127 to 143 in 8c12335
|
Where do we use |
yadism does - since we do the interpolation ourselves
as said above the only reason is being "rusty" and not "pythonic" - if it is too much of a hassle it is also fine ... (as Python knows no (strong) types, it also doesn't know casting so it feels a bit weird, that's it) |
Ok, let's keep it as it is then. I think this is basically done. The remaining todos re docs and change of macros were already addressed by #301. The only maybe we'd add is a pre-commit hooks to format the python tests (and that also runs |
Co-authored-by: Alessandro Candido <candido.ale@gmail.com>
Are we happy to merge this now? We can add pre-commit hooks to automatically run black and cargo fmt before commit in another PR. |
I found some minor things, let me fix them first. |
@cschwan What was actually the reason of renaming/moving |
That just reflects the same module structure in Rust. I think we should keep the two as close as possible. |
Yes, this I understood and I completely agree. But what was the reason to change it in the main Rust module (for my own curiosity). |
|
I see, thanks! |
@Radonirinaunimi can you please check that commit 8ef2297 doesn't do anything unexpected? Contrary to what I wrote it isn't a bug, in the new commit it should just be more succinct. If it's OK, you can merge! |
I checked and this does not change anything, so we are good. |
Co-authored-by: Felix Hekhorn <felixhekhorn@users.noreply.github.com>
Towards addressing #200.
TODO:
*lumi*
into*channel*
to be consistent with thepineappl
crate