Skip to content

Commit

Permalink
git - Merge pull request #55 from DinoTools/prepare_release
Browse files Browse the repository at this point in the history
Prepare release of version 0.4
  • Loading branch information
phibos committed Dec 8, 2016
2 parents 7b0e0d9 + 6e49cf2 commit 4e9c90a
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 25 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.rst
@@ -1,6 +1,27 @@
Changelog
=========

0.x (`master`_)
~~~~~~~~~~~~~~~

.. note:: This version is not yet released and is under development.

0.4 (2016-12-08)
~~~~~~~~~~~~~~~~

* Add SAX parser
* Add option to choose DOM or SAX parser
* Fix issues with CI builds with Python 3.2
* Add Python 3.5 to CI builds
* Fix issues (Thanks to all contributors)
* Add property for default API URL
* Add examples
* Build Fixes
* GitHub templates
* Parse center information
* Parse geometry information
* Support Areas

0.3.1 (2015-04-30)
~~~~~~~~~~~~~~~~~~

Expand Down
4 changes: 2 additions & 2 deletions overpy/__about__.py
Expand Up @@ -13,10 +13,10 @@
__summary__ = "Python Wrapper to access the OpenStreepMap Overpass API"
__uri__ = "https://github.com/DinoTools/python-overpy"

__version__ = "0.3.1"
__version__ = "0.4"

__author__ = "PhiBo (DinoTools)"
__email__ = ""

__license__ = "MIT"
__copyright__ = "Copyright 2014-2015 %s" % __author__
__copyright__ = "Copyright 2014-2016 %s" % __author__
6 changes: 6 additions & 0 deletions setup.cfg
@@ -1,2 +1,8 @@
[metadata]
license-file = LICENSE

[aliases]
test=pytest

[tool:pytest]
python_files = tests/*.py
3 changes: 3 additions & 0 deletions setup.py
Expand Up @@ -42,10 +42,13 @@
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy"
],
keywords="OverPy Overpass OSM OpenStreetMap",
install_requires=[],
packages=find_packages(exclude=["*.tests", "*.tests.*"]),
include_package_data=True,
package_data={
#"": ["README"],
},
setup_requires=["pytest-runner"],
tests_require=["pytest"],
)
12 changes: 9 additions & 3 deletions tests/__init__.py
@@ -1,5 +1,6 @@
import os
import sys
import time
from multiprocessing import Process
from threading import Lock

Expand All @@ -12,7 +13,7 @@
TCPServer.allow_reuse_address = True

HOST = "127.0.0.1"
PORT_START = 10000
PORT_START = sys.version_info[0] * 10000 + sys.version_info[1] * 100

current_port = PORT_START
test_lock = Lock()
Expand Down Expand Up @@ -42,7 +43,12 @@ def new_server_thread(handle_cls, port=None):
(HOST, port),
handle_cls
)
p = Process(target=server_thread, args=(server,))
p.start()
# Give the server some time to bind
# Is there a better option?
time.sleep(0.2)
return (
"http://%s:%d" % (HOST, port),
Process(target=server_thread, args=(server,))
)
p
)
9 changes: 0 additions & 9 deletions tests/test_request.py
Expand Up @@ -90,7 +90,6 @@ def handle(self):
class TestQuery(object):
def test_chunk_size(self):
url, t = new_server_thread(HandleResponseJSON)
t.start()

api = overpy.Overpass(read_chunk_size=128)
api.url = url
Expand All @@ -100,7 +99,6 @@ def test_chunk_size(self):

def test_overpass_syntax_error(self):
url, t = new_server_thread(HandleOverpassBadRequest)
t.start()

api = overpy.Overpass()
api.url = url
Expand All @@ -119,7 +117,6 @@ def test_overpass_syntax_error_encoding_error(self):
tmp.decode("utf-8")

url, t = new_server_thread(HandleOverpassBadRequestEncoding)
t.start()

api = overpy.Overpass()
api.url = url
Expand All @@ -133,7 +130,6 @@ def test_overpass_syntax_error_encoding_error(self):

def test_overpass_too_many_requests(self):
url, t = new_server_thread(HandleOverpassTooManyRequests)
t.start()

api = overpy.Overpass()
api.url = url
Expand All @@ -146,7 +142,6 @@ def test_overpass_too_many_requests(self):

def test_overpass_gateway_timeout(self):
url, t = new_server_thread(HandleOverpassGatewayTimeout)
t.start()

api = overpy.Overpass()
api.url = url
Expand All @@ -159,7 +154,6 @@ def test_overpass_gateway_timeout(self):

def test_overpass_unknown_status_code(self):
url, t = new_server_thread(HandleOverpassUnknownHTTPStatusCode)
t.start()

api = overpy.Overpass()
api.url = url
Expand All @@ -172,7 +166,6 @@ def test_overpass_unknown_status_code(self):

def test_response_json(self):
url, t = new_server_thread(HandleResponseJSON)
t.start()

api = overpy.Overpass()
api.url = url
Expand All @@ -182,7 +175,6 @@ def test_response_json(self):

def test_response_unknown(self):
url, t = new_server_thread(HandleResponseUnknown)
t.start()

api = overpy.Overpass()
api.url = url
Expand All @@ -192,7 +184,6 @@ def test_response_unknown(self):

def test_response_xml(self):
url, t = new_server_thread(HandleResponseXML)
t.start()

api = overpy.Overpass()
api.url = url
Expand Down
8 changes: 0 additions & 8 deletions tests/test_result.py
Expand Up @@ -48,7 +48,6 @@ def test_expand_01(self):
class TestArea(object):
def test_missing_unresolvable(self):
url, t = new_server_thread(HandleResponseJSON02)
t.start()

api = overpy.Overpass()
api.url = url
Expand All @@ -60,7 +59,6 @@ def test_missing_unresolvable(self):

def test_missing_resolvable(self):
url, t = new_server_thread(HandleResponseJSON02)
t.start()

api = overpy.Overpass()
api.url = url
Expand All @@ -82,7 +80,6 @@ def test_missing_resolvable(self):
class TestNode(object):
def test_missing_unresolvable(self):
url, t = new_server_thread(HandleResponseJSON02)
t.start()

api = overpy.Overpass()
api.url = url
Expand All @@ -94,7 +91,6 @@ def test_missing_unresolvable(self):

def test_missing_resolvable(self):
url, t = new_server_thread(HandleResponseJSON02)
t.start()

api = overpy.Overpass()
api.url = url
Expand All @@ -116,7 +112,6 @@ def test_missing_resolvable(self):
class TestRelation(object):
def test_missing_unresolvable(self):
url, t = new_server_thread(HandleResponseJSON02)
t.start()

api = overpy.Overpass()
api.url = url
Expand All @@ -128,7 +123,6 @@ def test_missing_unresolvable(self):

def test_missing_resolvable(self):
url, t = new_server_thread(HandleResponseJSON02)
t.start()

api = overpy.Overpass()
api.url = url
Expand All @@ -150,7 +144,6 @@ def test_missing_resolvable(self):
class TestWay(object):
def test_missing_unresolvable(self):
url, t = new_server_thread(HandleResponseJSON02)
t.start()

api = overpy.Overpass()
api.url = url
Expand All @@ -162,7 +155,6 @@ def test_missing_unresolvable(self):

def test_missing_resolvable(self):
url, t = new_server_thread(HandleResponseJSON02)
t.start()

api = overpy.Overpass()
api.url = url
Expand Down
3 changes: 0 additions & 3 deletions tests/test_result_way.py
Expand Up @@ -38,7 +38,6 @@ def handle(self):
class TestNodes(object):
def test_missing_unresolvable(self):
url, t = new_server_thread(HandleResponseJSON01)
t.start()

api = overpy.Overpass()
api.url = url
Expand All @@ -61,7 +60,6 @@ def test_missing_unresolvable(self):

def test_missing_partly_unresolvable(self):
url, t = new_server_thread(HandleResponseJSON02)
t.start()

api = overpy.Overpass()
api.url = url
Expand All @@ -84,7 +82,6 @@ def test_missing_partly_unresolvable(self):

def test_missing_resolvable(self):
url, t = new_server_thread(HandleResponseJSON03)
t.start()

api = overpy.Overpass()
api.url = url
Expand Down

0 comments on commit 4e9c90a

Please sign in to comment.