moved examples/app_paths.py into gui
This commit is contained in:
@@ -6,7 +6,7 @@ a = Analysis(
|
|||||||
pathex=[],
|
pathex=[],
|
||||||
binaries=[],
|
binaries=[],
|
||||||
datas=[('D:\\repo\\orisyssdk_git\\config', 'config'), ('D:\\repo\\orisyssdk_git\\assets', 'assets')],
|
datas=[('D:\\repo\\orisyssdk_git\\config', 'config'), ('D:\\repo\\orisyssdk_git\\assets', 'assets')],
|
||||||
hiddenimports=['PyQt5', 'pyqtgraph', 'open3d', 'cv2', 'orisys', 'gui', 'pipeline', 'viz', 'app_paths', 'plotly', '_plotly_utils', 'open3d.cpu.pybind'],
|
hiddenimports=['PyQt5', 'pyqtgraph', 'open3d', 'cv2', 'orisys', 'gui', 'pipeline', 'viz', 'gui.app_paths', 'plotly', '_plotly_utils', 'open3d.cpu.pybind'],
|
||||||
hookspath=[],
|
hookspath=[],
|
||||||
hooksconfig={},
|
hooksconfig={},
|
||||||
runtime_hooks=[],
|
runtime_hooks=[],
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ HIDDEN_IMPORTS = [
|
|||||||
"gui",
|
"gui",
|
||||||
"pipeline",
|
"pipeline",
|
||||||
"viz",
|
"viz",
|
||||||
"app_paths",
|
"gui.app_paths",
|
||||||
"plotly",
|
"plotly",
|
||||||
"_plotly_utils",
|
"_plotly_utils",
|
||||||
# sometimes needed for open3d:
|
# sometimes needed for open3d:
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ def copy_bundle_items(repo_root: Path, pkg_dir: Path, items: list[dict]) -> dict
|
|||||||
def package_data_from_bundle(ext_suffix: str, items: list[dict]) -> dict[str, list[str]]:
|
def package_data_from_bundle(ext_suffix: str, items: list[dict]) -> dict[str, list[str]]:
|
||||||
package_data: dict[str, list[str]] = {
|
package_data: dict[str, list[str]] = {
|
||||||
"orisys": [f"*{ext_suffix}"],
|
"orisys": [f"*{ext_suffix}"],
|
||||||
"orisys.examples": ["*.py", "README.md", "app_paths.py", "viz/**/*.py", "pipeline/**/*.py", "gui/**/*.py"],
|
"orisys.examples": ["*.py", "README.md", "viz/**/*.py", "pipeline/**/*.py", "gui/**/*.py"],
|
||||||
}
|
}
|
||||||
for item in items:
|
for item in items:
|
||||||
if item["name"] == "examples":
|
if item["name"] == "examples":
|
||||||
|
|||||||
+1
-2
@@ -5,7 +5,6 @@ Top-level demo scripts under `examples/`. Run them from the repository root.
|
|||||||
## Top-Level Files
|
## Top-Level Files
|
||||||
|
|
||||||
- `README.md` — this overview of the root-level example entry points
|
- `README.md` — this overview of the root-level example entry points
|
||||||
- `app_paths.py` — path helpers used by the packaged / frozen dashboard entry point
|
|
||||||
- `basic_pipeline.py` — basic single-sensor OpenCV demo for the compound-eye pipeline
|
- `basic_pipeline.py` — basic single-sensor OpenCV demo for the compound-eye pipeline
|
||||||
- `plot_data.py` — single-sensor demo with OpenCV views plus PyQtGraph force charts
|
- `plot_data.py` — single-sensor demo with OpenCV views plus PyQtGraph force charts
|
||||||
- `two_sensor_pipeline.py` — two-sensor multiprocessing demo for parallel acquisition / display
|
- `two_sensor_pipeline.py` — two-sensor multiprocessing demo for parallel acquisition / display
|
||||||
@@ -59,7 +58,7 @@ pip install -e ".[gui]"
|
|||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
- `finger_pipeline_3dview.py` is the main interactive demo. It uses `app_paths.py` so the same entry point works in editable and packaged runs.
|
- `finger_pipeline_3dview.py` is the main interactive demo. It uses `gui/app_paths.py` so the same entry point works in editable and packaged runs.
|
||||||
- Dashboard controls: click **启动** to start acquisition; `Q` quits, `R` resets, `S` starts recording, `E` stops recording, and `Esc` toggles fullscreen.
|
- Dashboard controls: click **启动** to start acquisition; `Q` quits, `R` resets, `S` starts recording, `E` stops recording, and `Esc` toggles fullscreen.
|
||||||
- `finger_pipeline.py` is the leanest finger example if you want to validate UV unroll + force/contact processing without the full dashboard.
|
- `finger_pipeline.py` is the leanest finger example if you want to validate UV unroll + force/contact processing without the full dashboard.
|
||||||
- `finger_pipeline.py` uses `orisys.finger.FingerRuntime` as the high-level entry point, then runs tactile analysis through `runtime.tactile`.
|
- `finger_pipeline.py` uses `orisys.finger.FingerRuntime` as the high-level entry point, then runs tactile analysis through `runtime.tactile`.
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import sys
|
|||||||
|
|
||||||
os.environ.setdefault("OPENCV_VIDEOIO_MSMF_ENABLE_HW_TRANSFORMS", "0")
|
os.environ.setdefault("OPENCV_VIDEOIO_MSMF_ENABLE_HW_TRANSFORMS", "0")
|
||||||
|
|
||||||
from app_paths import configure_frozen_runtime, default_config_path, ensure_examples_import_path
|
from gui.app_paths import configure_frozen_runtime, default_config_path, ensure_examples_import_path
|
||||||
|
|
||||||
configure_frozen_runtime()
|
configure_frozen_runtime()
|
||||||
ensure_examples_import_path()
|
ensure_examples_import_path()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
"""Resolve bundled resource paths for dev runs and Nuitka standalone builds."""
|
"""Resolve bundled resource paths for dev runs and standalone builds."""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
@@ -6,7 +6,8 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
_EXAMPLES_DIR = Path(__file__).resolve().parent
|
_GUI_DIR = Path(__file__).resolve().parent
|
||||||
|
_EXAMPLES_DIR = _GUI_DIR.parent
|
||||||
_REPO_ROOT = _EXAMPLES_DIR.parent
|
_REPO_ROOT = _EXAMPLES_DIR.parent
|
||||||
|
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ from PyQt5.QtWidgets import (
|
|||||||
from pipeline.config import PipelineConfig
|
from pipeline.config import PipelineConfig
|
||||||
from pipeline.service import FingerPipeline
|
from pipeline.service import FingerPipeline
|
||||||
|
|
||||||
from app_paths import resource_path
|
from .app_paths import resource_path
|
||||||
from .layout import (
|
from .layout import (
|
||||||
DashboardLayout,
|
DashboardLayout,
|
||||||
LAYOUT,
|
LAYOUT,
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ def resolve_viz_pose_path(path: str | Path | None = None) -> Path:
|
|||||||
here.parents[2] / raw,
|
here.parents[2] / raw,
|
||||||
]
|
]
|
||||||
try:
|
try:
|
||||||
from app_paths import app_root
|
from gui.app_paths import app_root
|
||||||
|
|
||||||
candidates.insert(0, app_root() / raw)
|
candidates.insert(0, app_root() / raw)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
+1
-1
@@ -51,7 +51,7 @@ dev_install = true
|
|||||||
name = "examples"
|
name = "examples"
|
||||||
source = "examples"
|
source = "examples"
|
||||||
target = "examples"
|
target = "examples"
|
||||||
patterns = ["*.py", "README.md", "app_paths.py", "viz/**/*.py", "pipeline/**/*.py", "gui/**/*.py"]
|
patterns = ["*.py", "README.md", "viz/**/*.py", "pipeline/**/*.py", "gui/**/*.py"]
|
||||||
preserve_tree = true
|
preserve_tree = true
|
||||||
|
|
||||||
[[tool.orisys.bundle.items]]
|
[[tool.orisys.bundle.items]]
|
||||||
|
|||||||
Reference in New Issue
Block a user