forked from PnX-SI/GeoNature
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc(test): add todos for occhab impor test
- Loading branch information
Showing
2 changed files
with
5 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,6 +143,7 @@ def check_transient_data(task, logger, imprt): | |
geom_local_field=fields["geom_local"], | ||
) | ||
if imprt.fieldmapping.get("altitudes_generate", False): | ||
# [email protected]_import_valid_file: add testcase | ||
generate_altitudes( | ||
imprt, fields["the_geom_local"], fields["altitude_min"], fields["altitude_max"] | ||
) | ||
|
@@ -160,6 +161,7 @@ def check_transient_data(task, logger, imprt): | |
) | ||
if "WKT" in selected_fields: | ||
check_is_valid_geography(imprt, entity, selected_fields["WKT"], fields["geom_4326"]) | ||
# [email protected]_import_valid_file: remove this check | ||
if current_app.config["IMPORT"]["ID_AREA_RESTRICTION"]: | ||
check_geography_outside( | ||
imprt, | ||
|
@@ -236,6 +238,7 @@ def import_data_to_occhab(imprt): | |
continue | ||
field = fields[field_name] | ||
if field.multi: | ||
# [email protected]_import_valid_file: add testcase | ||
if not set(source_field).isdisjoint(imprt.columns): | ||
insert_fields |= {field} | ||
else: | ||
|
@@ -246,6 +249,7 @@ def import_data_to_occhab(imprt): | |
insert_fields -= {fields["unique_dataset_id"]} | ||
insert_fields |= {fields["id_dataset"]} | ||
insert_fields |= {fields["geom_4326"], fields["geom_local"]} | ||
# [email protected]_import_valid_file: add testcase | ||
if imprt.fieldmapping.get("altitudes_generate", False): | ||
insert_fields |= {fields["altitude_min"], fields["altitude_max"]} | ||
# FIXME: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,7 @@ class Meta: | |
observers = Nested(UserSchema, unknown=EXCLUDE, many=True) | ||
dataset = Nested(DatasetSchema, dump_only=True) | ||
|
||
# [email protected]_import_valid_file: maybe add testcase | ||
@validates_schema | ||
def validate_habitats(self, data, **kwargs): | ||
""" | ||
|