commit
5d94850eb6
|
@ -10,12 +10,12 @@ env:
|
||||||
- secure: CQYL7MH6tSVrCcluIfWfDSTo4E/p+9pF0eI7Vtf0oaZBzyulODHK8h/mzJp4HwezyfOu0RCedq6sloGQr1/29CvWWESaYyoGoGz9Mz2ZS+MpIcjGISfZa+x4vSp6QPFvd4i/1Z/1j2gJVVyswkrIVUwZIDJtfAKzZI5iHx2gH8Y=
|
- secure: CQYL7MH6tSVrCcluIfWfDSTo4E/p+9pF0eI7Vtf0oaZBzyulODHK8h/mzJp4HwezyfOu0RCedq6sloGQr1/29CvWWESaYyoGoGz9Mz2ZS+MpIcjGISfZa+x4vSp6QPFvd4i/1Z/1j2gJVVyswkrIVUwZIDJtfAKzZI5iHx2gH8Y=
|
||||||
- secure: SsKJoJwtDVWrL5xxl9C/gTRy6FhfRQQNNAFOogl9mTs/WeI2t9QTYoKsxLPXOdoRdu4MvT3h/B2sjwggt7zP81fBVxQRTkg4nq0zSHlj0NqclbFa6I5lUYdGwH9gPk/HWJJwXhKRDsqn/iRw2v+qBDs/j3kIgPQ0yjM58LEPXic=
|
- secure: SsKJoJwtDVWrL5xxl9C/gTRy6FhfRQQNNAFOogl9mTs/WeI2t9QTYoKsxLPXOdoRdu4MvT3h/B2sjwggt7zP81fBVxQRTkg4nq0zSHlj0NqclbFa6I5lUYdGwH9gPk/HWJJwXhKRDsqn/iRw2v+qBDs/j3kIgPQ0yjM58LEPXic=
|
||||||
matrix:
|
matrix:
|
||||||
|
- TOXENV=lint
|
||||||
- TOXENV=py27
|
- TOXENV=py27
|
||||||
- TOXENV=py33
|
- TOXENV=py33
|
||||||
- TOXENV=py34
|
- TOXENV=py34
|
||||||
- TOXENV=pypy
|
- TOXENV=pypy
|
||||||
- TOXENV=pypy3
|
- TOXENV=pypy3
|
||||||
- TOXENV=lint
|
|
||||||
sudo: false
|
sudo: false
|
||||||
install:
|
install:
|
||||||
- travis_retry pip install tox
|
- travis_retry pip install tox
|
||||||
|
|
|
@ -80,7 +80,7 @@ export PYLAST_API_SECRET=TODO_ENTER_YOURS_HERE
|
||||||
|
|
||||||
To run all unit and integration tests:
|
To run all unit and integration tests:
|
||||||
```sh
|
```sh
|
||||||
pip install pytest
|
pip install pytest flaky
|
||||||
py.test
|
py.test
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
26
RELEASING.md
Normal file
26
RELEASING.md
Normal file
|
@ -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
|
||||||
|
```
|
|
@ -20,12 +20,6 @@
|
||||||
#
|
#
|
||||||
# http://code.google.com/p/pylast/
|
# 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
|
import hashlib
|
||||||
from xml.dom import minidom
|
from xml.dom import minidom
|
||||||
import xml.dom
|
import xml.dom
|
||||||
|
@ -36,9 +30,14 @@ import sys
|
||||||
import collections
|
import collections
|
||||||
import warnings
|
import warnings
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import six
|
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):
|
def _deprecation_warning(message):
|
||||||
warnings.warn(message, DeprecationWarning)
|
warnings.warn(message, DeprecationWarning)
|
||||||
|
@ -834,13 +833,13 @@ class LastFMNetwork(_Network):
|
||||||
name="Last.fm",
|
name="Last.fm",
|
||||||
homepage="http://last.fm",
|
homepage="http://last.fm",
|
||||||
ws_server=("ws.audioscrobbler.com", "/2.0/"),
|
ws_server=("ws.audioscrobbler.com", "/2.0/"),
|
||||||
api_key = api_key,
|
api_key=api_key,
|
||||||
api_secret = api_secret,
|
api_secret=api_secret,
|
||||||
session_key = session_key,
|
session_key=session_key,
|
||||||
submission_server = "http://post.audioscrobbler.com:80/",
|
submission_server="http://post.audioscrobbler.com:80/",
|
||||||
username = username,
|
username=username,
|
||||||
password_hash = password_hash,
|
password_hash=password_hash,
|
||||||
domain_names = {
|
domain_names={
|
||||||
DOMAIN_ENGLISH: 'www.last.fm',
|
DOMAIN_ENGLISH: 'www.last.fm',
|
||||||
DOMAIN_GERMAN: 'www.lastfm.de',
|
DOMAIN_GERMAN: 'www.lastfm.de',
|
||||||
DOMAIN_SPANISH: 'www.lastfm.es',
|
DOMAIN_SPANISH: 'www.lastfm.es',
|
||||||
|
@ -854,7 +853,7 @@ class LastFMNetwork(_Network):
|
||||||
DOMAIN_JAPANESE: 'www.lastfm.jp',
|
DOMAIN_JAPANESE: 'www.lastfm.jp',
|
||||||
DOMAIN_CHINESE: 'cn.last.fm',
|
DOMAIN_CHINESE: 'cn.last.fm',
|
||||||
},
|
},
|
||||||
urls = {
|
urls={
|
||||||
"album": "music/%(artist)s/%(album)s",
|
"album": "music/%(artist)s/%(album)s",
|
||||||
"artist": "music/%(artist)s",
|
"artist": "music/%(artist)s",
|
||||||
"event": "event/%(id)s",
|
"event": "event/%(id)s",
|
||||||
|
@ -930,13 +929,13 @@ class LibreFMNetwork(_Network):
|
||||||
name="Libre.fm",
|
name="Libre.fm",
|
||||||
homepage="http://alpha.libre.fm",
|
homepage="http://alpha.libre.fm",
|
||||||
ws_server=("alpha.libre.fm", "/2.0/"),
|
ws_server=("alpha.libre.fm", "/2.0/"),
|
||||||
api_key = api_key,
|
api_key=api_key,
|
||||||
api_secret = api_secret,
|
api_secret=api_secret,
|
||||||
session_key = session_key,
|
session_key=session_key,
|
||||||
submission_server = "http://turtle.libre.fm:80/",
|
submission_server="http://turtle.libre.fm:80/",
|
||||||
username = username,
|
username=username,
|
||||||
password_hash = password_hash,
|
password_hash=password_hash,
|
||||||
domain_names = {
|
domain_names={
|
||||||
DOMAIN_ENGLISH: "alpha.libre.fm",
|
DOMAIN_ENGLISH: "alpha.libre.fm",
|
||||||
DOMAIN_GERMAN: "alpha.libre.fm",
|
DOMAIN_GERMAN: "alpha.libre.fm",
|
||||||
DOMAIN_SPANISH: "alpha.libre.fm",
|
DOMAIN_SPANISH: "alpha.libre.fm",
|
||||||
|
@ -950,7 +949,7 @@ class LibreFMNetwork(_Network):
|
||||||
DOMAIN_JAPANESE: "alpha.libre.fm",
|
DOMAIN_JAPANESE: "alpha.libre.fm",
|
||||||
DOMAIN_CHINESE: "alpha.libre.fm",
|
DOMAIN_CHINESE: "alpha.libre.fm",
|
||||||
},
|
},
|
||||||
urls = {
|
urls={
|
||||||
"album": "artist/%(artist)s/album/%(album)s",
|
"album": "artist/%(artist)s/album/%(album)s",
|
||||||
"artist": "artist/%(artist)s",
|
"artist": "artist/%(artist)s",
|
||||||
"event": "event/%(id)s",
|
"event": "event/%(id)s",
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -1,6 +1,4 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import os
|
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
"""
|
"""
|
||||||
Integration (not unit) tests for pylast.py
|
Integration (not unit) tests for pylast.py
|
||||||
"""
|
"""
|
||||||
|
from flaky import flaky
|
||||||
import os
|
import os
|
||||||
import pytest
|
import pytest
|
||||||
from random import choice
|
from random import choice
|
||||||
|
@ -30,6 +31,7 @@ def load_secrets():
|
||||||
return doc
|
return doc
|
||||||
|
|
||||||
|
|
||||||
|
@flaky
|
||||||
class TestPyLast(unittest.TestCase):
|
class TestPyLast(unittest.TestCase):
|
||||||
|
|
||||||
secrets = None
|
secrets = None
|
||||||
|
|
3
tox.ini
3
tox.ini
|
@ -10,6 +10,7 @@ deps =
|
||||||
mock
|
mock
|
||||||
ipdb
|
ipdb
|
||||||
pytest-cov
|
pytest-cov
|
||||||
|
flaky
|
||||||
commands = py.test -v --cov pylast --cov-report term-missing {posargs}
|
commands = py.test -v --cov pylast --cov-report term-missing {posargs}
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
|
@ -28,4 +29,4 @@ commands =
|
||||||
pyflakes tests
|
pyflakes tests
|
||||||
pep8 pylast
|
pep8 pylast
|
||||||
pep8 tests
|
pep8 tests
|
||||||
./clonedigger.sh
|
./clonedigger.sh
|
||||||
|
|
Loading…
Reference in a new issue