From dafe3f5b83addce1784db9d5344ab04152d9e5de Mon Sep 17 00:00:00 2001 From: Zacharias Knudsen Date: Thu, 19 Jan 2023 08:33:23 +0100 Subject: [PATCH] Prepare for release v4.1.0 (#114) --- CHANGELOG.md | 9 ++++++--- CMakeLists.txt | 8 +++----- META.json | 10 +++++----- docs/api.md | 20 +++++++++---------- docs/development.md | 1 + h3/CMakeLists.txt | 4 ++-- h3/sql/install/04-hierarchy.sql | 4 ++-- h3/sql/install/30-extension.sql | 2 +- ...3--unreleased.sql => h3--4.0.3--4.1.0.sql} | 4 ++-- h3/src/deprecated.c | 4 ++-- h3/test/CMakeLists.txt | 2 +- h3_postgis/CMakeLists.txt | 4 ++-- h3_postgis/sql/install/03-traversal.sql | 2 +- h3_postgis/sql/install/05-regions.sql | 8 ++++---- h3_postgis/sql/install/30-wkb.sql | 4 ++-- ...eased.sql => h3_postgis--4.0.3--4.1.0.sql} | 2 +- h3_postgis/test/CMakeLists.txt | 2 +- 17 files changed, 46 insertions(+), 44 deletions(-) rename h3/sql/updates/{h3--4.0.3--unreleased.sql => h3--4.0.3--4.1.0.sql} (96%) rename h3_postgis/sql/updates/{h3_postgis--4.0.3--unreleased.sql => h3_postgis--4.0.3--4.1.0.sql} (94%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 621b82c4..4ede3ff4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,14 +26,16 @@ avoid adding features or APIs which do not map onto the Click to see more. + + +## [4.1.0] - 2023-01-18 + - Bump `h3` to `v4.1.0` - Add bindings for `h3_cell_to_child_pos` and `h3_child_pos_to_cell`. - Use CMake for entire build (see [#70]) - Add helper to fix pass-by-value migration (see [#111]) - Allow distance operator `<->` to work for cells at different resolutions (using center child). - - ## [4.0.3] - 2022-11-04 - Add BRIN operator class (see [#97], thanks [@mngr777]) @@ -182,7 +184,8 @@ avoid adding features or APIs which do not map onto the - Initial public release -[unreleased]: https://github.com/zachasme/h3-pg/compare/v4.0.3...HEAD +[unreleased]: https://github.com/zachasme/h3-pg/compare/v4.1.0...HEAD +[4.1.0]: https://github.com/zachasme/h3-pg/compare/v4.0.3...v4.1.0 [4.0.3]: https://github.com/zachasme/h3-pg/compare/v4.0.2...v4.0.3 [4.0.2]: https://github.com/zachasme/h3-pg/compare/v4.0.1...v4.0.2 [4.0.1]: https://github.com/zachasme/h3-pg/compare/v4.0.0...v4.0.1 diff --git a/CMakeLists.txt b/CMakeLists.txt index 7274f8c2..4f972da1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ endif() # Listing the version is nice here since it sets lots of useful variables project( h3-pg - VERSION 4.0.3 + VERSION 4.1.0 LANGUAGES C ) @@ -52,12 +52,10 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) include(CTest) endif() -# Include the extensions. -set(CORE_VERSION 4.0.1) -set(TEST_VERSION unreleased) - +# Include core library add_subdirectory(cmake/h3) +# Include extensions add_subdirectory(h3) add_subdirectory(h3_postgis) diff --git a/META.json b/META.json index c012f80b..3e3e5aee 100644 --- a/META.json +++ b/META.json @@ -2,21 +2,21 @@ "name": "h3", "abstract": "PostgreSQL bindings for H3", "description": "PostgreSQL bindings for H3, a hierarchical hexagonal geospatial indexing system.", - "version": "unreleased", + "version": "4.1.0", "maintainer": "Zacharias Knudsen ", "license": "apache_2_0", "provides": { "h3": { "abstract": "PostgreSQL bindings for H3", - "file": "h3--unreleased.sql", + "file": "h3--4.1.0.sql", "docfile": "README.md", - "version": "unreleased" + "version": "4.1.0" }, "h3_postgis": { "abstract": "H3 PostGIS integration", - "file": "h3_postgis--unreleased.sql", + "file": "h3_postgis--4.1.0.sql", "docfile": "README.md", - "version": "unreleased" + "version": "4.1.0" } }, "resources": { diff --git a/docs/api.md b/docs/api.md index 17dcc953..b38ac02c 100644 --- a/docs/api.md +++ b/docs/api.md @@ -182,14 +182,14 @@ Compacts the given array as best as possible. ### h3_cell_to_child_pos(child `h3index`, parentRes `integer`) ⇒ `int8` -*Since vunreleased* +*Since v4.1.0* Returns the position of the child cell within an ordered list of all children of the cells parent at the specified resolution parentRes. The order of the ordered list is the same as that returned by cellToChildren. This is the complement of childPosToCell. ### h3_child_pos_to_cell(childPos `int8`, parent `h3index`, childRes `int`) ⇒ `h3index` -*Since vunreleased* +*Since v4.1.0* Returns the child cell at a given position within an ordered list of all children of parent at the specified resolution childRes. The order of the ordered list is the same as that returned by cellToChildren. This is the complement of cellToChildPos. @@ -489,7 +489,7 @@ Get the currently installed version of the extension. ### h3_pg_migrate_pass_by_reference(`h3index`) ⇒ `h3index` -*Since vunreleased* +*Since v4.1.0* Migrate h3index from pass-by-reference to pass-by-value. @@ -555,7 +555,7 @@ Splits polygons when crossing 180th meridian. # PostGIS Grid Traversal Functions ### h3_grid_path_cells_recursive(origin `h3index`, destination `h3index`) ⇒ SETOF `h3index` -*Since vunreleased* +*Since v4.1.0* # PostGIS Region Functions @@ -569,19 +569,19 @@ Splits polygons when crossing 180th meridian. ### h3_cells_to_multi_polygon_geometry(`h3index[]`) ⇒ `geometry` -*Since vunreleased* +*Since v4.1.0* ### h3_cells_to_multi_polygon_geography(`h3index[]`) ⇒ `geography` -*Since vunreleased* +*Since v4.1.0* ### h3_cells_to_multi_polygon_geometry(setof `h3index`) -*Since vunreleased* +*Since v4.1.0* ### h3_cells_to_multi_polygon_geography(setof `h3index`) -*Since vunreleased* +*Since v4.1.0* # PostGIS casts @@ -597,7 +597,7 @@ Splits polygons when crossing 180th meridian. # WKB indexing functions ### h3_cell_to_boundary_wkb(cell `h3index`) ⇒ `bytea` -*Since vunreleased* +*Since v4.1.0* Finds the boundary of the index, converts to EWKB. @@ -610,7 +610,7 @@ This function has to return WKB since Postgres does not provide multipolygon typ # WKB regions functions ### h3_cells_to_multi_polygon_wkb(`h3index[]`) ⇒ `bytea` -*Since vunreleased* +*Since v4.1.0* Create a LinkedGeoPolygon describing the outline(s) of a set of hexagons, converts to EWKB. diff --git a/docs/development.md b/docs/development.md index be8c9561..25f615da 100644 --- a/docs/development.md +++ b/docs/development.md @@ -10,6 +10,7 @@ Documentation is generated from the sql files, using the script `scripts/documen - Don't follow semver, simply use major and minor from H3 core and increment patch. - Version number should be changed in `h3.control`, `h3_postgis.control` and `META.json`. - Update files suffixed `--unreleased` should be renamed. + - Installer `.sql` files should have `@ availability` comments updated. - Create new update files with `--unreleased` suffix. - Update changelog by moving from `Unreleased` to a new section 2. Create a release on GitHub diff --git a/h3/CMakeLists.txt b/h3/CMakeLists.txt index 21c4e6de..248bd0c6 100644 --- a/h3/CMakeLists.txt +++ b/h3/CMakeLists.txt @@ -4,7 +4,7 @@ PostgreSQL_add_extension(postgresql_h3 RELOCATABLE NAME h3 COMMENT "H3 bindings for PostgreSQL" - VERSION "unreleased" #${PROJECT_VERSION} + VERSION ${PROJECT_VERSION} #"unreleased" COMPONENT ${PROJECT_NAME} SOURCES src/binding/edge.c @@ -72,7 +72,7 @@ PostgreSQL_add_extension(postgresql_h3 sql/updates/h3--4.0.0--4.0.1.sql sql/updates/h3--4.0.1--4.0.2.sql sql/updates/h3--4.0.2--4.0.3.sql - sql/updates/h3--4.0.3--unreleased.sql + sql/updates/h3--4.0.3--4.1.0.sql ) # include diff --git a/h3/sql/install/04-hierarchy.sql b/h3/sql/install/04-hierarchy.sql index ab5994cb..0ec15571 100644 --- a/h3/sql/install/04-hierarchy.sql +++ b/h3/sql/install/04-hierarchy.sql @@ -47,14 +47,14 @@ AS 'h3' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_compact_cells(cells h3index[]) IS 'Compacts the given array as best as possible.'; ---@ availability: unreleased +--@ availability: 4.1.0 CREATE OR REPLACE FUNCTION h3_cell_to_child_pos(child h3index, parentRes integer) RETURNS int8 AS 'h3' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_cell_to_child_pos(child h3index, parentRes integer) IS 'Returns the position of the child cell within an ordered list of all children of the cells parent at the specified resolution parentRes. The order of the ordered list is the same as that returned by cellToChildren. This is the complement of childPosToCell.'; ---@ availability: unreleased +--@ availability: 4.1.0 CREATE OR REPLACE FUNCTION h3_child_pos_to_cell(childPos int8, parent h3index, childRes int) RETURNS h3index AS 'h3' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION diff --git a/h3/sql/install/30-extension.sql b/h3/sql/install/30-extension.sql index 7220d2f9..510965d4 100644 --- a/h3/sql/install/30-extension.sql +++ b/h3/sql/install/30-extension.sql @@ -22,7 +22,7 @@ CREATE OR REPLACE FUNCTION h3_get_extension_version() RETURNS text COMMENT ON FUNCTION h3_get_extension_version() IS 'Get the currently installed version of the extension.'; ---@ availability: unreleased +--@ availability: 4.1.0 CREATE OR REPLACE FUNCTION h3_pg_migrate_pass_by_reference(h3index) RETURNS h3index AS 'h3' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_pg_migrate_pass_by_reference(h3index) IS diff --git a/h3/sql/updates/h3--4.0.3--unreleased.sql b/h3/sql/updates/h3--4.0.3--4.1.0.sql similarity index 96% rename from h3/sql/updates/h3--4.0.3--unreleased.sql rename to h3/sql/updates/h3--4.0.3--4.1.0.sql index dc98eb89..4a3edf05 100644 --- a/h3/sql/updates/h3--4.0.3--unreleased.sql +++ b/h3/sql/updates/h3--4.0.3--4.1.0.sql @@ -1,5 +1,5 @@ /* - * Copyright 2022 Bytes & Brains + * Copyright 2022-2023 Bytes & Brains * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ */ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION h3 UPDATE TO 'unreleased'" to load this file. \quit +\echo Use "ALTER EXTENSION h3 UPDATE TO '4.1.0'" to load this file. \quit DROP FUNCTION IF EXISTS h3_cell_to_boundary_wkb(h3index); DROP FUNCTION IF EXISTS h3_cells_to_multi_polygon_wkb(h3index[]); diff --git a/h3/src/deprecated.c b/h3/src/deprecated.c index f8dde051..755d6fa9 100644 --- a/h3/src/deprecated.c +++ b/h3/src/deprecated.c @@ -74,5 +74,5 @@ H3_DEPRECATE("4.0.0", h3_to_geo_boundary); H3_DEPRECATE("4.0.0", h3_to_geo); H3_DEPRECATE("4.0.0", h3_uncompact); H3_DEPRECATE("4.0.0", h3_unidirectional_edge_is_valid); -H3_DEPRECATE("unreleased", h3_cell_to_boundary_wkb); -H3_DEPRECATE("unreleased", h3_cells_to_multi_polygon_wkb); +H3_DEPRECATE("4.1.0", h3_cell_to_boundary_wkb); +H3_DEPRECATE("4.1.0", h3_cells_to_multi_polygon_wkb); diff --git a/h3/test/CMakeLists.txt b/h3/test/CMakeLists.txt index 4cd9f32b..57116897 100644 --- a/h3/test/CMakeLists.txt +++ b/h3/test/CMakeLists.txt @@ -32,7 +32,7 @@ if(PostgreSQL_VALIDATE_EXTUPGRADE) COMMAND pg_validate_extupgrade --extname h3 --from 0.1.0 - --to unreleased + --to ${PROJECT_VERSION} #unreleased ) endif() diff --git a/h3_postgis/CMakeLists.txt b/h3_postgis/CMakeLists.txt index c517a251..348baf9b 100644 --- a/h3_postgis/CMakeLists.txt +++ b/h3_postgis/CMakeLists.txt @@ -2,7 +2,7 @@ PostgreSQL_add_extension(postgresql_h3_postgis RELOCATABLE NAME h3_postgis COMMENT "H3 PostGIS integration" - VERSION "unreleased" #${PROJECT_VERSION} + VERSION ${PROJECT_VERSION} #"unreleased" COMPONENT ${PROJECT_NAME} REQUIRES h3 @@ -29,7 +29,7 @@ PostgreSQL_add_extension(postgresql_h3_postgis sql/updates/h3_postgis--4.0.0--4.0.1.sql sql/updates/h3_postgis--4.0.1--4.0.2.sql sql/updates/h3_postgis--4.0.2--4.0.3.sql - sql/updates/h3_postgis--4.0.3--unreleased.sql + sql/updates/h3_postgis--4.0.3--4.1.0.sql ) # include diff --git a/h3_postgis/sql/install/03-traversal.sql b/h3_postgis/sql/install/03-traversal.sql index 20d74df8..9b41d2c0 100644 --- a/h3_postgis/sql/install/03-traversal.sql +++ b/h3_postgis/sql/install/03-traversal.sql @@ -16,7 +16,7 @@ --| # PostGIS Grid Traversal Functions ---@ availability: unreleased +--@ availability: 4.1.0 --@ refid: h3_grid_path_cells_recursive CREATE OR REPLACE FUNCTION h3_grid_path_cells_recursive(origin h3index, destination h3index) RETURNS SETOF h3index diff --git a/h3_postgis/sql/install/05-regions.sql b/h3_postgis/sql/install/05-regions.sql index cbe0d4a3..47efa0a9 100644 --- a/h3_postgis/sql/install/05-regions.sql +++ b/h3_postgis/sql/install/05-regions.sql @@ -43,19 +43,19 @@ CREATE OR REPLACE FUNCTION h3_polygon_to_cells(multi geometry, resolution intege CREATE OR REPLACE FUNCTION h3_polygon_to_cells(multi geography, resolution integer) RETURNS SETOF h3index AS $$ SELECT h3_polygon_to_cells($1::geometry, $2) $$ LANGUAGE SQL IMMUTABLE PARALLEL SAFE CALLED ON NULL INPUT; -- NOT STRICT ---@ availability: unreleased +--@ availability: 4.1.0 --@ refid: h3_cells_to_multi_polygon_geometry CREATE OR REPLACE FUNCTION h3_cells_to_multi_polygon_geometry(h3index[]) RETURNS geometry AS $$ SELECT h3_cells_to_multi_polygon_wkb($1)::geometry $$ IMMUTABLE STRICT PARALLEL SAFE LANGUAGE SQL; ---@ availability: unreleased +--@ availability: 4.1.0 --@ refid: h3_cells_to_multi_polygon_geography CREATE OR REPLACE FUNCTION h3_cells_to_multi_polygon_geography(h3index[]) RETURNS geography AS $$ SELECT h3_cells_to_multi_polygon_wkb($1)::geography $$ IMMUTABLE STRICT PARALLEL SAFE LANGUAGE SQL; ---@ availability: unreleased +--@ availability: 4.1.0 --@ refid: h3_cells_to_multi_polygon_geometry_agg CREATE AGGREGATE h3_cells_to_multi_polygon_geometry(h3index) ( sfunc = array_append, @@ -64,7 +64,7 @@ CREATE AGGREGATE h3_cells_to_multi_polygon_geometry(h3index) ( parallel = safe ); ---@ availability: unreleased +--@ availability: 4.1.0 --@ refid: h3_cells_to_multi_polygon_geography_agg CREATE AGGREGATE h3_cells_to_multi_polygon_geography(h3index) ( sfunc = array_append, diff --git a/h3_postgis/sql/install/30-wkb.sql b/h3_postgis/sql/install/30-wkb.sql index 76fc523a..ffebba8c 100644 --- a/h3_postgis/sql/install/30-wkb.sql +++ b/h3_postgis/sql/install/30-wkb.sql @@ -16,7 +16,7 @@ --| # WKB indexing functions ---@ availability: unreleased +--@ availability: 4.1.0 CREATE OR REPLACE FUNCTION h3_cell_to_boundary_wkb(cell h3index) RETURNS bytea AS 'h3_postgis' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION @@ -29,7 +29,7 @@ This function has to return WKB since Postgres does not provide multipolygon typ --| # WKB regions functions ---@ availability: unreleased +--@ availability: 4.1.0 CREATE OR REPLACE FUNCTION h3_cells_to_multi_polygon_wkb(h3index[]) RETURNS bytea AS 'h3_postgis' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION diff --git a/h3_postgis/sql/updates/h3_postgis--4.0.3--unreleased.sql b/h3_postgis/sql/updates/h3_postgis--4.0.3--4.1.0.sql similarity index 94% rename from h3_postgis/sql/updates/h3_postgis--4.0.3--unreleased.sql rename to h3_postgis/sql/updates/h3_postgis--4.0.3--4.1.0.sql index 8be9a8a9..2109e42d 100644 --- a/h3_postgis/sql/updates/h3_postgis--4.0.3--unreleased.sql +++ b/h3_postgis/sql/updates/h3_postgis--4.0.3--4.1.0.sql @@ -15,7 +15,7 @@ */ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION h3_postgis UPDATE TO 'unreleased'" to load this file. \quit +\echo Use "ALTER EXTENSION h3_postgis UPDATE TO '4.1.0'" to load this file. \quit CREATE OR REPLACE FUNCTION h3_cell_to_boundary_wkb(cell h3index) RETURNS bytea diff --git a/h3_postgis/test/CMakeLists.txt b/h3_postgis/test/CMakeLists.txt index b0ada47b..020fb76d 100644 --- a/h3_postgis/test/CMakeLists.txt +++ b/h3_postgis/test/CMakeLists.txt @@ -23,6 +23,6 @@ if(PostgreSQL_VALIDATE_EXTUPGRADE) COMMAND pg_validate_extupgrade --extname h3_postgis --from 4.0.0 - --to unreleased + --to ${PROJECT_VERSION} #unreleased ) endif()