Cellfinder workflow CLI input argument with tests#23
Merged
Conversation
…signal and background files to None by default in dataclass (they need to be predefined).
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #23 +/- ##
==========================================
+ Coverage 0.00% 92.56% +92.56%
==========================================
Files 1 2 +1
Lines 5 121 +116
==========================================
+ Hits 0 112 +112
- Misses 5 9 +4
☔ View full report in Codecov by Sentry. |
alessandrofelder
approved these changes
Oct 13, 2023
Member
alessandrofelder
left a comment
There was a problem hiding this comment.
Thanks a lot @sfmig
I think the source code looks good - made some minor comments!
As discussed, we may want to refactor the tests a bit in a separate PR.
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A script to simulate a typical cellfinder workflow. It builds up on previous work from PRs #15 and #20 (none of which we merged).
We wanted
The current solution takes the path to a configuration json file as a command line input.
If no input json file is passed as a CLI argument, the default configuration defined at
brainglobe_workflows/cellfinder/default_config.jsonis used. This default configuration fetches data from a GIN repo, creates a.cellfinder_workflowscache subdirectory at the location the script is launched from, and saves to it the downloaded data and the output results.Example usage
cellfinder_main.pyparent directory:python cellfinder_main.py --config path/to/input/config.jsonpython cellfinder_main.pyIt ended up being a larger PR than I thought, apologies! But hopefully it crystallises the structure we discussed these past few days (see #9)