Skip to content

Commit d0b4bb4

Browse files
committed
update for 0.2.0
1 parent 3508904 commit d0b4bb4

File tree

7 files changed

+73
-52
lines changed

7 files changed

+73
-52
lines changed

.github/workflows/ci.yml

+28-20
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,43 @@ on:
99
- '*'
1010
pull_request:
1111
env:
12-
LATEST_PY_VERSION: '3.9'
12+
LATEST_PY_VERSION: '3.13'
1313

1414
jobs:
1515
tests:
1616
runs-on: ubuntu-latest
1717
strategy:
1818
matrix:
19-
python-version: ['3.7', '3.8', '3.9']
19+
python-version:
20+
- '3.9'
21+
- '3.10'
22+
- '3.11'
23+
- '3.12'
24+
- '3.13'
2025

2126
steps:
22-
- uses: actions/checkout@v2
27+
- uses: actions/checkout@v4
2328
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v2
29+
uses: actions/setup-python@v5
2530
with:
2631
python-version: ${{ matrix.python-version }}
2732
- name: Install dependencies
2833
run: |
2934
python -m pip install --upgrade pip
30-
python -m pip install tox
31-
32-
# Run tox using the version of Python in `PATH`
33-
- name: Run Tox
34-
run: tox -e py
35+
python -m pip install -e ".[test]"
3536
3637
- name: Run pre-commit
3738
if: ${{ matrix.python-version == env.LATEST_PY_VERSION }}
3839
run: |
3940
python -m pip install pre-commit
4041
pre-commit run --all-files
4142
43+
- name: Run tests
44+
run: python -m pytest --cov rio_tiler_mvt --cov-report xml --cov-report term-missing -s -vv
45+
4246
- name: Upload Results
4347
if: ${{ matrix.python-version == env.LATEST_PY_VERSION }}
44-
uses: codecov/codecov-action@v1
48+
uses: codecov/codecov-action@v4
4549
with:
4650
file: ./coverage.xml
4751
flags: unittests
@@ -53,31 +57,35 @@ jobs:
5357
runs-on: ubuntu-latest
5458
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
5559
steps:
56-
- uses: actions/checkout@v2
60+
- uses: actions/checkout@v4
5761
- name: Set up Python
58-
uses: actions/setup-python@v1
62+
uses: actions/setup-python@v5
5963
with:
6064
python-version: ${{ env.LATEST_PY_VERSION }}
6165

6266
- name: Install dependencies
6367
run: |
6468
python -m pip install --upgrade pip
65-
python -m pip install tox numpy cython
69+
python -m pip install numpy cython wheel setuptools twine
6670
6771
- name: Set tag version
6872
id: tag
69-
# https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions
70-
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
73+
run: |
74+
echo "version=${GITHUB_REF#refs/*/}"
75+
echo "version=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
7176
7277
- name: Set module version
7378
id: module
74-
# https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions
75-
run: echo ::set-output name=version::$(python setup.py --version)
79+
run: |
80+
hatch --quiet version
81+
echo "version=$(python setup.py --version)" >> $GITHUB_OUTPUT
82+
83+
- name: Build sdist
84+
run: python setup.py sdist
7685

