plasma-app 2.2.0__tar.gz → 2.2.2__tar.gz
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.
- {plasma_app-2.2.0 → plasma_app-2.2.2}/PKG-INFO +8 -1
- {plasma_app-2.2.0 → plasma_app-2.2.2}/README.md +7 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/__init__.py +1 -1
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/app_context.py +9 -4
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/desktop_shortcut.py +56 -5
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma_app.egg-info/PKG-INFO +8 -1
- {plasma_app-2.2.0 → plasma_app-2.2.2}/LICENSE +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/__main__.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/__pyinstaller/__init__.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/__pyinstaller/hook-plasma.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/api.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/build_info.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/config.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/ctl.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/__init__.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/bitalino.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/__init__.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/ble_scan.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/bleak_probe.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/bleak_reconnect_test.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/config.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/detect.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/device.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/extract/__init__.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/extract/__main__.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/extract/clocksync.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/extract/options.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/extract/pipeline.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/formats/__init__.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/gyro_bias.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/nus_sim.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/nus_stream.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/panels/__init__.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/panels/_common.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/panels/clocksync.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/panels/control.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/panels/downloader.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/panels/extractor.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/panels/imu.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/panels/sqc.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/panels/tools.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/panels/uuid_tools.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/panels/viewer.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/quaternion.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/records.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense/signal_quality.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense_demo/__init__.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense_demo/config.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense_demo/device.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense_demo/fake_stream.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/msense_demo/faults.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/obs.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/pupil_labs.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/qb2.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/shimmer.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/devices/template.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/integrated_panel.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/journal.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/lsl_recorder.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/lsl_session.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/lsl_util.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/plot_util.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/plugins.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/resources/icons/plasma.icns +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/resources/icons/plasma.ico +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/resources/icons/plasma.png +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/resources/icons/plasma.svg +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/status.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma/xdf_writer.py +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma_app.egg-info/SOURCES.txt +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma_app.egg-info/dependency_links.txt +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma_app.egg-info/entry_points.txt +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma_app.egg-info/requires.txt +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/plasma_app.egg-info/top_level.txt +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/pyproject.toml +0 -0
- {plasma_app-2.2.0 → plasma_app-2.2.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: plasma-app
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.2
|
|
4
4
|
Summary: PLASMA — Platform for LSL-based Acquisition of Sensor Metrics and Analytics
|
|
5
5
|
License: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/YuyiChang/PLASMA
|
|
@@ -56,6 +56,13 @@ from faults.
|
|
|
56
56
|
|
|
57
57
|
## quickstart
|
|
58
58
|
|
|
59
|
+
**macOS: `brew install --cask yuyichang/plasma/plasma`** is the recommended
|
|
60
|
+
way to get PLASMA — no Python, no `liblsl`, no Gatekeeper dance. See
|
|
61
|
+
[Install & first launch](https://yuyichang.github.io/PLASMA/playbook/install/)
|
|
62
|
+
for that and every other install path (prebuilt binaries, PyPI, from source).
|
|
63
|
+
|
|
64
|
+
To run from source instead:
|
|
65
|
+
|
|
59
66
|
- `conda create -n plasma python=3.12`
|
|
60
67
|
- `conda activate plasma`
|
|
61
68
|
- `pip install -e ".[all]"` — or a lean subset, e.g. `".[msense]"` / `".[qb2,pupil]"`
|
|
@@ -8,6 +8,13 @@ from faults.
|
|
|
8
8
|
|
|
9
9
|
## quickstart
|
|
10
10
|
|
|
11
|
+
**macOS: `brew install --cask yuyichang/plasma/plasma`** is the recommended
|
|
12
|
+
way to get PLASMA — no Python, no `liblsl`, no Gatekeeper dance. See
|
|
13
|
+
[Install & first launch](https://yuyichang.github.io/PLASMA/playbook/install/)
|
|
14
|
+
for that and every other install path (prebuilt binaries, PyPI, from source).
|
|
15
|
+
|
|
16
|
+
To run from source instead:
|
|
17
|
+
|
|
11
18
|
- `conda create -n plasma python=3.12`
|
|
12
19
|
- `conda activate plasma`
|
|
13
20
|
- `pip install -e ".[all]"` — or a lean subset, e.g. `".[msense]"` / `".[qb2,pupil]"`
|
|
@@ -36,7 +36,7 @@ import os
|
|
|
36
36
|
import sys
|
|
37
37
|
from dataclasses import dataclass, replace
|
|
38
38
|
|
|
39
|
-
__all__ = ["AppContext", "app_context", "configure", "reset"]
|
|
39
|
+
__all__ = ["AppContext", "app_context", "configure", "reset", "user_data_dir"]
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
@dataclass(frozen=True)
|
|
@@ -71,8 +71,13 @@ _ctx: AppContext | None = None
|
|
|
71
71
|
_DEFAULT_APP_DIR = "PLASMA"
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
def
|
|
75
|
-
"""Per-user, per-OS application-data directory (stdlib, no platformdirs).
|
|
74
|
+
def user_data_dir(app: str = _DEFAULT_APP_DIR) -> str:
|
|
75
|
+
"""Per-user, per-OS application-data directory (stdlib, no platformdirs).
|
|
76
|
+
|
|
77
|
+
Public so other entry points (e.g. ``plasma.desktop_shortcut``) can target
|
|
78
|
+
the same directory a frozen build would resolve to, without themselves
|
|
79
|
+
running frozen.
|
|
80
|
+
"""
|
|
76
81
|
if sys.platform == "win32":
|
|
77
82
|
base = os.environ.get("LOCALAPPDATA") or os.path.join(
|
|
78
83
|
os.path.expanduser("~"), "AppData", "Local")
|
|
@@ -95,7 +100,7 @@ def _from_env() -> AppContext:
|
|
|
95
100
|
if env:
|
|
96
101
|
return AppContext(home=env)
|
|
97
102
|
if _is_frozen():
|
|
98
|
-
return AppContext(home=
|
|
103
|
+
return AppContext(home=user_data_dir())
|
|
99
104
|
return AppContext(home=os.getcwd())
|
|
100
105
|
|
|
101
106
|
|
|
@@ -14,9 +14,19 @@ Points the shortcut directly at *this* environment's ``plasma`` console-script
|
|
|
14
14
|
than re-deriving a `python -m ...` invocation — see the pyshortcuts prototype
|
|
15
15
|
notes in the packaging discussion for why.
|
|
16
16
|
|
|
17
|
+
The shortcut's working directory is pinned to the same per-OS app-data dir a
|
|
18
|
+
frozen PyInstaller build resolves to (``plasma.app_context.user_data_dir``),
|
|
19
|
+
not left to whatever the OS defaults a new shortcut to (``$HOME`` on
|
|
20
|
+
Windows/Linux; an unspecified Terminal default on macOS). Since
|
|
21
|
+
``plasma.app_context`` falls back to the working directory for a non-frozen
|
|
22
|
+
process, this keeps the Desktop-icon launch and a downloaded prebuilt binary
|
|
23
|
+
reading/writing config from the same place.
|
|
24
|
+
|
|
17
25
|
plasma-install-shortcut [--name NAME] [--no-terminal] [--no-startmenu]
|
|
18
26
|
|
|
19
|
-
Requires the ``desktop`` extra (``pip install plasma-app[desktop]``
|
|
27
|
+
Requires the ``desktop`` extra (``pip install "plasma-app[desktop]"`` —
|
|
28
|
+
quote it, or zsh's glob expansion on ``[...]`` will fail with "no matches
|
|
29
|
+
found").
|
|
20
30
|
"""
|
|
21
31
|
from __future__ import annotations
|
|
22
32
|
|
|
@@ -26,6 +36,8 @@ import shutil
|
|
|
26
36
|
import sys
|
|
27
37
|
from pathlib import Path
|
|
28
38
|
|
|
39
|
+
from plasma.app_context import user_data_dir
|
|
40
|
+
|
|
29
41
|
_ICON_DIR = Path(__file__).parent / "resources" / "icons"
|
|
30
42
|
|
|
31
43
|
|
|
@@ -60,6 +72,35 @@ def _plasma_executable() -> str:
|
|
|
60
72
|
)
|
|
61
73
|
|
|
62
74
|
|
|
75
|
+
def _target_home() -> str:
|
|
76
|
+
"""Where the shortcut should run PLASMA from — the same per-OS app-data
|
|
77
|
+
dir a frozen build resolves to (``$PLASMA_HOME`` still wins if set,
|
|
78
|
+
matching ``app_context``'s own precedence)."""
|
|
79
|
+
return os.environ.get("PLASMA_HOME") or user_data_dir()
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def _launch_script(target_home: str) -> str:
|
|
83
|
+
"""Path handed to pyshortcuts as the thing to run.
|
|
84
|
+
|
|
85
|
+
On Windows/Linux, pyshortcuts writes ``target_home`` into the shortcut
|
|
86
|
+
itself (the ``.lnk`` ``WorkingDirectory`` / the ``.desktop`` ``Path=``
|
|
87
|
+
key), so the plain console-script is enough. On macOS, pyshortcuts'
|
|
88
|
+
Terminal/Automator launcher never applies ``working_dir`` at all — so we
|
|
89
|
+
wrap the console-script in a tiny shell script that ``cd``s first.
|
|
90
|
+
"""
|
|
91
|
+
exe = _plasma_executable()
|
|
92
|
+
if sys.platform != "darwin":
|
|
93
|
+
return exe
|
|
94
|
+
wrapper = Path(target_home) / "plasma-launch.sh"
|
|
95
|
+
wrapper.write_text(
|
|
96
|
+
"#!/bin/sh\n"
|
|
97
|
+
f'cd "{target_home}" || exit 1\n'
|
|
98
|
+
f'exec "{exe}"\n'
|
|
99
|
+
)
|
|
100
|
+
wrapper.chmod(0o755)
|
|
101
|
+
return str(wrapper)
|
|
102
|
+
|
|
103
|
+
|
|
63
104
|
def install_shortcut(name="PLASMA", terminal=True, startmenu=True, folder=None):
|
|
64
105
|
"""Create the Desktop (+ Start Menu, if requested) shortcut. Returns the
|
|
65
106
|
``pyshortcuts.Shortcut`` namedtuple describing what was written.
|
|
@@ -76,19 +117,23 @@ def install_shortcut(name="PLASMA", terminal=True, startmenu=True, folder=None):
|
|
|
76
117
|
except ImportError as e:
|
|
77
118
|
raise ImportError(
|
|
78
119
|
"pyshortcuts is required to create a desktop shortcut — install "
|
|
79
|
-
|
|
120
|
+
'it with `pip install "plasma-app[desktop]"`.'
|
|
80
121
|
) from e
|
|
81
122
|
|
|
123
|
+
target_home = _target_home()
|
|
124
|
+
os.makedirs(target_home, exist_ok=True)
|
|
125
|
+
|
|
82
126
|
return make_shortcut(
|
|
83
|
-
script=
|
|
127
|
+
script=_launch_script(target_home),
|
|
84
128
|
name=name,
|
|
85
129
|
description="PLASMA sensor acquisition dashboard",
|
|
86
130
|
icon=_icon_path(),
|
|
87
131
|
terminal=terminal,
|
|
88
132
|
desktop=True,
|
|
89
133
|
startmenu=startmenu, # pyshortcuts itself no-ops this on macOS
|
|
134
|
+
working_dir=target_home,
|
|
90
135
|
folder=folder,
|
|
91
|
-
noexe=True, # script is already a standalone console-script
|
|
136
|
+
noexe=True, # script is already a standalone console-script/wrapper
|
|
92
137
|
)
|
|
93
138
|
|
|
94
139
|
|
|
@@ -114,7 +159,13 @@ def main(argv=None):
|
|
|
114
159
|
startmenu=not args.no_startmenu,
|
|
115
160
|
)
|
|
116
161
|
print(f"Created shortcut: {scut.target}")
|
|
117
|
-
|
|
162
|
+
# NOTE: not scut.script/scut.full_script — pyshortcuts splits `script` on
|
|
163
|
+
# its first space to separate a script from trailing arguments, which
|
|
164
|
+
# mangles this when the path itself contains a space (e.g. macOS's
|
|
165
|
+
# "Application Support"). The shortcut it writes is still correct; only
|
|
166
|
+
# the returned namedtuple's script fields are truncated for display.
|
|
167
|
+
print(f" runs: {_plasma_executable()}")
|
|
168
|
+
print(f" in: {scut.working_dir}")
|
|
118
169
|
print(f" desktop: {scut.desktop_dir}")
|
|
119
170
|
if scut.startmenu_dir:
|
|
120
171
|
print(f" menu: {scut.startmenu_dir}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: plasma-app
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.2
|
|
4
4
|
Summary: PLASMA — Platform for LSL-based Acquisition of Sensor Metrics and Analytics
|
|
5
5
|
License: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/YuyiChang/PLASMA
|
|
@@ -56,6 +56,13 @@ from faults.
|
|
|
56
56
|
|
|
57
57
|
## quickstart
|
|
58
58
|
|
|
59
|
+
**macOS: `brew install --cask yuyichang/plasma/plasma`** is the recommended
|
|
60
|
+
way to get PLASMA — no Python, no `liblsl`, no Gatekeeper dance. See
|
|
61
|
+
[Install & first launch](https://yuyichang.github.io/PLASMA/playbook/install/)
|
|
62
|
+
for that and every other install path (prebuilt binaries, PyPI, from source).
|
|
63
|
+
|
|
64
|
+
To run from source instead:
|
|
65
|
+
|
|
59
66
|
- `conda create -n plasma python=3.12`
|
|
60
67
|
- `conda activate plasma`
|
|
61
68
|
- `pip install -e ".[all]"` — or a lean subset, e.g. `".[msense]"` / `".[qb2,pupil]"`
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|