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

[IMPORT] hide map imported data if null bbox #3007

Open
wants to merge 6 commits into
base: feat/import
Choose a base branch
from

Conversation

edelclaux
Copy link
Contributor

@edelclaux edelclaux commented Apr 26, 2024

Travail réalisé par @VincentCauchois

Issue: https://github.com/orgs/PnX-SI/projects/13/views/18?pane=issue&itemId=47861673

Remarque: Cette PR ne couvre pas les problèmes évident de mise en page du rapport PDF.
Une PR dédiée au PDF a été réalisée séparément.

Commit 5edcda5 - fix(import): modify get_valid_bbox to support done imports

Modify the function get_valid_bbox, from imports utils functions, to handle retrieval of valid boundary box for data associated to an import done and thus with no more data in import transient tables. In this case, the function retrieves data from geom fields in the destination tables directly (e.g.: gn_synthese.synthese for destination "synthese", pr_occhab.t_stations for destination "occhab"). The destination table is retrieved as entity.get_destination_table().

Commit a0a3300 - feat(import): modify display logic of map for imported data":

Hide the section "Zone géographique" from the summary before import if the valid bbox is null.

@edelclaux edelclaux marked this pull request as draft April 26, 2024 10:32
@edelclaux edelclaux force-pushed the feat-import/hide-map-imported-data-if-null-bbox branch from 08266da to 0bd2001 Compare April 29, 2024 12:30
@edelclaux edelclaux force-pushed the feat-import/hide-map-imported-data-if-null-bbox branch from b5e3647 to 620a691 Compare April 30, 2024 10:32
@@ -354,6 +355,62 @@ def remove_data_from_synthese(imprt):
db.session.delete(source)


Copy link
Contributor

Choose a reason for hiding this comment

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

Je sais pas si faire une fonction est la meilleur maniére ici, ne vaudrait-il pas juste mettre la constante directement dans la config du module ?

Copy link
Contributor Author

@edelclaux edelclaux May 2, 2024

Choose a reason for hiding this comment

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

Je suis tout à fait d'accord, c'est pas une fonction, c'est une variable type config, comme pour les statistics_labels.
image

C'est ça la "config du module" ?

Je voulais demander à Vincent s'il avait une idée derrière la tête avant de changer la forme.

backend/geonature/core/imports/bbox.py Outdated Show resolved Hide resolved
dict
A dictionary indexed by the keys from bbox.Key enum
"""
return {
Copy link
Contributor

Choose a reason for hiding this comment

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

Pourquoi ne pas inclure ces dernières dans la configuration du module ?

}


def get_where_clause_id_import(imprt):
Copy link
Contributor

Choose a reason for hiding this comment

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

est-ce que l'on ferait pas un fonctionnement par défaut qui s'appuit sur des noms de colonnes déclarés dans la config __import__ du module ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sans doute que oui. Je me suis pas trop penché sur cette partie la.

@edelclaux edelclaux force-pushed the feat-import/hide-map-imported-data-if-null-bbox branch 2 times, most recently from 97867ed to 4a33b11 Compare May 2, 2024 10:20
@edelclaux edelclaux marked this pull request as ready for review May 2, 2024 10:33
@edelclaux edelclaux force-pushed the feat-import/hide-map-imported-data-if-null-bbox branch from 4a33b11 to caf97f9 Compare May 2, 2024 10:34
@edelclaux edelclaux force-pushed the feat-import/hide-map-imported-data-if-null-bbox branch 2 times, most recently from 9a46c90 to da7d1e6 Compare May 3, 2024 10:17
@edelclaux edelclaux force-pushed the feat-import/hide-map-imported-data-if-null-bbox branch from da7d1e6 to f770a69 Compare May 3, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants