Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix standalone install and add debian 12 support #573

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/test_install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Check pip install package with multiple version of python
on: [push, pull_request]

jobs:
check-requirements-install:
strategy:
matrix:
python-version: [ "3.9", "3.12" ]

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- run: pip install -r requirements.txt
5 changes: 5 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ CHANGELOG
[Unreleased]
------------------

🚀 **Nouveautés**

- Mise à jour de la dependance `greenlet` afin de pouvoir installer l'atlas sur une version de debian 12 (@juggler31)

🐛 **Corrections**

- Correction de la carte avec affichage par mailles de la fiche "Commune" (#533 par @jpm-cbna)
- Correction et amélioration de l'affichage de la fenêtre listant les sous-taxons aggrégés (#558 par @jpm-cbna)
- Correction du script install_db.sh afin d'installer l'atlas sans geonature. (@juggler31)

🐛 **Optimisations**

Expand Down
7 changes: 7 additions & 0 deletions install_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ if ! database_exists $db_name
-v type_territoire=$type_territoire \
-f data/gn2/atlas_ref_geo.sql &>> log/install_db.log
else

echo "Create extension defined in geonature"
sudo -u postgres -s psql -d $db_name -c "CREATE EXTENSION IF NOT EXISTS unaccent;" &>> log/install_db.log
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L'ajout de l'extension n'est pas au bon endroit, il faut l'ajouter pour tous au début du fichier, avec les autres extensions. On s'en charge.


# FR: Import du shape des limites du territoire ($limit_shp) dans la BDD / atlas.t_layer_territoire
# EN: Import of the shape of the territory limits ($limit_shp) in the BDD / atlas.t_layer_territory

Expand Down Expand Up @@ -325,6 +329,9 @@ if ! database_exists $db_name
echo "Creating syntheseff example table"
sudo -n -u postgres -s psql -d $db_name -f /tmp/atlas/without_geonature.sql &>> log/install_db.log
sudo -n -u postgres -s psql -d $db_name -c "ALTER TABLE synthese.syntheseff OWNER TO "$owner_atlas";"

sudo -n -u postgres -s psql -d $db_name -c "ALTER TABLE utilisateurs.bib_organismes OWNER TO "$owner_atlas";"
sudo -n -u postgres -s psql -d $db_name -c "ALTER TABLE gn_meta.cor_dataset_actor OWNER TO "$owner_atlas";"
fi

# FR: Creation des Vues Matérialisées (et remplacement éventuel des valeurs en dur par les paramètres)
Expand Down
7 changes: 4 additions & 3 deletions install_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ sudo apt-get -y upgrade
# Go to folder of install_env.sh
cd "$(dirname "$0")"

sudo apt-get install -y wget
sudo apt-get install -y unzip
sudo apt-get install -y apache2
sudo a2enmod proxy
Expand Down Expand Up @@ -51,11 +52,11 @@ then
fi


sudo apt-get install -y python-setuptools
sudo apt-get install -y python3-setuptools
sudo apt-get install -y libpq-dev python3-dev

sudo apt-get install python-pip
sudo apt-get install -y python-gdal
sudo apt-get install python3-pip
sudo apt-get install -y python3-gdal
sudo apt-get install -y gdal-bin

sudo apt-get install -y python3-virtualenv virtualenv
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ geoalchemy2==0.9.4
# via -r requirements.in
geojson==2.5.0
# via -r requirements.in
greenlet==1.1.3
greenlet==3.0.3

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • fixer la version de greenlet sera à faire dans requirements.in,
  • pas pu tester sur Debian 11 pour le moment,
  • cependant je ne vois pas d'utilisation de SQLAlchemy dans un mode asynchrone dans GN-Atlas, je ne pense pas que greenlet soit utilisé, la dépendance est juste incluse par défaut,
  • ce serait intéressant d'avoir l'erreur rencontrée lors de l'installation sur Ubuntu 24.04 pour documenter le pourquoi de cette montée de version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pour cela, j'ai rajouté un test dans les github actions pour tester l'installation des requirements.txt sur les différentes versions de python.

# via sqlalchemy
gunicorn==20.1.0
# via -r requirements.in
Expand Down
Loading