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

Push a new release to PyPI #71

Closed
perimosocordiae opened this issue Aug 3, 2017 · 25 comments
Closed

Push a new release to PyPI #71

perimosocordiae opened this issue Aug 3, 2017 · 25 comments
Milestone

Comments

@perimosocordiae
Copy link
Contributor

There are a lot of good changes since v0.3, so I think we're almost ready to release v0.4.

Once most (hopefully all) of the remaining items on the milestone are finished, we should tag a commit on Github and push the new builds to PyPI.

@terrytangyuan: I'll update this issue when we're good to go.

@perimosocordiae perimosocordiae added this to the v0.4.0 milestone Aug 3, 2017
@terrytangyuan
Copy link
Member

Sounds good.

@mtngld mtngld mentioned this issue Jun 5, 2018
@mtngld
Copy link

mtngld commented Jun 5, 2018

Any update on this?

Thanks!

@perimosocordiae
Copy link
Contributor Author

There's been a lot of movement recently with some new core contributors, and the APIs are going to be changing pretty significantly, so I'm not sure if now is a great time to cut a new release. I agree that we're overdue for one, though.

@wdevazelhes What do you think?

@wdevazelhes
Copy link
Member

I'm thinking maybe the new APIs changes could be put in the next release (v.0.5.0), since a working version could be merged soon in master (there is not much left to do), but to have a more robust one it may still take some more time. What do you think ?

Also, do you want to have all milestones issues solved before releasing ? I am currently working on the new API, but I could look also at some issues in order to better fulfil the milestone. Maybe we could solve the easiest issues from the milestone of v0.4.0, do the release, and postpone the others to v0.5.0 ?

@perimosocordiae
Copy link
Contributor Author

Yeah, I'm happy to push back any milestones that aren't quick to resolve. Feel free to move things around as you see fit.

@perimosocordiae
Copy link
Contributor Author

And yes, releasing the new API as v0.5 sounds good.

@terrytangyuan
Copy link
Member

There are quite some good changes. I agree that we should aim for v0.4.0 first and then target v0.5.0 later with new APIs.

@wdevazelhes
Copy link
Member

wdevazelhes commented Sep 3, 2018

Since all issues in the milestone are solved, I guess we can do the release ?

If I understand correctly, the way to go is the following:

  • on Github:

    • In the "release" pages, click on "Draft a new release"
    • Write a small text summarizing the more important changes (see below)
    • Zip and tar gz my local master and add it as attachment in the appropriate area
  • On the command line, run the following commands, as suggested by @nvauquie:

$ python3 setup.py sdist
$ python3 setup.py bdist_wheel
$ twine upload dist/*

I already ran these commands on Test PyPi (btw @perimosocordiae @bellet if you want to be included in the members of metric-learn on Test PyPi you should create an account on Test PyPi and give your credentials to @terrytangyuan)
The upload was successful but I just realized there's no project description (see https://test.pypi.org/project/metric_learn/)
I was thinking maybe it's because twine has a flag for config files that I didn't use ? (twine upload dist/* --config-file=setup.cfg)
I tried to redo the upload but it says the file "already exists" (apparently you cannot do an upload twice, whether on the real or the test PyPi)

@terrytangyuan, as you can manage the project, is there maybe an option to delete the upload ?


Here is a proposal for the text to write in github, tell me if it sounds good to you:

- Two newly introduced algorithms: 
    - MLKR (Metric Learning for Kernel Regression)
    - MMC (Mahalanobis Metric for Clustering)
- Improved documentation and examples

@bellet
Copy link
Member

bellet commented Sep 3, 2018

I would also add something like "Performance improvements" and "Minor bug fixes"

@wdevazelhes
Copy link
Member

I would also add something like "Performance improvements" and "Minor bug fixes"

I agree, will do

@terrytangyuan
Copy link
Member

@wdevazelhes I just granted you "owner" role (on Test PyPI only) so you can delete the release yourself now.

Also, when you make a release on Github, you don't have to "Zip and tar gz my local master and add it as attachment in the appropriate area" as Github will do that for you automatically once you create the release.

@wdevazelhes
Copy link
Member

@terrytangyuan thanks !

I deleted the test v.0.4.0 repo but it was is indeed not possible to reupload it, so I uploaded tests versions by adding a figure at the end (ex: v.0.4.0.1). I couldn't manage to make the description file printed until I added these lines to setup.py to specify the path to the config file (and then it worked):

# Get the long description from README.md
with open('README.rst', encoding='utf-8') as f:
  long_description = f.read()

# below description='Python implementations of metric learning algorithms' in setup(...)
long_description=long_description,

@terrytangyuan did you use a specific command to take into account the setup.cfg file ?

@wdevazelhes
Copy link
Member

Also, for the documentation, there's only need to push the doc folder to the gh-pages right ?

@perimosocordiae
Copy link
Contributor Author

Yes, I would typically build the docs from master and then copy everything over to the gh-pages branch.

@terrytangyuan
Copy link
Member

@perimosocordiae @wdevazelhes BTW Github now allows publish docs folder from master branch directly. Check out settings -> Github Pages -> source.

@wdevazelhes Nope, I don't recall anything special I needed to do to take into account the setup file. Perhaps PyPI has changed recently.

@wdevazelhes
Copy link
Member

Thanks for the advice

I realized the problem was that the url was not up to date :p I changed it in PR #121

@wdevazelhes
Copy link
Member

Regarding the doc I looked at it on github and have the impression that publishing doc from source will automatically update the doc from master, and not in a release based fashion ?
So maybe if we want to change the doc at the same time as each release we should stick to using gh-pages for now ?

@terrytangyuan
Copy link
Member

Another option would be only updating docs folder during releases.

@wdevazelhes
Copy link
Member

I realized the problem was that the url was not up to date :p I changed it in PR #121

In fact it was not that (sorry I didn't see I still had the file with the "long_description" statement), but anyway now we have the right url

@wdevazelhes
Copy link
Member

Another option would be only updating docs folder during releases.

How would you do that ? By having a docs folder in addition to the current doc folder, and copying from doc to docs only when doing a release ?

@terrytangyuan
Copy link
Member

Oh I see never mind then. I did't realize it's docs instead of doc. gh-pages sounds good to me.

@wdevazelhes
Copy link
Member

We could rename doc to docs, but then any commit impacting the docs in master would maybe be automatically uploaded to the current doc website, and I don't see how we would only update the docs during releases

@wdevazelhes
Copy link
Member

Regarding the problem of uploading the description, I tried to upload a downloaded version of release 0.1.0 of metric-learn into PyPi with old versions of twine (and also with the old "upload" command), and it does not seem to add the project description either...

Looking at this issue, it seems that an old button was available to put the project description and/or that you could upload it after with PKG-INFO files...
@terrytangyuan maybe you used this way of uploading the description ?

Even if not, the issue seems to show that indeed as you said PyPI has changed quite a lot, so maybe the basic commands worked before and don't work anymore... I guess I'll go for the solution mentioned in the issue and that works for me (updating the long_description as in this comment)

@wdevazelhes
Copy link
Member

I think we're ready for the release ! Let's go

@wdevazelhes
Copy link
Member

Here is the new version on PyPI ! https://pypi.org/project/metric-learn/

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

5 participants