Skip to content

Commit

Permalink
Merge pull request #433 from PnX-SI/develop
Browse files Browse the repository at this point in the history
Develop > Master / Release 2.0.0-rc2
  • Loading branch information
camillemonchicourt authored Sep 23, 2018
2 parents 626e7b6 + beb8c78 commit 577c417
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 58 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0-rc.2.dev0
2.0.0-rc.2
1 change: 0 additions & 1 deletion backend/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ alabaster==0.7.10
attrs==17.4.0
babel==2.5.3
backports.shutil-get-terminal-size==1.0.0
certifi==2017.11.5
chardet==3.0.4
configparser==3.5.0
coverage==4.4.2
Expand Down
1 change: 0 additions & 1 deletion backend/requirements-travis.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

https://github.com/PnX-SI/UsersHub-authentification-module/archive/1.2.0.zip
https://github.com/PnX-SI/Nomenclature-api-module/archive/1.2.1.zip
certifi==2017.11.5
chardet==3.0.4
click==6.7
flask-cors==3.0.3
Expand Down
1 change: 0 additions & 1 deletion backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

https://github.com/PnX-SI/UsersHub-authentification-module/archive/1.2.0.zip
https://github.com/PnX-SI/Nomenclature-api-module/archive/1.2.1.zip
certifi==2017.11.5
chardet==3.0.4
click==6.7
flask-cors==3.0.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ <h4> Relevé
codeNomenclatureType="TECHNIQUE_OBS" [disabled]=disabled>
</pnx-nomenclature>
</div>
<div *ngIf="occtaxConfig.form_fields.releve.group_type" class="col-xs-3 col-sm-3 col-md-3 col-lg-3 padding-sm">
<div *ngIf="occtaxConfig.form_fields.group_type" class="col-xs-3 col-sm-3 col-md-3 col-lg-3 padding-sm">
<pnx-nomenclature label="{{ 'Releve.GroupType' | translate }}" [parentFormControl]="releveForm.controls.properties.controls.id_nomenclature_grp_typ"
codeNomenclatureType="TYP_GRP" [disabled]="disabled">
</pnx-nomenclature>
Expand Down Expand Up @@ -101,7 +101,7 @@ <h4> Relevé
<div class="tab-content">
<div class="tab-pane active" id="occurrence" role="tabpanel">
<div class="row row-sm">
<div *ngIf="occtaxConfig.form_fields.occurrence.observation_status" class="col-xs-12 col-sm-12 col-md-12 col-lg-4 padding-sm">
<div *ngIf="occtaxConfig.form_fields.observation_status" class="col-xs-12 col-sm-12 col-md-12 col-lg-4 padding-sm">
<pnx-nomenclature label="{{ 'Taxon.ObservationStatus' | translate }}" [parentFormControl]="occurrenceForm.controls.id_nomenclature_observation_status"
codeNomenclatureType="STATUT_OBS" [disabled]="disabled">
</pnx-nomenclature>
Expand All @@ -120,17 +120,17 @@ <h4> Relevé


<div class="row row-sm">
<div *ngIf="occtaxConfig.form_fields.occurrence.determination_method" class="col-xs-12 col-sm-12 col-md-12 col-lg-4 padding-sm">
<div *ngIf="occtaxConfig.form_fields.determination_method" class="col-xs-12 col-sm-12 col-md-12 col-lg-4 padding-sm">
<pnx-nomenclature label="{{ 'Taxon.DeterminationMethod' | translate }}" [parentFormControl]="occurrenceForm.controls.id_nomenclature_determination_method"
codeNomenclatureType="METH_DETERMIN" [disabled]="disabled">
</pnx-nomenclature>
</div>
<div *ngIf="occtaxConfig.form_fields.occurrence.bio_status" class="col-xs-12 col-sm-12 col-md-12 col-lg-4 padding-sm">
<div *ngIf="occtaxConfig.form_fields.bio_status" class="col-xs-12 col-sm-12 col-md-12 col-lg-4 padding-sm">
<pnx-nomenclature label="{{ 'Taxon.BiologicalStatus' | translate }}" [parentFormControl]="occurrenceForm.controls.id_nomenclature_bio_status"
codeNomenclatureType="STATUT_BIO" [disabled]="disabled">
</pnx-nomenclature>
</div>
<div *ngIf="occtaxConfig.form_fields.occurrence.naturalness" class="col-xs-12 col-sm-12 col-md-12 col-lg-4 padding-sm">
<div *ngIf="occtaxConfig.form_fields.naturalness" class="col-xs-12 col-sm-12 col-md-12 col-lg-4 padding-sm">
<pnx-nomenclature label="{{ 'Taxon.Naturalness' | translate }}" [parentFormControl]="occurrenceForm.controls.id_nomenclature_naturalness"
codeNomenclatureType="NATURALITE" [disabled]="disabled">
</pnx-nomenclature>
Expand All @@ -139,19 +139,19 @@ <h4> Relevé


<div class="row row-sm">
<div *ngIf="occtaxConfig.form_fields.occurrence.exist_proof" class="col-xs-12 col-sm-12 col-md-12 col-lg-4 padding-sm">
<div *ngIf="occtaxConfig.form_fields.exist_proof" class="col-xs-12 col-sm-12 col-md-12 col-lg-4 padding-sm">
<pnx-nomenclature label="{{ 'Taxon.ExistProof' | translate }}" [parentFormControl]="occurrenceForm.controls.id_nomenclature_exist_proof"
codeNomenclatureType="PREUVE_EXIST" [disabled]="disabled">
</pnx-nomenclature>
</div>
<div *ngIf="occtaxConfig.form_fields.occurrence.digital_proof" class="col-xs-12 col-sm-12 col-md-12 col-lg-4 padding-sm">
<div *ngIf="occtaxConfig.form_fields.digital_proof" class="col-xs-12 col-sm-12 col-md-12 col-lg-4 padding-sm">
<small> {{ 'Taxon.DigitalProof' | translate }} </small>
<div class="input-group">
<input [disableControl]="disabled" class="form-control form-control-sm" [formControl]="occurrenceForm.controls.digital_proof"
type="text">
</div>
</div>
<div *ngIf="occtaxConfig.form_fields.occurrence.non_digital_proof" class="col-xs-12 col-sm-12 col-md-12 col-lg-4 padding-sm">
<div *ngIf="occtaxConfig.form_fields.non_digital_proof" class="col-xs-12 col-sm-12 col-md-12 col-lg-4 padding-sm">
<small> {{ 'Taxon.NonDigitalProof' | translate }} </small>
<div class="input-group">
<input [disableControl]="disabled" class="form-control form-control-sm" [formControl]="occurrenceForm.controls.non_digital_proof"
Expand All @@ -161,24 +161,24 @@ <h4> Relevé
</div>

