From 38d204ad90c5977167059d7efccfd2457c8dadd0 Mon Sep 17 00:00:00 2001 From: hugovk Date: Wed, 25 Feb 2015 15:03:54 +0200 Subject: [PATCH 1/5] Release checklist --- RELEASING.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 RELEASING.md diff --git a/RELEASING.md b/RELEASING.md new file mode 100644 index 0000000..9715b5e --- /dev/null +++ b/RELEASING.md @@ -0,0 +1,26 @@ +# Release Checklist + +* [ ] Get master to the appropriate code release state. [Travis CI](https://travis-ci.org/pylast/pylast) should be running cleanly for all merges to master. +* [ ] Update version in `pylast/__init__.py` and `setup.py` and commit: +```bash +git add pylast/__init__.py setup.py +git commit -m "Release 1.1.0" +``` +* [ ] Tag the last commit with the version number: +```bash +git tag -a 1.1.0 +``` +* [ ] Release on PyPI: +```bash +python setup.py register +python setup.py sdist --format=gztar upload +``` +* [ ] Push: `git push` +* [ ] Push tags: `git push --tags` +* [ ] Create new GitHub release: https://github.com/pylast/pylast/releases/new +* [ ] Update develop branch from master: +```bash +git checkout develop +git merge master --ff-only +git push +``` From 816be1cbe8cd50c7775cb61ac8fe9ad8d95a1a93 Mon Sep 17 00:00:00 2001 From: hugovk Date: Sun, 12 Apr 2015 12:54:22 +0300 Subject: [PATCH 2/5] Rerun flaky interation tests --- README.md | 2 +- tests/test_pylast.py | 2 ++ tox.ini | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 36bd8f5..77b16eb 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ export PYLAST_API_SECRET=TODO_ENTER_YOURS_HERE To run all unit and integration tests: ```sh -pip install pytest +pip install pytest flaky py.test ``` diff --git a/tests/test_pylast.py b/tests/test_pylast.py index 37695bf..8962ef3 100755 --- a/tests/test_pylast.py +++ b/tests/test_pylast.py @@ -2,6 +2,7 @@ """ Integration (not unit) tests for pylast.py """ +from flaky import flaky import os import pytest from random import choice @@ -30,6 +31,7 @@ def load_secrets(): return doc +@flaky class TestPyLast(unittest.TestCase): secrets = None diff --git a/tox.ini b/tox.ini index 28796b2..ec0e215 100644 --- a/tox.ini +++ b/tox.ini @@ -10,6 +10,7 @@ deps = mock ipdb pytest-cov + flaky commands = py.test -v --cov pylast --cov-report term-missing {posargs} [testenv:venv] @@ -28,4 +29,4 @@ commands = pyflakes tests pep8 pylast pep8 tests - ./clonedigger.sh \ No newline at end of file + ./clonedigger.sh From 4f2871f504afa4fb0041c481dfa877255f88f7ea Mon Sep 17 00:00:00 2001 From: hugovk Date: Sun, 12 Apr 2015 15:47:00 +0300 Subject: [PATCH 3/5] pep8 fixes --- pylast/__init__.py | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/pylast/__init__.py b/pylast/__init__.py index c0d700b..f7fe250 100644 --- a/pylast/__init__.py +++ b/pylast/__init__.py @@ -20,12 +20,6 @@ # # http://code.google.com/p/pylast/ -__version__ = '1.1.0' -__author__ = 'Amr Hassan, hugovk' -__copyright__ = "Copyright (C) 2008-2010 Amr Hassan, 2013-2014 hugovk" -__license__ = "apache2" -__email__ = 'amr.hassan@gmail.com' - import hashlib from xml.dom import minidom import xml.dom @@ -36,9 +30,14 @@ import sys import collections import warnings import re - import six +__version__ = '1.1.0' +__author__ = 'Amr Hassan, hugovk' +__copyright__ = "Copyright (C) 2008-2010 Amr Hassan, 2013-2014 hugovk" +__license__ = "apache2" +__email__ = 'amr.hassan@gmail.com' + def _deprecation_warning(message): warnings.warn(message, DeprecationWarning) @@ -834,13 +833,13 @@ class LastFMNetwork(_Network): name="Last.fm", homepage="http://last.fm", ws_server=("ws.audioscrobbler.com", "/2.0/"), - api_key = api_key, - api_secret = api_secret, - session_key = session_key, - submission_server = "http://post.audioscrobbler.com:80/", - username = username, - password_hash = password_hash, - domain_names = { + api_key=api_key, + api_secret=api_secret, + session_key=session_key, + submission_server="http://post.audioscrobbler.com:80/", + username=username, + password_hash=password_hash, + domain_names={ DOMAIN_ENGLISH: 'www.last.fm', DOMAIN_GERMAN: 'www.lastfm.de', DOMAIN_SPANISH: 'www.lastfm.es', @@ -854,7 +853,7 @@ class LastFMNetwork(_Network): DOMAIN_JAPANESE: 'www.lastfm.jp', DOMAIN_CHINESE: 'cn.last.fm', }, - urls = { + urls={ "album": "music/%(artist)s/%(album)s", "artist": "music/%(artist)s", "event": "event/%(id)s", @@ -930,13 +929,13 @@ class LibreFMNetwork(_Network): name="Libre.fm", homepage="http://alpha.libre.fm", ws_server=("alpha.libre.fm", "/2.0/"), - api_key = api_key, - api_secret = api_secret, - session_key = session_key, - submission_server = "http://turtle.libre.fm:80/", - username = username, - password_hash = password_hash, - domain_names = { + api_key=api_key, + api_secret=api_secret, + session_key=session_key, + submission_server="http://turtle.libre.fm:80/", + username=username, + password_hash=password_hash, + domain_names={ DOMAIN_ENGLISH: "alpha.libre.fm", DOMAIN_GERMAN: "alpha.libre.fm", DOMAIN_SPANISH: "alpha.libre.fm", @@ -950,7 +949,7 @@ class LibreFMNetwork(_Network): DOMAIN_JAPANESE: "alpha.libre.fm", DOMAIN_CHINESE: "alpha.libre.fm", }, - urls = { + urls={ "album": "artist/%(artist)s/album/%(album)s", "artist": "artist/%(artist)s", "event": "event/%(id)s", From 0b691de78938826709d98545845c58c51f645f9c Mon Sep 17 00:00:00 2001 From: hugovk Date: Sun, 12 Apr 2015 15:47:22 +0300 Subject: [PATCH 4/5] Remove unused import --- setup.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setup.py b/setup.py index 71a0dda..2173f52 100755 --- a/setup.py +++ b/setup.py @@ -1,6 +1,4 @@ #!/usr/bin/env python -import os - from setuptools import setup, find_packages From 16f12a02c90d8bb5b522cfe0447bd0c3ad8179a0 Mon Sep 17 00:00:00 2001 From: hugovk Date: Sun, 12 Apr 2015 16:06:34 +0300 Subject: [PATCH 5/5] Run fast lint job first --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5c0f5be..2cfaab8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,12 +10,12 @@ env: - secure: CQYL7MH6tSVrCcluIfWfDSTo4E/p+9pF0eI7Vtf0oaZBzyulODHK8h/mzJp4HwezyfOu0RCedq6sloGQr1/29CvWWESaYyoGoGz9Mz2ZS+MpIcjGISfZa+x4vSp6QPFvd4i/1Z/1j2gJVVyswkrIVUwZIDJtfAKzZI5iHx2gH8Y= - secure: SsKJoJwtDVWrL5xxl9C/gTRy6FhfRQQNNAFOogl9mTs/WeI2t9QTYoKsxLPXOdoRdu4MvT3h/B2sjwggt7zP81fBVxQRTkg4nq0zSHlj0NqclbFa6I5lUYdGwH9gPk/HWJJwXhKRDsqn/iRw2v+qBDs/j3kIgPQ0yjM58LEPXic= matrix: + - TOXENV=lint - TOXENV=py27 - TOXENV=py33 - TOXENV=py34 - TOXENV=pypy - TOXENV=pypy3 - - TOXENV=lint sudo: false install: - travis_retry pip install tox