-
Notifications
You must be signed in to change notification settings - Fork 296
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
Changing pycv into a proper python package #1134
Open
Iximiel
wants to merge
33
commits into
plumed:master
Choose a base branch
from
Iximiel:pycv-package
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Iximiel
changed the title
Changing pycv into a package
Changing pycv into a proper python package
Oct 14, 2024
… needs the plumed executable in the path)
7 tasks
It works, but I do not understand and I cannot reproduce locally the segmentation faults that are present in the fedora CI. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This should solve #1133, the TL;DR is "calling pycv from the python implementation gives problems"
I rewrote the building part of pyCV to look like a python package.
To install it you need plumed available in your path and you just need to use
pip install .
in the pycv dir.
To use it, it is slightly less straightforward (these solution do not work if you installed with
pip install -e .
):calling plumed from the shell
When you install with pip you get an extra
pycv
executable in the bin of the environment. Calling it will print on the shell the path of the .so that contains the pycv actions.You can copy-paste that path to your plumed.dat and you are ready to go.
calling plumed from python
If you are using plumed in a python script you'll need to have pycv available in the python environment. Then you can get the pycv object to load with:
I need to
A good number of important projects use scikit-build-core, among them LAMMPS and Cmake, so it is a project destined to remain.
This will unlikely pass the CI for the first few commits
@GiovanniBussi @tonigi, what do you think?
Target release
I would like my code to appear in release 2.10 or 2.11?
Type of contribution
Copyright
COPYRIGHT
file with the correct license information. Code should be released under an open source license. I also used the commandcd src && ./header.sh mymodulename
in order to make sure the headers of the module are correct.Tests