Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support single z-stack tif file for input #88

Merged
merged 3 commits into from
May 7, 2024

Conversation

matham
Copy link
Contributor

@matham matham commented Apr 10, 2024

This is part of this PR: brainglobe/cellfinder#397 and brainglobe/brainglobe-utils#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
Copy link
Member

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

Copy link
Contributor

@K-Meech K-Meech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I added a few small comments below to make it clearer that dask or numpy arrays may now be returned.

The test failures you encountered should hopefully have been fixed with #89. Could you pull the latest changes from main into this branch? Hopefully that will then fix the CI.

Merging this PR will require brainglobe/brainglobe-utils#67 and brainglobe/cellfinder#397 to be merged first.

brainglobe_workflows/cellfinder_core/cellfinder_core.py Outdated Show resolved Hide resolved
brainglobe_workflows/cellfinder_core/cellfinder_core.py Outdated Show resolved Hide resolved
brainglobe_workflows/cellfinder_core/cellfinder_core.py Outdated Show resolved Hide resolved
Copy link
Member

@alessandrofelder alessandrofelder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks @matham !
I'll merge this now, and aim to make a release of various recent changes on Monday (Friday afternoon releases are dangerous 😆 )

Copy link

codecov bot commented May 3, 2024

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 ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #88   +/-   ##
=======================================
  Coverage   85.69%   85.69%           
=======================================
  Files          16       16           
  Lines         839      839           
=======================================
  Hits          719      719           
  Misses        120      120           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alessandrofelder
Copy link
Member

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

@alessandrofelder alessandrofelder merged commit 4700a23 into brainglobe:main May 7, 2024
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants