Skip to content

Commit

Permalink
Prepare first release (#31)
Browse files Browse the repository at this point in the history
* Add RELEASING.md

* Add testing for Python 3.12 and remove support for 3.8 to make it easier to maintain

* Update installation instructions

* Bump version to 0.1.0
  • Loading branch information
binste authored Nov 24, 2023
1 parent 911a227 commit 496b3b5
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_and_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
51 changes: 51 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions altair_tiles/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions doc/intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
},
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -86,7 +86,7 @@ build-and-publish = ["clean", "build", "publish"]


[tool.ruff]
target-version = "py38"
target-version = "py39"
line-length = 88
select = [
# flake8-bugbear
Expand Down

0 comments on commit 496b3b5

Please sign in to comment.