-
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
Distribute CLI as a Python package #176
Conversation
Codecov Report
@@ Coverage Diff @@
## master #176 +/- ##
==========================================
+ Coverage 89.66% 89.74% +0.07%
==========================================
Files 47 47
Lines 7337 7432 +95
==========================================
+ Hits 6579 6670 +91
- Misses 758 762 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
That's ingenious 👍! We have to decide which features to activate; right now I suppose it uses the default features, which do not include the importers. However, supporting this might be difficult, unless we link everything together statically (which might be a good idea). |
If the size of the final binary is no more than a few MB (even 10-20 MB I consider reasonable, more it starts being a compromise), I believe it would really be the best option. |
I just compiled it and it seems it ships LHAPDF! |
@alecandido how do I install the binary after having it built with |
I believe you just want something like this: pip install ./downloads/SomeProject-1.0.4.tar.gz |
Yes, but you know where it is coming from. |
Eventually, I would make this a dependency of the Logically, it would be the other way round, but I believe to be easier to say: "Just do: pip install pineappl and you will get Python API + CLI out of the box". I would not try instead to make a single bundle. I'm very happy about what |
If you open the wheel by unzipping it you can see that it ships |
Ah, this is completely unexpected to me. |
I agree with everything you said. |
This looks good. We should build the CLI with all features and release mode,
and ideally we should also install ROOT to support the conversion of |
What about a pre-compiled distribution? In one case I actually have control over the container (and being Linux should be simple enough to have compatible binaries). However, I would consider to support APPLgrid import even only in the simpler case of Linux binaries, and keep the Windows and MacOS distribution import-less (we don't need to make always the perfect job, some mild limitations are fine if they limit the amount of work). |
I merge this, since it's already working, and I'll manually release the first package. |
The goal of this PR is just to add metadata for Python packaging.
No new crate/folder is going to be created, because no further code should be added.
To do:
pineappl
Python packageIn order to test locally, you can use the usual:
maturin develop
to build and install in current environmentmaturin build
to make the actual Python package, without installationEventually, we will use
maturin publish
(possibly in the same workflow distributingpineappl_py
), and just upload the further packagepineappl-cli
to PyPI, just wrapping the Rust binary.https://github.com/N3PDF/pineappl/blob/81dd719f62103895be245251af38582d05dca80b/.github/workflows/wheels.yml#L20
https://github.com/N3PDF/pineappl/blob/81dd719f62103895be245251af38582d05dca80b/.github/workflows/wheels.yml#L47