Skip to content

Commit

Permalink
Merge pull request #122 from metaodi/develop
Browse files Browse the repository at this point in the history
Release 2.0.0
  • Loading branch information
metaodi committed Nov 22, 2021
2 parents f50e785 + e2cad2b commit 6938b79
Show file tree
Hide file tree
Showing 27 changed files with 660 additions and 261 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/build.yml
@@ -0,0 +1,38 @@
name: Build osmapi
on:
pull_request:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
sudo apt-get install pandoc
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r test-requirements.txt
pip install -e .
- name: Build the package
run: ./build.sh

- name: Test coverage
run: coveralls --service=github
if: ${{ matrix.python-version == '3.8' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/publish_python.yml
@@ -0,0 +1,29 @@
# workflow inspired by chezou/tabula-py
name: Upload Python Package

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

111 changes: 80 additions & 31 deletions CHANGELOG.md
Expand Up @@ -2,25 +2,40 @@
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project follows [Semantic Versioning](http://semver.org/).

## [Unreleased][unreleased]
## [Unreleased]

## 1.3.0 - 2020-10-05
## [2.0.0] - 2021-11-22
### Added
- Move from Travis CI to Github Actions
- Add more API-specific errors to catch specific errors (see issue #115, thanks [Mateusz Konieczny](https://github.com/matkoniecz)):
- `ChangesetClosedApiError`
- `NoteClosedApiError`
- `VersionMismatchApiError`
- `PreconditionFailedApiError`

### Changed
- **BC-Break**: osmapi does **not** support Python 2.7, 3.3, 3.4, 3.5 and 3.6 anymore

### Fixed
- Return an empty list in `NodeRelations`, `WayRelations`, `RelationRelations` and `NodeWays` if the returned XML is empty (thanks [FisherTsai](https://github.com/FisherTsai), see issue #117)

## [1.3.0] - 2020-10-05
### Added
- Add close() method to close the underlying http session (see issue #107)
- Add context manager to automatically open and close the http session (see issue #107)

### Fixed
- Correctly parse password file (thanks [Julien Palard](https://github.com/JulienPalard), see pull request #106)

## 1.2.2 - 2018-11-05
## [1.2.2] - 2018-11-05
### Fixed
- Update PyPI password for deployment

## 1.2.1 - 2018-11-05
## [1.2.1] - 2018-11-05
### Fixed
- Deployment to PyPI with Travis

## 1.2.0 - 2018-11-05
## [1.2.0] - 2018-11-05
### Added
- Support Python 3.7 (thanks a lot [cclauss](https://github.com/cclauss))

Expand All @@ -31,25 +46,25 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Updated dependencies for Python 3.7
- Adapt README to use Python 3 syntax (thanks [cclauss](https://github.com/cclauss))

## 1.1.0 - 2017-10-11
## [1.1.0] - 2017-10-11
### Added
- Raise new `XmlResponseInvalidError` if XML response from the OpenStreetMap API is invalid

### Changed
- Improved README (thanks [Mateusz Konieczny](https://github.com/matkoniecz))

## 1.0.2 - 2017-09-07
## [1.0.2] - 2017-09-07
### Added
- Rais ResponseEmptyApiError if we expect a response from the OpenStreetMap API, but didn't get one

### Removed
- Removed httpretty as HTTP mock library

## 1.0.1 - 2017-09-07
## [1.0.1] - 2017-09-07
### Fixed
- Make sure tests run offline

## 1.0.0 - 2017-09-05
## [1.0.0] - 2017-09-05
### Added
- Officially support Python 3.5 and 3.6

Expand All @@ -59,41 +74,41 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Changed
- **BC-Break:** raise an exception if the requested element is deleted (previoulsy `None` has been returned)

## 0.8.1 - 2016-12-21
## [0.8.1] - 2016-12-21
### Fixed
- Use setuptools instead of distutils in setup.py

## 0.8.0 - 2016-12-21
## [0.8.0] - 2016-12-21
### Removed
- This release no longer supports Python 3.2, if you need it, go back to release <= 0.6.2

## Changed
- Read version from __init__.py instead of importing it in setup.py

## 0.7.2 - 2016-12-21
## [0.7.2] - 2016-12-21
### Fixed
- Added 'requests' as a dependency to setup.py to fix installation problems

## 0.7.1 - 2016-12-12
## [0.7.1] - 2016-12-12
### Changed
- Catch OSError in setup.py to avoid installation errors

## 0.7.0 - 2016-12-07
## [0.7.0] - 2016-12-07
### Changed
- Replace the old httplib with requests library (thanks a lot [Austin Hartzheim](http://austinhartzheim.me/)!)
- Use format strings instead of ugly string concatenation
- Fix unicode in changesets (thanks a lot to [MichaelVL](https://github.com/MichaelVL)!)

## 0.6.2 - 2016-01-04
## [0.6.2] - 2016-01-04
### Changed
- Re-arranged README
- Make sure PyPI releases are only created when a release has been tagged on GitHub

## 0.6.1 - 2016-01-04
## [0.6.1] - 2016-01-04
### Changed
- The documentation is now available at a new domain: http://osmapi.metaodi.ch, the previous provider does no longer provide this service

## 0.6.0 - 2015-05-26
## [0.6.0] - 2015-05-26
### Added
- SSL support for the API calls (thanks [Austin Hartzheim](http://austinhartzheim.me/)!)
- Run tests on Python 3.4 as well
Expand All @@ -104,7 +119,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Changed
- Changed generic `Exception` with more specific ones, so a client can catch those and react accordingly (no BC-break!)

## 0.5.0 - 2015-01-03
## [0.5.0] - 2015-01-03
### Changed
- BC-break: all dates are now parsed as datetime objects

Expand All @@ -113,7 +128,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- When (un)subscribing to a changeset, there are two special errors `AlreadySubscribedApiError` and `NotSubscribedApiError` to check for
- The ChangesetGet method got a new parameter `include_discussion` to determine wheter or not changeset discussion should be in the response

## 0.4.2 - 2015-01-01
## [0.4.2] - 2015-01-01
### Fixed
- Result of `NodeWay` is now actually parsed as a `way`

Expand All @@ -123,54 +138,54 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Changed
- Update to pdoc 0.3.1 which changed the appearance of the online docs

## 0.4.1 - 2014-10-08
## [0.4.1] - 2014-10-08
### Changed
- Parse dates in notes as `datetime` objects

## 0.4.0 - 2014-10-07
## [0.4.0] - 2014-10-07
### Added
- Release for OSM Notes API
- Generation of online documentation (http://osmapi.divshot.io)

## 0.3.1 - 2014-06-21
## [0.3.1] - 2014-06-21
### Fixed
- Hotfix release of Python 3.x (base64)

## 0.3.0 - 2014-05-20
## [0.3.0] - 2014-05-20
### Added
- Support for Python 3.x
- Use `tox` to run tests against multiple versions of Python

## 0.2.26 - 2014-05-02
## [0.2.26] - 2014-05-02
### Fixed
- Fixed notes again

## 0.2.25 - 2014-05-02
## [0.2.25] - 2014-05-02
### Fixed
- Unit tests for basic functionality
- Fixed based on the unit tests (previously undetected bugs)

## 0.2.24 - 2014-01-07
## [0.2.24] - 2014-01-07
### Fixed
- Fixed notes

## 0.2.23 - 2014-01-03
## [0.2.23] - 2014-01-03
### Changed
- Hotfix release

## 0.2.22 - 2014-01-03
## [0.2.22] - 2014-01-03
### Fixed
- Fixed README.md not found error during installation

## 0.2.21 - 2014-01-03
## [0.2.21] - 2014-01-03
### Changed
- Updated description

## 0.2.20 - 2014-01-01
## [0.2.20] - 2014-01-01
### Added
- First release of PyPI package "osmapi"

## 0.2.19 - 2014-01-01
## [0.2.19] - 2014-01-01
### Changed
- Inital version from SVN (http://svn.openstreetmap.org/applications/utils/python_lib/OsmApi/OsmApi.py)
- Move to GitHub
Expand Down Expand Up @@ -265,3 +280,37 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- `Removed` for deprecated features removed in this release.
- `Fixed` for any bug fixes.
- `Security` to invite users to upgrade in case of vulnerabilities.

[Unreleased]: https://github.com/metaodi/osmapi/compare/v2.0.0...HEAD
[2.0.0]: https://github.com/metaodi/osmapi/compare/v1.3.0...v2.0.0
[1.3.0]: https://github.com/metaodi/osmapi/compare/v1.2.2...v1.3.0
[1.2.2]: https://github.com/metaodi/osmapi/compare/v1.2.1...v1.2.2
[1.2.1]: https://github.com/metaodi/osmapi/compare/v1.2.0...v1.2.1
[1.2.0]: https://github.com/metaodi/osmapi/compare/v1.1.0...v1.2.0
[1.1.0]: https://github.com/metaodi/osmapi/compare/v1.0.2...v1.1.0
[1.0.2]: https://github.com/metaodi/osmapi/compare/v1.0.1...v1.0.2
[1.0.1]: https://github.com/metaodi/osmapi/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/metaodi/osmapi/compare/v0.8.1...v1.0.0
[0.8.1]: https://github.com/metaodi/osmapi/compare/v0.8.0...v0.8.1
[0.8.0]: https://github.com/metaodi/osmapi/compare/v0.7.2...v0.8.0
[0.7.2]: https://github.com/metaodi/osmapi/compare/v0.7.1...v0.7.2
[0.7.1]: https://github.com/metaodi/osmapi/compare/v0.7.0...v0.7.1
[0.7.0]: https://github.com/metaodi/osmapi/compare/v0.6.2...v0.7.0
[0.6.2]: https://github.com/metaodi/osmapi/compare/v0.6.1...v0.6.2
[0.6.1]: https://github.com/metaodi/osmapi/compare/v0.6.0...v0.6.1
[0.6.0]: https://github.com/metaodi/osmapi/compare/v0.5.0...v0.6.0
[0.5.0]: https://github.com/metaodi/osmapi/compare/v0.4.2...v0.5.0
[0.4.2]: https://github.com/metaodi/osmapi/compare/v0.4.1...v0.4.2
[0.4.1]: https://github.com/metaodi/osmapi/compare/v0.4.0...v0.4.1
[0.4.0]: https://github.com/metaodi/osmapi/compare/v0.3.1...v0.4.0
[0.3.1]: https://github.com/metaodi/osmapi/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/metaodi/osmapi/compare/v0.2.26...v0.3.0
[0.2.26]: https://github.com/metaodi/osmapi/compare/v0.2.25...v0.2.26
[0.2.25]: https://github.com/metaodi/osmapi/compare/v0.2.24...v0.2.25
[0.2.24]: https://github.com/metaodi/osmapi/compare/v0.2.23...v0.2.24
[0.2.23]: https://github.com/metaodi/osmapi/compare/v0.2.22...v0.2.23
[0.2.22]: https://github.com/metaodi/osmapi/compare/v0.2.21...v0.2.22
[0.2.21]: https://github.com/metaodi/osmapi/compare/v0.2.20...v0.2.21
[0.2.20]: https://github.com/metaodi/osmapi/compare/v0.2.19...v0.2.20
[0.2.19]: https://github.com/metaodi/osmapi/releases/tag/v0.2.19

12 changes: 6 additions & 6 deletions README.md
@@ -1,12 +1,12 @@
osmapi
======

[![Build](https://img.shields.io/travis/metaodi/osmapi/develop.svg)](https://travis-ci.org/metaodi/osmapi)
[![Build osmapi](https://github.com/metaodi/osmapi/actions/workflows/build.yml/badge.svg)](https://github.com/metaodi/osmapi/actions/workflows/build.yml)
[![Coverage](https://img.shields.io/coveralls/metaodi/osmapi/develop.svg)](https://coveralls.io/r/metaodi/osmapi?branch=develop)
[![Version](https://img.shields.io/pypi/v/osmapi.svg)](https://pypi.python.org/pypi/osmapi/)
[![License](https://img.shields.io/pypi/l/osmapi.svg)](https://github.com/metaodi/osmapi/blob/master/LICENSE.txt)

Python wrapper for the OSM API
Python wrapper for the OSM API (requires Python >= 3.7)

## Installation

Expand All @@ -20,7 +20,7 @@ The documentation is generated using `pdoc` and can be [viewed online](http://os

The build the documentation locally, you can use

pdoc --html osmapi.OsmApi # create HTML file
pdoc -o . osmapi # create HTML files

This project uses GitHub Pages to publish its documentation.
To update the online documentation, you need to re-generate the documentation with the above command and update the `gh-pages` branch of this repository.
Expand Down Expand Up @@ -87,7 +87,7 @@ To run the tests use the following command:

nosetests --verbose

By using tox you can even run the tests against different versions of python (2.7, 3.4, 3.5, 3.6 and 3.7):
By using tox you can even run the tests against different versions of python (3.7, 3.8, 3.9):

tox

Expand All @@ -99,8 +99,8 @@ To create a new release, follow these steps (please respect [Semantic Versioning
1. Update the CHANGELOG with the version
1. Create a pull request to merge develop into master (make sure the tests pass!)
1. Create a [new release/tag on GitHub](https://github.com/metaodi/osmapi/releases) (on the master branch)
1. The [publication on PyPI](https://pypi.python.org/pypi/osmapi) happens via [Travis CI](https://travis-ci.org/metaodi/osmapi) on every tagged commit
1. Re-build the documentation (see above) and copy the generated file to `index.html` on the `gh-pages` branch
1. The [publication on PyPI](https://pypi.python.org/pypi/osmapi) happens via [GitHub Actions](https://github.com/metaodi/osmapi/actions/workflows/publish_python.yml) on every tagged commit
1. Re-build the documentation (see above) and copy the generated files to the `gh-pages` branch

## Attribution

Expand Down

0 comments on commit 6938b79

Please sign in to comment.