diff --git a/.codespellrc b/.codespellrc index 3f048ee5..692fb2c3 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,3 +1,3 @@ [codespell] -skip = .git/*,./doc/_build/*,./doc/gallery/*,.tox/*,./reports/*,./issues/*,*.sublime-workspace +skip = .git/*,./doc/_build/*,./doc/gallery/*,.tox/*,./reports/*,./issues/*,*.sublime-workspace,./test_container/* ignore-words-list = nd diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 5fe87de9..d894f29a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -26,7 +26,7 @@ Your reports must include the following features: 1. **succinct description** of the problem - typically a line or two at most. 2. **succinct, dependency-free code** which reproduces the problem, otherwise known as a [Minimal, Complete, and Verifiable](https://stackoverflow.com/help/mcve) example. - IF YOU DO NOT HAVE A COMPLETE, RUNNABLE TEST CASE WRITTEN DIRECTLY IN THE TEXTAREA BELOW, YOUR ISSUE MAY BE CLOSED. + **Please note that if you do not have a complete and runnable test case written directly in the textarea below, then your issue will be very hard for us to process and may be closed.** 3. **complete stack traces for all errors** - please avoid screenshots, use formatted text inside issues. diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2269e2c3..97b86a1b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ default_language_version: python: python3.8 repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-added-large-files - id: check-case-conflict @@ -17,11 +17,11 @@ repos: hooks: - id: isort - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 23.10.0 hooks: - id: black - repo: https://github.com/codespell-project/codespell - rev: v2.2.4 + rev: v2.2.6 hooks: - id: codespell - repo: https://github.com/PyCQA/pydocstyle @@ -31,6 +31,6 @@ repos: additional_dependencies: ["tomli"] exclude: "tests" - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 6.1.0 hooks: - id: flake8 diff --git a/CHANGES.txt b/CHANGES.txt index 0414a4f8..cd1144c1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,11 +1,18 @@ GeoAlchemy 2 Changelog ====================== +0.14.2 +------ + +* Test: Add a container to run the tests @mbway (#479) +* Feat: Added type stub generation for dynamic functions @mbway (#478) +* Docs: Add new mapping style example in the gallery @adrien-berchet (#473) + 0.14.1 ------ * Add type annotations @shuttle1987 (#464) -* Tests: Minor improvements @adrien-berchet (#465) +* Test: Minor improvements @adrien-berchet (#465) * Docs: Add util to replace keywords in docstrings @adrien-berchet (#461) * Docs: Fix badges and link to docs @adrien-berchet (#460) diff --git a/MANIFEST.in b/MANIFEST.in index f218bf26..058ea85a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,4 @@ include *.rst include *.txt +include geoalchemy2/functions.pyi +include geoalchemy2/py.typed diff --git a/doc/index.rst b/doc/index.rst index 65516cc4..a6d38e76 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -141,6 +141,7 @@ Contributors: * ijl (https://github.com/ijl) * Loïc Gasser (https://github.com/loicgasser) * Marcel Radischat (https://github.com/quiqua) +* Matt Broadway (https://github.com/mbway) * rapto (https://github.com/rapto) * Serge Bouchut (https://github.com/SergeBouchut) * Tobias Bieniek (https://github.com/Turbo87) diff --git a/geoalchemy2/_functions.py b/geoalchemy2/_functions.py index 41469e15..bb22a54b 100644 --- a/geoalchemy2/_functions.py +++ b/geoalchemy2/_functions.py @@ -252,7 +252,7 @@ ('ST_AsText', None, '''Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata.'''), ('ST_AsBinary', None, - '''[gometry] Return the Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.\nOR\n[raster] Return the Well-Known Binary (WKB) representation of the raster.'''), + '''[geometry] Return the Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.\nOR\n[raster] Return the Well-Known Binary (WKB) representation of the raster.'''), ('ST_AsEWKB', None, '''Return the Well-Known Binary (WKB) representation of the geometry with SRID meta data.'''), ('ST_AsHEXEWKB', None, diff --git a/geoalchemy2/functions.pyi b/geoalchemy2/functions.pyi index d5c7b362..fb0da0cf 100644 --- a/geoalchemy2/functions.pyi +++ b/geoalchemy2/functions.pyi @@ -1238,7 +1238,7 @@ class ST_AsText(GenericFunction): class ST_AsBinary(GenericFunction): """ - [gometry] Return the Well-Known Binary (WKB) representation of the geometry/geography without SRID + [geometry] Return the Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data. OR [raster] Return the Well-Known Binary (WKB) representation of the raster. diff --git a/pyproject.toml b/pyproject.toml index 744ae584..753df5f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,5 +45,12 @@ testpaths = [ ] # MYPY -[tool.mypy] +[[tool.mypy.overrides]] +module = [ + "importlib.*", + "psycopg2cffi", + "rasterio", + "shapely", + "shapely.*" +] ignore_missing_imports = true diff --git a/tox.ini b/tox.ini index 47b0e146..d7bc6489 100644 --- a/tox.ini +++ b/tox.ini @@ -22,8 +22,9 @@ passenv= SPATIALITE_LIBRARY_PATH setenv= COVERAGE_FILE = {env:COVERAGE_FILE:.coverage-{envname}} - EXPECTED_COV = 90 + EXPECTED_COV = 93 pypy3: EXPECTED_COV = 85 + sqla14: PYTEST_ADDOPTS = {env:PYTEST_ADDOPTS:} --mypy-ignore-missing-imports deps= sqla14: SQLAlchemy==1.4.* sqlalatest: SQLAlchemy