brainglobe / brainglobe-workflows

Workflows that utilise BrainGlobe tools to perform data analysis and visualisation.
BSD 3-Clause "New" or "Revised" License
9 stars 2 forks source link

Support single z-stack tif file for input #88

Closed matham closed 1 month ago

matham commented 2 months ago

This is part of this PR: https://github.com/brainglobe/cellfinder/pull/397 and https://github.com/brainglobe/brainglobe-utils/pull/67.

I had to fix this manually for the tests to pass. But this is an issue with the repo, not these changes:

ImportError while importing test module 'D:\code\cellcount\brainglobe-workflows\tests\brainmapper\test_unit\test_prep.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
C:\Prog\Python\Python310\lib\importlib\__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests\brainmapper\test_unit\test_prep.py:6: in <module>
    from brainglobe_workflows.brainmapper import prep
brainglobe_workflows\brainmapper\prep.py:25: in <module>
    import brainglobe_workflows.brainmapper.parser as parser
brainglobe_workflows\brainmapper\parser.py:25: in <module>
    from cellfinder.core.tools.source_files import source_custom_config_cellfinder
E   ImportError: cannot import name 'source_custom_config_cellfinder' from 'cellfinder.core.tools.source_files' (D:\code\cellcount\cellfinder\cellfinder\core\tools\source_files.py)

Then is succeded except of these tests, which I don't think are related to this PR

========================================================================================================== short test summary info =========================================================================================================== FAILED tests/brainmapper/test_integration/test_detection.py::test_detection_full - OSError: Unable to synchronously open file (truncated file: eof = 66060288, sblock->base_addr = 0, stored_eof = 184831728)
FAILED tests/cellfinder_core/test_integration/test_cellfinder.py::test_main - FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Matthew Einhorn\\.brainglobe-tests\\.cellfinder\\cellfinder.conf.custom'
FAILED tests/cellfinder_core/test_integration/test_cellfinder.py::test_main_w_inputs[config_local_json] - FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Matthew Einhorn\\.brainglobe-tests\\.cellfinder\\cellfinder.conf.custom'
FAILED tests/cellfinder_core/test_integration/test_cellfinder.py::test_main_w_inputs[config_GIN_json] - FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Matthew Einhorn\\.brainglobe-tests\\.cellfinder\\cellfinder.conf.custom'
FAILED tests/cellfinder_core/test_integration/test_cellfinder.py::test_entry_point_help - FileNotFoundError: [WinError 2] The system cannot find the file specified
FAILED tests/cellfinder_core/test_unit/test_cellfinder.py::test_run_workflow_from_cellfinder_run[default_input_config_cellfinder] - FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Matthew Einhorn\\.brainglobe-tests\\.cellfinder\\cellfinder.conf.custom'
FAILED tests/cellfinder_core/test_unit/test_cellfinder.py::test_run_workflow_from_cellfinder_run[config_local_json] - FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Matthew Einhorn\\.brainglobe-tests\\.cellfinder\\cellfinder.conf.custom'
FAILED tests/cellfinder_core/test_unit/test_cellfinder.py::test_run_workflow_from_cellfinder_run[config_GIN_json] - FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Matthew Einhorn\\.brainglobe-tests\\.cellfinder\\cellfinder.conf.custom'
================================================================================ 8 failed, 14 passed, 1 skipped, 1 xfailed, 39 warnings in 407.22s (0:06:47) =================================================================================
adamltyson commented 2 months ago

Thanks for this @matham. Just to let you know we should get back to you with a review next week.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 85.71429% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 85.69%. Comparing base (918ac9f) to head (ae9297d).

Files Patch % Lines
brainglobe_workflows/brainmapper/main.py 75.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #88 +/- ## ======================================= Coverage 85.69% 85.69% ======================================= Files 16 16 Lines 839 839 ======================================= Hits 719 719 Misses 120 120 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

alessandrofelder commented 1 month ago

benchmark test failure expected as we have not released cellfinder with the required new API yet. Other tests pass.