Skip to content

Commit

Permalink
Release 0.14.0 (#457)
Browse files Browse the repository at this point in the history
* Release 0.14.0

* Add changelog in docs

* Improve docs for load_spatialite
  • Loading branch information
adrien-berchet committed Jul 5, 2023
1 parent 3dd0582 commit 9daf455
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ jobs:
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.10
python-version: "3.10"

# Build distribution and deploy to Pypi
- name: Build and deploy package
Expand Down
36 changes: 36 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,42 @@
GeoAlchemy 2 Changelog
======================

0.14.0
------

* Split load_spatialite into load_spatialite_driver and init_spatialite @adrien-berchet (#459)
* Remove the management parameter @adrien-berchet (#415)
* Add GeoPackage support @adrien-berchet (#456)
* CI: Use new action to setup Mamba @adrien-berchet (#455)
* Fix codespell config and typo 'prodived' -> 'provided' @djm93dev (#454)
* Fix ReadTheDocs generation @adrien-berchet (#452)
* Fix compatibility with Alembic>1.11 @adrien-berchet (#447)
* Add Py311 support @adrien-berchet (#446)
* Add an example to insert raster entries in gallery @adrien-berchet (#438)
* fix: handle mysql schemas in column reflection @EtienneDG (#443)
* Fix: Shapely remains optional requirement @adrien-berchet (#441)
* Fix CI @adrien-berchet (#439)
* Add auto extended feature and methods for WKT/WKB conversion from/to extended elements @adrien-berchet (#435)
* setup.py needs to know about subpackages @EdwardBetts (#434)
* Reorganize tests and fix nullable propagation and some other bugs @adrien-berchet (#433)
* Reorganize dialect-specific code @adrien-berchet (#432)
* Add partial MySQL support @adrien-berchet (#330)

0.13.3
------

* Fix compatibility with Alembic>1.11 @adrien-berchet (#449)

0.13.2
------

* Install Python and Pypy using Micromamba in CI @adrien-berchet (#428)
* Move SQLite functions to the relevant module @adrien-berchet (#427)
* Remove schema from the engine used in tests for SQLite dialect @adrien-berchet (#426)
* Improve monkeypatch robustness and related tests in Alembic helpers @adrien-berchet (#425)
* Fix compatibility with SQLAlchemy>=2 @adrien-berchet (#424)


0.13.1
------

Expand Down
3 changes: 3 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.. _changelog:

.. include:: ../CHANGES.txt
23 changes: 17 additions & 6 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,29 @@ GeoAlchemy 2 Documentation
GeoAlchemy 2 provides extensions to `SQLAlchemy <http://sqlalchemy.org>`_ for
working with spatial databases.

GeoAlchemy 2 focuses on `PostGIS <http://postgis.net/>`_. PostGIS 1.5,
PostGIS 2 and PostGIS 3 are supported.
GeoAlchemy 2 focuses on `PostGIS <http://postgis.net/>`_. PostGIS 2 and PostGIS 3 are supported.

SpatiaLite is also supported, but using GeoAlchemy 2 with SpatiaLite requires some specific
configuration on the application side. GeoAlchemy 2 works with SpatiaLite 4.3.0 and higher
(except for alembic helpers that need SpatiaLite >= 5).
GeoAlchemy 2 also supports the following dialects:

* `SpatiaLite <https://www.gaia-gis.it/fossil/libspatialite/home>`_ >= 4.3.0 (except for alembic
helpers that require SpatiaLite >= 5)
* `MySQL <https://dev.mysql.com/doc/refman/8.0/en/spatial-types.html>`_ >= 8
* `GeoPackage <http://www.geopackage.org/spec/>`_

Note that using GeoAlchemy 2 with these dialects may require some specific configuration on the
application side.

GeoAlchemy 2 aims to be simpler than its predecessor, `GeoAlchemy
<https://pypi.python.org/pypi/GeoAlchemy>`_. Simpler to use, and simpler
to maintain.

The current version of this documentation applies to the version |version| of GeoAlchemy 2.
.. toctree::
:hidden:

changelog

The current version of this documentation applies to the version |version| of GeoAlchemy 2. See the
:ref:`changelog` page for details on recent changes.


Requirements
Expand Down
3 changes: 2 additions & 1 deletion doc/spatialite_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ At this point you can test that you are able to connect to the database::

Note that this call will internally call the ``load_spatialite`` function, which can take some time
to execute on a new database because it actually calls the ``InitSpatialMetaData`` function from
SpatiaLite.
SpatiaLite (it is possible to reduce this time by loading only the required SRIDs, see
:func:`geoalchemy2.admin.dialects.sqlite.load_spatialite`).
Then you can also check that the ``gis.db`` SQLite database file was created on the file system.

Note that when ``InitSpatialMetaData`` is executed again it will report an error::
Expand Down
6 changes: 4 additions & 2 deletions geoalchemy2/admin/dialects/sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,14 @@ def init_spatialite(
.. Note::
When using this function as a listener it is not possible to pass the `transaction`,
`init_mode` or `journal_mode` arguments directly. To do this you can either create another
function that calls `load_spatialite` with an hard-coded `init_mode` or just use a lambda::
function that calls `init_spatialite` (or
:func:`geoalchemy2.admin.dialects.sqlite.load_spatialite` if you also want to load the
SpatiaLite drivers) with an hard-coded `init_mode` or just use a lambda::
>>> sqlalchemy.event.listen(
... engine,
... "connect",
... lambda x, y: load_spatialite(
... lambda x, y: init_spatialite(
... x,
... y,
... transaction=True,
Expand Down

0 comments on commit 9daf455

Please sign in to comment.