Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@ jobs:
test:
strategy:
matrix:
include:
- python-version: 3.8
os: ubuntu-22.04
- python-version: 3.9
os: ubuntu-22.04
os: ["ubuntu-22.04"]
python-version: ["3.10", "3.11", "3.12"]

runs-on: ${{ matrix.os }}

Expand All @@ -27,9 +24,9 @@ jobs:

- 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]
python -m pip install --upgrade pip
pip install -e '.[estimate-area]'
pip install pytest pytest-cov pre-commit codecov

- name: Show Python and pytest versions
run: |
Expand All @@ -46,7 +43,7 @@ jobs:
run: ls -la

- name: Upload coverage to GitHub (optional, internal)
if: matrix.python-version == '3.8'
if: matrix.python-version == '3.10'
uses: actions/upload-artifact@v4
with:
name: coverage-report
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

=======

# 2.0.0 (2025-12-23)
- Migrates metadata to pyproject.toml
- Drops support for Python versions < 3.10

# 1.14.0 (2025-04-23)
- Added command `tilesets upload-changeset` that uploads a changeset file.
- Added command `tilesets publish-changesets` that publishes changesets for a incrementally updatable tileset.
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ After which you can add these changes and commit again. Note that failing pre-co

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
1. Update the version in `pyproject.toml`
2. Update the changelog
3. Commit changes to **your branch**. For example `git commit -am '0.2.0' && git push origin HEAD`
4. Get a review and merge your changes to master.
Expand Down
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,18 @@ CLI for interacting with and preparing data for the [Mapbox Tiling Service](http

## Requirements

- Python >= 3.6 (can be installed via virtualenv)
- Recommended: [virtualenv](https://virtualenv.pypa.io/) / [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io/en/latest/)
- Python >= 3.10

## Basic installation

`pip install mapbox-tilesets` will install everything but [`estimate-area`](#estimate-area).
`pip install mapbox-tilesets` will install everything but the [`estimate-area`](#estimate-area) command.

## Installing optional `estimate-area` command

If you are using an x86 Mac or Linux machine, run:
`pip install 'mapbox-tilesets[estimate-area]'`

Otherwise, you will need to install some dependencies.
`pip install 'mapbox-tilesets[estimate-area]'`. Otherwise, you will need to install some dependencies.

### arm64 MacOS

If you're on an arm64 Mac (e.g., with an M1 chip), you'll need to install [GDAL](https://gdal.org/) first. On Mac, a simple way is to use [Homebrew](https://brew.sh/):
If you're on an Arm64 Mac, you'll need to install [GDAL](https://gdal.org/) first. On Mac, a simple way is to use [Homebrew](https://brew.sh/):

```sh
$ brew install gdal
Expand Down Expand Up @@ -507,4 +502,4 @@ Publishes changesets for a tileset that supports incremental updates. This comma

```shell
tilesets publish-changesets <tileset_id> --changeset /path/to/changeset.json
```
```
8 changes: 7 additions & 1 deletion mapbox_tilesets/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
"""mapbox_tilesets package"""

__version__ = "1.14.0"
from importlib.metadata import PackageNotFoundError, version as _pkg_version

try:
__version__ = _pkg_version("mapbox-tilesets")
except PackageNotFoundError:
# Fallback for development mode
__version__ = "0.0.0.dev"
3 changes: 2 additions & 1 deletion mapbox_tilesets/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def __init__(self, message):
message: str
Error description
"""
super().__init__(message)
self.message = message


Expand All @@ -25,7 +26,7 @@ class TilesetNameError(TilesetsError):

def __init__(self, tileset_id):
self.tileset_id = tileset_id
self.message = "Invalid Tileset ID"
super().__init__("Invalid Tileset ID")

def __str__(self):
return "{tileset_id} -> {message}".format(
Expand Down
52 changes: 52 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "mapbox-tilesets"
version = "2.0.0"
description = "CLI for interacting with and preparing data for the Mapbox Tilesets API"
readme = "README.md"
requires-python = ">=3.10"
license = { file = "LICENSE.md" }
authors = [{ name = "Mapbox", email = "maps-api-team@mapbox.com" }]
keywords = ["mapbox", "tilesets", "cli", "geojson", "vector tiles"]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
]

dependencies = [
"click>=8.1",
"cligj>=0.7",
"requests>=2.32",
"requests-toolbelt>=1.0",
"jsonschema>=4.18,<5",
"mercantile>=1.1",
"geojson>=3.0",
"numpy>=1.23,<2",
]

[project.optional-dependencies]
estimate-area = ["supermercado>=0.2.0"]

[project.scripts]
tilesets = "mapbox_tilesets.scripts.cli:cli"

[tool.pytest.ini_options]
addopts = "-q --strict-markers --disable-warnings"
testpaths = ["tests"]

[tool.setuptools]
packages = ["mapbox_tilesets", "mapbox_tilesets.scripts"]

[dependency-groups]
dev = [
"pytest>=8",
"pytest-cov>=4",
"build>=1.2",
"pre-commit>=3.5",
"black==22.3.0",
]
12 changes: 0 additions & 12 deletions requirements.txt

This file was deleted.

Empty file removed setup.cfg
Empty file.
62 changes: 0 additions & 62 deletions setup.py

This file was deleted.

7 changes: 0 additions & 7 deletions tests/test_version_documentation.py

This file was deleted.

Loading