Tags: openmaptiles/openmaptiles-tools
Tags
Remove `STRICT` statement (#392) Remove `STRICT` statement from `get_basic_names` and `get_latin_name` functions. FIX openmaptiles/openmaptiles#1319 Concurrently with PR openmaptiles/openmaptiles#1320
Revert to Python 3.9 (#389) Tools in 6.0 used Python 3.8. The 6.1 tried to upgrade to Python 3.10, but the [py-ascii-graph](https://github.com/kakwa/py-ascii-graph) is not compatible (used by the `test-perf` tool). Reverting to Python 3.9 should fix it for now.
Add helpText to requires (#373) Add `helpText` to `layer.requires` like discussed in openmaptiles/openmaptiles#1220 I had to change from `SELECT 'osm_ocean_polygon'::regclass;` to `PERFORM 'osm_ocean_polygon'::regclass;` because plpgsql needs a return value if `SELECT` is used. Also added an error if a function has no arguments: ``` when invalid_text_representation then RAISE EXCEPTION '%! The arguments of the required function "osmFunc" of the layer "water" are missing. Example: "osmFunc(text)"', SQLERRM; ``` Example: ``` layer: id: "water" requires: helpText: 'This is a text with "quotes"' functions: "osmFunc" tables: "osm_ocean_polygon" ``` SQL: ``` -- Assert osm_ocean_polygon exists do $$ begin PERFORM 'osm_ocean_polygon'::regclass; exception when undefined_table then RAISE EXCEPTION '%! This is error text with "quotes"', SQLERRM; end; $$ language 'plpgsql'; -- Assert osmFunc exists do $$ begin PERFORM 'osmFunc'::regprocedure; exception when undefined_function then RAISE EXCEPTION '%! This is a text with "quotes"', SQLERRM; when invalid_text_representation then RAISE EXCEPTION '%! The arguments of the required function "osmFunc" of the layer "water" are missing. Example: "osmFunc(text)"', SQLERRM; end; $$ language 'plpgsql'; ``` Result of `make import-sql`: > psql:/sql/parallel/water__waterway.sql:10: ERROR: relation "osm_ocean_polygon2" does not exist! This is a text with "quotes" Co-authored-by: Yuri Astrakhan <[email protected]>
PreviousNext