Skip to content

Commit b662fa7

Browse files
committed
Finish improving outputs
1 parent e571d9c commit b662fa7

File tree

3 files changed

+228
-38
lines changed

3 files changed

+228
-38
lines changed

NOTES.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ switched to using `pydoclint` directly, and configured it in `pyproject.toml`. I
5050
* `outputs/blob/blob.py` should use custom exceptions for `retrieve_data` and `to_dict`. We also need more unit tests for blobs, including error conditions and invalid URLs.
5151
- 428: should use a custom exception, possibly based on `AttributeError`.
5252
- 535: should use generic class methods to ensure the return type is an instance of `cls` rather than `Blob`. Same for `from_bytes`.
53-
* `docs/src/blobs.rst` could really do with doctest to stop the example going stale.
53+
* `docs/src/blobs.rst` could really do with doctest to stop the example going stale
54+
* `outputs/mjpeg_stream.py` could be simplified.
55+
- `buffer_for_reading` is a pointless context manager, could be replaced with `ringbuffer_entry`
56+
- many generic `RuntimeErrors` should have exceptions defined.
57+
- Should we use `IndexError` when frames aren't available (or at least a subclass thereof)?
58+
- Example code in the descriptor may want a doctest in due course.
59+
- Could do with example code showing how it works in a simple camera?
60+
5461

5562

src/labthings_fastapi/outputs/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
"""Support for additional output formats.
2+
3+
Currently, this submodule provides an MJPEG Stream output. See
4+
`.MJPEGStreamDescriptor`.
5+
"""
6+
17
from .mjpeg_stream import MJPEGStream, MJPEGStreamDescriptor
28

39
# __all__ enables convenience imports from this module.

0 commit comments

Comments
 (0)