Add docstrings to all public package
This commit is contained in:
parent
14359e73bb
commit
864ca91e5c
7 changed files with 46 additions and 1 deletions
|
|
@ -129,7 +129,6 @@ ignore = [
|
||||||
"D213", # incompatible with D212
|
"D213", # incompatible with D212
|
||||||
"D400", # A stricter version of #415 that doesn't allow !
|
"D400", # A stricter version of #415 that doesn't allow !
|
||||||
# The checkers below should be turned on as they complain about missing docstrings.
|
# The checkers below should be turned on as they complain about missing docstrings.
|
||||||
"D104",
|
|
||||||
"D105",
|
"D105",
|
||||||
"D107",
|
"D107",
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
"""The OpenFlexure Microscope Server Package.
|
||||||
|
|
||||||
|
The OpenFlexure Microscope Server is a LabThings-FastAPI server. All hardware
|
||||||
|
interfaces, and almost all functionality exposed over HTTP is done using ``Things``.
|
||||||
|
|
||||||
|
On the microscope the server is started by systemd. It can be controlled using commands
|
||||||
|
such as ``ofm restart``, ``ofm start``, and ``ofm stop``.
|
||||||
|
|
||||||
|
The server can also be run in simulation mode from the terminal. In the root directory
|
||||||
|
of the repository the server can be started with run:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
openflexure-microscope-server --fallback -c ./ofm_config_simulation.json
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
"""A package responsible for, setup, booting, and shutting down the server."""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from typing import Optional, Callable
|
from typing import Optional, Callable
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
"""A package for all of the core LabThings-FastAPI Things shipped with the microscope.
|
||||||
|
|
||||||
|
The microscope can be extended to be used with other hardware by creating a package
|
||||||
|
with other Things and including them in the LabThings-FastAPI config file.
|
||||||
|
"""
|
||||||
|
|
@ -1,3 +1,14 @@
|
||||||
|
"""A package for stage control Things.
|
||||||
|
|
||||||
|
`BaseStage` is the base class that provides core stage functionality, but
|
||||||
|
no hardware interface control. To create a stage Thing to control a specific
|
||||||
|
piece of hardware the BaseStage should be subclassed, and any method raising
|
||||||
|
a NotImplementedError should be created.
|
||||||
|
|
||||||
|
As the object will be used as a context manager create the hardware connection in
|
||||||
|
``__enter__`` (not in ``__init__``), and close the connection with ``__exit__``.
|
||||||
|
"""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
from collections.abc import Sequence, Mapping
|
from collections.abc import Sequence, Mapping
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
"""The unit-test suite for the OpenFlexure Microscope Server.
|
||||||
|
|
||||||
|
This package contains all of the unit tests that can be run without specific
|
||||||
|
hardware. See also the `hardware-specific-tests` directory and the
|
||||||
|
`integration-tests` directory for more testing!.
|
||||||
|
"""
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
"""A package of test module providing mock Things for testing.
|
||||||
|
|
||||||
|
The mock things do not subclass the origninal things to minimise the inflation of
|
||||||
|
test coverage.
|
||||||
|
"""
|
||||||
Loading…
Add table
Add a link
Reference in a new issue