From 3e8be6cf1f8dc57b7f7120c46542fd46d063e9b9 Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Mon, 14 Apr 2025 13:38:47 +0300 Subject: [PATCH 01/28] GH workflow for unit tests --- .github/workflows/unit-test.yaml | 54 ++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/unit-test.yaml diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/unit-test.yaml new file mode 100644 index 0000000..e44c6f4 --- /dev/null +++ b/.github/workflows/unit-test.yaml @@ -0,0 +1,54 @@ +name: Unit tests + +on: + push: + branches: ["**"] + pull_request: + +jobs: + test: + runs-on: ubuntu-20.04 + strategy: + matrix: + python-version: [3.6, 3.7, 3.8] + + steps: + - name: configure aws credentials + uses: mapbox/configure-aws-credentials-internal@v5 + with: + target-account-id: ${{ vars.AWS_ACCOUNT_ID_DEFAULT }} + + - name: setup GH reader token + uses: mapbox/setup-github-tokens@v2 + with: + scope-type: 'reader' + + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools + pip install "importlib-metadata==4.8.3" + pip install -r requirements.txt -e .[test] + + - name: Show Python and pytest versions + run: | + python --version + pytest --version + + - name: Run pre-commit checks + run: pre-commit run --all-files + + - name: Run tests with coverage + run: pytest --cov --cov-config=.coveragerc + + - name: Upload coverage to GitHub (optional, internal) + uses: actions/upload-artifact@v4 + with: + name: coverage-report + path: .coverage \ No newline at end of file From 3a959a5c526307e015a669a0021d10dc3ccb3aec Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Mon, 14 Apr 2025 13:48:53 +0300 Subject: [PATCH 02/28] Remove aws creds and gh token --- .github/workflows/unit-test.yaml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/unit-test.yaml index e44c6f4..37b8470 100644 --- a/.github/workflows/unit-test.yaml +++ b/.github/workflows/unit-test.yaml @@ -11,18 +11,9 @@ jobs: strategy: matrix: python-version: [3.6, 3.7, 3.8] + steps: - - name: configure aws credentials - uses: mapbox/configure-aws-credentials-internal@v5 - with: - target-account-id: ${{ vars.AWS_ACCOUNT_ID_DEFAULT }} - - - name: setup GH reader token - uses: mapbox/setup-github-tokens@v2 - with: - scope-type: 'reader' - - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} From 8757e726de6c62449603d77f68cdc043f6fbc076 Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Wed, 16 Apr 2025 11:33:51 +0300 Subject: [PATCH 03/28] GHA PyPi release --- .github/workflows/{unit-test.yaml => ci.yaml} | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) rename .github/workflows/{unit-test.yaml => ci.yaml} (64%) diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/ci.yaml similarity index 64% rename from .github/workflows/unit-test.yaml rename to .github/workflows/ci.yaml index 37b8470..f89ab0e 100644 --- a/.github/workflows/unit-test.yaml +++ b/.github/workflows/ci.yaml @@ -42,4 +42,23 @@ jobs: uses: actions/upload-artifact@v4 with: name: coverage-report - path: .coverage \ No newline at end of file + path: .coverage + + deploy: + runs-on: ubuntu-18.04 + needs: test + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && matrix.python-version == '3.8' + + steps: + - name: Install dependencies + run: pip install twine wheel + + - name: Setup deployment + run: python setup.py sdist bdist_wheel + + - name: Validate deployment + run: twine check dist/* + + - name: Run deployment + run: + twine upload dist/* -r pypi -u __token__ -p ${{ secrets.PYPI_PASSWORD }} \ No newline at end of file From 965c8a7e27cbb936f88a613171239a4cb8700504 Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Wed, 16 Apr 2025 11:35:54 +0300 Subject: [PATCH 04/28] v1.14.0-rc1 --- mapbox_tilesets/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mapbox_tilesets/__init__.py b/mapbox_tilesets/__init__.py index e319c8c..773e604 100644 --- a/mapbox_tilesets/__init__.py +++ b/mapbox_tilesets/__init__.py @@ -1,3 +1,3 @@ """mapbox_tilesets package""" -__version__ = "1.13.0" +__version__ = "1.14.0-rc1" From 88f7b31fb592b6823136b274f101285263def03a Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Wed, 16 Apr 2025 11:42:44 +0300 Subject: [PATCH 05/28] Typo --- .github/workflows/ci.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f89ab0e..527073a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,4 +1,4 @@ -name: Unit tests +name: CI on: push: @@ -47,9 +47,20 @@ jobs: deploy: runs-on: ubuntu-18.04 needs: test - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && matrix.python-version == '3.8' + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') steps: + - uses: actions/checkout@v4 + + - name: Set up Python 3.8 + uses: actions/setup-python@v5 + with: + python-version: 3.8 + + - name: Upgrade pip and setuptools + run: | + python -m pip install --upgrade pip setuptools + - name: Install dependencies run: pip install twine wheel From 618aa5d92fce9cfc9fae64d3acd40f90d6bcd0c6 Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Wed, 16 Apr 2025 11:44:42 +0300 Subject: [PATCH 06/28] Update to ubunto-latest --- .github/workflows/ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 527073a..f17e5c6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,7 +7,7 @@ on: jobs: test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: matrix: python-version: [3.6, 3.7, 3.8] @@ -45,7 +45,7 @@ jobs: path: .coverage deploy: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest needs: test if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') @@ -60,7 +60,7 @@ jobs: - name: Upgrade pip and setuptools run: | python -m pip install --upgrade pip setuptools - + - name: Install dependencies run: pip install twine wheel From 8fcfc33c4448f5fc2cd7a4bf29860ee978620ca4 Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Wed, 16 Apr 2025 11:50:18 +0300 Subject: [PATCH 07/28] Overrides runs-on depending on Python version --- .github/workflows/ci.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f17e5c6..51bc2bc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,11 +7,17 @@ on: jobs: test: - runs-on: ubuntu-latest strategy: matrix: - python-version: [3.6, 3.7, 3.8] - + include: + - python-version: 3.6 + os: ubuntu-20.04 + - python-version: 3.7 + os: ubuntu-20.04 + - python-version: 3.8 + os: ubuntu-22.04 + + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -45,7 +51,7 @@ jobs: path: .coverage deploy: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: test if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') From 55bc840e5d0b9823d2f5d0348c2e7b52e503b52a Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Wed, 16 Apr 2025 11:51:56 +0300 Subject: [PATCH 08/28] Removed Python 3.6 and 3.7 --- .github/workflows/ci.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 51bc2bc..154062b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,10 +10,11 @@ jobs: strategy: matrix: include: - - python-version: 3.6 - os: ubuntu-20.04 - - python-version: 3.7 - os: ubuntu-20.04 + # Ubuntu 20.04 is no longer supported by GitHub Actions + # - python-version: 3.6 + # os: ubuntu-20.04 + # - python-version: 3.7 + # os: ubuntu-20.04 - python-version: 3.8 os: ubuntu-22.04 From d12d23456c1c630a9c698413f387400ea19b0c37 Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Wed, 16 Apr 2025 11:55:17 +0300 Subject: [PATCH 09/28] Updated CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1cb16c..b39da57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Unreleased ======= +# 1.14.0-rc1 (2025-04-16) +- Migrate to GHA # 1.13.0 (2025-01-07) - Temporarily remove the `estimate-cu` command for further refinement. From e07a05210f0a7659586ccd74339f891960346736 Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Wed, 16 Apr 2025 13:16:04 +0300 Subject: [PATCH 10/28] Refactor into two workflows --- .github/workflows/release.yaml | 42 ++++++++++++++++++++++++ .github/workflows/{ci.yaml => test.yaml} | 35 +++----------------- 2 files changed, 46 insertions(+), 31 deletions(-) create mode 100644 .github/workflows/release.yaml rename .github/workflows/{ci.yaml => test.yaml} (62%) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..937b28f --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,42 @@ +name: release + +on: + push: + tags: + - '*' + +jobs: + deploy: + runs-on: ubuntu-22.04 + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python 3.8 + uses: actions/setup-python@v5 + with: + python-version: 3.8 + + - name: Compare tags + run: | + VERSION = `grep '__version__' mapbox_tilesets/__init__.py | sed -E "s/^.*['\"](.*)['\"].*$/\1/"` + echo "Checking that package version [v$VERSION] matches release tag [${{ github.ref_name }}]" + [ "${{ github.ref_type }}" = "tag" ] && [ "${{ github.ref_name }}" = "v$VERSION" ] + + - name: Upgrade pip and setuptools + run: | + python -m pip install --upgrade pip setuptools + + - name: Install dependencies + run: pip install twine wheel + + - name: Setup deployment + run: python setup.py sdist bdist_wheel + + - name: Validate deployment + run: twine check dist/* + + - name: Run deployment + run: + twine upload dist/* -r pypi -u __token__ -p ${{ secrets.PYPI_PASSWORD }} diff --git a/.github/workflows/ci.yaml b/.github/workflows/test.yaml similarity index 62% rename from .github/workflows/ci.yaml rename to .github/workflows/test.yaml index 154062b..857199c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/test.yaml @@ -1,4 +1,4 @@ -name: CI +name: Unit test on: push: @@ -45,38 +45,11 @@ jobs: - name: Run tests with coverage run: pytest --cov --cov-config=.coveragerc + - name: List all files in current directory + run: ls -la + - name: Upload coverage to GitHub (optional, internal) uses: actions/upload-artifact@v4 with: name: coverage-report path: .coverage - - deploy: - runs-on: ubuntu-22.04 - needs: test - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python 3.8 - uses: actions/setup-python@v5 - with: - python-version: 3.8 - - - name: Upgrade pip and setuptools - run: | - python -m pip install --upgrade pip setuptools - - - name: Install dependencies - run: pip install twine wheel - - - name: Setup deployment - run: python setup.py sdist bdist_wheel - - - name: Validate deployment - run: twine check dist/* - - - name: Run deployment - run: - twine upload dist/* -r pypi -u __token__ -p ${{ secrets.PYPI_PASSWORD }} \ No newline at end of file From 256a91e71e191cf8c4af673ac1edd3842a882218 Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Wed, 16 Apr 2025 13:22:21 +0300 Subject: [PATCH 11/28] Convert to xml coverage --- .github/workflows/test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 857199c..e1dff98 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -43,7 +43,7 @@ jobs: run: pre-commit run --all-files - name: Run tests with coverage - run: pytest --cov --cov-config=.coveragerc + run: pytest --cov --cov-config=.coveragerc --cov-report=xml - name: List all files in current directory run: ls -la @@ -52,4 +52,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: coverage-report - path: .coverage + path: coverage.xml From 5943b525d833c78f29f2375045b3e87650ab8f8b Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Wed, 16 Apr 2025 13:25:41 +0300 Subject: [PATCH 12/28] 1.14.0-rc2 --- CHANGELOG.md | 2 +- mapbox_tilesets/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b39da57..2945dea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Unreleased ======= -# 1.14.0-rc1 (2025-04-16) +# 1.14.0-rc2 (2025-04-16) - Migrate to GHA # 1.13.0 (2025-01-07) diff --git a/mapbox_tilesets/__init__.py b/mapbox_tilesets/__init__.py index 773e604..5debfc0 100644 --- a/mapbox_tilesets/__init__.py +++ b/mapbox_tilesets/__init__.py @@ -1,3 +1,3 @@ """mapbox_tilesets package""" -__version__ = "1.14.0-rc1" +__version__ = "1.14.0-rc2" From ed89a507d97aaceaa2b366ae5138b77f8130325a Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Wed, 16 Apr 2025 13:29:12 +0300 Subject: [PATCH 13/28] Fix release workflow --- .github/workflows/release.yaml | 6 +++--- CHANGELOG.md | 2 +- mapbox_tilesets/__init__.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 937b28f..efdd234 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,9 +20,9 @@ jobs: - name: Compare tags run: | - VERSION = `grep '__version__' mapbox_tilesets/__init__.py | sed -E "s/^.*['\"](.*)['\"].*$/\1/"` - echo "Checking that package version [v$VERSION] matches release tag [${{ github.ref_name }}]" - [ "${{ github.ref_type }}" = "tag" ] && [ "${{ github.ref_name }}" = "v$VERSION" ] + PKG_VERSION= `grep '__version__' mapbox_tilesets/__init__.py | sed -E "s/^.*['\"](.*)['\"].*$/\1/"` + echo "Checking that package version [v$PKG_VERSION] matches release tag [${{ github.ref_name }}]" + [ "${{ github.ref_type }}" = "tag" ] && [ "${{ github.ref_name }}" = "v$PKG_VERSION" ] - name: Upgrade pip and setuptools run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 2945dea..3e2eb0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Unreleased ======= -# 1.14.0-rc2 (2025-04-16) +# 1.14.0-rc3 (2025-04-16) - Migrate to GHA # 1.13.0 (2025-01-07) diff --git a/mapbox_tilesets/__init__.py b/mapbox_tilesets/__init__.py index 5debfc0..d04c580 100644 --- a/mapbox_tilesets/__init__.py +++ b/mapbox_tilesets/__init__.py @@ -1,3 +1,3 @@ """mapbox_tilesets package""" -__version__ = "1.14.0-rc2" +__version__ = "1.14.0-rc3" From 9a83bf4faf4aa0a37fab7bc8182f0a03fb48c677 Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Wed, 16 Apr 2025 13:33:46 +0300 Subject: [PATCH 14/28] v1.14.0-rc4 --- .github/workflows/release.yaml | 2 +- CHANGELOG.md | 2 +- mapbox_tilesets/__init__.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index efdd234..17b6321 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,7 +20,7 @@ jobs: - name: Compare tags run: | - PKG_VERSION= `grep '__version__' mapbox_tilesets/__init__.py | sed -E "s/^.*['\"](.*)['\"].*$/\1/"` + PKG_VERSION=`grep '__version__' mapbox_tilesets/__init__.py | sed -E "s/^.*['\"](.*)['\"].*$/\1/"` echo "Checking that package version [v$PKG_VERSION] matches release tag [${{ github.ref_name }}]" [ "${{ github.ref_type }}" = "tag" ] && [ "${{ github.ref_name }}" = "v$PKG_VERSION" ] diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e2eb0a..f694190 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Unreleased ======= -# 1.14.0-rc3 (2025-04-16) +# 1.14.0-rc4 (2025-04-16) - Migrate to GHA # 1.13.0 (2025-01-07) diff --git a/mapbox_tilesets/__init__.py b/mapbox_tilesets/__init__.py index d04c580..5a12495 100644 --- a/mapbox_tilesets/__init__.py +++ b/mapbox_tilesets/__init__.py @@ -1,3 +1,3 @@ """mapbox_tilesets package""" -__version__ = "1.14.0-rc3" +__version__ = "1.14.0-rc4" From 2af0dd4abb01514fb64450b9fd6c46cf4c765b62 Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Wed, 16 Apr 2025 13:45:26 +0300 Subject: [PATCH 15/28] Updated documentation for GHA release workflow --- CONTRIBUTING.md | 6 +++--- README.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c4025cd..b537031 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -54,7 +54,7 @@ After which you can add these changes and commit again. Note that failing pre-co ## Release process -Releases to PyPi are handled via TravisCI and GitHub tags. Once changes have been merged to master: +Releases to PyPi are handled via Github Actions and GitHub tags. Once changes have been merged to master: 1. Update the version in mapbox_tilesets/__init__.py 2. Update the changelog @@ -62,8 +62,8 @@ Releases to PyPi are handled via TravisCI and GitHub tags. Once changes have bee 4. Get a review and merge your changes to master. 5. Get the latest changes locally from master `git checkout master && git pull origin master` 6. Tag on GitHub with `git tag` and push tags. For example `git tag -a v0.2.0 -m 'v0.2.0' && git push --tags` -7. Watch for tag build on travis at https://travis-ci.com/github/mapbox/tilesets-cli/builds -8. Once travis completes successfully, look for the release at https://pypi.org/project/mapbox-tilesets/#history +7. Watch for tag build on Github Actions at https://github.com/mapbox/tilesets-cli/actions +8. Once Github Actions completes successfully, look for the release at https://pypi.org/project/mapbox-tilesets/#history ## Tests diff --git a/README.md b/README.md index b86bf3c..e0cb9ab 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # tilesets-cli -[![Build Status](https://travis-ci.com/mapbox/tilesets-cli.svg?token=wqR3RcWUEprcQ1ttsgiP&branch=master)](https://travis-ci.com/mapbox/tilesets-cli) [![codecov](https://codecov.io/gh/mapbox/tilesets-cli/branch/master/graph/badge.svg?token=YBTKyc2o3j)](https://codecov.io/gh/mapbox/tilesets-cli) +[![Build Status](https://github.com/mapbox/tilesets-cli/actions/workflows/release.yaml/badge.svg)](https://github.com/mapbox/tilesets-cli/actions/workflows/release.yaml) [![codecov](https://codecov.io/gh/mapbox/tilesets-cli/branch/master/graph/badge.svg?token=YBTKyc2o3j)](https://codecov.io/gh/mapbox/tilesets-cli) CLI for interacting with and preparing data for the [Mapbox Tiling Service](https://docs.mapbox.com/mapbox-tiling-service/overview/). From 32fdb6a166e2cd4cd85d03dc15b2603034daa3b2 Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Wed, 16 Apr 2025 13:46:33 +0300 Subject: [PATCH 16/28] Revert to production version --- CHANGELOG.md | 3 --- mapbox_tilesets/__init__.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f694190..52273d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,6 @@ # Unreleased ======= -# 1.14.0-rc4 (2025-04-16) -- Migrate to GHA - # 1.13.0 (2025-01-07) - Temporarily remove the `estimate-cu` command for further refinement. diff --git a/mapbox_tilesets/__init__.py b/mapbox_tilesets/__init__.py index 5a12495..e319c8c 100644 --- a/mapbox_tilesets/__init__.py +++ b/mapbox_tilesets/__init__.py @@ -1,3 +1,3 @@ """mapbox_tilesets package""" -__version__ = "1.14.0-rc4" +__version__ = "1.13.0" From 77467013671133ec157f1cd852bf93be1cd14534 Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Wed, 16 Apr 2025 14:01:21 +0300 Subject: [PATCH 17/28] Remove .travis.yml --- .travis.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3901882..0000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -language: python -dist: bionic -python: - - '3.6' - - '3.7' - - '3.8' - -install: - - pip install -U setuptools "importlib-metadata==4.8.3" - - pip install -r requirements.txt -e .[test] -script: - - python --version - - pytest --version - - pre-commit run --all-files - - pytest --cov --cov-config=.coveragerc -after_script: - - python -m codecov -deploy: - provider: pypi - user: __token__ - password: $PYPI_PASSWORD - distributions: "sdist bdist_wheel" - on: - python: 3.8 - tags: true From 5b88e43f9b2fcf84fc46038311fed57c8e16d2b6 Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Wed, 16 Apr 2025 19:24:14 +0300 Subject: [PATCH 18/28] Added unit tests for Python 3.9 -> 3.12 --- .github/workflows/test.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e1dff98..fc40fdf 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -17,6 +17,14 @@ jobs: # os: ubuntu-20.04 - python-version: 3.8 os: ubuntu-22.04 + - python-version: 3.9 + os: ubuntu-22.04 + - python-version: 3.10 + os: ubuntu-22.04 + - python-version: 3.11 + os: ubuntu-24.04 + - python-version: 3.12 + os: ubuntu-24.04 runs-on: ${{ matrix.os }} From 39267e3801e09ca1cc20606652e0087d45148897 Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Wed, 16 Apr 2025 19:26:18 +0300 Subject: [PATCH 19/28] Pin to 3.10.17 --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index fc40fdf..a1e3a6d 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -19,7 +19,7 @@ jobs: os: ubuntu-22.04 - python-version: 3.9 os: ubuntu-22.04 - - python-version: 3.10 + - python-version: 3.10.17 os: ubuntu-22.04 - python-version: 3.11 os: ubuntu-24.04 From bb3b7c1807376469d63dd5c6af19c38dbd6a3ad3 Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Wed, 16 Apr 2025 19:28:13 +0300 Subject: [PATCH 20/28] Removed Python 3.12 --- .github/workflows/test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a1e3a6d..ab5b493 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -23,8 +23,8 @@ jobs: os: ubuntu-22.04 - python-version: 3.11 os: ubuntu-24.04 - - python-version: 3.12 - os: ubuntu-24.04 + # - python-version: 3.12 + # os: ubuntu-24.04 runs-on: ${{ matrix.os }} From b7b72d3575a7f6b4c77d98ce1790adbdbc02f509 Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Wed, 16 Apr 2025 19:31:30 +0300 Subject: [PATCH 21/28] Upload artifact for Python 3.8 only --- .github/workflows/test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ab5b493..3e15b88 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -57,6 +57,7 @@ jobs: run: ls -la - name: Upload coverage to GitHub (optional, internal) + if: matrix.python-version == '3.8' uses: actions/upload-artifact@v4 with: name: coverage-report From d80d4dc4677b6285b407b1feecf9df658fe384ca Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Wed, 16 Apr 2025 19:34:23 +0300 Subject: [PATCH 22/28] Remove Python 3.10 and 3.11 --- .github/workflows/test.yaml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 3e15b88..f1c0ff0 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,21 +10,10 @@ jobs: strategy: matrix: include: - # Ubuntu 20.04 is no longer supported by GitHub Actions - # - python-version: 3.6 - # os: ubuntu-20.04 - # - python-version: 3.7 - # os: ubuntu-20.04 - python-version: 3.8 os: ubuntu-22.04 - python-version: 3.9 os: ubuntu-22.04 - - python-version: 3.10.17 - os: ubuntu-22.04 - - python-version: 3.11 - os: ubuntu-24.04 - # - python-version: 3.12 - # os: ubuntu-24.04 runs-on: ${{ matrix.os }} From 46c89663c397e5daaad4691c800a7a68549558d2 Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Thu, 17 Apr 2025 15:04:22 +0300 Subject: [PATCH 23/28] Empty commit --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52273d3..f1cb16c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Unreleased ======= + # 1.13.0 (2025-01-07) - Temporarily remove the `estimate-cu` command for further refinement. From 859a8f38a37cbf7574e87d0e07d08b33b8706504 Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Thu, 17 Apr 2025 17:16:53 +0300 Subject: [PATCH 24/28] Added release workflow step to test the distribution --- .github/workflows/build-package/action.yaml | 31 +++++++++++++++++++ .github/workflows/release.yaml | 33 ++++++++++++--------- 2 files changed, 50 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/build-package/action.yaml diff --git a/.github/workflows/build-package/action.yaml b/.github/workflows/build-package/action.yaml new file mode 100644 index 0000000..fd6a4ce --- /dev/null +++ b/.github/workflows/build-package/action.yaml @@ -0,0 +1,31 @@ +name: 'Build Python Package' +description: 'Sets up Python, builds package, and validates it' +inputs: + python-version: + description: 'Python version to use' + required: false + default: '3.8' + +runs: + using: "composite" + steps: + - name: Set up Python ${{ inputs.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ inputs.python-version }} + + - name: Upgrade pip and setuptools + shell: bash + run: python -m pip install --upgrade pip setuptools + + - name: Install dependencies + shell: bash + run: pip install twine wheel + + - name: Setup deployment + shell: bash + run: python setup.py sdist bdist_wheel + + - name: Validate deployment + shell: bash + run: twine check dist/* \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 17b6321..e8b1dca 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,9 +6,25 @@ on: - '*' jobs: - deploy: + release-test: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + + - uses: ./.github/actions/build-package + + - name: Set up a fresh environment and run tests + run: | + python -m venv venv + source venv/bin/activate + pip install dist/*.tar.gz + pip install dist/*.whl + pip install -e .[test] + pytest + + release: runs-on: ubuntu-22.04 - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + needs: release-test steps: - uses: actions/checkout@v4 @@ -24,18 +40,7 @@ jobs: echo "Checking that package version [v$PKG_VERSION] matches release tag [${{ github.ref_name }}]" [ "${{ github.ref_type }}" = "tag" ] && [ "${{ github.ref_name }}" = "v$PKG_VERSION" ] - - name: Upgrade pip and setuptools - run: | - python -m pip install --upgrade pip setuptools - - - name: Install dependencies - run: pip install twine wheel - - - name: Setup deployment - run: python setup.py sdist bdist_wheel - - - name: Validate deployment - run: twine check dist/* + - uses: ./.github/actions/build-package - name: Run deployment run: From 6092061d0cbb48d2a77a83c299b52a0ebcd67d52 Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Thu, 17 Apr 2025 17:20:40 +0300 Subject: [PATCH 25/28] v1.14.0-rc5 --- CHANGELOG.md | 3 +++ mapbox_tilesets/__init__.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1cb16c..7ccff84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ======= +# 1.14.0-rc5 (2025-01-07) +- Temporarily remove the `estimate-cu` command for further refinement. + # 1.13.0 (2025-01-07) - Temporarily remove the `estimate-cu` command for further refinement. diff --git a/mapbox_tilesets/__init__.py b/mapbox_tilesets/__init__.py index e319c8c..553ae20 100644 --- a/mapbox_tilesets/__init__.py +++ b/mapbox_tilesets/__init__.py @@ -1,3 +1,3 @@ """mapbox_tilesets package""" -__version__ = "1.13.0" +__version__ = "1.14.0-rc5" From 2e7db0478f469c7855623ba61bd6ac560c404183 Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Thu, 17 Apr 2025 17:30:08 +0300 Subject: [PATCH 26/28] Typo --- .github/{workflows => actions}/build-package/action.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{workflows => actions}/build-package/action.yaml (100%) diff --git a/.github/workflows/build-package/action.yaml b/.github/actions/build-package/action.yaml similarity index 100% rename from .github/workflows/build-package/action.yaml rename to .github/actions/build-package/action.yaml From cdcdbeea7e9a9e9abbcf6b594ee67d5bdc268da3 Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Thu, 17 Apr 2025 17:33:03 +0300 Subject: [PATCH 27/28] 1.14.0-rc6 --- CHANGELOG.md | 2 +- mapbox_tilesets/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ccff84..b508bcc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ======= -# 1.14.0-rc5 (2025-01-07) +# 1.14.0-rc6 (2025-01-07) - Temporarily remove the `estimate-cu` command for further refinement. # 1.13.0 (2025-01-07) diff --git a/mapbox_tilesets/__init__.py b/mapbox_tilesets/__init__.py index 553ae20..a52026e 100644 --- a/mapbox_tilesets/__init__.py +++ b/mapbox_tilesets/__init__.py @@ -1,3 +1,3 @@ """mapbox_tilesets package""" -__version__ = "1.14.0-rc5" +__version__ = "1.14.0-rc6" From df3e47fe2ab6454445258a26f6604f9f5ff50341 Mon Sep 17 00:00:00 2001 From: dylannguyen11195 Date: Thu, 17 Apr 2025 17:50:09 +0300 Subject: [PATCH 28/28] Revert to 1.13.0 --- CHANGELOG.md | 3 --- mapbox_tilesets/__init__.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b508bcc..f1cb16c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,6 @@ ======= -# 1.14.0-rc6 (2025-01-07) -- Temporarily remove the `estimate-cu` command for further refinement. - # 1.13.0 (2025-01-07) - Temporarily remove the `estimate-cu` command for further refinement. diff --git a/mapbox_tilesets/__init__.py b/mapbox_tilesets/__init__.py index a52026e..e319c8c 100644 --- a/mapbox_tilesets/__init__.py +++ b/mapbox_tilesets/__init__.py @@ -1,3 +1,3 @@ """mapbox_tilesets package""" -__version__ = "1.14.0-rc6" +__version__ = "1.13.0"