jensengroup / xyz2mol

Converts an xyz file to an RDKit mol object
MIT License
250 stars 70 forks source link

Release on conda #23

Closed hadim closed 2 years ago

hadim commented 3 years ago

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 commented 3 years ago

ping @jhjensen2

charnley commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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.

hadim commented 3 years ago

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

simonmb commented 3 years ago

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

pythonnewbie3 commented 3 years ago

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

mkrompiec commented 3 years ago

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

hadim commented 3 years ago

@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 commented 2 years ago

«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 commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

We will also need a setup.py file as in https://github.com/jensengroup/xyz2mol/pull/24

jhjensen2 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

OK, done

hadim commented 2 years ago

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

jhjensen2 commented 2 years ago

oops, fixed

hadim commented 2 years ago

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

jhjensen2 commented 2 years ago

done!

hadim commented 2 years ago

The package recipe is being reviewed at https://github.com/conda-forge/staged-recipes/pull/17412

hadim commented 2 years ago

The feedstock and conda forge package are now available.

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