Skip to content

Commit

Permalink
cleanup, add todos
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkonie committed Nov 18, 2024
1 parent 5116290 commit ca346ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 2 additions & 5 deletions samplesheets/rendering.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,12 +394,9 @@ def _add_annotation(self, ann, header, header_type, obj):
:param obj: GenericMaterial or Process object the annotation belongs to
"""
unit = None
# Special case: Comments as parsed in SODAR v0.5.2 (see #629)
# Special case: Comments as string or list
# TODO: TBD: Should these be added in this function at all?
if isinstance(ann, str):
val = ann
# Comment as a list
elif isinstance(ann, list):
if isinstance(ann, (str, list)):
val = ann
# Ontology reference(s) (altamISA v0.1+, SODAR v0.5.2+)
elif isinstance(ann['value'], dict) or (
Expand Down
2 changes: 2 additions & 0 deletions samplesheets/vueapp/src/components/editors/DataCellEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ export default Vue.extend({
return false
}
} else if (this.editValue !== '') {
// TODO: Enable validation of listed values separately
// Test range
if (['integer', 'double'].includes(this.editConfig.format) &&
'range' in this.editConfig &&
Expand Down Expand Up @@ -350,6 +351,7 @@ export default Vue.extend({
if (!this.destroyCalled) {
this.destroyCalled = true // HACK for issue #869
// Convert to list value if applicable
// TODO: Allow for integer, double and unit-having fields
if (this.editValue.includes(';') && (
this.isValueArray || (
!['integer', 'double'].includes(this.editConfig.format) &&
Expand Down

0 comments on commit ca346ee

Please sign in to comment.