Skip to content

Commit

Permalink
Update developments tools (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit9126 authored May 29, 2024
1 parent 9a15bf8 commit b33cb28
Show file tree
Hide file tree
Showing 18 changed files with 340 additions and 387 deletions.
8 changes: 0 additions & 8 deletions .flake8

This file was deleted.

14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
strategy:
matrix:
python-version:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- "3.9"
- "3.10"
- "3.11"
- "3.12"

steps:
- uses: actions/checkout@v3
Expand All @@ -27,7 +27,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
cache: "poetry"

- name: Install dependencies
run: |
Expand All @@ -45,7 +45,7 @@ jobs:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.python-version }}
parallel: true
path-to-lcov: './coverage.lcov'
path-to-lcov: "./coverage.lcov"

finish:
needs: tests
Expand All @@ -56,4 +56,4 @@ jobs:
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
path-to-lcov: './coverage.lcov'
path-to-lcov: "./coverage.lcov"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ mapbox_vector_tile.egg-info/
.tox/
.coverage
bench/fgeoms.wkt.zip
node_modules/
39 changes: 15 additions & 24 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,22 @@ repos:
- id: trailing-whitespace
- id: check-toml
- id: detect-private-key
- id: fix-encoding-pragma
args: [ --remove ]
- id: check-merge-conflict
- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.1
- repo: https://github.com/python-poetry/poetry
rev: 1.8.0
hooks:
- id: absolufy-imports
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
- id: poetry-check
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.5
hooks:
- id: pyupgrade
args: [ --py39-plus ]
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
- id: ruff
args: [--fix]
types_or: [python, pyi, jupyter]
- id: ruff-format
types_or: [python, pyi, jupyter]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/asottile/yesqa
rev: v1.5.0
hooks:
- id: yesqa
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
- id: prettier
args: ["--print-width", "120"]
require_serial: true
224 changes: 101 additions & 123 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,175 +1,153 @@
Version 2.1.0
-------------
## Version 2.1.0

*In development*
_In development_

- Drop the support for Python 3.8 and add the support for Python 3.12
- Update the minimum required version for `protobuf`
- Replace Isort, Flake8 and Black by Ruff in the `.pre-commit-config.yaml` file
- Use `prettier` pre-commit tool to prettify Markdown and Yaml files
- Use `poetry-check` pre-commit tool to avoid incompatibilities between `poetry.lock` and `pyproject.toml`

Version 2.0.1
-------------
## Version 2.0.1

