bihealth / sodar-server

SODAR: System for Omics Data Access and Retrieval
https://github.com/bihealth/sodar-server
MIT License
14 stars 3 forks source link

Upgrade to altamISA v0.3.0 #2033

Open mikkonie opened 3 weeks ago

mikkonie commented 3 weeks ago

What it says on the tin. The release is here.

To fully support this release we also need to support importing, exporting and editing performer and factor value fields as lists. The alternative would be to prohibit importing them as lists, but that would be pretty much the same amount of work.

Tasks

mikkonie commented 3 weeks ago

Some failed tests, will see about fixing these issues tomorrow:

======================================================================
ERROR: test_import_multi_val (samplesheets.tests.test_io.TestSampleSheetIOImport)
Test _import_multi_val()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/sodar-server/sodar-server/samplesheets/tests/test_io.py", line 386, in test_import_multi_val
    'name': in_data.name,
AttributeError: 'list' object has no attribute 'name'

======================================================================
FAIL: test_isa_export_batch (samplesheets.tests.test_io.TestSampleSheetIOBatch)
Test ISA-Tab export in batch
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/sodar-server/sodar-server/samplesheets/tests/test_io.py", line 215, in test_isa_export_batch
    sheet_io.export_isa(investigation)
  File "/home/runner/work/sodar-server/sodar-server/samplesheets/io.py", line 1390, in export_isa
    StudyValidator(
  File "/opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/site-packages/altamisa/isatab/validate_assay_study.py", line 439, in validate
    self._validate_materials()
  File "/opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/site-packages/altamisa/isatab/validate_assay_study.py", line 449, in _validate_materials
    validator.validate(m)
  File "/opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/site-packages/altamisa/isatab/validate_assay_study.py", line 80, in validate
    self._validate_material_annotations(material)
  File "/opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/site-packages/altamisa/isatab/validate_assay_study.py", line 99, in _validate_material_annotations
    any_fact = any([any(has_content(v) for v in fact.value) for fact in material.factor_values])
  File "/opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/site-packages/altamisa/isatab/validate_assay_study.py", line 99, in <listcomp>
    any_fact = any([any(has_content(v) for v in fact.value) for fact in material.factor_values])
TypeError: 'OntologyTermRef' object is not iterable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/runner/work/sodar-server/sodar-server/samplesheets/tests/test_io.py", line 218, in test_isa_export_batch
    return self.fail_isa(zip_name, ex)
  File "/home/runner/work/sodar-server/sodar-server/samplesheets/tests/test_io.py", line 143, in fail_isa
    self.fail('Exception in {}: {}'.format(zip_name, ex))
AssertionError: Exception in BII-I-1_edited.zip: 'OntologyTermRef' object is not iterable

======================================================================
FAIL: test_import_ref_val (samplesheets.tests.test_io.TestSampleSheetIOImport)
Test _import_ref_val()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/sodar-server/sodar-server/samplesheets/tests/test_io.py", line 356, in test_import_ref_val
    self.assertEqual(out_data, in_data)
AssertionError: None != ['200']

======================================================================
FAIL: test_sync_task (samplesheets.tests.test_tasks_celery_taskflow.TestSheetRemoteSyncTask)
Test sync
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/sodar-server/sodar-server/samplesheets/tests/test_tasks_celery_taskflow.py", line 197, in test_sync_task
    self.assertEqual(data_target, data_source)
AssertionError: {'ass[640 chars]sv': "Source Name\tCharacteristics[organism]\t[5065 chars]xt'}} != {'ass[640 chars]sv': 'Source Name\tCharacteristics[organism]\t[4980 chars]xt'}}
Diff is 13514 characters long. Set self.maxDiff to None to see it.