From b274aae50075e909b1107a24924beecfdd71f283 Mon Sep 17 00:00:00 2001 From: nilsnolde Date: Wed, 13 Apr 2022 15:45:29 +0200 Subject: [PATCH 1/2] remove OSRM profiles, there's no such concept --- CHANGELOG.md | 3 ++- routingpy/routers/osrm.py | 17 ++++------------- tests/test_helper.py | 2 -- tests/test_osrm.py | 20 ++++++++++---------- 4 files changed, 16 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 369d424..10e87c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## **Unreleased** -- +### Fixed +- OSRM wasn't requesting the right endpoints: profile is meaningless ## [0.4.0](https://pypi.org/project/routingpy/0.4.0/) diff --git a/routingpy/routers/osrm.py b/routingpy/routers/osrm.py index 470f45f..2a15072 100644 --- a/routingpy/routers/osrm.py +++ b/routingpy/routers/osrm.py @@ -90,7 +90,6 @@ def __init__( def directions( self, locations, - profile, radiuses=None, bearings=None, alternatives=None, @@ -102,7 +101,8 @@ def directions( dry_run=None, **direction_kwargs ): - """Get directions between an origin point and a destination point. + """ + Get directions between an origin point and a destination point. Use ``direction_kwargs`` for any missing ``directions`` request options. @@ -112,10 +112,6 @@ def directions( from in order of visit. :type locations: list of list - :param profile: Specifies the mode of transport to use when calculating - directions. One of ["car", "bike", "foot"]. - :type profile: str - :param radiuses: A list of maximum distances (measured in meters) that limit the search of nearby road segments to every given waypoint. The values must be greater than 0, an empty element signifies to use the backend default @@ -178,9 +174,7 @@ def directions( ) return self._parse_direction_json( - self.client._request( - "/route/v1/" + profile + "/" + coords, get_params=params, dry_run=dry_run - ), + self.client._request("/route/v1/driving/" + coords, get_params=params, dry_run=dry_run), alternatives, geometries, ) @@ -276,7 +270,6 @@ def isochrones(self): # pragma: no cover def matrix( self, locations, - profile, radiuses=None, bearings=None, sources=None, @@ -346,9 +339,7 @@ def matrix( params = self.get_matrix_params(sources, destinations, annotations, **matrix_kwargs) return self._parse_matrix_json( - self.client._request( - "/table/v1/" + profile + "/" + coords, get_params=params, dry_run=dry_run - ) + self.client._request("/table/v1/driving/" + coords, get_params=params, dry_run=dry_run) ) @staticmethod diff --git a/tests/test_helper.py b/tests/test_helper.py index c5af718..00f975c 100644 --- a/tests/test_helper.py +++ b/tests/test_helper.py @@ -503,7 +503,6 @@ "osrm": { "directions": { "locations": PARAM_LINE_MULTI, - "profile": "car", "radiuses": [PARAM_INT_BIG, PARAM_INT_BIG, PARAM_INT_BIG], "bearings": [[PARAM_INT_SMALL, PARAM_INT_SMALL]] * 3, "alternatives": True, @@ -515,7 +514,6 @@ }, "matrix": { "locations": PARAM_LINE_MULTI, - "profile": "car", "radiuses": [PARAM_INT_BIG, PARAM_INT_BIG, PARAM_INT_BIG], "bearings": [[PARAM_INT_SMALL, PARAM_INT_SMALL]] * 3, "annotations": ["distance", "duration"], diff --git a/tests/test_osrm.py b/tests/test_osrm.py index 59765c7..60ac089 100644 --- a/tests/test_osrm.py +++ b/tests/test_osrm.py @@ -42,7 +42,7 @@ def test_full_directions(self): responses.add( responses.GET, - "https://router.project-osrm.org/route/v1/{}/{}".format(query["profile"], coords), + "https://router.project-osrm.org/route/v1/driving/{}".format(coords), status=200, json=ENDPOINTS_RESPONSES["osrm"]["directions_geojson"], content_type="application/json", @@ -51,7 +51,7 @@ def test_full_directions(self): routes = self.client.directions(**query) self.assertEqual(1, len(responses.calls)) self.assertURLEqual( - "https://router.project-osrm.org/route/v1/car/8.688641,49.420577;8.680916,49.415776;8.780916,49.445776?" + "https://router.project-osrm.org/route/v1/driving/8.688641,49.420577;8.680916,49.415776;8.780916,49.445776?" "alternatives=false&annotations=true&bearings=50%2C50%3B50%2C50%3B50%2C50&continue_straight=true&" "geometries=geojson&overview=simplified&radiuses=500%3B500%3B500&steps=true&fallback_speed=42", responses.calls[0].request.url, @@ -69,7 +69,7 @@ def test_full_directions_alternatives(self): responses.add( responses.GET, - "https://router.project-osrm.org/route/v1/{}/{}".format(query["profile"], coords), + "https://router.project-osrm.org/route/v1/driving/{}".format(coords), status=200, json=ENDPOINTS_RESPONSES["osrm"]["directions_geojson"], content_type="application/json", @@ -78,7 +78,7 @@ def test_full_directions_alternatives(self): routes = self.client.directions(**query) self.assertEqual(1, len(responses.calls)) self.assertURLEqual( - "https://router.project-osrm.org/route/v1/car/8.688641,49.420577;8.680916,49.415776;8.780916,49.445776?" + "https://router.project-osrm.org/route/v1/driving/8.688641,49.420577;8.680916,49.415776;8.780916,49.445776?" "alternatives=true&annotations=true&bearings=50%2C50%3B50%2C50%3B50%2C50&continue_straight=true&" "geometries=geojson&overview=simplified&radiuses=500%3B500%3B500&steps=true", responses.calls[0].request.url, @@ -100,7 +100,7 @@ def test_directions_polyline5(self): responses.add( responses.GET, - "https://router.project-osrm.org/route/v1/{}/{}".format(query["profile"], coords), + "https://router.project-osrm.org/route/v1/driving/{}".format(coords), status=200, json=ENDPOINTS_RESPONSES["osrm"]["directions_polyline"], content_type="application/json", @@ -165,7 +165,7 @@ def test_directions_polyline6(self): responses.add( responses.GET, - "https://router.project-osrm.org/route/v1/{}/{}".format(query["profile"], coords), + "https://router.project-osrm.org/route/v1/driving/{}".format(coords), status=200, json=ENDPOINTS_RESPONSES["osrm"]["directions_polyline6"], content_type="application/json", @@ -230,7 +230,7 @@ def test_full_matrix(self): responses.add( responses.GET, - "https://router.project-osrm.org/table/v1/{}/{}".format(query["profile"], coords), + "https://router.project-osrm.org/table/v1/driving/{}".format(coords), status=200, json=ENDPOINTS_RESPONSES["osrm"]["matrix"], content_type="application/json", @@ -240,7 +240,7 @@ def test_full_matrix(self): self.assertEqual(1, len(responses.calls)) self.assertURLEqual( - "https://router.project-osrm.org/table/v1/car/8.688641,49.420577;8.680916,49.415776;8.780916,49.445776" + "https://router.project-osrm.org/table/v1/driving/8.688641,49.420577;8.680916,49.415776;8.780916,49.445776" "?annotations=distance%2Cduration&fallback_speed=42", responses.calls[0].request.url, ) @@ -259,7 +259,7 @@ def test_few_sources_destinations_matrix(self): responses.add( responses.GET, - "https://router.project-osrm.org/table/v1/{}/{}".format(query["profile"], coords), + "https://router.project-osrm.org/table/v1/driving/{}".format(coords), status=200, json=ENDPOINTS_RESPONSES["osrm"]["matrix"], content_type="application/json", @@ -269,7 +269,7 @@ def test_few_sources_destinations_matrix(self): self.assertEqual(1, len(responses.calls)) self.assertURLEqual( - "https://router.project-osrm.org/table/v1/car/8.688641,49.420577;8.680916,49.415776;8.780916,49.445776?" + "https://router.project-osrm.org/table/v1/driving/8.688641,49.420577;8.680916,49.415776;8.780916,49.445776?" "destinations=0%3B2&sources=1%3B2&annotations=distance%2Cduration", responses.calls[0].request.url, ) From 8b203caa734fe54388c89146524ef0e856abeb3a Mon Sep 17 00:00:00 2001 From: nilsnolde Date: Wed, 13 Apr 2022 16:00:48 +0200 Subject: [PATCH 2/2] update black to remove bug; also remove linters from project dependencies, we should only be using the pre-commit api --- .pre-commit-config.yaml | 2 +- poetry.lock | 147 +--------------------------------------- pyproject.toml | 2 - requirements_dev.txt | 2 - routingpy/utils.py | 2 +- 5 files changed, 4 insertions(+), 151 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 586bc50..a2ba3c5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/psf/black - rev: 21.12b0 + rev: 22.3.0 hooks: - id: black language_version: python3 diff --git a/poetry.lock b/poetry.lock index b54dc10..87493dc 100644 --- a/poetry.lock +++ b/poetry.lock @@ -66,33 +66,6 @@ category = "main" optional = true python-versions = "*" -[[package]] -name = "black" -version = "21.12b0" -description = "The uncompromising code formatter." -category = "dev" -optional = false -python-versions = ">=3.6.2" - -[package.dependencies] -click = ">=7.1.2" -mypy-extensions = ">=0.4.3" -pathspec = ">=0.9.0,<1" -platformdirs = ">=2" -tomli = ">=0.2.6,<2.0.0" -typed-ast = {version = ">=1.4.2", markers = "python_version < \"3.8\" and implementation_name == \"cpython\""} -typing-extensions = [ - {version = ">=3.10.0.0", markers = "python_version < \"3.10\""}, - {version = "!=3.10.0.1", markers = "python_version >= \"3.10\""}, -] - -[package.extras] -colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4)"] -jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] -python2 = ["typed-ast (>=1.4.3)"] -uvloop = ["uvloop (>=0.15.2)"] - [[package]] name = "build" version = "0.7.0" @@ -157,7 +130,7 @@ name = "click" version = "8.0.4" description = "Composable command line interface toolkit" category = "main" -optional = false +optional = true python-versions = ">=3.6" [package.dependencies] @@ -315,20 +288,6 @@ calc = ["shapely"] s3 = ["boto3 (>=1.2.4)"] test = ["pytest (>=3)", "pytest-cov", "boto3 (>=1.2.4)", "mock"] -[[package]] -name = "flake8" -version = "3.9.2" -description = "the modular source code checker: pep8 pyflakes and co" -category = "dev" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" - -[package.dependencies] -importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} -mccabe = ">=0.6.0,<0.7.0" -pycodestyle = ">=2.7.0,<2.8.0" -pyflakes = ">=2.3.0,<2.4.0" - [[package]] name = "fonttools" version = "4.30.0" @@ -622,14 +581,6 @@ python-versions = ">=3.5" [package.dependencies] traitlets = "*" -[[package]] -name = "mccabe" -version = "0.6.1" -description = "McCabe checker, plugin for flake8" -category = "dev" -optional = false -python-versions = "*" - [[package]] name = "mercantile" version = "1.2.1" @@ -660,14 +611,6 @@ six = "*" testing = ["pytest", "coverage", "astroid (>=1.5.3,<1.6.0)", "pylint (>=1.7.2,<1.8.0)", "astroid (>=2.0)", "pylint (>=2.3.1,<2.4.0)"] yaml = ["PyYAML (>=5.1.0)"] -[[package]] -name = "mypy-extensions" -version = "0.4.3" -description = "Experimental type system extensions for programs checked with the mypy typechecker." -category = "dev" -optional = false -python-versions = "*" - [[package]] name = "nest-asyncio" version = "1.5.4" @@ -731,14 +674,6 @@ python-versions = ">=3.6" qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] testing = ["docopt", "pytest (<6.0.0)"] -[[package]] -name = "pathspec" -version = "0.9.0" -description = "Utility library for gitignore style pattern matching of file paths." -category = "dev" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" - [[package]] name = "pep517" version = "0.12.0" @@ -850,14 +785,6 @@ category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -[[package]] -name = "pycodestyle" -version = "2.7.0" -description = "Python style guide checker" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" - [[package]] name = "pycparser" version = "2.21" @@ -866,14 +793,6 @@ category = "main" optional = true python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -[[package]] -name = "pyflakes" -version = "2.3.1" -description = "passive checker of Python programs" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" - [[package]] name = "pygments" version = "2.11.2" @@ -1246,14 +1165,6 @@ python-versions = ">=3.7" [package.extras] test = ["pytest"] -[[package]] -name = "typed-ast" -version = "1.5.2" -description = "a fork of Python 2 and 3 ast modules with type comment support" -category = "dev" -optional = false -python-versions = ">=3.6" - [[package]] name = "typing-extensions" version = "4.1.1" @@ -1328,7 +1239,7 @@ notebooks = ["shapely", "ipykernel", "geopandas", "contextily", "matplotlib", "d [metadata] lock-version = "1.1" python-versions = "^3.7.0" -content-hash = "ef50de2ddde722eb3a33963992de0d88ac7e36bb2cb486b0f142983086d531ff" +content-hash = "0c424ba498839f542887023012e587b42efec2afd919a2fdd19e0353106e7145" [metadata.files] affine = [ @@ -1359,10 +1270,6 @@ backcall = [ {file = "backcall-0.2.0-py2.py3-none-any.whl", hash = "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255"}, {file = "backcall-0.2.0.tar.gz", hash = "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e"}, ] -black = [ - {file = "black-21.12b0-py3-none-any.whl", hash = "sha256:a615e69ae185e08fdd73e4715e260e2479c861b5740057fde6e8b4e3b7dd589f"}, - {file = "black-21.12b0.tar.gz", hash = "sha256:77b80f693a569e2e527958459634f18df9b0ba2625ba4e0c2d5da5be42e6f2b3"}, -] build = [ {file = "build-0.7.0-py3-none-any.whl", hash = "sha256:21b7ebbd1b22499c4dac536abc7606696ea4d909fd755e00f09f3c0f2c05e3c8"}, {file = "build-0.7.0.tar.gz", hash = "sha256:1aaadcd69338252ade4f7ec1265e1a19184bf916d84c9b7df095f423948cb89f"}, @@ -1536,10 +1443,6 @@ fiona = [ {file = "Fiona-1.8.21-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:40b4eaf5b88407421d6c9e707520abd2ff16d7cd43efb59cd398aa41d2de332c"}, {file = "Fiona-1.8.21.tar.gz", hash = "sha256:3a0edca2a7a070db405d71187214a43d2333a57b4097544a3fcc282066a58bfc"}, ] -flake8 = [ - {file = "flake8-3.9.2-py2.py3-none-any.whl", hash = "sha256:bf8fd333346d844f616e8d47905ef3a3384edae6b4e9beb0c5101e25e3110907"}, - {file = "flake8-3.9.2.tar.gz", hash = "sha256:07528381786f2a6237b061f6e96610a4167b226cb926e2aa2b6b1d78057c576b"}, -] fonttools = [ {file = "fonttools-4.30.0-py3-none-any.whl", hash = "sha256:6985cc5380c06db07fdc73ade15e6adbd4ce6ff850d7561ca00f97090b4b263d"}, {file = "fonttools-4.30.0.zip", hash = "sha256:084dd1762f083a1bf49e41da1bfeafb475c9dce46265690a6bdd33290b9a63f4"}, @@ -1736,10 +1639,6 @@ matplotlib-inline = [ {file = "matplotlib-inline-0.1.3.tar.gz", hash = "sha256:a04bfba22e0d1395479f866853ec1ee28eea1485c1d69a6faf00dc3e24ff34ee"}, {file = "matplotlib_inline-0.1.3-py3-none-any.whl", hash = "sha256:aed605ba3b72462d64d475a21a9296f400a19c4f74a31b59103d2a99ffd5aa5c"}, ] -mccabe = [ - {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, - {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, -] mercantile = [ {file = "mercantile-1.2.1-py3-none-any.whl", hash = "sha256:30f457a73ee88261aab787b7069d85961a5703bb09dc57a170190bc042cd023f"}, {file = "mercantile-1.2.1.tar.gz", hash = "sha256:fa3c6db15daffd58454ac198b31887519a19caccee3f9d63d17ae7ff61b3b56b"}, @@ -1748,10 +1647,6 @@ munch = [ {file = "munch-2.5.0-py2.py3-none-any.whl", hash = "sha256:6f44af89a2ce4ed04ff8de41f70b226b984db10a91dcc7b9ac2efc1c77022fdd"}, {file = "munch-2.5.0.tar.gz", hash = "sha256:2d735f6f24d4dba3417fa448cae40c6e896ec1fdab6cdb5e6510999758a4dbd2"}, ] -mypy-extensions = [ - {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, - {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, -] nest-asyncio = [ {file = "nest_asyncio-1.5.4-py3-none-any.whl", hash = "sha256:3fdd0d6061a2bb16f21fe8a9c6a7945be83521d81a0d15cff52e9edee50101d6"}, {file = "nest_asyncio-1.5.4.tar.gz", hash = "sha256:f969f6013a16fadb4adcf09d11a68a4f617c6049d7af7ac2c676110169a63abd"}, @@ -1824,10 +1719,6 @@ parso = [ {file = "parso-0.8.3-py2.py3-none-any.whl", hash = "sha256:c001d4636cd3aecdaf33cbb40aebb59b094be2a74c556778ef5576c175e19e75"}, {file = "parso-0.8.3.tar.gz", hash = "sha256:8c07be290bb59f03588915921e29e8a50002acaf2cdc5fa0e0114f91709fafa0"}, ] -pathspec = [ - {file = "pathspec-0.9.0-py2.py3-none-any.whl", hash = "sha256:7d15c4ddb0b5c802d161efc417ec1a2558ea2653c2e8ad9c19098201dc1c993a"}, - {file = "pathspec-0.9.0.tar.gz", hash = "sha256:e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1"}, -] pep517 = [ {file = "pep517-0.12.0-py2.py3-none-any.whl", hash = "sha256:dd884c326898e2c6e11f9e0b64940606a93eb10ea022a2e067959f3a110cf161"}, {file = "pep517-0.12.0.tar.gz", hash = "sha256:931378d93d11b298cf511dd634cf5ea4cb249a28ef84160b3247ee9afb4e8ab0"}, @@ -1901,18 +1792,10 @@ py = [ {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, ] -pycodestyle = [ - {file = "pycodestyle-2.7.0-py2.py3-none-any.whl", hash = "sha256:514f76d918fcc0b55c6680472f0a37970994e07bbb80725808c17089be302068"}, - {file = "pycodestyle-2.7.0.tar.gz", hash = "sha256:c389c1d06bf7904078ca03399a4816f974a1d590090fecea0c63ec26ebaf1cef"}, -] pycparser = [ {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, ] -pyflakes = [ - {file = "pyflakes-2.3.1-py2.py3-none-any.whl", hash = "sha256:7893783d01b8a89811dd72d7dfd4d84ff098e5eed95cfa8905b22bbffe52efc3"}, - {file = "pyflakes-2.3.1.tar.gz", hash = "sha256:f5bc8ecabc05bb9d291eb5203d6810b49040f6ff446a756326104746cc00c1db"}, -] pygments = [ {file = "Pygments-2.11.2-py3-none-any.whl", hash = "sha256:44238f1b60a76d78fc8ca0528ee429702aae011c265fe6a8dd8b63049ae41c65"}, {file = "Pygments-2.11.2.tar.gz", hash = "sha256:4e426f72023d88d03b2fa258de560726ce890ff3b630f88c21cbb8b2503b8c6a"}, @@ -2203,32 +2086,6 @@ traitlets = [ {file = "traitlets-5.1.1-py3-none-any.whl", hash = "sha256:2d313cc50a42cd6c277e7d7dc8d4d7fedd06a2c215f78766ae7b1a66277e0033"}, {file = "traitlets-5.1.1.tar.gz", hash = "sha256:059f456c5a7c1c82b98c2e8c799f39c9b8128f6d0d46941ee118daace9eb70c7"}, ] -typed-ast = [ - {file = "typed_ast-1.5.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:183b183b7771a508395d2cbffd6db67d6ad52958a5fdc99f450d954003900266"}, - {file = "typed_ast-1.5.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:676d051b1da67a852c0447621fdd11c4e104827417bf216092ec3e286f7da596"}, - {file = "typed_ast-1.5.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bc2542e83ac8399752bc16e0b35e038bdb659ba237f4222616b4e83fb9654985"}, - {file = "typed_ast-1.5.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:74cac86cc586db8dfda0ce65d8bcd2bf17b58668dfcc3652762f3ef0e6677e76"}, - {file = "typed_ast-1.5.2-cp310-cp310-win_amd64.whl", hash = "sha256:18fe320f354d6f9ad3147859b6e16649a0781425268c4dde596093177660e71a"}, - {file = "typed_ast-1.5.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:31d8c6b2df19a777bc8826770b872a45a1f30cfefcfd729491baa5237faae837"}, - {file = "typed_ast-1.5.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:963a0ccc9a4188524e6e6d39b12c9ca24cc2d45a71cfdd04a26d883c922b4b78"}, - {file = "typed_ast-1.5.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:0eb77764ea470f14fcbb89d51bc6bbf5e7623446ac4ed06cbd9ca9495b62e36e"}, - {file = "typed_ast-1.5.2-cp36-cp36m-win_amd64.whl", hash = "sha256:294a6903a4d087db805a7656989f613371915fc45c8cc0ddc5c5a0a8ad9bea4d"}, - {file = "typed_ast-1.5.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:26a432dc219c6b6f38be20a958cbe1abffcc5492821d7e27f08606ef99e0dffd"}, - {file = "typed_ast-1.5.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7407cfcad702f0b6c0e0f3e7ab876cd1d2c13b14ce770e412c0c4b9728a0f88"}, - {file = "typed_ast-1.5.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f30ddd110634c2d7534b2d4e0e22967e88366b0d356b24de87419cc4410c41b7"}, - {file = "typed_ast-1.5.2-cp37-cp37m-win_amd64.whl", hash = "sha256:8c08d6625bb258179b6e512f55ad20f9dfef019bbfbe3095247401e053a3ea30"}, - {file = "typed_ast-1.5.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:90904d889ab8e81a956f2c0935a523cc4e077c7847a836abee832f868d5c26a4"}, - {file = "typed_ast-1.5.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:bbebc31bf11762b63bf61aaae232becb41c5bf6b3461b80a4df7e791fabb3aca"}, - {file = "typed_ast-1.5.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c29dd9a3a9d259c9fa19d19738d021632d673f6ed9b35a739f48e5f807f264fb"}, - {file = "typed_ast-1.5.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:58ae097a325e9bb7a684572d20eb3e1809802c5c9ec7108e85da1eb6c1a3331b"}, - {file = "typed_ast-1.5.2-cp38-cp38-win_amd64.whl", hash = "sha256:da0a98d458010bf4fe535f2d1e367a2e2060e105978873c04c04212fb20543f7"}, - {file = "typed_ast-1.5.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:33b4a19ddc9fc551ebabca9765d54d04600c4a50eda13893dadf67ed81d9a098"}, - {file = "typed_ast-1.5.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1098df9a0592dd4c8c0ccfc2e98931278a6c6c53cb3a3e2cf7e9ee3b06153344"}, - {file = "typed_ast-1.5.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42c47c3b43fe3a39ddf8de1d40dbbfca60ac8530a36c9b198ea5b9efac75c09e"}, - {file = "typed_ast-1.5.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f290617f74a610849bd8f5514e34ae3d09eafd521dceaa6cf68b3f4414266d4e"}, - {file = "typed_ast-1.5.2-cp39-cp39-win_amd64.whl", hash = "sha256:df05aa5b241e2e8045f5f4367a9f6187b09c4cdf8578bb219861c4e27c443db5"}, - {file = "typed_ast-1.5.2.tar.gz", hash = "sha256:525a2d4088e70a9f75b08b3f87a51acc9cde640e19cc523c7e41aa355564ae27"}, -] typing-extensions = [ {file = "typing_extensions-4.1.1-py3-none-any.whl", hash = "sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2"}, {file = "typing_extensions-4.1.1.tar.gz", hash = "sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42"}, diff --git a/pyproject.toml b/pyproject.toml index 897ae17..8f4554d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,8 +31,6 @@ sphinx-rtd-theme = "^1.0.0" responses = "^0.10.0" coverage = "^6.3.2" pre-commit = "^2.7.1" -flake8 = "^3.9.1" -black = "^21.6b0" pytest = "^6.2.5" build = "^0.7.0" setuptools-scm = "^6.4.2" diff --git a/requirements_dev.txt b/requirements_dev.txt index fe0dfe6..4a935cd 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -4,8 +4,6 @@ sphinx-rtd-theme>=1.0.0 responses>=0.10.0 coverage>=6.3.0 pre-commit>=2.13.0 -flake8==3.9.0 -black==21.6b0 build>=0.7.0 setuptools-scm>=6.4.2 pytest>=6.2.5 diff --git a/routingpy/utils.py b/routingpy/utils.py index 99f59d9..c7ae092 100644 --- a/routingpy/utils.py +++ b/routingpy/utils.py @@ -53,7 +53,7 @@ def _decode(expression, precision=5, is3d=False, order="lnglat"): 0, 0, len(expression), - float(10 ** precision), + float(10**precision), ) while index < length: