Browse Source

added species complexes in the CSV database and fixed some bugs related to this change (e.g. checks of the hierarchy level entries)

Dimitri Korsch 3 years ago
parent
commit
370f9ac856

File diff suppressed because it is too large
+ 0 - 964
labels/LepiForum_PandasVersion/LepiForum_Species_edited_by_GBrehm.csv


+ 3 - 1
labels/LepiForum_PandasVersion/Provider.py

@@ -24,6 +24,7 @@ class Provider(LabelProvider):
         'kr_nr',
         'genus',
         'species',
+        'species_group',
         'authors',
         'comment',
         'remove_me',
@@ -46,6 +47,7 @@ class Provider(LabelProvider):
         'kr_nr': "object",
         'genus': "category",
         'species': "category",
+        'species_group': "category",
         'authors': "object",
         'comment': "object",
         'remove_me': "category",
@@ -103,7 +105,7 @@ class Provider(LabelProvider):
 
             for level, level_name in self.hierarchy_levels:
                 level_entry = entry[level]
-                if level_entry is None:
+                if level_entry is None or (isinstance(level_entry, float) and np.isnan(level_entry)):
                     continue
 
                 reference, name = f'{level}_{level_entry.lower()}', level_entry

+ 2 - 1
labels/LepiForum_PandasVersion/configuration1.json

@@ -11,6 +11,7 @@
   "onlyGerman": false,
   "hierarchyLevels": [
     ["family", "Familie"],
-    ["genus", "Gattung"]
+    ["genus", "Gattung"],
+    ["species_group", "Artkomplex"]
   ]
 }

+ 2 - 1
labels/LepiForum_PandasVersion/configuration2.json

@@ -11,6 +11,7 @@
   "onlyGerman": true,
   "hierarchyLevels": [
     ["family", "Familie"],
-    ["genus", "Gattung"]
+    ["genus", "Gattung"],
+    ["species_group", "Artkomplex"]
   ]
 }

+ 2 - 1
labels/LepiForum_PandasVersion/configuration3.json

@@ -11,6 +11,7 @@
   "onlyGerman": true,
   "hierarchyLevels": [
     ["family", "Familie"],
-    ["genus", "Gattung"]
+    ["genus", "Gattung"],
+    ["species_group", "Artkomplex"]
   ]
 }

+ 6 - 5
webui/src/components/projects/project-labels-window.vue

@@ -7,11 +7,6 @@
     </h1>
 
     <template v-if="labels !== false">
-      <label-tree-view v-for="label in sortedLabels" :key="label.identifier"
-                       :label="label"
-                       :targetable="true"
-                       indent="2rem"/>
-
       <div class="label">
         <input-group>
           <text-input placeholder="New Label"
@@ -22,6 +17,12 @@
           </button-input>
         </input-group>
       </div>
+      <label-tree-view v-for="label in sortedLabels" :key="label.identifier"
+                       :label="label"
+                       :targetable="true"
+                       indent="2rem"/>
+
+
     </template>
     <template v-else>
       <loading-icon/>

Some files were not shown because too many files changed in this diff