Coverage for src/dictk/__init__.py: 75%
8 statements
« prev ^ index » next coverage.py v7.15.2, created at 2026-08-25 21:06 +0000
« prev ^ index » next coverage.py v7.15.2, created at 2026-08-25 21:06 +0000
1"""dictk: Digital Image Correlation Toolkit.
3CLI vs. API: the `dictk` command-line entry points (`dictk rosta`,
4`dictk checkerboard`, `dictk astronaut`, ...) write image files to disk —
5that's their whole job. The corresponding Python API functions
6(`dictk.rosta`, `dictk.checkerboard`, `dictk.astronaut`, ...) do not
7perform any file I/O; they return NumPy arrays only. This keeps the API
8composable in a functional style — arrays
9can be piped through further functions (e.g. `dictk.image.combine`)
10before anything touches disk — and callers who do want a file call
11`dictk.image.write` explicitly as a separate, deliberate step.
12"""
14from importlib.metadata import PackageNotFoundError, version
16from dictk.image import astronaut, checkerboard
17from dictk.rosta import rosta
19try:
20 __version__ = version("dictk")
21except PackageNotFoundError:
22 __version__ = "0.0.0+unknown"
24__all__ = [
25 # Top-level re-exports: the array-returning API functions this
26 # docstring describes above.
27 "astronaut",
28 "checkerboard",
29 "rosta",
30 "__version__",
31 # Submodule names, not re-exports: without these, `from dictk import
32 # *` only binds the four names above, and pdoc's own package walk
33 # (both what it documents and what it links under "Submodules" on
34 # the dictk.html landing page) only discovers dictk.rosta -- by
35 # coincidence, since "rosta" already appears above as a re-export
36 # and happens to share its module's name. Listing every submodule
37 # here explicitly, not by that accident, is what makes both
38 # `from dictk import *` and pdoc's discovery complete and uniform.
39 # Add any new top-level submodule here too, or it silently drops out
40 # of both.
41 "cli",
42 "correlation",
43 "element",
44 "grid",
45 "image",
46 "plot",
47 "translation",
48]