7786
- name: Build and publish
78-
if: steps.tag.outputs.tag == steps.module.outputs.version
87+
if: ${{ steps.tag.outputs.version }} == ${{ steps.module.outputs.version}}
7988
env:
80-
TOXENV: release
8189
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
8290
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
83-
run: tox
91+
run: twine upload --skip-existing dist/*

.pre-commit-config.yaml

+7-18
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,19 @@
11
repos:
2-
- repo: https://github.com/psf/black
3-
rev: 22.3.0
4-
hooks:
5-
- id: black
6-
language_version: python
7-
82
- repo: https://github.com/PyCQA/isort
9-
rev: 5.4.2
3+
rev: 5.13.2
104
hooks:
115
- id: isort
126
language_version: python
137

14-
- repo: https://github.com/PyCQA/flake8
15-
rev: 3.8.3
8+
- repo: https://github.com/astral-sh/ruff-pre-commit
9+
rev: v0.3.5
1610
hooks:
17-
- id: flake8
18-
language_version: python
19-
20-
- repo: https://github.com/PyCQA/pydocstyle
21-
rev: 6.1.1
22-
hooks:
23-
- id: pydocstyle
24-
language_version: python
11+
- id: ruff
12+
args: ["--fix"]
13+
- id: ruff-format
2514

2615
- repo: https://github.com/pre-commit/mirrors-mypy
27-
rev: v0.812
16+
rev: v1.9.0
2817
hooks:
2918
- id: mypy
3019
language_version: python

CHANGES.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.2.0 (2025-01-20)
2+
3+
* update python versions support
4+
15
## 0.1.0 (2022-08-08)
26

37
* Fix polygon and point coordinates in `pixels_encoder`

rio_tiler_mvt/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
from rio_tiler_mvt.mvt import pixels_encoder, shapes_encoder # noqa
44

5-
__version__ = "0.1.0"
5+
__version__ = "0.2.0"

rio_tiler_mvt/mvt.pyx

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
import warnings
44

55
import numpy
6-
cimport numpy
76

8-
from vtzero.tile import Tile, Layer, Point, Polygon
7+
cimport numpy
98

109
from rasterio._features import _shapes
1110
from rasterio.rio.helpers import coords
1211
from rasterio.transform import IDENTITY
1312
from shapely import geometry
13+
from vtzero.tile import Layer, Point, Polygon, Tile
1414

1515

1616
cpdef bytes pixels_encoder(

setup.cfg

+25-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[bumpversion]
2-
current_version = 0.1.0
2+
current_version = 0.2.0
33
commit = True
44
tag = True
55
tag_name = {new_version}
6-
parse =
6+
parse =
77
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
88
((?P<pre>a|b|rc|dev)(?P<prenum>\d+))?
9-
serialize =
9+
serialize =
1010
{major}.{minor}.{patch}{pre}{prenum}
1111
{major}.{minor}.{patch}
1212

@@ -17,10 +17,6 @@ replace = __version__ = "{new_version}"
1717
[metadata]
1818
version = attr: rio_tiler_mvt.__version__
1919

20-
[flake8]
21-
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist
22-
max-line-length = 90
23-
2420
[mypy]
2521
no_strict_optional = True
2622
ignore_missing_imports = True
@@ -30,3 +26,25 @@ profile = black
3026
known_first_party = rio_tiler_mvt
3127
known_third_party = rasterio,vtzero,shapely
3228
default_section = THIRDPARTY
29+
30+
[tool.ruff]
31+
line-length = 90
32+
33+
[tool.ruff.lint]
34+
select = [
35+
"D1", # pydocstyle errors
36+
"E", # pycodestyle errors
37+
"W", # pycodestyle warnings
38+
"F", # flake8
39+
"C", # flake8-comprehensions
40+
"B", # flake8-bugbear
41+
]
42+
ignore = [
43+
"E501", # line too long, handled by black
44+
"B008", # do not perform function calls in argument defaults
45+
"B905", # ignore zip() without an explicit strict= parameter, only support with python >3.10
46+
"B028",
47+
]
48+
49+
[tool.ruff.lint.mccabe]
50+
max-complexity = 12

setup.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,16 @@
3131
description="""A rio-tiler plugin to encode tile array to MVT""",
3232
long_description=long_description,
3333
long_description_content_type="text/markdown",
34-
python_requires=">=3.7",
34+
python_requires=">=3.9",
3535
classifiers=[
3636
"Intended Audience :: Information Technology",
3737
"Intended Audience :: Science/Research",
38-
"License :: OSI Approved :: BSD License",
38+
"License :: OSI Approved :: MIT License",
3939
"Programming Language :: Python :: 3.9",
40-
"Programming Language :: Python :: 3.8",
41-
"Programming Language :: Python :: 3.7",
40+
"Programming Language :: Python :: 3.10",
41+
"Programming Language :: Python :: 3.11",
42+
"Programming Language :: Python :: 3.12",
43+
"Programming Language :: Python :: 3.13",
4244
"Topic :: Scientific/Engineering :: GIS",
4345
],
4446
keywords="COG MVT mapbox vectortile GIS",

0 commit comments

Comments
 (0)