Skip to content
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

Conda distribution #575

Closed
wants to merge 2 commits into from
Closed

Conda distribution #575

wants to merge 2 commits into from

Conversation

Golui
Copy link

@Golui Golui commented Jun 22, 2021

As per #494, PySDM should get a release for the Anaconda ecosystem. While I'm not an expert, I can at least create a barebones configuration file.

With my limited of package distribution via conda-forge, there are several issues with this at the moment:

  • Since all the dependencies need to be in the Anaconda ecosystem, as @slayoo already mentioned in conda-forge package for installation of non-Python dependencies? #494, ThrustRTC and CURandRTC do not have (recent) releases for Anaconda.
  • A similar issue exists with chempy - while it does have an old Anaconda distribution, it is on a relatively unpopular channel (bjodah). This means that the install command is unintuitive, and the issue is not immediately obvious. This would not be a problem if this issue gets resolved.

To build the Anaconda package:

cd PySDM
conda-build . -c conda-forge -c bjodah
# activate your virtual environment
# for example: conda activate PySDMEnvironment
conda install --use-local PySDM=1.4 -c conda-forge -c bjodah

As a side note, here you can find the documentation for the meta.yaml file.

@slayoo
Copy link
Member

slayoo commented Jun 22, 2021

Thank you!

@slayoo
Copy link
Member

slayoo commented Jun 23, 2021

Thanks to @fynv, the ThrustRTC package is now updated: https://anaconda.org/fyplus/thrustrtc

@slayoo
Copy link
Member

slayoo commented Jul 5, 2021

one only thing I would find essential before merging is to have the added meta.yaml file somehow included in the CI workflow - I guess one way would be to create a new Github Actions script with something along:

pip install conda
cd PySDM
conda-build . -c conda-forge -c bjodah
conda activate PySDMEnvironment
conda install --use-local PySDM=1.4 -c conda-forge -c bjodah

does it make sense?

BTW, @Golui what is the rationale to have the 1.4 tag above and the git rev in the meta file?

@slayoo slayoo mentioned this pull request Jul 6, 2021
@Golui
Copy link
Author

Golui commented Jul 6, 2021

one only thing I would find essential before merging is to have the added meta.yaml file somehow included in the CI workflow - I guess one way would be to create a new Github Actions script with something along:

pip install conda
cd PySDM
conda-build . -c conda-forge -c bjodah
conda activate PySDMEnvironment
conda install --use-local PySDM=1.4 -c conda-forge -c bjodah

does it make sense?

BTW, @Golui what is the rationale to have the 1.4 tag above and the git rev in the meta file?

Apologies for the late reply @slayoo.

To my understanding, conda pulls the repository when installing the package. The git rev points to the commit tagged "v1.4" in the repository, matching the latest official release. You can, I believe, use a different option to just use the tag in the config.

The "meta.yml" that conda-build uses isn't strictly speaking a YAML file; the file is put through a template engine to create the real configuration. The version on the top is just defining a variable that can be used in the meta file.

@slayoo
Copy link
Member

slayoo commented Sep 17, 2021

Let's close this and the PR for now. If there is any reason why conda users should not just open anaconda prompt and do pip install PySDM, please reopen

@slayoo slayoo closed this Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants