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

Release on conda #23

Closed
hadim opened this issue Jan 19, 2021 · 25 comments
Closed

Release on conda #23

hadim opened this issue Jan 19, 2021 · 25 comments

Comments

@hadim
Copy link

hadim commented Jan 19, 2021

Would you be interested to release this lib on pypi (just the source package would be enough). So I can create a conda package from it?

@hadim
Copy link
Author

hadim commented Jan 19, 2021

ping @jhjensen2

@charnley
Copy link
Member

Releasing it on PyPI doesn't make sense, as it depends on rdkit which is a conda-only package. It is on the todo list to add xyz2mol to conda.

@hadim
Copy link
Author

hadim commented Jan 19, 2021

Yeah you're right. In that case a simple git tag will do the job (with a setup.py file). From that I am happy to build the conda recipe for you and add you as a maintainer.

@charnley
Copy link
Member

Sounds good. I'll setup the setup.py in the weekend. I anyway want to update the repo with pre-commit. Do you have an example GitHub action for conda releases?

@hadim
Copy link
Author

hadim commented Jan 20, 2021

To be more specific a conda package is a conda package on the conda forge channel. This anaconda channel is managed by an open community (not the anaconda company).

The process to create such a package is to create a git repo called a feedstock. This repo contains all the logic to build and upload a package from the source code.

Python libraries are automatically updated whenever a new pypi release is made. This is why I was proposing to release a pypi package of xyz2mol. Since it will allow conda forge to automatically build a new package whenever it detects it. The fact that it depends on rdkit is not a big deal as long as you highlight it on the README and propose conda as the primary way to install it.

You can find more information about the whole process on the doc: https://conda-forge.org/docs. You don't have to master conda forge right now as I am happy to take care of this for you and you'll catch up later whenever you have time for this.

Feel free to ask more questions here.

@charnley
Copy link
Member

I don't like adding xyz2mol to pypi, as the package will not work if users install it via pip. The users who won't understand why will probably not read a readme.

I've added the following meta.yaml to the recipe https://github.com/jensengroup/staged-recipes/tree/xyz2mol/recipes/xyz2mol

And currently working on a pull-request with setup.py and automatic releases via git tags https://github.com/charnley/xyz2mol

Comments are welcome on my conda-forge usage.

@hadim
Copy link
Author

hadim commented Jan 24, 2021

It's fine to not have a pypi package.

I would add a test section to the recipe (it can be as simple as an import test).

Once a release has been made here, submit your PR to conda forge and ping me there, I will review it.

@charnley charnley changed the title Release on pypi Release on conda Jan 25, 2021
@hadim
Copy link
Author

hadim commented Mar 10, 2021

Friendly ping here. Just a simple git tag will do the job. I can do the rest.

@simonmb
Copy link

simonmb commented Mar 28, 2021

I would also be interested to have this amazing module as a package on conda.

@pythonnewbie3
Copy link

How can I install it to my conda enviroment to use the xyz to mol function?

@mkrompiec
Copy link

rdkit is now available on pypi (as rdkit-pypi), so nothing prevents it from being released on pypi as well

@hadim
Copy link
Author

hadim commented Oct 29, 2021

@charnley Would you be ok adding a git tag to the repo? It's all I need to make a conda package out of it.

@nbehrnd
Copy link

nbehrnd commented Jan 2, 2022

«as it depends on rdkit which is a conda-only package»

It doesn't look so. DebiChem repackages RDKit for Debian (tracker) for multiple years, thus it equally is available for relatives like the Ubuntu family (tracker). Apparently, likewise Fedora repackages RDKit (tracker), too. Depending on the intended work ahead, the lag between them and the releases for conda may be significant, or not. E.g., with RDKit 2021.09.2 as provided by Debian 12/bookworm (testing), the commit by 2020-11-26, 08:36 (cf. here) xyz2mol actually seems to work just as intended.

@jhjensen2
Copy link
Member

Sorry for the radio silence on this, but I finally have a bit of time to look at this. I am happy to have conda and pip installs (if it's not too much work on my part) but I know nothing about it and need someone to guide me through the steps

@hadim
Copy link
Author

hadim commented Jan 5, 2022

@jhjensen2 if you can create a git tag or release on the repo with a semver version (something like 0.1.0 or 1.0.0) then I can start the conda package creation process and ping you along the way, so you can see what is happening. I will also add you as a maintainer of the package, so you'll have full control over it.

To create a release on GH, see https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository

@hadim
Copy link
Author

hadim commented Jan 5, 2022

We will also need a setup.py file as in #24

@jhjensen2
Copy link
Member

I don't understand the last comment or what's in the link. What should go in the file?
I've made a release, but should I have made the setup.py file first?

@hadim
Copy link
Author

hadim commented Jan 5, 2022

To be able to install the library, a setup.py file need to be added to the repo. The one from https://github.com/jensengroup/xyz2mol/blob/b86529f15f7a9fc728002adb17739c930c5f8bce/setup.py should do the job . Adapt the version string in the file to 0.1.1 and then create a new release for 0.1.1.

@jhjensen2
Copy link
Member

OK, done

@hadim
Copy link
Author

hadim commented Jan 5, 2022

The setup.py file is empty: https://github.com/jensengroup/xyz2mol/blob/master/setup.py

@jhjensen2
Copy link
Member

oops, fixed

@hadim
Copy link
Author

hadim commented Jan 5, 2022

You now need to release 0.1.2 (and make sure to edit the version in setup.py too). We're almost there!

@jhjensen2
Copy link
Member

done!

@hadim
Copy link
Author

hadim commented Jan 5, 2022

The package recipe is being reviewed at conda-forge/staged-recipes#17412

@hadim
Copy link
Author

hadim commented Jan 6, 2022

The feedstock and conda forge package are now available.

Just install with conda install -c conda-forge xyz2mol.

@hadim hadim closed this as completed Jan 6, 2022
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

No branches or pull requests

7 participants