<div class="row row-sm">
<div *ngIf="occtaxConfig.form_fields.occurrence.diffusion_level" class="col-xs-12 col-sm-12 col-md-12 col-lg-4 padding-sm">
<div *ngIf="occtaxConfig.form_fields.diffusion_level" class="col-xs-12 col-sm-12 col-md-12 col-lg-4 padding-sm">
<pnx-nomenclature label="{{ 'Taxon.DiffusionLevel' | translate }}" [parentFormControl]="occurrenceForm.controls.id_nomenclature_diffusion_level"
codeNomenclatureType="NIV_PRECIS" [disabled]="disabled">
</pnx-nomenclature>
</div>
<div *ngIf="occtaxConfig.form_fields.occurrence.blurring" class="col-xs-12 col-sm-12 col-md-12 col-lg-4 padding-sm">
<div *ngIf="occtaxConfig.form_fields.blurring" class="col-xs-12 col-sm-12 col-md-12 col-lg-4 padding-sm">
<pnx-nomenclature label="{{ 'Taxon.Blurring' | translate }}" [parentFormControl]="occurrenceForm.controls.id_nomenclature_blurring"
codeNomenclatureType="DEE_FLOU" [disabled]="disabled">
</pnx-nomenclature>
</div>
<div *ngIf="occtaxConfig.form_fields.occurrence.source_status" class="col-xs-12 col-sm-12 col-md-12 col-lg-4 padding-sm">
<div *ngIf="occtaxConfig.form_fields.source_status" class="col-xs-12 col-sm-12 col-md-12 col-lg-4 padding-sm">
<pnx-nomenclature label="{{ 'Taxon.StatusSource' | translate }}" [parentFormControl]="occurrenceForm.controls.id_nomenclature_source_status"
codeNomenclatureType="STATUT_SOURCE" [disabled]="disabled">
</pnx-nomenclature>
</div>
</div>
<div class="row row-0" id="row-commentaire">
<div *ngIf="occtaxConfig.form_fields.occurrence.comment" class="col-xs-12 col-sm-12 col-md-12 col-lg-6 padding-sm">
<div *ngIf="occtaxConfig.form_fields.comment" class="col-xs-12 col-sm-12 col-md-12 col-lg-6 padding-sm">
<div class="input-group">
<input [disableControl]="disabled" placeholder="{{ 'Releve.Comment' | translate }}" class="form-control"
[formControl]="occurrenceForm.controls.comment" type="text">
Expand All @@ -194,38 +194,38 @@ <h4> Relevé
<div class="tab-pane" id="counting" role="tabpanel">
<div *ngFor="let counting of selectedOccurrence?.cor_counting_occtax; let index = index">
<div class="row row-sm">
<div *ngIf="occtaxConfig.form_fields.counting.life_stage" class="col-xs-12 col-sm-12 col-md-12 col-lg-4 padding-sm col-counting">
<div *ngIf="occtaxConfig.form_fields.life_stage" class="col-xs-12 col-sm-12 col-md-12 col-lg-4 padding-sm col-counting">
<pnx-nomenclature label="{{ 'Counting.LifeStage' | translate }}" [parentFormControl]="countingFormArray.controls[index].controls.id_nomenclature_life_stage"
codeNomenclatureType="STADE_VIE" [disabled]="disabled">
</pnx-nomenclature>
</div>
<div *ngIf="occtaxConfig.form_fields.counting.sex" class="col-xs-12 col-sm-12 col-md-12 col-lg-3 padding-sm col-counting">
<div *ngIf="occtaxConfig.form_fields.sex" class="col-xs-12 col-sm-12 col-md-12 col-lg-3 padding-sm col-counting">
<pnx-nomenclature label="{{ 'Counting.Sex' | translate }}" [parentFormControl]="countingFormArray.controls[index].controls.id_nomenclature_sex"
codeNomenclatureType="SEXE" [disabled]="disabled">
</pnx-nomenclature>
</div>
<div *ngIf="occtaxConfig.form_fields.counting.obj_count" class="col-xs-12 col-sm-12 col-md-12 col-lg-5 padding-sm col-counting">
<div *ngIf="occtaxConfig.form_fields.obj_count" class="col-xs-12 col-sm-12 col-md-12 col-lg-5 padding-sm col-counting">
<pnx-nomenclature label="{{ 'Counting.CountingObject' | translate }}" [parentFormControl]="countingFormArray.controls[index].controls.id_nomenclature_obj_count"
codeNomenclatureType="OBJ_DENBR" [disabled]="disabled">
</pnx-nomenclature>
</div>

</div>
<div class="form-group row row-sm">
<div *ngIf="occtaxConfig.form_fields.counting.type_count" class="col-xs-12 col-sm-12 col-md-12 col-lg-5 padding-sm col-counting">
<div *ngIf="occtaxConfig.form_fields.type_count" class="col-xs-12 col-sm-12 col-md-12 col-lg-5 padding-sm col-counting">
<pnx-nomenclature #typeDenombrement label="{{ 'Counting.CountingType' | translate }}"
[parentFormControl]="countingFormArray.controls[index].controls.id_nomenclature_type_count"
codeNomenclatureType="TYP_DENBR" [disabled]="disabled">
</pnx-nomenclature>
</div>
<div *ngIf="occtaxConfig.form_fields.counting.count_min" class="col-xs-12 col-sm-12 col-md-12 col-lg-3 padding-sm col-counting">
<div *ngIf="occtaxConfig.form_fields.count_min" class="col-xs-12 col-sm-12 col-md-12 col-lg-3 padding-sm col-counting">
<div class="form-group">
<small> {{ 'Counting.NumberMin' | translate }} </small>
<input class="form-control form-control-sm" type="number" [formControl]="countingFormArray.controls[index].controls.count_min"
[disableControl]="disabled">
</div>
</div>
<div *ngIf="occtaxConfig.form_fields.counting.count_max" class="col-xs-12 col-sm-12 col-md-12 col-lg-3 padding-sm col-counting">
<div *ngIf="occtaxConfig.form_fields.count_max" class="col-xs-12 col-sm-12 col-md-12 col-lg-3 padding-sm col-counting">
<div class="form-group">
<small> {{ 'Counting.NumberMax' | translate }} </small>
<input class="form-control form-control-sm" type="number" [formControl]="countingFormArray.controls[index].controls.count_max"
Expand All @@ -234,7 +234,7 @@ <h4> Relevé
</div>
</div>
<div class="form-group row row-0">
<div *ngIf="occtaxConfig.form_fields.counting.type_count" class="col-xs-12 col-sm-12 col-md-12 col-lg-5 col-counting padding-sm">
<div *ngIf="occtaxConfig.form_fields.type_count" class="col-xs-12 col-sm-12 col-md-12 col-lg-5 col-counting padding-sm">
<pnx-nomenclature #typeDenombrement label="{{ 'Counting.ValidationStatus' | translate }}"
[parentFormControl]="countingFormArray.controls[index].controls.id_nomenclature_valid_status"
codeNomenclatureType="STATUT_VALID" [disabled]="disabled">
Expand Down
6 changes: 5 additions & 1 deletion docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
CHANGELOG
=========

2.0.0-rc.2 (unreleased)
2.0.0-rc.2 (2018-09-23)
-----------------------

**Nouveautés**

* Script ``install_all.sh`` compatible Ubuntu (16 et 18)
* Amélioration du composant Download
* Amélioration du ShapeService
* Compléments de la documentation
Expand All @@ -17,13 +18,16 @@ CHANGELOG

**Corrections**

* Correction du script ``install/migration/migration.sh``
* Ne pas afficher le debug dans le recherche de la synthèse
* Correction du bug de déconnexion entre TaxHub et GeoNature (#423)
* Correction de la fiche info d'Occtax
* Champs Multiselect : Ne pas afficher les valeurs selectionnées dans la liste quand on modifie un objet
* Trigger Occtax vers Synthèse : Correction des problèmes d'heure de relevés mal copiés dans la Synthèse
* Correction des altitudes (non abouti) (#424)
* Données exemple : Suppression de l'observer_txt
* Suppression d'un ``id_municipality`` en dur dans une route
* Suppression de la librairie Certifi non utilisée

2.0.0-rc.1 (2018-09-21)
-----------------------
Expand Down
2 changes: 1 addition & 1 deletion install/install_all/install_all.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ usershub_release=1.3.2


### CONFIGURATION GEONATURE ###
geonature_release=2.0.0-rc.1
geonature_release=2.0.0-rc.2
# Effacer la base de données GeoNature existante lors de l'installation
drop_geonaturedb=false
# Nom de la base de données GeoNature
Expand Down
38 changes: 31 additions & 7 deletions install/install_all/install_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ fi


# Check os and versions
if [ "$OS_NAME" != "debian" ]
if [ "$OS_NAME" != "debian" ] && [ "$OS_NAME" != "ubuntu" ]
then
echo -e "\e[91m\e[1mLe script d'installation n'est prévu que pour les distributions Debian\e[0m" >&2
echo -e "\e[91m\e[1mLe script d'installation n'est prévu que pour les distributions Debian et Ubuntu\e[0m" >&2
exit 1
fi

if [ "$OS_VERSION" != "8" ] && [ "$OS_VERSION" != "9" ]
if [ "$OS_VERSION" != "8" ] && [ "$OS_VERSION" != "9" ] && [ "$OS_VERSION" != "18.04" ] && [ "$OS_VERSION" != "16.04" ]
then
echo -e "\e[91m\e[1mLe script d'installation n'est prévu que pour Debian 8 ou 9\e[0m" >&2
echo -e "\e[91m\e[1mLe script d'installation n'est prévu que pour Debian 8/9 et ubuntu 16.04/18.04\e[0m" >&2
exit 1
fi

Expand Down Expand Up @@ -75,10 +75,26 @@ if [ "$OS_VERSION" == "9" ]
then
sudo apt-get install -y postgresql-server-dev-9.6 2> var/log/install_app.log
sudo apt install -y postgis-2.3 postgis postgresql-9.6-postgis-2.3 2> var/log/install_app.log
else
fi
if [ "$OS_VERSION" == "8" ]
then
sudo apt-get install -y postgresql-server-dev-9.4 2> var/log/install_app.log
sudo apt install postgis-2.3 postgis 2> var/log/install_app.log
sudo apt install -y postgis-2.3 postgis 2> var/log/install_app.log
fi

if [ "$OS_VERSION" == "18.04" ]
then
sudo apt-get install -y postgresql-server-dev-10 2> var/log/install_app.log
sudo apt install -y postgis 2> var/log/install_app.log
fi

if [ "$OS_VERSION" == "16.04" ]
then
sudo apt-get install -y libatlas3-base
sudo apt-get install -y postgresql-server-dev-9.5 2> var/log/install_app.log
sudo apt install -y postgis postgis postgresql-9.5-postgis-2.2 2> var/log/install_app.log
fi

sudo apt-get install -y python3 2> var/log/install_app.log
sudo apt-get install -y python3-dev 2> var/log/install_app.log
sudo apt-get install -y python3-setuptools 2> var/log/install_app.log
Expand All @@ -94,10 +110,18 @@ if [ "$OS_VERSION" == "9" ]
then
sudo curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install nodejs
else
fi
if [ "$OS_VERSION" == "8" ]
then
sudo apt-get install -y npm 2> var/log/install_app.log
fi

if [ "$OS_VERSION" == "16.04" ] || [ "$OS_VERSION" == "18.04" ]
then
sudo apt-get install -y nodejs
sudo apt-get install -y npm
fi

sudo apt-get install -y supervisor 2> var/log/install_app.log

# To make opencv (TaxHub) work on Debian 8
Expand Down
57 changes: 31 additions & 26 deletions install/migration/migration.sh
Original file line number Diff line number Diff line change
@@ -1,41 +1,52 @@
#!/bin/bash
myrootpath=`pwd`/..

. $myrootpath/geonature_old/config/settings.ini

cp /home/$USER/geonature_old/config/settings.ini config/settings.ini
cp /home/$USER/geonature_old/config/geonature_config.toml config/geonature_config.toml
cp /home/$USER/geonature_old/frontend/src/conf/map.config.ts frontend/src/conf/map.config.ts
cp -r /home/$USER/geonature_old/frontend/src/custom/* frontend/src/custom/
cp -r /home/$USER/geonature_old/external_modules/* external_modules
cp -r /home/$USER/geonature_old/frontend/src/external_assets/* frontend/src/external_assets/
cp $myrootpath/geonature_old/config/settings.ini config/settings.ini
cp $myrootpath/geonature_old/config/geonature_config.toml config/geonature_config.toml
cp $myrootpath/geonature_old/frontend/src/conf/map.config.ts frontend/src/conf/map.config.ts
cp -r $myrootpath/geonature_old/frontend/src/custom/* frontend/src/custom/
cp -r $myrootpath/geonature_old/external_modules/* external_modules
# on supprime le lien symbolique qui pointe vers geonature_old/contrib/occtax
rm -r external_modules/occtax
# rapatrier le fichier de conf de occtax
cp $myrootpath/geonature_old/contrib/occtax/config/conf_gn_module.toml $myrootpath/geonature/contrib/occtax/config/conf_gn_module.toml
# on recrée le lien symbolique sur le nouveau répertoire geonature
ln -s $myrootpath/geonature/contrib/occtax external_modules/occtax

mkdir /home/$USER/geonature/var
mkdir /home/$USER/geonature/var/log
cp -r $myrootpath/geonature_old/frontend/src/external_assets/* $myrootpath/geonature/frontend/src/external_assets/
# on supprime le lien symbolique qui pointe vers geonature_old/contrib/occtax/frontend/assets
rm frontend/src/external_assets/occtax
# on recrée le lien symbolique sur le nouveau répertoire geonature
ln -s $myrootpath/geonature/contrib/occtax/frontend/assets $myrootpath/geonature/frontend/src/external_assets/occtax

# Création du répertoitre static et rapattriement des médias

mkdir $myrootpath/geonature/var
mkdir $myrootpath/geonature/var/log

# Création du répertoitre static et rapatriement des médias
if [ ! -d 'backend/static/' ]
then
mkdir static
mkdir backend/static
fi

if [ ! -d 'backend/static/medias/' ]
then
mkdir ./static/medias
mkdir backend/static/medias
fi
cp -r /home/$USER/geonature_old/backend/static/medias/* backend/static/medias
cp -r $myrootpath/geonature_old/backend/static/medias/* backend/static/medias

if [ ! -d 'backend/static/shapefiles/' ]
then
mkdir /home/$USER/geonature/backend/static/shapefiles
mkdir backend/static/shapefiles
fi



. /home/$USER/geonature/config/settings.ini

cd /home/$USER/geonature/frontend
cd $myrootpath/geonature/frontend
npm install

cd /home/$USER/geonature/backend
cd $myrootpath/geonature/backend

if [ -d 'venv/' ]
then
Expand All @@ -57,16 +68,10 @@ python ../geonature_cmd.py install_command

echo "Update configurations "
geonature update_configuration --build=false
geonature generate_frontend_config --build=false
#geonature generate_frontend_config --build=false
geonature generate_frontend_modules_route
geonature generate_frontend_tsconfig
geonature update_module_configuration occtax --build=false


echo "Rebuild du frontend"
cd ../frontend
npm run build
cd ../
geonature update_module_configuration occtax

sudo supervisorctl reload

Expand Down

0 comments on commit 577c417

Please sign in to comment.