Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
146 lines (130 loc) · 4.23 KB
/
Copy pathpyproject.toml
File metadata and controls
146 lines (130 loc) · 4.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "session-visualizer"
version = "0.0.0"
description = "Best-effort live visualization layer for OperantKit sessions: non-blocking EventSink, cumulative record, and on-budget model fitting over SSE."
readme = "README.md"
requires-python = ">=3.11"
license = { text = "MIT" }
authors = [
{ name = "OperantKit contributors" },
]
keywords = [
"behavior-analysis",
"operant-conditioning",
"cumulative-record",
"live-dashboard",
"experiment",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Visualization",
]
dependencies = [
# session-analyzer owns the canonical visualizer / theme / suggester
# implementations. Nearly every documented HTTP endpoint
# (/theme.json, /figure/*, /suggest) is backed by it, so the upstream
# contract is not honoured without it. Until it is on PyPI, install it
# from GitHub (git+https://github.com/OperantKit/session-analyzer).
"session-analyzer>=0.1.1,<0.2",
# session-recorder is required by OKLTailReader for cross-process
# tailing of OKL v1 logs. Already pulled in transitively via
# session-analyzer; declared here explicitly so the dependency is
# not silently broken if session-analyzer's deps change.
"session-recorder>=0.1.1,<0.2",
]
[project.optional-dependencies]
# ---- Lightweight descriptive stats + linear fits for mid-session ticks
# (e.g. generalized-matching slope via log-log OLS, moving-window response
# rate, IRT descriptives). Kept deliberately small so `[fit]` does not
# pull in pymc/statsmodels. These are the fits allowed to run on the
# in-process periodic tick (10 s / 1 min cadence).
fit = [
"numpy>=1.26",
"scipy>=1.11",
]
# ---- Streaming / realtime transport extras. The sink + aggregator
# themselves do not need these; they are for consumers that want to pipe
# snapshots over WebSockets or async file tails. Left empty by default so
# installing `[realtime]` is a no-op today — the slot exists to keep the
# install surface stable as we add async transports.
realtime = []
# ---- Filesystem watcher for the cross-process tail source. With
# `watchdog` installed, LogTailSource wakes on file modifications
# instead of waiting out the poll interval, lowering tail latency.
# Without it, plain time-based polling is used (functional, just less
# responsive).
stream = [
"watchdog>=4.0",
]
server = [
"fastapi>=0.110",
"sse-starlette>=2.0",
"uvicorn>=0.29",
]
# ---- Kitchen-sink: everything needed to run a live dashboard with
# in-process light fits. Does NOT include [test]/[dev] — those are for
# maintainers.
full = [
"session-visualizer[fit,realtime,server,stream]",
]
test = [
"pytest>=8",
"pytest-cov>=5",
# README examples drive a session with session-runner.
"session-runner>=0.1.1,<0.2",
# The server tests (tests/test_server_*.py) drive the FastAPI app through
# fastapi.testclient, which needs httpx; without these they are skipped.
"httpx>=0.27",
"session-visualizer[server]",
]
dev = [
"session-visualizer[test,server,fit,stream]",
"mypy>=1.10",
"ruff>=0.5",
]
[project.scripts]
session-visualizer = "session_visualizer.cli:main"
[project.urls]
Homepage = "https://github.com/OperantKit"
Repository = "https://github.com/OperantKit/session-visualizer"
[tool.hatch.build.targets.wheel]
packages = ["src/session_visualizer"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = [
"--strict-markers",
"--strict-config",
"-ra",
]
markers = [
"unit: pure unit tests with no external dependencies",
"integration: tests that exercise cross-module interactions",
]
[tool.coverage.run]
branch = true
source = ["session_visualizer"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"\\.\\.\\.",
]
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "N", "UP", "B", "C4", "SIM", "RET"]
[tool.mypy]
python_version = "3.11"
strict = true
warn_unused_ignores = true
warn_redundant_casts = true