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

feat: Add data source organism on species page (#538) #588

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions atlas/atlasRoutes.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
vmMedias,
vmCorTaxonAttribut,
vmTaxonsMostView,
vmCorTaxonOrganism,
)


Expand Down Expand Up @@ -232,6 +233,7 @@ def ficheEspece(cd_nom):
taxon = vmTaxrefRepository.searchEspece(connection, cd_ref)
altitudes = vmAltitudesRepository.getAltitudesChilds(connection, cd_ref)
months = vmMoisRepository.getMonthlyObservationsChilds(connection, cd_ref)
data_source_values = vmCorTaxonOrganism.getTaxonOrganism(connection, cd_ref)
Copy link
Member

Choose a reason for hiding this comment

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

J’appellerais cette variable organism_stats ou organism_plot_data

synonyme = vmTaxrefRepository.getSynonymy(connection, cd_ref)
communes = vmCommunesRepository.getCommunesObservationsChilds(connection, cd_ref)
taxonomyHierarchy = vmTaxrefRepository.getAllTaxonomy(db_session, cd_ref)
Expand Down Expand Up @@ -274,6 +276,7 @@ def ficheEspece(cd_nom):
cd_ref=cd_ref,
altitudes=altitudes,
months=months,
data_source_values=data_source_values,
Copy link
Member

Choose a reason for hiding this comment

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

Idem

synonyme=synonyme,
communes=communes,
taxonomyHierarchy=taxonomyHierarchy,
Expand Down
29 changes: 29 additions & 0 deletions atlas/configuration/config.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,32 @@ LANGUAGES = {
}
}

Couleur s'affichant dans les graphiques de type 'pie' (circulaire)
COLOR_PIE_CHARTS = [
'#E1CE7A',
'#FBFFB9',
'#FDD692',
'#EC7357',
'#754F44',
'#FB6376',
'#B7ADCF',
'#DEE7E7',
'#F4FAFF',
'#383D3B',
'#7C7C7C',
'#B5F44A',
'#D6FF79',
'#507255',
'#381D2A',
'#BA5624',
'#FFA552',
'#F7FFE0',
'#49C6E5',
'#54DEFD',
'#0B5563',
'#54DEFD'
]

#####################
#####################
### Configuration ###
Expand Down Expand Up @@ -193,6 +219,9 @@ AFFICHAGE_GRAPH_ALTITUDES = True
# Afficher le graphique de la phénologie. Affichage True/False
AFFICHAGE_GRAPH_PHENOLOGIE = True

# Afficher le graphique de provenance des données. Affichage True/False
AFFICHAGE_GRAPH_PROVENANCE_DONNEE = False

# Rang taxonomique qui fixe jusqu'à quel taxon remonte la filiation taxonomique (hierarchie dans la fiche d'identite : Famille, Ordre etc... )
LIMIT_RANG_TAXONOMIQUE_HIERARCHIE = 13

Expand Down
30 changes: 29 additions & 1 deletion atlas/configuration/config_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,35 @@ class Meta:
AFFICHAGE_NOUVELLES_ESPECES = fields.Boolean(load_default=True)
AFFICHAGE_RECHERCHE_AVANCEE = fields.Boolean(load_default=False)
AFFICHAGE_GRAPH_ALTITUDES = fields.Boolean(load_default=True)
AFFICHAGE_GRAPH_PHENOLOGIE = fields.Boolean(load_default=True)
AFFICHAGE_GRAPH_PHENOLOGIE = fields.Boolean(load_default=False)
Copy link
Member

@TheoLechemia TheoLechemia Jan 20, 2025

Choose a reason for hiding this comment

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

Pourquoi masquer le graphique des phénologie par défaut ?

AFFICHAGE_GRAPH_PROVENANCE_DONNEE = fields.Boolean(load_default=False)
Copy link
Member

Choose a reason for hiding this comment

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

Faut le mettre à TRUE par défaut, mais si le module ORGANISME n'est pas activé (ORGANISM_MODULE = FALSE), alors ne pas l'afficher, même si ce paramètre AFFICHAGE_GRAPH_PROVENANCE_DONNEE est à TRUE.

COLOR_PIE_CHARTS = fields.List(
fields.String(),
load_default=[
"#E1CE7A",
"#FBFFB9",
"#FDD692",
"#EC7357",
"#754F44",
"#FB6376",
"#B7ADCF",
"#DEE7E7",
"#F4FAFF",
"#383D3B",
"#7C7C7C",
"#B5F44A",
"#D6FF79",
"#507255",
"#381D2A",
"#BA5624",
"#FFA552",
"#F7FFE0",
"#49C6E5",
"#54DEFD",
"#0B5563",
"#54DEFD",
],
)

RANG_STAT = fields.List(
fields.Dict,
Expand Down
Loading
Loading