-
Notifications
You must be signed in to change notification settings - Fork 135
Structure python directory as a python package #818
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
base: master
Are you sure you want to change the base?
Structure python directory as a python package #818
Conversation
75707b0 to
6f169ce
Compare
|
Thank you, this is very impressive work! The structuring into different subdirectories seems very logical and a good first step to get our python files under control. I know about uv and have been meaning to experiment with it. The question will be how we can allow it to integrate with packages from LCG, CVMFS and support the python environment needed by SWAN. Apart from the lock file, I don't see how much of this depends on uv. |
|
If you resolve the merge conflict, at least the main scripts can already be tested in the CI, with manual testing to follow. |
6f169ce to
8062e2d
Compare
|
@olantwin You are right about uv for the moment not really bringing anything to the table in this repo besides the minimal lockfile in which I simply included pytest for development purposes. Anyhow, it is how I generated the pyproject and it uses e.g. hatchling and some other modern tooling. As you say, the challenge will probably be to figure out how to define the dependencies that come from other sources than pypi. |
|
@olantwin So for the last part now, the fairship package has to be installed into the runtine environment setup by the |
Yes, I'll figure that part out. |
56463c4 to
0ebb3aa
Compare
0ebb3aa to
2a2fcbb
Compare
2a2fcbb to
01d3ab4
Compare
A start of restructuring the python code to a package/module. This allows easier inclusions, cleaner interfaces and also makes it easier to work and maintain the code. The work has been done partly at the 2nd computing workshop of SHIP. The splitting and re-naming has been done at a best effort practice, and due to a lack of tools locally (specifically ROOT), these changes are not really tested. Hence please do clone these changes to try them out locally.
This PR also introduces UV, which is a great package manager for python. In this case, it seems as though "only" root and the standard libraries are used, but using UV could open the possibilities for easy use of other libraries. Also it allows managing multiple python versions seamlessly. See their website for more info.
NOTE! When observed I have also changed some minor naming issues, which are not backwards compatible. Because the very nature of this PR is to break backwards compatibility completely, I deemed it worthwhile to make those changes in the same PR.