Skip to content
Snippets Groups Projects
Commit 5fa73e89 authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files

ENH: Use correct datamodel in special tretment lists

parent 206daaef
No related branches found
No related tags found
1 merge request!1F awi sams
......@@ -57,115 +57,68 @@ def _use_custom_names(definition: Union[list, dict]):
DATATYPE_DEFINITIONS = _use_custom_names({
"AphiaID": int,
"entity_id": str,
"Campaign": str,
"Fixation": str,
"Gear configuration": str,
"Gear": str,
"Hol": int,
"Elevation start": float,
"Elevation stop": float,
"Latitude start": float,
"Latitude stop": float,
"Longitude start": float,
"Longitude stop": float,
"Main User": str,
"Nagoya case number": str,
"PI": str,
"Parent LinkAhead ID": str,
"Platform": str,
"Sample Context": str,
"Sample container": str,
"SampleMethod": str,
"SampleType": str,
"SampleTypeSpecific": str,
"Sampling Person": str,
"Sampling depth start": float,
"Sampling depth stop": float,
"Sampling method": str,
"Station ID": str,
"Station number": str,
"Storage Container Label": str,
"Storage ID": str,
"StorageTemperature": str,
"Subevent": str,
"Water depth start": float,
"Water depth stop": float,
"entity_id": str,
})
# Obligatory columns: Must exist and must not be empty
# Must exist
OBLIGATORY_COLUMNS = _use_custom_names([
"entity_id",
"Device",
"Latitude start",
"Longitude start",
"Main User",
"PI",
"Sample container",
"SampleType",
"Sphere",
"Storage ID",
"StorageTemperature",
])
OBLIGATORY_COLUMNS_CHILD = _use_custom_names([
"entity_id",
"Main User",
"Parent LinkAhead ID",
"Sample container",
"SampleType",
"SampleTypeSpecific",
"Sphere",
"Storage ID",
"StorageTemperature",
])
COLUMN_CONVERTER = _use_custom_names({
"Collection": semicolon_separated_list,
"Ecotaxa URL": semicolon_separated_list,
"NCBI Accession": semicolon_separated_list,
"NCBI BioProject": semicolon_separated_list,
"NCBI BioSample": semicolon_separated_list,
"OSIS URL": semicolon_separated_list,
"Collector": semicolon_separated_list,
"Curator": semicolon_separated_list,
"Embargo": _embargo_converter,
"Publications": semicolon_separated_list,
"Event responsible": semicolon_separated_list,
"Sphere": semicolon_separated_list,
})
SPECIAL_TREATMENT_SAMPLE = _use_custom_names([
"entity_id",
"Collection",
"Gear configuration",
"Gear",
"Hol",
"Biome",
"Campaign",
"Elevation start",
"Elevation stop",
"End date",
"Event responsible",
"IGSN DOI",
"Latitude start",
"Latitude stop",
"Level",
"Locality description",
"Locality name",
"Longitude start",
"Longitude stop",
"Main User",
"Nagoya case number",
"PDFReport",
"PI",
"Parent Linkahead ID",
"Person",
"Sampling Person",
"Sampling depth start",
"Sampling depth stop",
"Sphere",
"Station ID",
"Station number",
"Storage Container Label",
"Sphere",
"Start date",
"Storage ID",
"Subevent",
"Water depth start",
"Water depth stop",
"entity_id",
])
IGNORED_COLUMN_NAMES_SAMPLE = _use_custom_names([
"LinkAhead URL",
"IGSN URL",
"IGSN", # TODO This will be relevant for external IGSNs in the future.
"Parent Sample",
"Sampling depth",
"Storage chain",
"Water depth",
])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment