mrzv / dionysus

Library for computing persistent homology
http://mrzv.org/software/dionysus2
Other
145 stars 31 forks source link

[WIP]* Add Travis-CI auto-deployment to PyPI #4

Closed olgabot closed 6 years ago

olgabot commented 6 years ago

This PR adds the ability to auto-deploy to PyPI with every push to GitHub. It also requires a push BACK from Travis-CI to GitHub, because the bumpversion command also makes a commit, and this needs to be propagated back to GitHub. I'm still testing it and making sure it works so for now I'm uploading to the Test PyPI server (https://test.pypi.org/project/)

*WIP = Work In Progress

mrzv commented 6 years ago

Hm, the requirements seem way too broad. There are libraries in there that I don't think are required. E.g., Qt.

Also I'm not sure that I'm keen on actually keeping track of and bumping a version number of the library. I'd rather keep master HEAD as the latest stable version.

olgabot commented 6 years ago

Ah okay I can take that off. It was in the environment.yml file when I did conda env export.

olgabot commented 6 years ago

As for the versions, the only reason I'm doing them here is because the first step in making it easy to use is by making it easy to install, so pip install dionysus without the whole GitHub URL is much easier. Also, updating to conda-forge so that it's part of the broader conda package ecosystem (which is more than just Python) is much much easier if the package is already on PyPI. Uploading to PyPI requires a version number, so that's why I've been doing the version numbering.

mrzv commented 6 years ago

Can we use the date as the version number? That would avoid having to modify the repository from travis.

I think the requirements should be empty. Dionysus doesn't actually require anything (except Boost and CMake for building, which I think can only be expressed in conda). Everything else is optional, and even then "everything" means numpy, scipy, matplotlib.

olgabot commented 6 years ago

The date can work! I believe it would have to be a UTC timestamp to the second because there could be overlapping releases per day.

mrzv commented 6 years ago

Can you somehow delete or disown dionysus on test.pypi.org? I'm trying to figure out how to upload a package there, but it's telling me that I'm not allowed to, and I suspect it's because you are listed as a maintainer.

mrzv commented 6 years ago

@olgabot

olgabot commented 6 years ago

Sure - what is your PyPI username and preferred email?

mrzv commented 6 years ago

@olgabot username: mrzv, email: dmitriy@mrzv.org

mrzv commented 6 years ago

@olgabot The last commit didn't do the trick. https://test.pypi.org/project/dionysus/ now lists you and me as authors, and you as a maintainer, which is weird, given what's in the commit.

olgabot commented 6 years ago

Yeah that was a mistake... I'm trying to figure this out now. This is way too complicated!

mrzv commented 6 years ago

This is my first experience with PyPI (and Python packaging in general), and I must say: it's way too complicated.

olgabot commented 6 years ago

Okay turns out I had to use their old interface. I've removed dionysus from pypi.org completely, and added you as an Owner for testpypi. Let me know if it works for you!

mrzv commented 6 years ago

Thanks. I've uploaded a tarball to PyPI. I'm going to go with manual versioning for now. No need to complicate things with Travis. So I'm going to close this PR. Thanks for your help.