deladect 1.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
deladect/__init__.py ADDED
@@ -0,0 +1,36 @@
1
+ """DelaDect: crack and delamination detection in translucent composites."""
2
+
3
+ import os
4
+ from importlib.metadata import PackageNotFoundError, version
5
+
6
+
7
+ def _configure_numba_defaults() -> None:
8
+ """Turn off numba JIT unless ``DELADECT_ENABLE_NUMBA_JIT`` is set.
9
+
10
+ crackdect's jitted helpers (``find_cracks``, ``_find_crack_end``) no
11
+ longer compile with recent numba, so they run as plain Python instead.
12
+ """
13
+ if os.environ.get("NUMBA_DISABLE_JIT") is not None:
14
+ return
15
+ if os.environ.get("DELADECT_ENABLE_NUMBA_JIT", "").strip().lower() in {"1", "true", "yes", "on"}:
16
+ return
17
+ os.environ["NUMBA_DISABLE_JIT"] = "1"
18
+
19
+
20
+ _configure_numba_defaults()
21
+
22
+ try:
23
+ __version__ = version("deladect")
24
+ except PackageNotFoundError:
25
+ __version__ = "0.0.0"
26
+
27
+ from .specimen import Specimen # noqa: E402
28
+ from .detection import DelaminationDetector, crack_analysis, plot_cracks # noqa: E402
29
+
30
+ __all__ = [
31
+ "__version__",
32
+ "Specimen",
33
+ "DelaminationDetector",
34
+ "crack_analysis",
35
+ "plot_cracks",
36
+ ]
@@ -0,0 +1,2 @@
1
+ """Command-line entry points for DelaDect."""
2
+