From 0547bc4f087bfb6b8faf3a6672f53bcc3862312d Mon Sep 17 00:00:00 2001 From: jesse Date: Fri, 27 Oct 2023 16:30:09 -0700 Subject: [PATCH] Version minor (#6) * version minor bc gotta do a processing thing * version minor --- CHANGELOG.md | 7 +++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- bench/test_eq.py | 1 + pyproject.toml | 6 +++++- python/utiles/__about__.py | 4 +++- python/utiles/cli.py | 2 +- python/utiles/rio_plugin.py | 8 ++++++++ 8 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 python/utiles/rio_plugin.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 825dbbd0..1dc48f0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# 0.1.0 + + - Drop python 3.7 (was good knowing you) + - Update pyo3 to 0.20.0 + - Added rasterio/rio entry points ('utiles' and 'ut' alias bc why type `rio utiles` over `rio ut`) + + # 0.0.2 - Added `__len__` to TilesGenerator for pbars diff --git a/Cargo.lock b/Cargo.lock index 0fe66737..c8fe759d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -209,7 +209,7 @@ dependencies = [ [[package]] name = "pyutiles" -version = "0.0.2" +version = "0.1.0" dependencies = [ "fast_hilbert", "geo-types", diff --git a/Cargo.toml b/Cargo.toml index 949de1c1..bf451e88 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyutiles" -version = "0.0.2" +version = "0.1.0" edition = "2021" include = ["src/**/*", "Cargo.toml", "LICENSE", "README.md"] license = "MIT OR Apache-2.0" diff --git a/bench/test_eq.py b/bench/test_eq.py index c3990758..dd95acec 100644 --- a/bench/test_eq.py +++ b/bench/test_eq.py @@ -26,6 +26,7 @@ def test_tile_equality_tuple2tile(benchmark: BenchmarkFixture) -> None: tile_obj = utiles.from_tuple(t) benchmark(_equal, t, tile_obj) + def test_tile_equality_tile2tuple(benchmark: BenchmarkFixture) -> None: t = (1, 2, 3) tile_obj = utiles.from_tuple(t) diff --git a/pyproject.toml b/pyproject.toml index 364a0c21..aa41103a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "utiles" -version = "0.0.2" +version = "0.1.0" description = "utiles = (utils + tiles) * rust" requires-python = ">=3.8" classifiers = [ @@ -21,6 +21,10 @@ dependencies = [ [project.scripts] utiles = "utiles.cli:cli" +[project.entry-points."rasterio.rio_plugins"] +utiles = "utiles.rio_plugin:rio_utiles" +ut = "utiles.rio_plugin:rio_ut" + [tool.maturin] python-source = "python" features = ["pyo3/extension-module"] diff --git a/python/utiles/__about__.py b/python/utiles/__about__.py index 2c301f75..7ca6fbfb 100644 --- a/python/utiles/__about__.py +++ b/python/utiles/__about__.py @@ -1,7 +1,9 @@ """Package metadata/info""" +from utiles.libutiles import __version_lib__ + __all__ = ("__title__", "__description__", "__pkgroot__", "__version__") __title__ = "utiles" __description__ = "utiles = utils + tiles + rust" __pkgroot__ = __file__.replace("__about__.py", "").rstrip("/\\") -__version__ = "0.0.2" +__version__ = __version_lib__ diff --git a/python/utiles/cli.py b/python/utiles/cli.py index 83eb230c..ee7a19d1 100644 --- a/python/utiles/cli.py +++ b/python/utiles/cli.py @@ -50,7 +50,7 @@ def iter_lines(lines: List[str]) -> Iterable[str]: # The CLI command group. -@click.group(help="Command line interface for the utiles Python package.") +@click.group(name="utiles", help="utiles cli (python)") @click.option("--verbose", "-v", count=True, help="Increase verbosity.") @click.option("--quiet", "-q", count=True, help="Decrease verbosity.") @click.version_option(version=utiles.__version__, message="%(version)s") diff --git a/python/utiles/rio_plugin.py b/python/utiles/rio_plugin.py new file mode 100644 index 00000000..ee44d13c --- /dev/null +++ b/python/utiles/rio_plugin.py @@ -0,0 +1,8 @@ +import click +from utiles.cli import cli as rio_utiles + +__all__ = ("rio_ut", "rio_utiles") + +rio_ut = click.CommandCollection( + sources=[rio_utiles], name="ut", help="utiles cli (alias)" +)