pass None for default preprocessing config - #178
Open
alessandrofelder wants to merge 6 commits into
Open
Conversation
alessandrofelder
marked this pull request as ready for review
March 26, 2026 17:03
PolarBean
reviewed
May 15, 2026
| """ | ||
|
|
||
| if isinstance(config, Path): | ||
| if not config: |
Member
There was a problem hiding this comment.
This assumes config is truthy. its fine but it would be safer to say if config is None
PolarBean
reviewed
May 15, 2026
| ) | ||
|
|
||
| logger.info(f"Csv file path: {standardised_csv}") | ||
| logger.info(f"Config: {config}") |
Member
There was a problem hiding this comment.
maybe you should now log preproc_config so that its not None
PolarBean
reviewed
May 15, 2026
| if not config: | ||
| # use default mask and padding, and default to outputting | ||
| # into sibling folder of `standardised/` | ||
| preproc_config = PreprocConfig( |
Member
There was a problem hiding this comment.
why not just define MaskConfig() as the default argument for PreprocConfig simplify.
PolarBean
approved these changes
May 15, 2026
Member
|
Some small suggestions but overall looks good :) |
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.
Description
What is this PR
Why is this PR needed?
Following group meeting discussion, we decided that it should be possible to run
preprocesswithout needing any configuration object. This simplifies the code that people need to understand when working through a basic template-building guide.What does this PR do?
Allows
preprocessfunction to take aNoneconfig (now the default), and handles this by instantiating a defaultPreprocConfigandMaskConfigin the sibling folder ofstandardised.Also ignores read time-outs to biorxiv for link checker.
References
Related to internal discussion of brainglobe/brainglobe.github.io#465
How has this PR been tested?
Added a parameter to an existing unit test
Is this a breaking change?
Nope
Does this PR require an update to the documentation?
Docstrings updated.
Part of simplifying API to enable better documentation in brainglobe/brainglobe.github.io#465
Checklist: