-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from cogeotiff/shapesEncoder
encode shapes
- Loading branch information
Showing
15 changed files
with
407 additions
and
194 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: CI | ||
|
||
# On every pull request, but only on push to master | ||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '*' | ||
pull_request: | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install tox codecov pre-commit | ||
# Run tox using the version of Python in `PATH` | ||
- name: Run Tox | ||
run: tox -e py | ||
|
||
# Run pre-commit (only for python-3.7) | ||
- name: run pre-commit | ||
if: matrix.python-version == 3.7 | ||
run: pre-commit run --all-files | ||
|
||
- name: Upload Results | ||
if: success() | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
file: ./coverage.xml | ||
flags: unittests | ||
name: ${{ matrix.platform }}-${{ matrix.tox-env }} | ||
fail_ci_if_error: false | ||
|
||
publish: | ||
needs: [tests] | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install tox | ||
- name: Set tag version | ||
id: tag | ||
# https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions | ||
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | ||
|
||
- name: Set module version | ||
id: module | ||
# https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions | ||
run: echo ::set-output name=version::$(python setup.py --version) | ||
|
||
- name: Build and publish | ||
if: steps.tag.outputs.tag == steps.module.outputs.version | ||
env: | ||
TOXENV: release | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: tox |
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,34 +1,44 @@ | ||
|
||
repos: | ||
- | ||
repo: 'https://github.com/ambv/black' | ||
# 18.6b1 | ||
rev: ed50737290662f6ef4016a7ea44da78ee1eff1e2 | ||
hooks: | ||
- id: black | ||
args: ['--safe'] | ||
language_version: python3.6 | ||
- | ||
repo: 'https://github.com/pre-commit/pre-commit-hooks' | ||
# v1.3.0 | ||
rev: a6209d8d4f97a09b61855ea3f1fb250f55147b8b | ||
hooks: | ||
- id: flake8 | ||
language_version: python3.6 | ||
args: [ | ||
# E501 let black handle all line length decisions | ||
# W503 black conflicts with "line break before operator" rule | ||
# E203 black conflicts with "whitespace before ':'" rule | ||
'--ignore=E501,W503,E203'] | ||
- | ||
repo: 'https://github.com/chewse/pre-commit-mirrors-pydocstyle' | ||
# 2.1.1 | ||
rev: 22d3ccf6cf91ffce3b16caa946c155778f0cb20f | ||
hooks: | ||
- id: pydocstyle | ||
language_version: python3.6 | ||
args: [ | ||
# Check for docstring presence only | ||
'--select=D1', | ||
# Don't require docstrings for tests | ||
'--match=(?!test).*\.py'] | ||
- repo: https://github.com/psf/black | ||
rev: 19.10b0 | ||
hooks: | ||
- id: black | ||
language_version: python3.7 | ||
args: ["--safe"] | ||
|
||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.4.2 | ||
hooks: | ||
- id: isort | ||
language_version: python3.7 | ||
|
||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 3.8.3 | ||
hooks: | ||
- id: flake8 | ||
language_version: python3.7 | ||
args: [ | ||
# E501 let black handle all line length decisions | ||
# W503 black conflicts with "line break before operator" rule | ||
# E203 black conflicts with "whitespace before ':'" rule | ||
"--ignore=E501,W503,E203", | ||
] | ||
|
||
- repo: https://github.com/PyCQA/pydocstyle | ||
rev: 5.1.1 | ||
hooks: | ||
- id: pydocstyle | ||
language_version: python3.7 | ||
args: [ | ||
# Check for docstring presence only | ||
"--select=D1", | ||
# Don't require docstrings for tests | ||
'--match=(?!test).*\.py', | ||
] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.770 | ||
hooks: | ||
- id: mypy | ||
language_version: python3.7 | ||
args: ["--no-strict-optional", "--ignore-missing-imports"] |
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,16 @@ | ||
## Next (TBD) | ||
|
||
* update tests for new vector-tile-base version | ||
* add `shapes` encoding (add shapely and rasterio in requirements). | ||
|
||
**breaking changes** | ||
|
||
* renamed `mvt.encoder` to `mvt.pixels_encoder` | ||
|
||
## 0.0.1dev1 (2019-06-25) | ||
|
||
* Fix missing files in package | ||
|
||
## 0.0.1dev0 (2019-06-24) | ||
|
||
* Initial release. |
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
Oops, something went wrong.