diff --git a/.github/workflows/test_and_lint.yml b/.github/workflows/test_and_lint.yml index ceb94aa..0d7f467 100644 --- a/.github/workflows/test_and_lint.yml +++ b/.github/workflows/test_and_lint.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.12"] name: py ${{ matrix.python-version }} steps: - uses: actions/checkout@v3 diff --git a/README.md b/README.md index 169f844..917b0fb 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,8 @@ You can use altair_tiles to add tiles from any xyz tile provider such as OpenStr You can find the documentation [here](https://altair-viz.github.io/altair_tiles). For a general introduction to plotting geographic data with Altair, see [Geoshape - Vega-Altair](https://altair-viz.github.io/user_guide/marks/geoshape.html) and [Specifying Data - Vega-Altair](https://altair-viz.github.io/user_guide/data.html#spatial-data). ## Installation -We have not yet put the package on pypi but you can install it from GitHub with: - ```bash -pip install git+https://github.com/altair-viz/altair_tiles.git +pip install altair_tiles ``` altair-tiles requires at least Vega version `5.26.0`. If you use an IDE such as a Jupyter Notebook or VS Code, you usually don't have to worry about this. diff --git a/RELEASING.md b/RELEASING.md new file mode 100644 index 0000000..ffe0aa0 --- /dev/null +++ b/RELEASING.md @@ -0,0 +1,51 @@ +1. Create a new virtual environment following the instructions in `README.md`. + Make sure to also install all dependencies for the documentation. + +2. Make certain your branch is in sync with head: + + git pull upstream main + +3. Do a clean doc build: + + hatch run doc:clean + hatch run doc:build + hatch run doc:serve + + Navigate to http://localhost:8000 and ensure it looks OK (particularly + do a visual scan of the gallery thumbnails). + +4. Update version in `altair_tiles/__init__.py`: + +5. Commit change and push to main: + + git add . -u + git commit -m "MAINT: bump version to 5.0.0" + git push upstream main + +6. Tag the release: + + git tag -a v5.0.0 -m "version 5.0.0 release" + git push upstream v5.0.0 + +7. Build source & wheel distributions: + + hatch clean # clean old builds & distributions + hatch build # create a source distribution and universal wheel + +8. Publish to PyPI (Requires correct PyPI owner permissions): + + hatch publish + +9. Build and publish docs: + + hatch run doc:build-and-publish + +10. Update version to e.g. 5.1.0dev in `altair_tiles/__init__.py`: + +11. Commit change and push to main: + + git add . -u + git commit -m "MAINT: bump version to 5.1.0dev" + git push upstream main + +12. Add release in https://github.com/binste/dbt-ibis/releases and select the version tag diff --git a/altair_tiles/__init__.py b/altair_tiles/__init__.py index 028eeea..e7fed04 100644 --- a/altair_tiles/__init__.py +++ b/altair_tiles/__init__.py @@ -1,9 +1,9 @@ -__version__ = "0.1.0dev" +__version__ = "0.1.0" __all__ = ["add_tiles", "add_attribution", "create_tiles_chart", "providers"] import math from dataclasses import dataclass -from typing import Final, List, Optional, Union, cast +from typing import Final, Optional, Union, cast import altair as alt import mercantile as mt @@ -361,7 +361,7 @@ class _XYMinMax: y_max: int -def _bounds_to_x_y_min_max(bounds: List[List[float]], zoom: int) -> _XYMinMax: +def _bounds_to_x_y_min_max(bounds: list[list[float]], zoom: int) -> _XYMinMax: south_west, north_east = bounds south, west = south_west north, east = north_east diff --git a/doc/intro.ipynb b/doc/intro.ipynb index 246ab56..d02eb4e 100644 --- a/doc/intro.ipynb +++ b/doc/intro.ipynb @@ -13,10 +13,8 @@ "For a general introduction to plotting geographic data with Altair, see [Geoshape - Vega-Altair](https://altair-viz.github.io/user_guide/marks/geoshape.html) and [Specifying Data - Vega-Altair](https://altair-viz.github.io/user_guide/data.html#spatial-data).\n", "\n", "## Installation\n", - "We have not yet published the package on pypi but you can install it from GitHub with:\n", - "\n", "```bash\n", - "pip install git+https://github.com/altair-viz/altair_tiles.git\n", + "pip install altair_tiles\n", "```\n" ] }, diff --git a/pyproject.toml b/pyproject.toml index ae9ea17..465fcc2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,21 +18,21 @@ dependencies = ["altair", "xyzservices", "mercantile"] description = "altair_tiles" readme = "README.md" keywords = ["altair", "basemaps", "tiles"] -requires-python = ">=3.8" +requires-python = ">=3.9" dynamic = ["version"] license-files = { paths = ["LICENSE"] } classifiers = [ "License :: OSI Approved :: BSD License", "Natural Language :: English", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Typing :: Typed", ] [project.urls] -Source = "https://github.com/binste/altair_tiles" +Source = "https://github.com/altair-viz/altair_tiles" [project.optional-dependencies] dev = [ @@ -86,7 +86,7 @@ build-and-publish = ["clean", "build", "publish"] [tool.ruff] -target-version = "py38" +target-version = "py39" line-length = 88 select = [ # flake8-bugbear