Core
The core package (jumper_extension.core) defines the domain model, configuration, and parsing logic that underpin the JUmPER IPython extension. For the public Python API of PerfmonitorService, see the Python API section; the content below focuses on supporting modules and helper functions and is generated directly from the code.
State
The state module contains dataclasses describing runtime settings for
monitoring, automatic reports, and exported or loaded variables.
Configuration and state models for the JUmPER core.
This module defines dataclasses that hold runtime configuration for monitoring, performance reports, and names of exported or loaded variables.
ExportVars
dataclass
Names of variables used when exporting data frames.
Attributes:
| Name | Type | Description |
|---|---|---|
perfdata |
str
|
Variable name for exported performance data. |
cell_history |
str
|
Variable name for exported cell history. |
Source code in jumper_extension/core/state.py
13 14 15 16 17 18 19 20 21 22 23 | |
LoadedVars
dataclass
Names of variables used when loading data frames.
Attributes:
| Name | Type | Description |
|---|---|---|
perfdata |
str
|
Variable name for loaded performance data. |
cell_history |
str
|
Variable name for loaded cell history. |
Source code in jumper_extension/core/state.py
26 27 28 29 30 31 32 33 34 35 36 | |
PerfomanceReports
dataclass
Configuration for automatic per-cell performance reports.
Attributes:
| Name | Type | Description |
|---|---|---|
enabled |
bool
|
Whether per-cell reports are enabled. |
level |
str
|
Monitoring level used when generating reports. |
text |
bool
|
If True, use text reports instead of HTML. |
Source code in jumper_extension/core/state.py
39 40 41 42 43 44 45 46 47 48 49 50 51 | |
PerformanceMonitoring
dataclass
Configuration for the performance monitoring loop.
Attributes:
| Name | Type | Description |
|---|---|---|
default_interval |
float
|
Default sampling interval in seconds. |
user_interval |
Optional[float]
|
User-provided interval overriding the default. |
running |
bool
|
Whether monitoring is currently running. |
Source code in jumper_extension/core/state.py
54 55 56 57 58 59 60 61 62 63 64 65 66 | |
Settings
dataclass
Top-level configuration container for the extension.
Groups performance reports, monitoring configuration, and variable names used when exporting or loading data.
Attributes:
| Name | Type | Description |
|---|---|---|
perfreports |
PerfomanceReports
|
Settings for per-cell performance reports. |
monitoring |
PerformanceMonitoring
|
Settings for the monitoring loop. |
export_vars |
ExportVars
|
Names for exported data variables. |
loaded_vars |
LoadedVars
|
Names for loaded data variables. |
visualizer_backend |
str
|
Default backend used for plotting. |
Source code in jumper_extension/core/state.py
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 | |
snapshot()
Return a deep copy of the current settings.
Returns:
| Name | Type | Description |
|---|---|---|
Settings |
Settings
|
Independent copy of the current configuration. |
Source code in jumper_extension/core/state.py
90 91 92 93 94 95 96 | |
Parsers
Module containing parser utilities for the JUmPER extension.
ArgParsers
dataclass
Configuration for command-line argument parsers.
Source code in jumper_extension/core/parsers.py
11 12 13 14 15 16 17 18 19 20 21 22 23 | |
build_export_session_parser()
Build parser for exporting a full session package.
Usage examples in magics
%export_session # uses default directory name %export_session my_dir # export into directory %export_session my_session.zip # export and zip (auto-detected by .zip extension)
Source code in jumper_extension/core/parsers.py
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | |
build_import_session_parser()
Build parser for importing a full session package from directory or zip.
Source code in jumper_extension/core/parsers.py
181 182 183 184 185 186 187 188 189 | |
build_perfmonitor_start_parser()
Build an ArgumentParser for the perfmonitor_start command.
Source code in jumper_extension/core/parsers.py
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 | |
build_perfreport_parser()
Build an ArgumentParser instance for JUmPER commands.
Source code in jumper_extension/core/parsers.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | |
parse_arguments(parser, line)
Parse common command line arguments for JUmPER commands.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
line
|
str
|
The command line string to parse |
required |
parser
|
ArgumentParser
|
Optional existing ArgumentParser instance |
required |
Returns:
| Type | Description |
|---|---|
Optional[Namespace]
|
Parsed arguments or None if parsing failed |
Source code in jumper_extension/core/parsers.py
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | |
parse_cell_range(cell_str, cell_history_length)
Parse a cell range string into start and end indices.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cell_str
|
str
|
String representing cell range (e.g., "1:3", "5", ":10") |
required |
cell_history_length
|
int
|
Length of cell history |
required |
Returns:
| Type | Description |
|---|---|
Optional[Tuple[int, int]]
|
Tuple of (start_idx, end_idx) or None if invalid |
Source code in jumper_extension/core/parsers.py
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 | |
Messages
The messages module defines error and info codes together with their
human-readable message templates.
Message codes and templates used by the JUmPER extension.
This module defines enums for error and info codes, maps them to human-readable message templates, and exposes helpers for working with those messages.
ExtensionErrorCode
Bases: Enum
Error codes emitted by the extension.
Source code in jumper_extension/core/messages.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | |
ExtensionInfoCode
Bases: Enum
Informational codes emitted by the extension.
Source code in jumper_extension/core/messages.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | |
get_jumper_process_error_hint()
Return a hint pointing to the error log file.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Human-readable hint with the path to the error log file. |
Source code in jumper_extension/core/messages.py
153 154 155 156 157 158 159 160 161 162 163 | |
Service helpers
The service itself is documented in the public API; this section exposes the helper functions that construct it.
build_perfmonitor_service(plots_disabled=False, plots_disabled_reason='Plotting not available.', display_disabled=False, display_disabled_reason='Display not available.', visualizer_backend='matplotlib')
Build a new :class:PerfmonitorService instance.
This factory configures the default monitor, visualizer, reporter, cell history, and script writer for use in Python code.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plots_disabled
|
bool
|
If |
False
|
plots_disabled_reason
|
str
|
Human-readable reason shown when plots are disabled. |
'Plotting not available.'
|
display_disabled
|
bool
|
If |
False
|
display_disabled_reason
|
str
|
Human-readable reason shown when rich display is disabled. |
'Display not available.'
|
visualizer_backend
|
str
|
Visualizer backend to use. Supported values:
|
'matplotlib'
|
Returns:
| Name | Type | Description |
|---|---|---|
PerfmonitorService |
PerfmonitorService
|
A fully initialized service instance. |
Examples:
>>> from jumper_extension.core.service import build_perfmonitor_service
>>> service = build_perfmonitor_service()
Source code in jumper_extension/core/service.py
1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 | |
build_perfmonitor_magic_adapter(plots_disabled=False, plots_disabled_reason='Plotting not available.', display_disabled=False, display_disabled_reason='Display not available.', visualizer_backend='matplotlib')
Build a new :class:PerfmonitorMagicAdapter instance.
This factory constructs a :class:PerfmonitorService and wraps it
with a string-based adapter suitable for IPython magics or other
command-style interfaces.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plots_disabled
|
bool
|
If |
False
|
plots_disabled_reason
|
str
|
Human-readable reason shown when plots are disabled. |
'Plotting not available.'
|
display_disabled
|
bool
|
If |
False
|
display_disabled_reason
|
str
|
Human-readable reason shown when rich display is disabled. |
'Display not available.'
|
visualizer_backend
|
str
|
Visualizer backend to use. Supported values:
|
'matplotlib'
|
Returns:
| Name | Type | Description |
|---|---|---|
PerfmonitorMagicAdapter |
PerfmonitorMagicAdapter
|
Adapter instance wrapping the service. |
Examples:
>>> from jumper_extension.core.service import (
... build_perfmonitor_magic_adapter,
... )
>>> adapter = build_perfmonitor_magic_adapter()
Source code in jumper_extension/core/service.py
1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 | |