* Support previous pre 2.0 encode/decode method signatures with deprecation warning.
- Support previous pre 2.0 encode/decode method signatures with deprecation warning.
[#129](https://github.com/tilezen/mapbox-vector-tile/pull/129)

Version 2.0.0
-------------
## Version 2.0.0

* Drop Python 2 support
* Usage of `tox` for tests
* Add GitHub Actions
* Add pre-commit tool
* Regenerate the vector tile protobuf Python code to solve
- Drop Python 2 support
- Usage of `tox` for tests
- Add GitHub Actions
- Add pre-commit tool
- Regenerate the vector tile protobuf Python code to solve
[#113](https://github.com/tilezen/mapbox-vector-tile/issues/113)
* Support for Python 3.11
* Delete the `round_fn` argument as Python 2 has been dropped
* Use `pyproject.toml` and Poetry to replace the `setup.py` file
* Use `geom_type` property instead of deprecated `type`
* Add the possibility to give a coordinates transformer
* Add a `geojson` option. See [#107](https://github.com/tilezen/mapbox-vector-tile/issues/107)
* Refactor the options using the `per_layer_options` and `default_options` dictionaries.
* Add the option `max_geometry_validate_tries`.
- Support for Python 3.11
- Delete the `round_fn` argument as Python 2 has been dropped
- Use `pyproject.toml` and Poetry to replace the `setup.py` file
- Use `geom_type` property instead of deprecated `type`
- Add the possibility to give a coordinates transformer
- Add a `geojson` option. See [#107](https://github.com/tilezen/mapbox-vector-tile/issues/107)
- Refactor the options using the `per_layer_options` and `default_options` dictionaries.
- Add the option `max_geometry_validate_tries`.

## Version 1.2.1

Version 1.2.1
-------------
- Add the trove classifiers to the setup.py

* Add the trove classifiers to the setup.py
## Version 1.2.0

Version 1.2.0
-------------
- Performance focused release, including:
- Enable Shapely speedups, when available
- Skip inners which cause exceptions
- Union inners in blocks when making valid
- Make benchmark script python3 compatible
- Fix test to support different versions of GEOS

* Performance focused release, including:
* Enable Shapely speedups, when available
* Skip inners which cause exceptions
* Union inners in blocks when making valid
* Make benchmark script python3 compatible
* Fix test to support different versions of GEOS
## Version 1.1.0

Version 1.1.0
-------------
- Include LICENSE & CHANGELOG.md in sdist tarballs
- Refactor geometry encoding logic, including skipping tiny geometries
- Decoded geometry is now geojson-ish dict
- Winding order is now optional
- Add benchmarking around round function and document how to improve performance
- Document performance tip for protobuf encoding with C bindings for Debian

* Include LICENSE & CHANGELOG.md in sdist tarballs
* Refactor geometry encoding logic, including skipping tiny geometries
* Decoded geometry is now geojson-ish dict
* Winding order is now optional
* Add benchmarking around round function and document how to improve performance
* Document performance tip for protobuf encoding with C bindings for Debian
## Version 1.0.0

Version 1.0.0
-------------
- Generate more valid polygons and multipolygons using [pyclipper](https://pypi.python.org/pypi/pyclipper) library for v2 MVT compliance (but we're still not fully v2 compliant for [other](https://github.com/tilezen/mapbox-vector-tile/issues/42) reasons).
- Handle edge cases where polygon buffer makes a multi-polygon, ensuring inner rings are dropped when subtracting them from the polygon would make it invalid, and not adding multipolygons as array elements for multipolygon constructor.
- Calculate area more properly by using PolyTree result from Clipper.
- Factor out polygon validity code into its own file.

* Generate more valid polygons and multipolygons using [pyclipper](https://pypi.python.org/pypi/pyclipper) library for v2 MVT compliance (but we're still not fully v2 compliant for [other](https://github.com/tilezen/mapbox-vector-tile/issues/42) reasons).
* Handle edge cases where polygon buffer makes a multi-polygon, ensuring inner rings are dropped when subtracting them from the polygon would make it invalid, and not adding multipolygons as array elements for multipolygon constructor.
* Calculate area more properly by using PolyTree result from Clipper.
* Factor out polygon validity code into its own file.
## Version 0.5.0

Version 0.5.0
-------------
- Improved results from `on_invalid_geometry_make_valid` when the geometry is self-crossing. It was possible for large parts of the geometry to be discarded, and it is now less likely. See [PR 66](https://github.com/tilezen/mapbox-vector-tile/pull/66) for more information.

* Improved results from `on_invalid_geometry_make_valid` when the geometry is self-crossing. It was possible for large parts of the geometry to be discarded, and it is now less likely. See [PR 66](https://github.com/tilezen/mapbox-vector-tile/pull/66) for more information.
## Version 0.4.0

Version 0.4.0
-------------
- Custom rounding functions: a `round_fn` parameter was added to the `encode` function, which allows control over how floating point coordinates are transformed to integer ones. See [PR 55](https://github.com/tilezen/mapbox-vector-tile/pull/55).
- Custom validity functions: an `on_invalid_geometry` parameter was added to the `encode` function, which is called when invalid geometry is found, or created through coordinate rounding. See [PR 46](https://github.com/tilezen/mapbox-vector-tile/pull/46).
- Winding order bug fix: See [issue 57](https://github.com/tilezen/mapbox-vector-tile/issues/57) and [PR 59](https://github.com/tilezen/mapbox-vector-tile/pull/59).
- Performance improvements: including a 2x speedup from using `tuple`s instead of `dict`s for coordinates, see [PR 56](https://github.com/tilezen/mapbox-vector-tile/pull/56).
- Improvements to PY3 compatibility: See [PR 52](https://github.com/tilezen/mapbox-vector-tile/pull/52).

* Custom rounding functions: a `round_fn` parameter was added to the `encode` function, which allows control over how floating point coordinates are transformed to integer ones. See [PR 55](https://github.com/tilezen/mapbox-vector-tile/pull/55).
* Custom validity functions: an `on_invalid_geometry` parameter was added to the `encode` function, which is called when invalid geometry is found, or created through coordinate rounding. See [PR 46](https://github.com/tilezen/mapbox-vector-tile/pull/46).
* Winding order bug fix: See [issue 57](https://github.com/tilezen/mapbox-vector-tile/issues/57) and [PR 59](https://github.com/tilezen/mapbox-vector-tile/pull/59).
* Performance improvements: including a 2x speedup from using `tuple`s instead of `dict`s for coordinates, see [PR 56](https://github.com/tilezen/mapbox-vector-tile/pull/56).
* Improvements to PY3 compatibility: See [PR 52](https://github.com/tilezen/mapbox-vector-tile/pull/52).
## Version 0.3.0

Version 0.3.0
-------------
- python3 compatability improvements
- travis integration
- documentation updates
- insert CMD_SEG_END for MultiPolygons
- decode multipolygons correctly
- encode tiles using version 1

* python3 compatability improvements
* travis integration
* documentation updates
* insert CMD_SEG_END for MultiPolygons
* decode multipolygons correctly
* encode tiles using version 1
## Version 0.2.1

Version 0.2.1
-------------
- include README.md in distribution to fix install

* include README.md in distribution to fix install
## Version 0.2.0

Version 0.2.0
-------------
- python3 updates
- enforce winding order on multipolygons
- update key/val handling
- round floating point values instead of truncating
- add option to quantize bounds
- add option to flip y coord system
- add ability to pass custom extents

* python3 updates
* enforce winding order on multipolygons
* update key/val handling
* round floating point values instead of truncating
* add option to quantize bounds
* add option to flip y coord system
* add ability to pass custom extents
## Version 0.1.0

Version 0.1.0
-------------
- Add compatibility with python 3
- Handle multipolygons as single features
- Use winding order from mapbox vector tile 2.0 spec
- Support custom extents when decoding

* Add compatibility with python 3
* Handle multipolygons as single features
* Use winding order from mapbox vector tile 2.0 spec
* Support custom extents when decoding
## Version 0.0.11

Version 0.0.11
--------------
- Decode string keys to utf-8

* Decode string keys to utf-8
## Version 0.0.10

Version 0.0.10
--------------
- Allow encoder to accept shapely objects directly

* Allow encoder to accept shapely objects directly
## Version 0.0.9

Version 0.0.9
-------------
- Handle tiles from java-vector-tile (zero pad binary integers)
- Update README

* Handle tiles from java-vector-tile (zero pad binary integers)
* Update README
## Version 0.0.8

Version 0.0.8
-------------
- Handle unicode properties

* Handle unicode properties
## Version 0.0.7

Version 0.0.7
-------------
- Update id handling behavior

* Update id handling behavior
## Version 0.0.6

Version 0.0.6
-------------
- Explode multipolygons into several features
- https://github.com/tilezen/mapbox-vector-tile/issues/4
- Resolve issue when id is passed in
- More tests

* Explode multipolygons into several features
* https://github.com/tilezen/mapbox-vector-tile/issues/4
* Resolve issue when id is passed in
* More tests
## Version 0.0.5

Version 0.0.5
-------------
- Removing the option of encoding floats in big endian
- Updated tests

* Removing the option of encoding floats in big endian
* Updated tests
## Version 0.0.4

Version 0.0.4
-------------
- Bug fix - does not try to load wkt geom if wkb succeeds

* Bug fix - does not try to load wkt geom if wkb succeeds
## Version 0.0.3

Version 0.0.3
-------------
- Option to encode floats in little endian

* Option to encode floats in little endian
## Version 0.0.2

Version 0.0.2
-------------
- WKT Support
- Better Documentation
- More tests

* WKT Support
* Better Documentation
* More tests
## Version 0.0.1

Version 0.0.1
-------------

* Initial release
- Initial release
Loading

0 comments on commit b33cb28

Please sign in to comment.