-
Notifications
You must be signed in to change notification settings - Fork 219
[WIP] pyproject.toml #5307
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: dev
Are you sure you want to change the base?
[WIP] pyproject.toml #5307
Conversation
ci: no-compile
…on package with pip ci: no-compile
Current stateFor the CI, we need to change the way how dependency versions to be tested are configured. At the moment, we have tow custom script, which does the job:
Possible SolutionModify the pythonInstead reading and modifying Using an existing test frameworktox and nox should be able to test different dependency versions by a given configuration. Unfortunately I have no experience with it. After a short review, I'm not sure if this solution works with our CI workflow of generating a CI job for each test combination. But if it works, we save the maintenance of the custom scripts. Maybe somebody has experience with it at the center. |
I think this is to be seen in a larger context. We will probably move more towards using the Python interface in general. There's also been discussions about properly modularising and individually packaging the different components. It might even be a way to provide an "installable" version in the sense of making the PICMI interface available as a package and coordinating the whole build and run process via Python. So, this is an interesting attempt and definitely in the right direction. The question is if we should approach this incrementally with this draft being a first step or as a general overhaul completely reorganising our Python approach. Concretely:
|
Concerning the possible CI solutions: I think that |
In an offline discussion with @pordyna, we agreed that he is checking if |
Loading from |
@SimeonEhrig @chillenzer @psychocoderHPC Since the discussion about dependencies testing is still ongoing, I would suggest adding a very minimal
We can still do our tests just like before, we could consider also already switching to |
@pordyna I will present the problem on the RSE meeting on Thursday. Let's see, if somebody can help me. |
just a note so I don't forget it. @SimeonEhrig we should probably add https://pyproject-fmt.readthedocs.io/en/latest/ with our pre-commit once we switch |
Adds
pyproject.toml
intolib/python
. With that, you can install thepicongpu
python package into any python environment withpip install -e <picongpu_src>/lib/python
. You can also install it not in edit mode, but I think it makes more sense for picongpu to include the-e
.With this PR there is no need for editing the
PYTHONPATH
, which is quite ugly and defies the whole point of having python envs.The dependencies list is taken from all the
requirements.txt
files. At some point (with this PR or after?) we should remove the requirements.txt and only use thepyproject.toml
specification.I also add here a default python
.gitignore
, since pip will create some hidden files in/lib/pytho
when installing with-e
, that need to be excluded.Everything in
lib/python/synchrotronRadiationExtension
and inlib/python/test
is ignored.TODO:
PYTHONPATH
andrequirements.txt
in the docs.PYTHONPATH
from all*.profile.example
requirements.txt
?@psychocoderHPC, should we switch completely at once and remove
requirements.txt
, edit all documentation mentions?@chillenzer @BrianMarre @SimeonEhrig can you comment on the possibly needed CI / tests changes?