-
Notifications
You must be signed in to change notification settings - Fork 8
PyPI support #1
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
PyPI support #1
Conversation
Sorry for the delayed reply here, @ahnaf-tahmid-chowdhury. We're getting closer, but I'm not sure we're quite ready for PyPI. Let's revisit this soon! |
Maybe it would be helpful to update these actions to do all the testing and staging, but not actually publish to PyPI? Then it will be ready when needed. There is clearly some work to do to figure out how to bundle MOAB for PyPI, as well. |
The PyPI workflow only runs when we create a new tag; otherwise, it will not run. However, there is another step to consider when working with PyPI: we need to configure the environment on the PyPI side, or else the workflow will fail to publish on PyPI. I am a little worried when talking about MOAB pip support. I have already opened PRs in the MOAB repo, which are still under review (Inactive). To implement the scikit build method, we must first consider fixing the Windows build. |
I'm not optimistic about those changes in MOAB as they are focused on their core community which is broader than us and generally not on a Windows system |
A PR is added to MOAB |
Is HDF5 a runtime dependency of DAGMC or it is only required at build time? If so, we may need to enable PyPI support for it as well. |
libhdf5 is a runtime dependency. I don't think it's in our scope or mandate to add PyPI support for HDF5 |
I think depending on |
The following libraries are included with h5py and stored in
That's mean we can stay with h5py. Maybe need an update to FindHDF5 file? |
To simplify things here, let's separate some concerns. From the perspective of this project, I don't think we should concern ourselves at all with how @ahnaf-tahmid-chowdhury, the set of changes here does a few things that I'd like to break into multiple smaller PRs.
One last small thing. I do prefer we keep the GH workflow for testing named |
Absolutely, I'm fine with creating multiple PRs. However, at this moment, we're not prepared to publish our project on PyPi. Our project heavily relies on pymoab, which we import in our main file. Therefore, pymoab needs to be available on PyPi first. |
c806ea4
to
6f96ec7
Compare
@ahnaf-tahmid-chowdhury, @paulromano @gonuke and I have been discussing this offline. I'll summarize that discussion here so we're all on the same page. There are two approaches we've considered:
This goes against convention for packages on PyPI, but it isn't unheard of. https://github.com/Thea-Energy/stellarmesh does this, for example. Upsides: Users learn early (before they try to run a script or import Downsides: Goes against convention and it isn't immediately clear to the person installing how to proceed in installing
try:
import pymoab
except ImportError as e:
# print message about missing pymoab and point to installation instructions/MOAB docs Upsides: PyPI installation of Downsides: The user potentially won't know about the missing dependency until they try to run code that imports All things considered I think option 2 is the most sensible for now. |
Following option 2, I also think this one is the best. I will add some instructions for installing pymoab in the comments. |
Thanks for being willing to take that on! Let's make the transition of |
Also, I think we'd ideally provide a link to full instructions for |
I think the pip install for pymoab is now just a clone and pip install command, thanks to @ahnaf-tahmid-chowdhury
|
I just wanted to check in: what's the status of this? We were just discussing I do a PR like this to support parastell, so seeing as most of the work has been done is great. |
Co-authored-by: Jonathan Shimwell <[email protected]>
Co-authored-by: Jonathan Shimwell <[email protected]>
@pshriwise this seems pretty ready to me. Could you check when you have a moment? |
As far as I can tell, I think we just need to clean up the workflow -- dispatching to the test platform vs. PyPI itself depending on the workflow trigger event. Not complaining as it gives me some time to think about adding documentation/examples before we release :) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1 +/- ##
=======================================
Coverage 97.19% 97.19%
=======================================
Files 2 2
Lines 428 428
Branches 47 47
=======================================
Hits 416 416
Misses 9 9
Partials 3 3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Thank you @ahnaf-tahmid-chowdhury!
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. We were able to discuss how to use environment protections to my satisfaction.
Description
This PR introduces automated PyPI package publishing through GitHub Actions workflows. This addition streamlines the release process, ensuring consistent and reliable distribution of the package.
Sponsored By
This contribution is kindly sponsored by @proximafusion, supporting the ongoing development and modernization of DAGMC’s Python packaging and build system.