Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into flexible-dimension-…
Browse files Browse the repository at this point in the history
…order
  • Loading branch information
aliddell committed Mar 8, 2024
2 parents 99d1ee0 + 23a3edd commit 877b49d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
7 changes: 6 additions & 1 deletion python/acquire/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@
Tuple,
Union,
)

from importlib.metadata import version, PackageNotFoundError
import numpy.typing as npt

from . import acquire
from .acquire import *

try:
__version__ = version("acquire-imaging")
except PackageNotFoundError:
__version__ = "uninstalled"

__doc__ = acquire.__doc__

import logging
Expand Down
2 changes: 2 additions & 0 deletions python/acquire/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import napari # type: ignore

from .acquire import Runtime, Properties

__version__: str

def setup(
runtime: Runtime,
camera: Union[str, List[str]] = ...,
Expand Down
7 changes: 7 additions & 0 deletions tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ def runtime():
yield acquire.Runtime()


def test_version():
assert isinstance(acquire.__version__, str)
# this will fail if pip install -e . has not been run
# so feel free to remove this line if it's not what you want to test
assert acquire.__version__ != "uninstalled"


def test_set():
t = Trigger()
assert not t.enable
Expand Down

0 comments on commit 877b49d

Please sign in to comment.