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

housekeeping #168

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,10 @@ jobs:

- name: Run tests with tox
run: poetry run tox

- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: true
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Overpass API python wrapper
![PyPI - Downloads](https://img.shields.io/pypi/dm/overpass)
![PyPI - License](https://img.shields.io/pypi/l/overpass)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/overpass)
[![codecov](https://codecov.io/gh/mvexel/overpass-api-python-wrapper/graph/badge.svg?token=7pAwXEZNCt)](https://codecov.io/gh/mvexel/overpass-api-python-wrapper)
![GitHub License](https://img.shields.io/github/license/mvexel/overpass-api-python-wrapper)
![Mastodon Follow](https://img.shields.io/mastodon/follow/17500?domain=https%3A%2F%2Fen.osm.town)

Expand Down
11 changes: 2 additions & 9 deletions overpass/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
# -*- coding: utf-8 -*-

# Copyright 2015-2018 Martijn van Exel.
# This file is part of the overpass-api-python-wrapper project
# which is licensed under Apache 2.0.
# See LICENSE.txt for the full license text.

"""Thin wrapper around the OpenStreetMap Overpass API."""
from importlib.metadata import version

__title__ = "overpass"
__version__ = "0.7"
__version__ = version("overpass")
__license__ = "Apache 2.0"

from .api import API
Expand Down
2 changes: 2 additions & 0 deletions overpass/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ def get(self, query, responseformat="geojson", verbosity="body", build=True, dat
return list(csv.reader(StringIO(r.text), delimiter="\t"))
elif content_type in ("text/xml", "application/xml", "application/osm3s+xml"):
return r.text
elif content_type.startswith("text/html"):
raise ServerRuntimeError(r.text)
else:
response = json.loads(r.text)

Expand Down
107 changes: 106 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ requests = "^2.32.3"

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.0"
pytest-cov = "^5.0.0"
geojson = "^3.1.0"
requests-mock = { extras = ["fixtures"], version = "^1.12.1" }
deepdiff = "^7.0.1"
tox = "^4.17.1"


[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

25 changes: 0 additions & 25 deletions setup.py

This file was deleted.

4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ allowlist_externals = poetry
commands_pre =
poetry install --no-root --sync
commands =
poetry run pytest tests/ --import-mode importlib
poetry run pytest --cov=overpass --cov-report=xml --cov-report=term-missing tests/ --import-mode importlib

[gh-actions]
python =
3.9: py39
3.10: py310
3.11: py311
3.11: py311
Loading