From ec3df6808a539f65751f2b7857578fe261bf0318 Mon Sep 17 00:00:00 2001 From: Chris Amico Date: Mon, 31 Oct 2022 11:03:29 -0400 Subject: [PATCH] Test on python 3.11. Update action deps. --- .github/workflows/test.yml | 8 ++++---- README.md | 15 +++++++++------ setup.py | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b2b631f..3bc5813 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,14 +7,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] + python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - uses: actions/cache@v2 + - uses: actions/cache@v3 name: Configure pip caching with: path: ~/.cache/pip diff --git a/README.md b/README.md index 4af98bc..41069f7 100644 --- a/README.md +++ b/README.md @@ -59,18 +59,22 @@ The CLI currently supports these geocoders: - `bing` - `googlev3` - `mapquest` (and `open-mapquest`) -- `nominatim` - `mapbox` +- `nominatim` - `opencage` -More will be added soon. +#### Adding new geocoders + +1. Open an issue with the name of the geocoding service as the ticket title ([example](https://github.com/eyeseast/geocode-sqlite/issues/35)). Put any noteworthy implementation details in the ticket body, like where to get an API key if one is required. +2. Fork the repo and add a geocoder. +3. Add an example to the `Makefile`. Add tests if there's new shared functionality. ### Common arguments and options Each geocoder needs to know where to find the data it's working with. These are the first two arguments: -- database: a path to a SQLite file, which must already exist -- table: the name of a table, in that database, which exists and has data to geocode +- `database`: a path to a SQLite file, which must already exist +- `table`: the name of a table, in that database, which exists and has data to geocode From there, we have a set of options passed to every geocoder: @@ -131,9 +135,8 @@ To run the tests: ```sh pytest - ``` -Please remember that this library is mainly glue code between other well-tested projects, specifically: click, geopy and sqlite-utils. Tests should focus on making sure those parts fit together correctly. We can assume the parts themselves already work. +Please remember that this library is mainly glue code between other well-tested projects, specifically: [click](https://click.palletsprojects.com/), [geopy](https://geopy.readthedocs.io/en/stable/) and [sqlite-utils](https://sqlite-utils.datasette.io/en/stable/). Tests should focus on making sure those parts fit together correctly. We can assume the parts themselves already work. To that end, there is a test geocoder included: `geocode_sqlite.testing.DummyGeocoder`. That geocoder works with an included dataset of In-N-Out Burger locations provided by [AllThePlaces](https://www.alltheplaces.xyz/). It works like a normal GeoPy geocoder, except it will only return results for In-N-Out locations using the included database. diff --git a/setup.py b/setup.py index 2b21916..0c00f66 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup import os -VERSION = "0.6.1" +VERSION = "0.7.0" requirements = ["click>=7.0", "sqlite_utils", "geopy"]