From 0c24c98549d4479caccbfed3e2ff1ce83d125459 Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Wed, 16 Jun 2021 14:49:04 +0200 Subject: [PATCH 01/21] fix missing cython for publish job --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e613b00..31c9560 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install tox + python -m pip install tox setuptools cython>=0.29.23 git submodule update --init - name: Set tag version From de597b1f73ebd97ae0e876709dbabfa508d22437 Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Wed, 16 Jun 2021 16:01:41 +0200 Subject: [PATCH 02/21] add missing language_level --- vtzero/cvtzero.pxd | 2 ++ vtzero/tile.pyx | 2 ++ 2 files changed, 4 insertions(+) diff --git a/vtzero/cvtzero.pxd b/vtzero/cvtzero.pxd index 90563e2..75a42af 100644 --- a/vtzero/cvtzero.pxd +++ b/vtzero/cvtzero.pxd @@ -1,3 +1,5 @@ +# cython: language_level=3 + from libc.stdint cimport uint32_t, uint64_t, int32_t from libcpp.string cimport string from libcpp cimport bool diff --git a/vtzero/tile.pyx b/vtzero/tile.pyx index 517d8e7..76cf88d 100644 --- a/vtzero/tile.pyx +++ b/vtzero/tile.pyx @@ -1,3 +1,5 @@ +# cython: language_level=3 + """vtzero.tile module.""" cimport cvtzero From 9a890467c378267bdc05427fcfb7d58503f7ab00 Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Wed, 16 Jun 2021 16:35:11 +0200 Subject: [PATCH 03/21] update tox dependencies --- tox.ini | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tox.ini b/tox.ini index 6109c75..4b13f05 100644 --- a/tox.ini +++ b/tox.ini @@ -14,9 +14,8 @@ commands= [testenv:wheel] deps = + {[testenv]deps} wheel - setuptools - cython>=0.29.23 skip_install = true extras = commands = @@ -27,8 +26,7 @@ commands = basepython = python3 skip_install = true deps = - wheel - setuptools + {[testenv:wheel]deps} commands = python setup.py sdist @@ -36,7 +34,7 @@ commands = basepython = python3 skip_install = true deps = - {[testenv:build]deps} + {[testenv:wheel]deps} twine >= 1.5.0 commands = {[testenv:build]commands} From a6c1cae7ed23f7d445c93c88ace12257da70548a Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Wed, 16 Jun 2021 16:46:50 +0200 Subject: [PATCH 04/21] add tox env --- tox.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tox.ini b/tox.ini index 4b13f05..50c1522 100644 --- a/tox.ini +++ b/tox.ini @@ -31,6 +31,9 @@ commands = python setup.py sdist [testenv:release] +setenv = + TWINE_USERNAME = {env:TWINE_USERNAME} + TWINE_PASSWORD = {env:TWINE_PASSWORD} basepython = python3 skip_install = true deps = From d85a55387a15c69b149915beab8ce738ed3de0e3 Mon Sep 17 00:00:00 2001 From: Marcel Schneider Date: Tue, 29 Mar 2022 09:50:30 +0200 Subject: [PATCH 05/21] Update vtzero and dependencies Building vtzero failes with gcc >=11 (see mapbox/vtzero#52). Updating vtzero to latest master fixes this (the latest version does not yet fix this). In this move the other dependencies are updated to their respective latest versions. Fixes tilery/python-vtzero#21 --- vendor/mvt-fixtures | 2 +- vendor/protozero | 2 +- vendor/vtzero | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vendor/mvt-fixtures b/vendor/mvt-fixtures index aeeb6ff..665ee9c 160000 --- a/vendor/mvt-fixtures +++ b/vendor/mvt-fixtures @@ -1 +1 @@ -Subproject commit aeeb6ff59fcd09a152d99506a2f87b353ec65dc8 +Subproject commit 665ee9c752f20df1ca21a1906836e9c7f962ed68 diff --git a/vendor/protozero b/vendor/protozero index aa8b304..f379578 160000 --- a/vendor/protozero +++ b/vendor/protozero @@ -1 +1 @@ -Subproject commit aa8b304cf63831589f52c254b5af2c688bdc2fc4 +Subproject commit f379578a3f7c8162aac0ac31c2696de09a5b5f93 diff --git a/vendor/vtzero b/vendor/vtzero index 5e70144..646e997 160000 --- a/vendor/vtzero +++ b/vendor/vtzero @@ -1 +1 @@ -Subproject commit 5e70144a3a2ea1231b6e271ec75b6d49198eaa67 +Subproject commit 646e99739dbc2b37c825935aace91c5db05ca42d From f2003ee387ecc2a6d1409c853853debcf0c8f627 Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Tue, 25 Oct 2022 10:28:27 +0200 Subject: [PATCH 06/21] add pre-commit and cibuildwheel --- .flake8 | 4 ++ .github/workflows/build.yml | 82 +++++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 76 +++++++++++++++------------------- .pre-commit-config.yaml | 27 ++++++++++++ example/__init__.py | 12 +++--- pyproject.toml | 14 +++++-- setup.py | 44 ++++++++++---------- tests/test_fixtures.py | 19 +++++---- tests/test_tile.py | 65 +++++++++++++++++++---------- tox.ini | 44 -------------------- vendor/mvt-fixtures | 2 +- vendor/protozero | 2 +- vendor/vtzero | 2 +- vtzero/cvtzero.pxd | 4 +- vtzero/tile.pyx | 5 ++- vtzero/version.py | 2 +- 16 files changed, 248 insertions(+), 156 deletions(-) create mode 100644 .flake8 create mode 100644 .github/workflows/build.yml create mode 100644 .pre-commit-config.yaml delete mode 100644 tox.ini diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..d2e91c6 --- /dev/null +++ b/.flake8 @@ -0,0 +1,4 @@ +[flake8] +ignore = E501,W503,E203 +exclude = .git,__pycache__,docs/source/conf.py,old,build,dist +max-line-length = 90 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a9abe9d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,82 @@ +name: Build +on: + push: + tags: + - '*' + workflow_run: + workflows: [CI] + types: [completed] + +jobs: + build_wheels: + if: ${{ github.event.workflow_run.conclusion == 'success' }} + name: ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + - uses: actions/checkout@v3 + + # Used to host cibuildwheel + - uses: actions/setup-python@v4 + + - name: Install cibuildwheel + run: python -m pip install cibuildwheel==2.11.1 + + - name: Install dependencies + run: | + git submodule update --init + + - name: Build wheels + run: python -m cibuildwheel --output-dir wheelhouse + env: + CIBW_SKIP: 'pp*' + CIBW_ARCHS_LINUX: auto aarch64 + CIBW_ARCHS_MACOS: auto universal2 + + - uses: actions/upload-artifact@v3 + with: + path: ./wheelhouse + + build_sdist: + if: ${{ github.event.workflow_run.conclusion == 'success' }} + name: Build source distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v4 + name: Install Python + with: + python-version: '3.10' + + - name: Install dependencies + run: | + python -m pip install numpy Cython + git submodule update --init + + - name: Build sdist + run: python setup.py sdist + + - uses: actions/upload-artifact@v3 + with: + path: dist/*.tar.gz + + upload_pypi: + needs: [build_wheels, build_sdist] + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v2 + with: + name: artifact + path: dist + + - uses: pypa/gh-action-pypi-publish@master + with: + user: ${{ secrets.PYPI_USERNAME }} + password: ${{ secrets.PYPI_PASSWORD }} + # To test: + repository_url: https://test.pypi.org/legacy/ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36f5f02..39a7b90 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,59 +11,49 @@ on: jobs: tests: - runs-on: ubuntu-latest + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: - python-version: [3.5, 3.6, 3.7, 3.8, 3.9] + include: + - {name: Windows, python: '3.10', os: windows-latest} + - {name: Mac, python: '3.10', os: macos-latest} + - {name: 'Ubuntu', python: '3.10', os: ubuntu-latest} + - {name: '3.11', python: '3.11.0-rc.2 - 3.11', os: ubuntu-latest} + - {name: '3.9', python: '3.9', os: ubuntu-latest} + - {name: '3.8', python: '3.8', os: ubuntu-latest} + - {name: '3.7', python: '3.7', os: ubuntu-latest} + - {name: '3.6', python: '3.6', os: ubuntu-latest} + - {name: '3.5', python: '3.5', os: ubuntu-latest} steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python }} + uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ matrix.python }} - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install tox git submodule update --init + python -m pip install -e .["test"] - # Run tox using the version of Python in `PATH` - - name: Run Tox - run: tox -e py - - 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 + - name: Run pre-commit + if: ${{ matrix.name == 'Ubuntu' }} run: | - python -m pip install --upgrade pip - python -m pip install tox setuptools cython>=0.29.23 - git submodule update --init - python setup.py build_ext --inplace - - - 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/*/} + python -m pip install pre-commit + pre-commit run --all-files - - 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: Run Tests + run: | + python -m pytest --cov rio_color --cov-report xml --cov-report term-missing - - 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 + - name: Upload Results + if: ${{ matrix.name == 'Ubuntu' }} + uses: codecov/codecov-action@v1 + with: + file: ./coverage.xml + flags: unittests + name: ${{ matrix.python }} + fail_ci_if_error: false diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..a248dcd --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,27 @@ +repos: + - repo: https://github.com/psf/black + rev: 22.3.0 + hooks: + - id: black + language_version: python + args: [--safe] + + - repo: https://github.com/PyCQA/isort + rev: 5.10.1 + hooks: + - id: isort + language_version: python + + - repo: https://github.com/PyCQA/flake8 + rev: 5.0.4 + hooks: + - id: flake8 + language_version: python + + - repo: https://github.com/PyCQA/pydocstyle + rev: 6.1.1 + hooks: + - id: pydocstyle + language_version: python + additional_dependencies: + - toml diff --git a/example/__init__.py b/example/__init__.py index f65ef81..4baf8e1 100644 --- a/example/__init__.py +++ b/example/__init__.py @@ -1,17 +1,19 @@ -from vtzero.tile import VectorTile, Tile, Layer, Point, Polygon, Linestring +"""Example of python-vtzero usage.""" + +from vtzero.tile import Layer, Linestring, Point, Polygon, Tile, VectorTile # Create MVT tile = Tile() # Add a layer -layer = Layer(tile, b'my_layer') +layer = Layer(tile, b"my_layer") # Add a point feature = Point(layer) feature.add_points(1) feature.set_point(10, 10) -feature.add_property(b'foo', b'bar') -feature.add_property(b'x', b'y') +feature.add_property(b"foo", b"bar") +feature.add_property(b"x", b"y") feature.commit() # Add a polygon @@ -47,4 +49,4 @@ if f.geometry_type == 0: break features.append(f) -print(f"Nb Features: {len(features)}") \ No newline at end of file +print(f"Nb Features: {len(features)}") diff --git a/pyproject.toml b/pyproject.toml index 6cee20f..ae88cde 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,6 +2,14 @@ requires = ["setuptools>=40.8.0", "wheel", "Cython>=0.29.23"] build-backend = "setuptools.build_meta" -[tool.flake8] -exclude = ".git,__pycache__,docs/source/conf.py,old,build,dist" -max-line-length = 90 +[tool.isort] +profile = "black" +known_first_party = ["vtzero"] +default_section = "THIRDPARTY" + +[tool.mypy] +no_strict_optional = "True" + +[tool.pydocstyle] +select = "D1" +match = "(?!test).*.py" diff --git a/setup.py b/setup.py index cdf2263..5b27fd0 100644 --- a/setup.py +++ b/setup.py @@ -1,19 +1,19 @@ """python-vtzero setup.""" +from Cython.Build import cythonize from setuptools import setup from setuptools.extension import Extension -from Cython.Build import cythonize with open("README.md") as f: long_description = f.read() ext_options = { - 'include_dirs': ['./vendor/vtzero/include', './vendor/protozero/include'], - 'extra_compile_args': ['-O2', '-std=c++11'] + "include_dirs": ["./vendor/vtzero/include", "./vendor/protozero/include"], + "extra_compile_args": ["-O2", "-std=c++11"], } -ext_modules = cythonize([ - Extension('vtzero.tile', ['vtzero/tile.pyx'], language="c++", **ext_options) -]) +ext_modules = cythonize( + [Extension("vtzero.tile", ["vtzero/tile.pyx"], language="c++", **ext_options)] +) extra_reqs = { "test": ["pytest"], @@ -21,27 +21,27 @@ setup( - name='vtzero', - description='Python wrapper for vtzero C++ library.', + name="vtzero", + description="Python wrapper for vtzero C++ library.", long_description=long_description, long_description_content_type="text/markdown", classifiers=[ - 'License :: OSI Approved :: MIT License', - 'Intended Audience :: Developers', - 'Programming Language :: Python :: 3', - 'Operating System :: POSIX', - 'Environment :: Web Environment', - 'Development Status :: 2 - Pre-Alpha', - 'Topic :: Scientific/Engineering :: GIS' + "License :: OSI Approved :: MIT License", + "Intended Audience :: Developers", + "Programming Language :: Python :: 3", + "Operating System :: POSIX", + "Environment :: Web Environment", + "Development Status :: 2 - Pre-Alpha", + "Topic :: Scientific/Engineering :: GIS", ], - keywords='mvt mapbox vector tile gis', - platforms=['POSIX'], - author='Yohan Boniface', - author_email='yohan.boniface@data.gouv.fr', - license='MIT', - packages=['vtzero'], + keywords="mvt mapbox vector tile gis", + platforms=["POSIX"], + author="Yohan Boniface", + author_email="yohan.boniface@data.gouv.fr", + license="MIT", + packages=["vtzero"], ext_modules=ext_modules, - provides=['vtzero'], + provides=["vtzero"], include_package_data=True, extras_require=extra_reqs, ) diff --git a/tests/test_fixtures.py b/tests/test_fixtures.py index 77c56ce..1bedc80 100644 --- a/tests/test_fixtures.py +++ b/tests/test_fixtures.py @@ -1,11 +1,11 @@ import json from pathlib import Path -from vtzero.tile import VectorTile - import pytest -ROOT = Path(__file__).parent.parent / 'vendor/mvt-fixtures/fixtures' +from vtzero.tile import VectorTile + +ROOT = Path(__file__).parent.parent / "vendor/mvt-fixtures/fixtures" # Magic: Generate tests from yml. # def pytest_generate_tests(metafunc): @@ -28,13 +28,14 @@ def fixture(): def _(id): path = ROOT / id - with (path / 'info.json').open('r') as f: + with (path / "info.json").open("r") as f: info = json.loads(f.read()) - with (path / 'tile.json').open('r') as f: + with (path / "tile.json").open("r") as f: data = json.loads(f.read()) - with (path / 'tile.mvt').open('rb') as f: + with (path / "tile.mvt").open("rb") as f: mvt = f.read() return info, data, mvt + return _ @@ -42,7 +43,7 @@ def first_feature(tile): assert not tile.empty() assert len(tile) == 1 layer = next(tile) - assert layer.name == b'hello' + assert layer.name == b"hello" assert layer.version == 2 assert layer.extent == 4096 assert len(layer) == 1 @@ -50,14 +51,14 @@ def first_feature(tile): def test_empty_tile(fixture): - info, data, mvt = fixture('001') + info, data, mvt = fixture("001") tile = VectorTile(mvt) assert tile.empty() assert len(tile) == 0 def test_single_point_without_id(fixture): - info, data, mvt = fixture('002') + info, data, mvt = fixture("002") tile = VectorTile(mvt) feature = first_feature(tile) assert not feature.has_id() diff --git a/tests/test_tile.py b/tests/test_tile.py index 54904ca..eccbaa6 100644 --- a/tests/test_tile.py +++ b/tests/test_tile.py @@ -1,23 +1,26 @@ -from vtzero.tile import Tile, Layer, Point, Polygon, Linestring +from vtzero.tile import Layer, Linestring, Point, Polygon, Tile def test_point_encoding(): """Test creation of point feature.""" tile = Tile() - points = Layer(tile, b'points') + points = Layer(tile, b"points") feature = Point(points) feature.add_points(1) feature.set_point(10, 10) - feature.add_property(b'foo', b'bar') - feature.add_property(b'x', b'y') + feature.add_property(b"foo", b"bar") + feature.add_property(b"x", b"y") feature.commit() - assert tile.serialize() == b'\x1a0x\x02\n\x06points(\x80 \x12\r\x18\x01"\x03\t\x14\x14\x12\x04\x00\x00\x01\x01\x1a\x03foo\x1a\x01x"\x05\n\x03bar"\x03\n\x01y' # noqa + assert ( + tile.serialize() + == b'\x1a0x\x02\n\x06points(\x80 \x12\r\x18\x01"\x03\t\x14\x14\x12\x04\x00\x00\x01\x01\x1a\x03foo\x1a\x01x"\x05\n\x03bar"\x03\n\x01y' + ) # noqa def test_polygon_encoding(): """Test creation of polygon feature.""" tile = Tile() - poly = Layer(tile, b'polygon') + poly = Layer(tile, b"polygon") feature = Polygon(poly) feature.add_ring(5) feature.set_point(0, 0) @@ -25,15 +28,18 @@ def test_polygon_encoding(): feature.set_point(10, 10) feature.set_point(0, 10) feature.set_point(0, 0) - feature.add_property(b'foo', b'bar') + feature.add_property(b"foo", b"bar") feature.commit() - assert tile.serialize() == b'\x1a/x\x02\n\x07polygon(\x80 \x12\x13\x18\x03"\x0b\t\x00\x00\x1a\x14\x00\x00\x14\x13\x00\x0f\x12\x02\x00\x00\x1a\x03foo"\x05\n\x03bar' # noqa + assert ( + tile.serialize() + == b'\x1a/x\x02\n\x07polygon(\x80 \x12\x13\x18\x03"\x0b\t\x00\x00\x1a\x14\x00\x00\x14\x13\x00\x0f\x12\x02\x00\x00\x1a\x03foo"\x05\n\x03bar' + ) # noqa def test_polygon_encoding_close_ring(): """Test creation of polygon feature with 'close_ring' method.""" tile = Tile() - poly = Layer(tile, b'polygon') + poly = Layer(tile, b"polygon") feature = Polygon(poly) feature.add_ring(5) feature.set_point(0, 0) @@ -41,40 +47,49 @@ def test_polygon_encoding_close_ring(): feature.set_point(10, 10) feature.set_point(0, 10) feature.close_ring() - feature.add_property(b'foo', b'bar') + feature.add_property(b"foo", b"bar") feature.commit() - assert tile.serialize() == b'\x1a/x\x02\n\x07polygon(\x80 \x12\x13\x18\x03"\x0b\t\x00\x00\x1a\x14\x00\x00\x14\x13\x00\x0f\x12\x02\x00\x00\x1a\x03foo"\x05\n\x03bar' # noqa + assert ( + tile.serialize() + == b'\x1a/x\x02\n\x07polygon(\x80 \x12\x13\x18\x03"\x0b\t\x00\x00\x1a\x14\x00\x00\x14\x13\x00\x0f\x12\x02\x00\x00\x1a\x03foo"\x05\n\x03bar' + ) # noqa def test_linestring_encoding(): """Test creation of linestring feature.""" tile = Tile() - line = Layer(tile, b'linestring') + line = Layer(tile, b"linestring") feature = Linestring(line) feature.add_linestring(3) feature.set_point(0, 0) feature.set_point(10, 10) feature.set_point(20, 20) - feature.add_property(b'foo', b'bar') + feature.add_property(b"foo", b"bar") feature.commit() - assert tile.serialize() == b'\x1a/x\x02\n\nlinestring(\x80 \x12\x10\x18\x02"\x08\t\x00\x00\x12\x14\x14\x14\x14\x12\x02\x00\x00\x1a\x03foo"\x05\n\x03bar' # noqa + assert ( + tile.serialize() + == b'\x1a/x\x02\n\nlinestring(\x80 \x12\x10\x18\x02"\x08\t\x00\x00\x12\x14\x14\x14\x14\x12\x02\x00\x00\x1a\x03foo"\x05\n\x03bar' + ) # noqa def test_set_id_valid(): """Test set_id method.""" tile = Tile() - points = Layer(tile, b'points') + points = Layer(tile, b"points") feature = Point(points) feature.set_id(1) feature.add_points(1) feature.set_point(10, 10) - feature.add_property(b'foo', b'bar') - feature.add_property(b'x', b'y') + feature.add_property(b"foo", b"bar") + feature.add_property(b"x", b"y") feature.commit() - assert tile.serialize() == b'\x1a2x\x02\n\x06points(\x80 \x12\x0f\x18\x01\x08\x01"\x03\t\x14\x14\x12\x04\x00\x00\x01\x01\x1a\x03foo\x1a\x01x"\x05\n\x03bar"\x03\n\x01y' # noqa + assert ( + tile.serialize() + == b'\x1a2x\x02\n\x06points(\x80 \x12\x0f\x18\x01\x08\x01"\x03\t\x14\x14\x12\x04\x00\x00\x01\x01\x1a\x03foo\x1a\x01x"\x05\n\x03bar"\x03\n\x01y' + ) # noqa tile = Tile() - poly = Layer(tile, b'polygon') + poly = Layer(tile, b"polygon") feature = Polygon(poly) feature.set_id(1) feature.add_ring(5) @@ -84,10 +99,13 @@ def test_set_id_valid(): feature.set_point(0, 10) feature.set_point(0, 0) feature.commit() - assert tile.serialize() == b'\x1a!x\x02\n\x07polygon(\x80 \x12\x11\x18\x03\x08\x01"\x0b\t\x00\x00\x1a\x14\x00\x00\x14\x13\x00\x0f' # noqa + assert ( + tile.serialize() + == b'\x1a!x\x02\n\x07polygon(\x80 \x12\x11\x18\x03\x08\x01"\x0b\t\x00\x00\x1a\x14\x00\x00\x14\x13\x00\x0f' + ) # noqa tile = Tile() - line = Layer(tile, b'linestring') + line = Layer(tile, b"linestring") feature = Linestring(line) feature.set_id(1) feature.add_linestring(3) @@ -95,4 +113,7 @@ def test_set_id_valid(): feature.set_point(10, 10) feature.set_point(20, 20) feature.commit() - assert tile.serialize() == b'\x1a!x\x02\n\nlinestring(\x80 \x12\x0e\x18\x02\x08\x01"\x08\t\x00\x00\x12\x14\x14\x14\x14' # noqa + assert ( + tile.serialize() + == b'\x1a!x\x02\n\nlinestring(\x80 \x12\x0e\x18\x02\x08\x01"\x08\t\x00\x00\x12\x14\x14\x14\x14' + ) # noqa diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 50c1522..0000000 --- a/tox.ini +++ /dev/null @@ -1,44 +0,0 @@ -[tox] -envlist = py35,py36,py37,py38,py39 -isolated_build = true - -[testenv] -extras = test -deps = - setuptools - cython>=0.29.23 -commands= - python setup.py build_ext --inplace - pip install . --no-deps --no-build-isolation - python -m pytest - -[testenv:wheel] -deps = - {[testenv]deps} - wheel -skip_install = true -extras = -commands = - pip wheel -w wheelhouse --no-deps . - -# Release -[testenv:build] -basepython = python3 -skip_install = true -deps = - {[testenv:wheel]deps} -commands = - python setup.py sdist - -[testenv:release] -setenv = - TWINE_USERNAME = {env:TWINE_USERNAME} - TWINE_PASSWORD = {env:TWINE_PASSWORD} -basepython = python3 -skip_install = true -deps = - {[testenv:wheel]deps} - twine >= 1.5.0 -commands = - {[testenv:build]commands} - twine upload --skip-existing dist/* diff --git a/vendor/mvt-fixtures b/vendor/mvt-fixtures index 665ee9c..aeeb6ff 160000 --- a/vendor/mvt-fixtures +++ b/vendor/mvt-fixtures @@ -1 +1 @@ -Subproject commit 665ee9c752f20df1ca21a1906836e9c7f962ed68 +Subproject commit aeeb6ff59fcd09a152d99506a2f87b353ec65dc8 diff --git a/vendor/protozero b/vendor/protozero index f379578..aa8b304 160000 --- a/vendor/protozero +++ b/vendor/protozero @@ -1 +1 @@ -Subproject commit f379578a3f7c8162aac0ac31c2696de09a5b5f93 +Subproject commit aa8b304cf63831589f52c254b5af2c688bdc2fc4 diff --git a/vendor/vtzero b/vendor/vtzero index 646e997..5e70144 160000 --- a/vendor/vtzero +++ b/vendor/vtzero @@ -1 +1 @@ -Subproject commit 646e99739dbc2b37c825935aace91c5db05ca42d +Subproject commit 5e70144a3a2ea1231b6e271ec75b6d49198eaa67 diff --git a/vtzero/cvtzero.pxd b/vtzero/cvtzero.pxd index 75a42af..c8c1629 100644 --- a/vtzero/cvtzero.pxd +++ b/vtzero/cvtzero.pxd @@ -1,8 +1,8 @@ # cython: language_level=3 -from libc.stdint cimport uint32_t, uint64_t, int32_t -from libcpp.string cimport string +from libc.stdint cimport int32_t, uint32_t, uint64_t from libcpp cimport bool +from libcpp.string cimport string cdef extern from 'protozero/pbf_reader.hpp' namespace 'protozero': diff --git a/vtzero/tile.pyx b/vtzero/tile.pyx index 9ff278c..0b1645a 100644 --- a/vtzero/tile.pyx +++ b/vtzero/tile.pyx @@ -2,9 +2,10 @@ """vtzero.tile module.""" -from vtzero cimport cvtzero -from libcpp.string cimport string from libc.stdint cimport uint32_t +from libcpp.string cimport string + +from vtzero cimport cvtzero cdef class VectorTile: diff --git a/vtzero/version.py b/vtzero/version.py index 189f372..d7d9664 100644 --- a/vtzero/version.py +++ b/vtzero/version.py @@ -1,3 +1,3 @@ """vtzero version.""" -__version__ = '0.0.1b2' +__version__ = "0.0.1b2" From 52664a0b84734608938bc3fedee7585e7e1154d4 Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Tue, 25 Oct 2022 10:31:25 +0200 Subject: [PATCH 07/21] add pytest-cov --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5b27fd0..9b7d1de 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ ) extra_reqs = { - "test": ["pytest"], + "test": ["pytest", "pytest-cov"], } From 5534f5c061ef86939c6e62ca7c3880025a4b7dae Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Tue, 25 Oct 2022 10:33:57 +0200 Subject: [PATCH 08/21] bad copy/pasta --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39a7b90..89ab571 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,7 +47,7 @@ jobs: - name: Run Tests run: | - python -m pytest --cov rio_color --cov-report xml --cov-report term-missing + python -m pytest --cov vtzero --cov-report xml --cov-report term-missing - name: Upload Results if: ${{ matrix.name == 'Ubuntu' }} From 04ab74b9efa8c6e549df957f39ed9e93c61e5348 Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Tue, 25 Oct 2022 10:42:37 +0200 Subject: [PATCH 09/21] version update --- CHANGELOG.md | 5 +++++ vtzero/version.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d380906..ee1736b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ ## Release Notes +### 0.0.1b3 - 2022-10-25 + +- add python 3.9, 3.10, 3.11 support +- add python wheels +- update vendor submodules ### 0.0.1b2 - 2021-06-16 diff --git a/vtzero/version.py b/vtzero/version.py index d7d9664..6582589 100644 --- a/vtzero/version.py +++ b/vtzero/version.py @@ -1,3 +1,3 @@ """vtzero version.""" -__version__ = "0.0.1b2" +__version__ = "0.0.1b3" From 53c4d190da3ee8faf0fab35dfd4877e1809f20ad Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Tue, 25 Oct 2022 11:02:19 +0200 Subject: [PATCH 10/21] one workflow --- .github/codecov.yml | 8 ++++ .github/workflows/build.yml | 82 ------------------------------------- .github/workflows/ci.yml | 78 +++++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+), 82 deletions(-) create mode 100644 .github/codecov.yml delete mode 100644 .github/workflows/build.yml diff --git a/.github/codecov.yml b/.github/codecov.yml new file mode 100644 index 0000000..c61977e --- /dev/null +++ b/.github/codecov.yml @@ -0,0 +1,8 @@ +comment: off + +coverage: + status: + project: + default: + target: auto + threshold: 5 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index a9abe9d..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: Build -on: - push: - tags: - - '*' - workflow_run: - workflows: [CI] - types: [completed] - -jobs: - build_wheels: - if: ${{ github.event.workflow_run.conclusion == 'success' }} - name: ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - - steps: - - uses: actions/checkout@v3 - - # Used to host cibuildwheel - - uses: actions/setup-python@v4 - - - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.11.1 - - - name: Install dependencies - run: | - git submodule update --init - - - name: Build wheels - run: python -m cibuildwheel --output-dir wheelhouse - env: - CIBW_SKIP: 'pp*' - CIBW_ARCHS_LINUX: auto aarch64 - CIBW_ARCHS_MACOS: auto universal2 - - - uses: actions/upload-artifact@v3 - with: - path: ./wheelhouse - - build_sdist: - if: ${{ github.event.workflow_run.conclusion == 'success' }} - name: Build source distribution - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-python@v4 - name: Install Python - with: - python-version: '3.10' - - - name: Install dependencies - run: | - python -m pip install numpy Cython - git submodule update --init - - - name: Build sdist - run: python setup.py sdist - - - uses: actions/upload-artifact@v3 - with: - path: dist/*.tar.gz - - upload_pypi: - needs: [build_wheels, build_sdist] - runs-on: ubuntu-latest - steps: - - uses: actions/download-artifact@v2 - with: - name: artifact - path: dist - - - uses: pypa/gh-action-pypi-publish@master - with: - user: ${{ secrets.PYPI_USERNAME }} - password: ${{ secrets.PYPI_PASSWORD }} - # To test: - repository_url: https://test.pypi.org/legacy/ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89ab571..2534e91 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,3 +57,81 @@ jobs: flags: unittests name: ${{ matrix.python }} fail_ci_if_error: false + + ####################################################################################### + # Deploy + ####################################################################################### + build_wheels: + needs: [tests] + if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' + name: ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + - uses: actions/checkout@v3 + + # Used to host cibuildwheel + - uses: actions/setup-python@v4 + + - name: Install cibuildwheel + run: python -m pip install cibuildwheel==2.11.1 + + - name: Install dependencies + run: | + git submodule update --init + + - name: Build wheels + run: python -m cibuildwheel --output-dir wheelhouse + env: + CIBW_SKIP: 'pp*' + CIBW_ARCHS_LINUX: auto aarch64 + CIBW_ARCHS_MACOS: auto universal2 + + - uses: actions/upload-artifact@v3 + with: + path: ./wheelhouse + + build_sdist: + needs: [tests] + if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' + name: Build source distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v4 + name: Install Python + with: + python-version: '3.10' + + - name: Install dependencies + run: | + python -m pip install numpy Cython + git submodule update --init + + - name: Build sdist + run: python setup.py sdist + + - uses: actions/upload-artifact@v3 + with: + path: dist/*.tar.gz + + upload_pypi: + needs: [build_wheels, build_sdist] + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v2 + with: + name: artifact + path: dist + + - uses: pypa/gh-action-pypi-publish@master + with: + user: ${{ secrets.PYPI_USERNAME }} + password: ${{ secrets.PYPI_PASSWORD }} + # To test: + repository_url: https://test.pypi.org/legacy/ From 303769dca0ff92e13605052eec67993932444a05 Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Tue, 25 Oct 2022 11:07:08 +0200 Subject: [PATCH 11/21] use python3 --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2534e91..2bb36e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,6 +76,8 @@ jobs: # Used to host cibuildwheel - uses: actions/setup-python@v4 + with: + python-version: '3.10' - name: Install cibuildwheel run: python -m pip install cibuildwheel==2.11.1 From acb6a60745f6e97ab8b4122aaa7e787c2a2bfb8f Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Tue, 25 Oct 2022 12:38:12 +0200 Subject: [PATCH 12/21] fix --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2bb36e3..210f869 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,7 +90,6 @@ jobs: run: python -m cibuildwheel --output-dir wheelhouse env: CIBW_SKIP: 'pp*' - CIBW_ARCHS_LINUX: auto aarch64 CIBW_ARCHS_MACOS: auto universal2 - uses: actions/upload-artifact@v3 From 6cf6cceb0c3f261ecd8f6dcbc6cd80617c4a0c76 Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Tue, 25 Oct 2022 13:07:42 +0200 Subject: [PATCH 13/21] push to pypa --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 210f869..8f1fde8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -134,5 +134,3 @@ jobs: with: user: ${{ secrets.PYPI_USERNAME }} password: ${{ secrets.PYPI_PASSWORD }} - # To test: - repository_url: https://test.pypi.org/legacy/ From 758d0fdd195e2ef5a73bd8e223b4ab271de4f638 Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Wed, 24 Apr 2024 23:13:17 +0200 Subject: [PATCH 14/21] add python 3.12 support and update pre-commit --- .github/workflows/ci.yml | 8 +++++--- .pre-commit-config.yaml | 28 +++++++++++----------------- CHANGELOG.md | 4 ++++ README.md | 4 ++-- pyproject.toml | 21 ++++++++++++++++++--- tests/test_fixtures.py | 7 +++++++ tests/test_tile.py | 2 ++ 7 files changed, 49 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f1fde8..48c7638 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,8 @@ jobs: - {name: Windows, python: '3.10', os: windows-latest} - {name: Mac, python: '3.10', os: macos-latest} - {name: 'Ubuntu', python: '3.10', os: ubuntu-latest} - - {name: '3.11', python: '3.11.0-rc.2 - 3.11', os: ubuntu-latest} + - {name: '3.12', python: '3.12', os: ubuntu-latest} + - {name: '3.11', python: '3.11', os: ubuntu-latest} - {name: '3.9', python: '3.9', os: ubuntu-latest} - {name: '3.8', python: '3.8', os: ubuntu-latest} - {name: '3.7', python: '3.7', os: ubuntu-latest} @@ -28,11 +29,12 @@ jobs: - {name: '3.5', python: '3.5', os: ubuntu-latest} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} + - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a248dcd..08d9bbb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,27 +1,21 @@ repos: - - repo: https://github.com/psf/black - rev: 22.3.0 - hooks: - - id: black - language_version: python - args: [--safe] - - repo: https://github.com/PyCQA/isort - rev: 5.10.1 + rev: 5.13.2 hooks: - id: isort language_version: python - - repo: https://github.com/PyCQA/flake8 - rev: 5.0.4 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.3.5 hooks: - - id: flake8 - language_version: python + - id: ruff + args: ["--fix"] + - id: ruff-format - - repo: https://github.com/PyCQA/pydocstyle - rev: 6.1.1 + - repo: https://github.com/pre-commit/mirrors-mypy + rev: v1.9.0 hooks: - - id: pydocstyle + - id: mypy language_version: python - additional_dependencies: - - toml + # No reason to run if only tests have changed. They intentionally break typing. + exclude: tests/.* diff --git a/CHANGELOG.md b/CHANGELOG.md index ee1736b..a4ac32e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## Release Notes +### 0.0.1b4 - 2022-10-25 + +- add python 3.12 support + ### 0.0.1b3 - 2022-10-25 - add python 3.9, 3.10, 3.11 support diff --git a/README.md b/README.md index 6eed9c3..e476fc9 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Experimental Python wrapper of [vtzero](https://github.com/mapbox/vtzero) a mini You can install python-vtzero using pip ```bash -$ pip install vtzero +$ python -m pip install vtzero ``` or install from source @@ -30,7 +30,7 @@ $ git submodule update --init # Compile Cython module $ python setup.py build_ext --inplace -$ pip install -e . +$ python -m pip install -e . ``` ## Example diff --git a/pyproject.toml b/pyproject.toml index ae88cde..20d9517 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,6 +10,21 @@ default_section = "THIRDPARTY" [tool.mypy] no_strict_optional = "True" -[tool.pydocstyle] -select = "D1" -match = "(?!test).*.py" +[tool.ruff] +line-length = 90 + +[tool.ruff.lint] +select = [ + "D1", # pydocstyle errors + "E", # pycodestyle errors + "W", # pycodestyle warnings + "F", # flake8 + "C", # flake8-comprehensions + "B", # flake8-bugbear +] +ignore = [ + "E501", # line too long, handled by black + "B008", # do not perform function calls in argument defaults + "B905", # ignore zip() without an explicit strict= parameter, only support with python >3.10 + "B028", +] diff --git a/tests/test_fixtures.py b/tests/test_fixtures.py index 1bedc80..ab74894 100644 --- a/tests/test_fixtures.py +++ b/tests/test_fixtures.py @@ -1,3 +1,5 @@ +"""fixtures.""" + import json from pathlib import Path @@ -26,6 +28,8 @@ @pytest.fixture def fixture(): + """data fixtures.""" + def _(id): path = ROOT / id with (path / "info.json").open("r") as f: @@ -40,6 +44,7 @@ def _(id): def first_feature(tile): + """check and return feature.""" assert not tile.empty() assert len(tile) == 1 layer = next(tile) @@ -51,6 +56,7 @@ def first_feature(tile): def test_empty_tile(fixture): + """empty tile fixture.""" info, data, mvt = fixture("001") tile = VectorTile(mvt) assert tile.empty() @@ -58,6 +64,7 @@ def test_empty_tile(fixture): def test_single_point_without_id(fixture): + """Point.""" info, data, mvt = fixture("002") tile = VectorTile(mvt) feature = first_feature(tile) diff --git a/tests/test_tile.py b/tests/test_tile.py index eccbaa6..15affe8 100644 --- a/tests/test_tile.py +++ b/tests/test_tile.py @@ -1,3 +1,5 @@ +"""Test tile encoding.""" + from vtzero.tile import Layer, Linestring, Point, Polygon, Tile From 512091e9ba3ffad23d2b25cc06e21a05164f4587 Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Wed, 24 Apr 2024 23:19:56 +0200 Subject: [PATCH 15/21] remove old pythons --- .github/workflows/ci.yml | 3 --- CHANGELOG.md | 1 + README.md | 2 +- setup.py | 1 + 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48c7638..50e91df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,9 +24,6 @@ jobs: - {name: '3.11', python: '3.11', os: ubuntu-latest} - {name: '3.9', python: '3.9', os: ubuntu-latest} - {name: '3.8', python: '3.8', os: ubuntu-latest} - - {name: '3.7', python: '3.7', os: ubuntu-latest} - - {name: '3.6', python: '3.6', os: ubuntu-latest} - - {name: '3.5', python: '3.5', os: ubuntu-latest} steps: - uses: actions/checkout@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index a4ac32e..51f4cfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### 0.0.1b4 - 2022-10-25 - add python 3.12 support +- remove support for python <3.8 ### 0.0.1b3 - 2022-10-25 diff --git a/README.md b/README.md index e476fc9..798deac 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Experimental Python wrapper of [vtzero](https://github.com/mapbox/vtzero) a mini ## Requirements -- Python >= 3.5 +- Python >= 3.8 - gcc/clang++ >= 4.5 (C++11) ## Install diff --git a/setup.py b/setup.py index 9b7d1de..3a8ebc4 100644 --- a/setup.py +++ b/setup.py @@ -44,4 +44,5 @@ provides=["vtzero"], include_package_data=True, extras_require=extra_reqs, + python_requires=">=3.8", ) From b7aff8f31d0d70b8b11b02d28d672a4af0e9ee7a Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Wed, 24 Apr 2024 23:24:49 +0200 Subject: [PATCH 16/21] update submodules --- vendor/mvt-fixtures | 2 +- vendor/protozero | 2 +- vendor/vtzero | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vendor/mvt-fixtures b/vendor/mvt-fixtures index aeeb6ff..e7591fb 160000 --- a/vendor/mvt-fixtures +++ b/vendor/mvt-fixtures @@ -1 +1 @@ -Subproject commit aeeb6ff59fcd09a152d99506a2f87b353ec65dc8 +Subproject commit e7591fbf674fa305443c5f9584d215b116f5b118 diff --git a/vendor/protozero b/vendor/protozero index aa8b304..542fcf7 160000 --- a/vendor/protozero +++ b/vendor/protozero @@ -1 +1 @@ -Subproject commit aa8b304cf63831589f52c254b5af2c688bdc2fc4 +Subproject commit 542fcf7dd228672b775eb283d18ccd94c4e682d9 diff --git a/vendor/vtzero b/vendor/vtzero index 5e70144..67f934e 160000 --- a/vendor/vtzero +++ b/vendor/vtzero @@ -1 +1 @@ -Subproject commit 5e70144a3a2ea1231b6e271ec75b6d49198eaa67 +Subproject commit 67f934ee9aa44b923b5d0bc2bc87448900051a57 From 136ceab989bff9d520d7edcd75f798b659cedfc8 Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Wed, 24 Apr 2024 23:29:14 +0200 Subject: [PATCH 17/21] update version --- vtzero/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vtzero/version.py b/vtzero/version.py index 6582589..b9777ba 100644 --- a/vtzero/version.py +++ b/vtzero/version.py @@ -1,3 +1,3 @@ """vtzero version.""" -__version__ = "0.0.1b3" +__version__ = "0.0.1b4" From 43bfbf37a9918209f55a3ff023fa2516d261b6b0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 22:03:46 +0000 Subject: [PATCH 18/21] Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 4.1.7. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v2...v4.1.7) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 50e91df..a8fa98d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -124,7 +124,7 @@ jobs: needs: [build_wheels, build_sdist] runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4.1.7 with: name: artifact path: dist From 515d3369bc3e689753dc986668cca1762d98abb0 Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Mon, 20 Jan 2025 15:28:27 +0100 Subject: [PATCH 19/21] add python 3.13 in CI --- .github/workflows/ci.yml | 1 + CHANGELOG.md | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 50e91df..59cca26 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,7 @@ jobs: - {name: Windows, python: '3.10', os: windows-latest} - {name: Mac, python: '3.10', os: macos-latest} - {name: 'Ubuntu', python: '3.10', os: ubuntu-latest} + - {name: '3.13', python: '3.13', os: ubuntu-latest} - {name: '3.12', python: '3.12', os: ubuntu-latest} - {name: '3.11', python: '3.11', os: ubuntu-latest} - {name: '3.9', python: '3.9', os: ubuntu-latest} diff --git a/CHANGELOG.md b/CHANGELOG.md index 51f4cfa..9849b9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## Release Notes +### 0.0.1b5 - 2025-01-20 + +- add python 3.13 support + ### 0.0.1b4 - 2022-10-25 - add python 3.12 support From 3e0d899ca3c2f1e1e6ef0c061c0ff1dbed865b48 Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Mon, 20 Jan 2025 16:21:03 +0100 Subject: [PATCH 20/21] update version --- .github/workflows/ci.yml | 10 ++++++---- vtzero/version.py | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5cb2a8b..77e1091 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,9 +92,10 @@ jobs: CIBW_SKIP: 'pp*' CIBW_ARCHS_MACOS: auto universal2 - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: path: ./wheelhouse + overwrite: true build_sdist: needs: [tests] @@ -117,20 +118,21 @@ jobs: - name: Build sdist run: python setup.py sdist - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: path: dist/*.tar.gz + overwrite: true upload_pypi: needs: [build_wheels, build_sdist] runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@v4.1.7 + - uses: actions/download-artifact@v4 with: name: artifact path: dist - - uses: pypa/gh-action-pypi-publish@master + - uses: pypa/gh-action-pypi-publish@release/v1 with: user: ${{ secrets.PYPI_USERNAME }} password: ${{ secrets.PYPI_PASSWORD }} diff --git a/vtzero/version.py b/vtzero/version.py index b9777ba..545c080 100644 --- a/vtzero/version.py +++ b/vtzero/version.py @@ -1,3 +1,3 @@ """vtzero version.""" -__version__ = "0.0.1b4" +__version__ = "0.0.1b5" From 41e628d8b0ec45c0ec08951ebbde3ca87f14e2b0 Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Fri, 24 Jan 2025 14:32:29 +0100 Subject: [PATCH 21/21] fix CI release --- .github/workflows/ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 77e1091..9c02bf4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,7 +80,7 @@ jobs: python-version: '3.10' - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.11.1 + run: python -m pip install cibuildwheel==2.22.0 - name: Install dependencies run: | @@ -94,8 +94,8 @@ jobs: - uses: actions/upload-artifact@v4 with: - path: ./wheelhouse - overwrite: true + name: vtzero-wheels-${{ matrix.os }}-${{ strategy.job-index }} + path: ./wheelhouse/*.whl build_sdist: needs: [tests] @@ -120,8 +120,8 @@ jobs: - uses: actions/upload-artifact@v4 with: + name: vtzero-sdist path: dist/*.tar.gz - overwrite: true upload_pypi: needs: [build_wheels, build_sdist] @@ -129,8 +129,9 @@ jobs: steps: - uses: actions/download-artifact@v4 with: - name: artifact + pattern: vtzero-* path: dist + merge-multiple: true - uses: pypa/gh-action-pypi-publish@release/v1 with: