Skip to content

Commit

Permalink
Merge pull request #59 from PnX-SI/develop
Browse files Browse the repository at this point in the history
1.6.0
  • Loading branch information
jacquesfize authored Jan 30, 2024
2 parents f9102ca + f125890 commit b3f628b
Show file tree
Hide file tree
Showing 21 changed files with 463 additions and 103 deletions.
42 changes: 13 additions & 29 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,17 @@ jobs:
strategy:
fail-fast: false
matrix:
debian-version: [ "10", "11" ]
sqlalchemy-version: [ "1.3", "1.4" ]
debian-version: [ "11", "12" ]
sqlalchemy-version: [ "1.4" ]
include:
- debian-version: "10"
python-version: "3.7"
postgres-version: 11
postgis-version: 2.5
- debian-version: "11"
python-version: "3.9"
postgres-version: 13
postgis-version: 3.2
- sqlalchemy-version: '1.3'
sqlalchemy-lt-version: '1.4'
flask-sqlalchemy-version: '2'
flask-sqlalchemy-lt-version: '3'
- sqlalchemy-version: '1.4'
sqlalchemy-lt-version: '2'
flask-sqlalchemy-version: '3'
flask-sqlalchemy-lt-version: '4'
exclude:
- debian-version: "10"
sqlalchemy-version: "1.4"
postgres-version: "13"
postgis-version: "3.2"
- debian-version: "12"
python-version: "3.11"
postgres-version: "15"
postgis-version: "3.3"

name: Debian ${{ matrix.debian-version }} - SQLAlchemy ${{ matrix.sqlalchemy-version }}

Expand All @@ -59,16 +48,12 @@ jobs:
--health-retries 5
steps:
- name: Add postgis_raster database extension
if: ${{ matrix.postgis-version >= 3 }}
run: |
psql -h localhost -U postgres -d postgres -tc 'CREATE EXTENSION "postgis_raster";'
env:
PGPASSWORD: postgres
- name: Add database extensions
run: |
psql -h localhost -U postgres -d postgres -tc 'CREATE EXTENSION "postgis_raster";'
psql -h localhost -U postgres -d postgres -tc 'CREATE EXTENSION "uuid-ossp";'
psql -h localhost -U postgres -d postgres -tc 'CREATE EXTENSION "pg_trgm";'
psql -h localhost -U postgres -d postgres -tc 'CREATE EXTENSION "unaccent";'
env:
PGPASSWORD: postgres
- uses: actions/checkout@v2
Expand All @@ -86,11 +71,10 @@ jobs:
-e .[tests] \
-e file:dependencies/Utils-Flask-SQLAlchemy#egg=utils-flask-sqlalchemy \
-e file:dependencies/TaxHub#egg=taxhub \
-e file:dependencies/UsersHub-authentification-module#egg=pypnusershub \
"sqlalchemy>=${{ matrix.sqlalchemy-version }},<${{ matrix.sqlalchemy-lt-version }}" \
"flask-sqlalchemy>=${{ matrix.flask-sqlalchemy-version }},<${{ matrix.flask-sqlalchemy-lt-version }}"
-e file:dependencies/UsersHub-authentification-module#egg=pypnusershub
- name: Install database
run: |
flask db upgrade taxonomie@head -x local-srid=2154
flask db upgrade ref_geo@head -x local-srid=2154
flask db upgrade nomenclatures_taxonomie@head
flask db autoupgrade
Expand All @@ -104,7 +88,7 @@ jobs:
env:
NOMENCLATURE_SETTINGS: test_settings.py
- name: Upload coverage to Codecov
if: ${{ matrix.debian-version == '11' && matrix.sqlalchemy-version == '1.4' }}
if: ${{ matrix.debian-version == '12' && matrix.sqlalchemy-version == '1.4' }}
uses: codecov/codecov-action@v3
with:
flags: pytest
2 changes: 1 addition & 1 deletion dependencies/TaxHub
Submodule TaxHub updated 70 files
+7 −21 .github/workflows/pytest.yml
+1 −1 Dockerfile
+1 −1 VERSION
+14 −6 apptax/app.py
+3 −2 apptax/log/logmanager.py
+1 −0 apptax/migrations/versions/188bc535258a_drop_old_status_table.py
+1 −0 apptax/migrations/versions/1b1a3f5cd107_add_table_to_link_bdc_status_and_ref_geo.py
+66 −0 apptax/migrations/versions/23c25552d707_create_bdc_status_table_if_not_exists.py
+1 −0 apptax/migrations/versions/27fd7e2b4b79_add_vm_taxref_list_forautocomplete_index.py
+55 −0 apptax/migrations/versions/32c5ed42bdbd_add_table_t_meta_taxref.py
+50 −0 apptax/migrations/versions/33e20a7682b4_check_group3_inpn_vm_function.py
+114 −0 apptax/migrations/versions/3bd542b72955_optimize_vm_taxref_for_autocomplete.py
+1 −0 apptax/migrations/versions/3fe8c07741be_taxhub_admin.py
+1 −0 apptax/migrations/versions/4a549132d156_add_unique_constraints.py
+1 −0 apptax/migrations/versions/4fb7e197d241_fix_v_bdc_status_view.py
+1 −0 apptax/migrations/versions/64d38dbe7739_taxonomie.py
+71 −0 apptax/migrations/versions/6607b25b2d66_taxref_set_null_to_empty_string.py
+1 −0 apptax/migrations/versions/7540702c6407_cd_ref_utility_functions.py
+112 −0 apptax/migrations/versions/8f3256f60915_group3_inpn_autocomplete.py
+1 −0 apptax/migrations/versions/98035939bc0d_find_all_taxons_parents.py
+1 −0 apptax/migrations/versions/9c2c0254aadc_create_taxonomie_schema.py
+1 −0 apptax/migrations/versions/c4415009f164_taxref_v15_db_structure.py
+1 −0 apptax/migrations/versions/c93cbb35cfe4_set_default_value_for_id_liste.py
+1 −0 apptax/migrations/versions/d768a5da908c_add_bdc_status_indexes.py
+1 −0 apptax/migrations/versions/f2c36312b3de_fix_vm_taxref_for_autocomplete.py
+1 −0 apptax/migrations/versions/fa5a90853c45_taxhub.py
+10 −1 apptax/taxonomie/commands/migrate_taxref/commands_v15.py
+11 −4 apptax/taxonomie/commands/migrate_taxref/commands_v16.py
+22 −0 apptax/taxonomie/commands/migrate_taxref/data/5_clean_db.sql
+2 −2 apptax/taxonomie/commands/migrate_taxref/data/specific_taxref_v15_v16/3.2_alter_taxref_data.sql
+7 −1 apptax/taxonomie/commands/taxref.py
+4 −1 apptax/taxonomie/commands/taxref_v15_v16.py
+88 −47 apptax/taxonomie/commands/utils.py
+16 −2 apptax/taxonomie/models.py
+9 −14 apptax/taxonomie/routesbiblistes.py
+12 −8 apptax/taxonomie/routesbibnoms.py
+114 −64 apptax/taxonomie/routestaxref.py
+4 −6 apptax/taxonomie/routestmedias.py
+39 −32 apptax/tests/fixtures.py
+25 −0 apptax/tests/test_bib_noms.py
+1 −1 apptax/tests/test_media.py
+2 −2 apptax/tests/test_taxhub.py
+155 −2 apptax/tests/test_taxref.py
+4 −6 apptax/tests/test_taxref_last_version.py
+6 −2 apptax/utils/utilssqlalchemy.py
+1 −1 data/scripts/update_taxref/README.rst
+1 −1 data/scripts/update_taxref/apply_changes.sh
+1 −1 data/scripts/update_taxref/clean_db.sh
+2 −2 data/scripts/update_taxref/import_taxref_v11_data.sh
+2 −2 data/scripts/update_taxref/import_taxref_v13_data.sh
+1 −1 data/scripts/update_taxref/import_taxref_v14.sh
+1 −1 dependencies/RefGeo
+1 −1 dependencies/UsersHub-authentification-module
+1 −1 dependencies/Utils-Flask-SQLAlchemy
+1 −1 dependencies/Utils-Flask-SQLAlchemy-Geo
+15 −5 docs/auteurs.rst
+1,260 −0 docs/changelog.md
+0 −862 docs/changelog.rst
+1 −1 install_app.sh
+1 −1 install_db.sh
+2 −1 requirements-common.in
+3 −3 requirements-dependencies.in
+81 −81 requirements-dev.txt
+71 −67 requirements.txt
+4 −2 setup.py
+1 −1 static/app/app.js
+1 −1 static/app/bib_liste/edit/bibliste-edit-controler.js
+1 −1 static/app/bib_liste/populate/bibliste-populate-controler.js
+1 −1 static/app/bib_nom/edit/bibNom-form-controler.js
+21 −18 static/app/login/loginControler.js
2 changes: 1 addition & 1 deletion dependencies/UsersHub-authentification-module
Submodule UsersHub-authentification-module updated 39 files
+13 −0 .github/workflows/lint.yml
+7 −23 .github/workflows/pytest.yml
+17 −4 README.md
+2 −1 VERSION
+1 −1 dependencies/Utils-Flask-SQLAlchemy
+119 −2 docs/changelog.rst
+4 −2 requirements-common.in
+1 −1 requirements-dependencies.in
+48 −54 requirements-dev.txt
+43 −43 requirements.txt
+26 −25 setup.py
+33 −27 src/pypnusershub/__main__.py
+209 −120 src/pypnusershub/db/models.py
+32 −29 src/pypnusershub/db/models_register.py
+12 −10 src/pypnusershub/db/tools.py
+28 −0 src/pypnusershub/decorators.py
+4 −4 src/pypnusershub/env.py
+42 −0 src/pypnusershub/login_manager.py
+2 −4 src/pypnusershub/migrations/env.py
+7 −4 src/pypnusershub/migrations/versions/10e87bc144cd_get_id_role_by_name.py
+1 −0 src/pypnusershub/migrations/versions/112ccf1024ce_add_unique_constraint_on_t_roles_uuid.py
+11 −6 src/pypnusershub/migrations/versions/5b334b77f5f5_fix_v_roleslist_forall_applications.py
+21 −12 src/pypnusershub/migrations/versions/72f227e37bdf_utilisateurs_sample_data.py
+7 −10 src/pypnusershub/migrations/versions/830cc8f4daef_add_additional_data_field_to_organism.py
+7 −4 src/pypnusershub/migrations/versions/951b8270a1cf_add_unique_constraint_on_uuid_organisme.py
+28 −0 src/pypnusershub/migrations/versions/f4bf21ac6238_fix_temp_user_organism_size.py
+35 −0 src/pypnusershub/migrations/versions/f9d3b95946cd_set_code_profil_in_integer.py
+8 −3 src/pypnusershub/migrations/versions/fa35dfe5ff27_create_utilisateurs_schema.py
+74 −185 src/pypnusershub/routes.py
+97 −74 src/pypnusershub/routes_register.py
+10 −11 src/pypnusershub/schemas.py
+4 −0 src/pypnusershub/test_settings.py
+0 −0 src/pypnusershub/tests/__init__.py
+16 −4 src/pypnusershub/tests/conftest.py
+79 −4 src/pypnusershub/tests/fixtures.py
+43 −8 src/pypnusershub/tests/test_utilisateurs.py
+51 −0 src/pypnusershub/tests/test_utils.py
+51 −17 src/pypnusershub/tests/utils.py
+52 −18 src/pypnusershub/utils.py
48 changes: 30 additions & 18 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,56 @@
CHANGELOG
=========

1.6.0 (2024-01-30)
------------------

**🚀 Nouveautés**

- Mise à jour de SQLAlchemy version 1.3 à 1.4 (#52 et #54)
- Arrêt du support de Debian 10 (#54)
- Ajout du support de Debian 12 dans les tests automatisés (#54)
- Ajout de la possibilité d'associer des nomenclatures à des Group3 INPN, en ajoutant le champs ``group3_inpn`` à la table ``cor_taxref_nomenclature`` (#53)
- Mise à jour des dépendances Python: TaxHub, Utils-Flask-SQLAlchemy, UsersHub-authentification-module

1.5.4 (2023-03-04)
------------------

**🚀 Nouveautés**

* Compatibilité SQLAlchemy 1.4
* Amélioration de la documentation de ``NomenclaturesMixin``
* Simplification des modèles et de leur homologue Flask-Admin
* Mise à jour des dépendances :
- Compatibilité SQLAlchemy 1.4
- Amélioration de la documentation de ``NomenclaturesMixin``
- Simplification des modèles et de leur homologue Flask-Admin
- Mise à jour des dépendances :

* TaxHub 1.11.1
* UsersHub-authentification-module 1.6.5
* Utils-Flask-SQLAlchemy 0.3.2
- TaxHub 1.11.1
- UsersHub-authentification-module 1.6.5
- Utils-Flask-SQLAlchemy 0.3.2

**🐛 Corrections**

* Ajout de shapely<2 aux requirements
- Ajout de shapely<2 aux requirements


1.5.3 (2022-09-01)
------------------

**🚀 Nouveautés**

* Ajout du type de nomenclature « Catégorie de liste rouge » et des nomenclatures associées.
* La branche ``nomenclature_taxonomie_inpn_data`` est renommée en ``nomenclature_taxonomie_data``, et ne dépend plus du référentiel TaxRef qui doit être importé manuellement.
* Le code est désormais formaté avec Black et une Github Action y veille.
* Possibilité de filtrer les nomenclatures par code (``cd_nomenclature``).
* Mise à jour des dépendances :
- Ajout du type de nomenclature « Catégorie de liste rouge » et des nomenclatures associées.
- La branche ``nomenclature_taxonomie_inpn_data`` est renommée en ``nomenclature_taxonomie_data``, et ne dépend plus du référentiel TaxRef qui doit être importé manuellement.
- Le code est désormais formaté avec Black et une Github Action y veille.
- Possibilité de filtrer les nomenclatures par code (``cd_nomenclature``).
- Mise à jour des dépendances :

* Utils-Flask-SQLAlchemy 0.3.0
* TaxHub 1.10.0
* UsersHub-authentification-module 1.6.0
- Utils-Flask-SQLAlchemy 0.3.0
- TaxHub 1.10.0
- UsersHub-authentification-module 1.6.0

**🐛 Corrections**

* Correction de la définition d’un type de nomenclature
* Correction des tests unitaires
- Correction de la définition d’un type de nomenclature
- Correction des tests unitaires


1.5.1 (2022-01-12)
------------------
Expand Down
9 changes: 4 additions & 5 deletions requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ flask-migrate
psycopg2
flask-marshmallow
marshmallow-sqlalchemy
shapely<2
sqlalchemy>=1.3,<2
sqlalchemy

utils-flask-sqlalchemy>=0.3.0
taxhub>=1.10.0
pypnusershub>=1.6.0
utils-flask-sqlalchemy>=0.4.1
taxhub>=1.13.2
pypnusershub>=2.1.1
220 changes: 213 additions & 7 deletions requirements.txt
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1,213 @@
Flask-Admin>=1.5.6
flask-sqlalchemy>=2.3.2
flask>=1.1.1
psycopg2>=2.8.5
sqlalchemy>=1.3.19
utils-flask-sqlalchemy>=0.1.2
flask-marshmallow>=0.12.0
#
# This file is autogenerated by pip-compile with Python 3.9
# by the following command:
#
# pip-compile requirements.in
#
alembic==1.13.1
# via
# flask-migrate
# pypn-ref-geo
# pypnusershub
attrs==23.2.0
# via fiona
authlib==1.3.0
# via pypnusershub
bcrypt==4.1.2
# via pypnusershub
blinker==1.7.0
# via flask
boto3==1.34.30
# via taxhub
botocore==1.34.30
# via
# boto3
# s3transfer
certifi==2023.11.17
# via
# fiona
# requests
cffi==1.16.0
# via cryptography
charset-normalizer==3.3.2
# via requests
click==8.1.7
# via
# click-plugins
# cligj
# fiona
# flask
# taxhub
click-plugins==1.1.1
# via fiona
cligj==0.7.2
# via fiona
cryptography==42.0.1
# via authlib
fiona==1.9.5
# via utils-flask-sqlalchemy-geo
flask==3.0.1
# via
# -r requirements.in
# flask-admin
# flask-cors
# flask-login
# flask-marshmallow
# flask-migrate
# flask-sqlalchemy
# pypn-ref-geo
# pypnusershub
# taxhub
# utils-flask-sqlalchemy
flask-admin==1.6.1
# via -r requirements.in
flask-cors==4.0.0
# via taxhub
flask-login==0.6.3
# via pypnusershub
flask-marshmallow==1.1.0
# via
# -r requirements.in
# pypn-ref-geo
# pypnusershub
flask-migrate==4.0.5
# via
# -r requirements.in
# taxhub
# utils-flask-sqlalchemy
flask-sqlalchemy==3.0.5
# via
# -r requirements.in
# flask-migrate
# pypn-ref-geo
# pypnusershub
# taxhub
# utils-flask-sqlalchemy
geoalchemy2==0.14.3
# via utils-flask-sqlalchemy-geo
geojson==3.1.0
# via utils-flask-sqlalchemy-geo
greenlet==3.0.3
# via sqlalchemy
gunicorn==21.2.0
# via taxhub
idna==3.6
# via requests
importlib-metadata==7.0.1
# via
# fiona
# flask
itsdangerous==2.1.2
# via flask
jinja2==3.1.3
# via flask
jmespath==1.0.1
# via
# boto3
# botocore
mako==1.3.2
# via alembic
markupsafe==2.1.4
# via
# jinja2
# mako
# werkzeug
# wtforms
marshmallow==3.20.2
# via
# flask-marshmallow
# marshmallow-geojson
# marshmallow-sqlalchemy
# utils-flask-sqlalchemy
marshmallow-geojson==0.5.0
# via utils-flask-sqlalchemy-geo
marshmallow-sqlalchemy==0.30.0
# via
# -r requirements.in
# pypnusershub
# taxhub
# utils-flask-sqlalchemy-geo
numpy==1.26.3
# via shapely
packaging==23.2
# via
# geoalchemy2
# gunicorn
# marshmallow
# marshmallow-sqlalchemy
pillow==10.2.0
# via taxhub
psycopg2==2.9.9
# via
# -r requirements.in
# pypn-ref-geo
# pypnusershub
# taxhub
pycparser==2.21
# via cffi
pypn-ref-geo==1.5.1
# via taxhub
pypnusershub==2.1.1
# via
# -r requirements.in
# taxhub
python-dateutil==2.8.2
# via
# botocore
# utils-flask-sqlalchemy
python-dotenv==1.0.1
# via
# -r requirements.in
# pypn-ref-geo
# taxhub
requests==2.31.0
# via pypnusershub
s3transfer==0.10.0
# via boto3
shapely==2.0.2
# via utils-flask-sqlalchemy-geo
six==1.16.0
# via
# fiona
# python-dateutil
sqlalchemy==1.4.51
# via
# -r requirements.in
# alembic
# flask-sqlalchemy
# geoalchemy2
# marshmallow-sqlalchemy
# pypn-ref-geo
# pypnusershub
# taxhub
# utils-flask-sqlalchemy
# utils-flask-sqlalchemy-geo
taxhub==1.13.2
# via -r requirements.in
typing-extensions==4.9.0
# via alembic
urllib3==1.26.18
# via
# botocore
# requests
# taxhub
utils-flask-sqlalchemy==0.4.1
# via
# -r requirements.in
# pypn-ref-geo
# pypnusershub
# taxhub
# utils-flask-sqlalchemy-geo
utils-flask-sqlalchemy-geo==0.3.1
# via pypn-ref-geo
werkzeug==3.0.1
# via
# flask
# flask-login
wtforms==3.1.2
# via flask-admin
zipp==3.17.0
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# setuptools
Loading

0 comments on commit b3f628b

Please sign in to comment.