-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0774b67
commit b74f0fc
Showing
9 changed files
with
289 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,265 @@ | ||
version: 2.1 | ||
|
||
commands: | ||
tester: | ||
description: "Test geohash-hilbert given a certain python version." | ||
steps: | ||
- checkout | ||
|
||
- run: | ||
name: Set PATH. | ||
command: | | ||
echo 'export PATH=$HOME/.local/bin:$PATH' >> $BASH_ENV | ||
source $BASH_ENV | ||
- restore_cache: | ||
key: v1-geohash-hilbert-{{ .Environment.CIRCLE_STAGE }}-{{ checksum "pyproject.toml" }}-{{ checksum "setup.cfg" }} | ||
|
||
- run: | ||
name: Pre-install | ||
command: | | ||
pip install --user poetry virtualenv | ||
virtualenv venv | ||
- run: | ||
name: Install | ||
command: | | ||
. venv/bin/activate | ||
poetry install | ||
if [ $WITH_CYTHON -eq 1 ]; then | ||
pip install cython | ||
cythonize -i geohash_hilbert/*.pyx | ||
fi | ||
poetry show | ||
python -c 'import geohash_hilbert as ghh; print(ghh._hilbert.CYTHON_AVAILABLE)' | ||
- save_cache: | ||
key: v1-geohash-hilbert-{{ .Environment.CIRCLE_STAGE }}-{{ checksum "pyproject.toml" }}-{{ checksum "setup.cfg" }} | ||
paths: | ||
- ~/app/venv | ||
- ~/app/poetry.lock | ||
|
||
- store_artifacts: | ||
path: ~/app/poetry.lock | ||
destination: poetry.lock | ||
|
||
- run: | ||
name: Style | ||
command: | | ||
. venv/bin/activate | ||
poetry run flake8 | ||
- run: | ||
name: Test | ||
command: | | ||
. venv/bin/activate | ||
poetry run pytest | ||
- run: | ||
name: Build sdist | ||
command: poetry build -vvv -f sdist | ||
|
||
- store_artifacts: | ||
path: ~/app/dist | ||
destination: dist | ||
|
||
- store_artifacts: | ||
path: ~/app/cov_html | ||
destination: cov_html | ||
|
||
- run: | ||
name: Coverage | ||
command: | | ||
. venv/bin/activate | ||
poetry run coveralls | ||
executors: | ||
python: | ||
working_directory: ~/app | ||
parameters: | ||
image: | ||
type: string | ||
with_cython: | ||
type: integer | ||
environment: | ||
WITH_CYTHON: << parameters.with_cython >> | ||
docker: | ||
- image: << parameters.image >> | ||
|
||
jobs: | ||
test_2_7: | ||
executor: | ||
name: python | ||
image: "circleci/python:2.7.15" | ||
with_cython: 0 | ||
steps: | ||
- tester | ||
test_2_7_cython: | ||
executor: | ||
name: python | ||
image: "circleci/python:2.7.15" | ||
with_cython: 1 | ||
steps: | ||
- tester | ||
test_2_7_pypy: | ||
executor: | ||
name: python | ||
image: "pypy:2-6.0.0" | ||
with_cython: 0 | ||
steps: | ||
- tester | ||
test_2_7_pypy_cython: | ||
executor: | ||
name: python | ||
image: "pypy:2-6.0.0" | ||
with_cython: 1 | ||
steps: | ||
- tester | ||
test_3_5: | ||
executor: | ||
name: python | ||
image: "circleci/python:3.5.6" | ||
with_cython: 0 | ||
steps: | ||
- tester | ||
test_3_5_cython: | ||
executor: | ||
name: python | ||
image: "circleci/python:3.5.6" | ||
with_cython: 1 | ||
steps: | ||
- tester | ||
test_3_5_pypy: | ||
executor: | ||
name: python | ||
image: "pypy:3-6.0.0" | ||
with_cython: 0 | ||
steps: | ||
- tester | ||
test_3_5_pypy_cython: | ||
executor: | ||
name: python | ||
image: "pypy:3-6.0.0" | ||
with_cython: 1 | ||
steps: | ||
- tester | ||
test_3_6: | ||
executor: | ||
name: python | ||
image: "circleci/python:3.6.8" | ||
with_cython: 0 | ||
steps: | ||
- tester | ||
test_3_6_cython: | ||
executor: | ||
name: python | ||
image: "circleci/python:3.6.8" | ||
with_cython: 1 | ||
steps: | ||
- tester | ||
test_3_7: | ||
executor: | ||
name: python | ||
image: "circleci/python:3.7.2" | ||
with_cython: 0 | ||
steps: | ||
- tester | ||
test_3_7_cython: | ||
executor: | ||
name: python | ||
image: "circleci/python:3.7.2" | ||
with_cython: 1 | ||
steps: | ||
- tester | ||
|
||
deploy_job: | ||
docker: | ||
- image: circleci/python:3.6.8 | ||
description: "Deploy geohash-hilbert to pypi." | ||
steps: | ||
- checkout | ||
|
||
- run: | ||
name: Set PATH. | ||
command: | | ||
echo 'export PATH=$HOME/.local/bin:$PATH' >> $BASH_ENV | ||
source $BASH_ENV | ||
- run: | ||
name: Pre-install | ||
command: | | ||
pip install --user poetry | ||
poetry build -vvv -f sdist | ||
poetry publish -vvv -n -u tammoippen -p $PYPI_PASS | ||
workflows: | ||
version: 2.1 | ||
test_and_deploy: | ||
jobs: | ||
- test_2_7: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- test_2_7_cython: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- test_2_7_pypy: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- test_2_7_pypy_cython: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- test_3_5: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- test_3_5_cython: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- test_3_5_pypy: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- test_3_5_pypy_cython: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- test_3_6: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- test_3_6_cython: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- test_3_7: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- test_3_7_cython: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- deploy_job: | ||
requires: | ||
- test_2_7 | ||
- test_2_7_cython | ||
- test_2_7_pypy | ||
- test_2_7_pypy_cython | ||
- test_3_5 | ||
- test_3_5_cython | ||
- test_3_5_pypy | ||
- test_3_5_pypy_cython | ||
- test_3_6 | ||
- test_3_6_cython | ||
- test_3_7 | ||
- test_3_7_cython | ||
filters: | ||
branches: | ||
ignore: /.*/ | ||
tags: | ||
only: /v[0-9]+(\.[0-9]+)*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,5 @@ pyproject.lock | |
poetry.lock | ||
.hypothesis/ | ||
.vscode/ | ||
pip-wheel-metadata/ | ||
.benchmarks/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
[build-system] | ||
requires = ["poetry>=0.12"] | ||
build-backend = "poetry.masonry.api" | ||
|
||
[tool.poetry] | ||
|
||
name = "geohash-hilbert" | ||
version = "1.3.0" | ||
version = "1.3.1" | ||
description = "Geohash a lng/lat coordinate using the hilbert curve." | ||
authors = ["Tammo Ippen <[email protected]>"] | ||
license = "MIT" | ||
|
@@ -41,7 +37,9 @@ python = "~2.7 || ^3.5" | |
|
||
[tool.poetry.dev-dependencies] | ||
|
||
coveralls = "^1.5.1" | ||
flake8 = "^3.5.0" | ||
flake8-bugbear = { version = "^18.8.0", python = "^3.5" } | ||
flake8-commas = "^2.0.0" | ||
flake8-comprehensions = "^1.4.1" | ||
flake8-import-order = "^0.18" | ||
|
@@ -55,5 +53,8 @@ pytest-cov = "^2.5.1" | |
pytest-flake8 = "^1.0.2" | ||
pytest-mccabe = "^0.1" | ||
pytest-pythonpath = "^0.7.3" | ||
python-coveralls = "^2.9.1" | ||
six = "^1.11.0" | ||
|
||
[build-system] | ||
requires = ["poetry>=0.12"] | ||
build-backend = "poetry.masonry.api" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
[flake8] | ||
application_import_names = geohash_hilbert | ||
max-line-length = 159 | ||
max-complexity = 10 | ||
import-order-style = google | ||
exclude = | ||
.venv/ | ||
venv/ | ||
|
||
[tool:pytest] | ||
python_paths = . | ||
addopts = --cov=geohash_hilbert --cov-report=term-missing --flake8 --mccabe -v | ||
addopts = --cov=geohash_hilbert --cov-report term-missing --cov-report html:cov_html --mccabe -v | ||
|
||
[bdist_wheel] | ||
universal = 0 | ||
|
||
[metadata] | ||
description-file = README.md | ||
license_file = LICENSE.txt | ||
description-file = README.md |
Oops, something went wrong.