Skip to content

Commit

Permalink
Merge branch 'config-dir' of https://github.com/Aharoni-Lab/miniscope-io
Browse files Browse the repository at this point in the history
 into config-dir
  • Loading branch information
sneakers-the-rat committed Nov 12, 2024
2 parents d7f6b4c + c007722 commit b05fb6f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion miniscope_io/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def _file_handler(
def _rich_handler() -> RichHandler:
rich_handler = RichHandler(rich_tracebacks=True, markup=True)
rich_formatter = logging.Formatter(
"[bold green]\[%(name)s][/bold green] %(message)s",
r"[bold green]\[%(name)s][/bold green] %(message)s",
datefmt="[%y-%m-%dT%H:%M:%S]",
)
rich_handler.setFormatter(rich_formatter)
Expand Down
2 changes: 1 addition & 1 deletion miniscope_io/stream_daq.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ def _handle_frame(
self.logger.debug("Saving header metadata")
try:
self._buffered_writer.append(
list(header.model_dump().values()) + [time.time()]
list(header.model_dump(warnings=False).values()) + [time.time()]
)
except Exception as e:
self.logger.exception(f"Exception saving headers: \n{e}")
Expand Down
8 changes: 6 additions & 2 deletions tests/test_stream_daq.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def test_csv_output(tmp_path, default_streamdaq, write_metadata, caplog):
default_streamdaq.capture(source="fpga", metadata=None, show_video=False)
assert not output_csv.exists()


# This is a helper function for test_continuous_and_termination() that is currently skipped
"""
def capture_wrapper(default_streamdaq, source, show_video, continuous):
Expand All @@ -132,8 +133,10 @@ def capture_wrapper(default_streamdaq, source, show_video, continuous):
pass # expected
"""

@pytest.mark.skip("Needs to be implemented."
"Temporary skipped because tests fail in some OS (See GH actions).")

@pytest.mark.skip(
"Needs to be implemented. Temporary skipped because tests fail in some OS (See GH actions)."
)
@pytest.mark.timeout(10)
def test_continuous_and_termination(tmp_path, default_streamdaq):
"""
Expand Down Expand Up @@ -162,6 +165,7 @@ def test_continuous_and_termination(tmp_path, default_streamdaq):
"""
pass


def test_metadata_plotting(tmp_path, default_streamdaq):
"""
Setting the capture kwarg ``show_metadata == True`` should plot the frame metadata
Expand Down

0 comments on commit b05fb6f

Please sign in to comment.