Skip to content

Commit 728e320

Browse files
authored
Move from Travis to Github actions (#49)
1 parent 096debc commit 728e320

5 files changed

Lines changed: 52 additions & 31 deletions

File tree

.github/workflows/build.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
tox:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
py:
16+
- "3.11"
17+
- "3.10"
18+
- "3.9"
19+
- "3.8"
20+
- "3.7"
21+
os:
22+
- ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v3
25+
- name: Setup python for test ${{ matrix.py }}
26+
uses: actions/setup-python@v4
27+
with:
28+
python-version: ${{ matrix.py }}
29+
- name: Install tox
30+
run: python -m pip install tox-gh>=1.2
31+
- name: Setup test suite
32+
run: tox -vv --notest
33+
- name: Run test suite
34+
run: tox --skip-pkg-install

.travis.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# OpenCage Geocoding Module for Python
32

43
A Python module to access the [OpenCage Geocoding API](https://opencagedata.com/).
@@ -9,7 +8,7 @@ A Python module to access the [OpenCage Geocoding API](https://opencagedata.com/
98
[![Downloads](https://pepy.tech/badge/opencage/month)](https://pepy.tech/project/opencage)
109
[![Versions](https://img.shields.io/pypi/pyversions/opencage)](https://pypi.org/project/opencage/)
1110
![GitHub contributors](https://img.shields.io/github/contributors/opencagedata/python-opencage-geocoder)
12-
[![Build Status](https://travis-ci.com/OpenCageData/python-opencage-geocoder.svg?branch=master)](https://travis-ci.com/OpenCageData/python-opencage-geocoder)
11+
[![Build Status](https://github.com/OpenCageData/python-opencage-geocoder/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/OpenCageData/python-opencage-geocoder/actions/workflows/build.yml)
1312
![Mastodon Follow](https://img.shields.io/mastodon/follow/109287663468501769?domain=https%3A%2F%2Fen.osm.town%2F&style=social)
1413

1514
## Tutorial
@@ -61,10 +60,9 @@ print(results[0]['formatted'])
6160
# u'London, ON N6A 3M8, Canada'
6261
```
6362

64-
6563
### Reverse geocoding
6664

67-
Turn a lat/long into an address with the ``reverse_geocode`` method:
65+
Turn a lat/long into an address with the `reverse_geocode` method:
6866

6967
```python
7068
result = geocoder.reverse_geocode(51.51024, -0.10303)
@@ -117,12 +115,11 @@ See `examples/batch.py` for an example to geocode a CSV file.
117115

118116
If anything goes wrong, then an exception will be raised:
119117

120-
* `InvalidInputError` for non-unicode query strings
121-
* `NotAuthorizedError` if API key is missing, invalid syntax or disabled
122-
* `ForbiddenError` API key is blocked or suspended
123-
* `RateLimitExceededError` if you go past your rate limit
124-
* `UnknownError` if there's some problem with the API (bad results, 500 status code, etc)
125-
118+
- `InvalidInputError` for non-unicode query strings
119+
- `NotAuthorizedError` if API key is missing, invalid syntax or disabled
120+
- `ForbiddenError` API key is blocked or suspended
121+
- `RateLimitExceededError` if you go past your rate limit
122+
- `UnknownError` if there's some problem with the API (bad results, 500 status code, etc)
126123

127124
## Copyright & License
128125

@@ -133,7 +130,7 @@ Please see `LICENSE.txt`
133130

134131
<a href="https://opencagedata.com"><img src="opencage_logo_300_150.png"/></a>
135132

136-
We run a worldwide [geocoding API](https://opencagedata.com/api) and [geosearch](https://opencagedata.com/geosearch) service based on open data.
137-
Learn more [about us](https://opencagedata.com/about).
133+
We run a worldwide [geocoding API](https://opencagedata.com/api) and [geosearch](https://opencagedata.com/geosearch) service based on open data.
134+
Learn more [about us](https://opencagedata.com/about).
138135

139136
We also run [Geomob](https://thegeomob.com), a series of regular meetups for location based service creators, where we do our best to highlight geoinnovation. If you like geo stuff, you will probably enjoy [the Geomob podcast](https://thegeomob.com/podcast/).

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"Use older opencage 1.x for Python 2.7 or 3.6"
2020
)
2121

22-
# try for travis
22+
# try for testing
2323
try:
2424
with open(os.path.join(SOURCE_DIR, 'README.md'), encoding="utf-8") as f:
2525
LONG_DESCRIPTION = f.read()

tox.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
[tox]
22
envlist = py37,py38,py39,py310,py311,lint
33

4+
[gh]
5+
python =
6+
3.11 = py311
7+
3.10 = py310
8+
3.9 = py39
9+
3.8 = py38
10+
3.7 = py37
11+
412
[testenv]
513
deps =
614
httpretty

0 commit comments

Comments
 (0)