Skip to content

Commit

Permalink
Merge pull request #54 from MilagrosMarin/main
Browse files Browse the repository at this point in the history
Fix declaration of `get_miniscope_root_data_dir`
  • Loading branch information
kushalbakshi authored Jan 22, 2024
2 parents 09b736e + 56f3295 commit dd3597f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.

## [0.4.1] - 2023-10-31

+ Fix - `tutorial_pipeline.py` markdown and variable name typos

## [0.4.0] - 2023-10-31

+ Add - DevContainer for codespaces
Expand Down
2 changes: 1 addition & 1 deletion element_miniscope/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""Package metadata"""
__version__ = "0.4.0"
__version__ = "0.4.1"
18 changes: 10 additions & 8 deletions notebooks/tutorial_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,18 @@

# Declare functions for retrieving data
def get_miniscope_root_data_dir():
"""Retrieve imaging root data directory."""
imaging_root_dirs = dj.config.get("custom", {}).get("miniscope_root_data_dir", None)
if not imaging_root_dirs:
"""Retrieve miniscope root data directory."""
miniscope_root_dirs = dj.config.get("custom", {}).get(
"miniscope_root_data_dir", None
)
if not miniscope_root_dirs:
return None
elif isinstance(imaging_root_dirs, (str, pathlib.Path)):
return [imaging_root_dirs]
elif isinstance(imaging_root_dirs, list):
return imaging_root_dirs
elif isinstance(miniscope_root_dirs, (str, pathlib.Path)):
return [miniscope_root_dirs]
elif isinstance(miniscope_root_dirs, list):
return miniscope_root_dirs
else:
raise TypeError("`imaging_root_data_dir` must be a string, pathlib, or list")
raise TypeError("`miniscope_root_data_dir` must be a string, pathlib, or list")


# Activate schemas
Expand Down

0 comments on commit dd3597f

Please sign in to comment.