Skip to content

Releases: lpoaura/GN2PG

v1.5.0

03 May 12:49
a9a9c7e
Compare
Choose a tag to compare

What's Changed

❗ The minimum version of the source GeoNature instance required for the incremental update must be a version 2.12.0

With the financial support of Office français de la biodiversité.

New Contributors

Full Changelog: v1.4.0...v1.5.0

v1.4.0

08 Feb 23:49
908a969
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 1.3.0...v1.4.0

ToDo on update

Unused database table datasets_json can be dropped:

BEGIN;
DROP TABLE gn2pg_import.datasets_json;
COMMIT;

v1.3.0

04 May 10:17
Compare
Choose a tag to compare

Changes

  • Add optional query strings on API calls, almost required to order export API using key orderby

TODO

On client side

pip install --upgrade gn2pg-client
  • for those who use gn2pg to populate a GeoNature database, you must apply new to_gnsynthese.sql script. To proceed, simply execute:
gn2pg_cli --custom-script to_gnsynthese <yourconfigfile>

You must also update your config file to add a custom query string to order results by id_synthese as mentionned in template and docs:

# Source configuration,
# Duplicate this block for each source (1 source = 1 export)
[[source]]
# Source name, will be use to tag stored data in import table
name = "Source1"
# GeoNature source login
user_name = "<monuser>"
# GeoNature source password
user_password = "<monPwd>"
# GeoNature source URL
url = "<http://geonature1/>"
# GeoNature source Export id
export_id = 1
data_type = "synthese_with_metadata"
# GeoNature ID application (default is 3)
id_application = 1
# Additional export API QueryStrings to filter or order data, you can add multiple columns by separating column names with ":"
[source.query_strings]
orderby = 'id_synthese'

If you upgrade directly from version before 1.2.0, A unique constraint on utilisateurs.t_roles.uuid_role is required. A PR have been proposed to PnX-SI/UsersHub-authentification-module#46. Or you can add this manually with this query:

ALTER TABLE utilisateurs.t_roles
    ADD CONSTRAINT t_roles_uuid_un_tmp
        UNIQUE (uuid_role)
;

On provider side

  • actors identify informations have been restructured in synthese_with_metadata view. you must apply new scripts provided in in data/source_sample.

  • Export API with LIMIT OFFSET can return unordered results as mentionned in PostgreSQL documentation, to solve this issue, waiting an official new relase of module [PnX-SI/Utils-Flask-SQLAlchemy], you must patch geonature dependency by changing those lines in file ~/geonature/backend/venv/lib/python3.7/site-packages/utils_flask_sqla/generic.py

https://github.com/PnX-SI/Utils-Flask-SQLAlchemy/blob/b99be4e455b6e9e2577c02176f3dab7fedccb01b/src/utils_flask_sqla/generic.py#L232#L232

with

https://github.com/PnX-SI/Utils-Flask-SQLAlchemy/blob/ae487010e220fb3f7dfbec29314343936c9b3344/src/utils_flask_sqla/generic.py#L224#L224-L236

v1.2.0

28 Apr 12:39
Compare
Choose a tag to compare

Changes

  • Update dependencies
  • Removal of requests to assign an owner to functions, cause of errors
  • Set gn2pg_import as default schema name in config template
  • Fix custom-script command on default to_gnsynthese.sql script due to % character
  • Improve t_roles populate on a GeoNature database using json objects with first and last name
  • Fix missing validation status on exports samples

TODO

On client side

pip install --upgrade gn2pg-client
  • for those who use gn2pg to populate a GeoNature database, you must apply new to_gnsynthese.sql script
    To proceed, simplyy execute:
gn2pg_cli --custom-script to_gnsynthese <yourconfigfile>

A unique constraint on utilisateurs.t_roles.uuid_role is required. A PR have been proposed to PnX-SI/UsersHub-authentification-module#46. Or you can add this manually with this query:

ALTER TABLE utilisateurs.t_roles
    ADD CONSTRAINT t_roles_uuid_un_tmp
        UNIQUE (uuid_role)
;

On provider side

  • Observations validation status was missing in previous query samples. Refer to scripts in data/source_sample to apply new scripts to your export views.

v1.1.2

14 Apr 14:54
Compare
Choose a tag to compare
  • Fix null value in gn_synthese.synthese.the_geom_local caused by null srid value while getting srid from first data in gn_synthese.synthese.
  • Fix delete trigger on synthese standard data (synthese_with_metadata type missing).

To update

To update GN2PG Cli:

pip install --upgrade gn2pg-client

To update geonature integration scripts

gn2pg_cli --custom-script to_gnsynthese <myconfigfile>

v1.1.0

06 Apr 22:47
Compare
Choose a tag to compare
  • New SQL scripts for geonature 2 geonature imports which provide triggers to insert data in synthese and populate most of the metadata data (acquisition frameworks, datasets, actors such as organisms and roles, territories, etc.). Source query sample is provided in fie geonature_export_sinp_with_metadata.sql

v1.0.1

25 Nov 15:22
9de66de
Compare
Choose a tag to compare

What's Changed

  • fix: % from sql script causing sqlalchemy error by @lpofredc in #19
  • fix: custom-script error due to % character in sql template file by @lpofredc in #20

Full Changelog: 1.0.0...1.0.1

v1.0.0

25 Nov 09:32
Compare
Choose a tag to compare

What's Changed

  • feat: implementation on incremental update by @lpofredc in #14

Full Changelog: https://github.com/lpoaura/GN2PG/blob/main/CHANGELOG.rst

v0.1.2-dev

03 Nov 10:53
Compare
Choose a tag to compare
v0.1.2-dev Pre-release
Pre-release
  • Fix #18, app crash while trying to log download events

Release note

To update:

pip install --upgrade gn2pg-client

v0.1.0-dev

28 Sep 12:54
Compare
Choose a tag to compare
v0.1.0-dev Pre-release
Pre-release

Changes

  • New feature : incremental update

How to update

using command

pip install --upgrade gn2pg-client