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. |
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 | |
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
88 89 90 91 92 93 94 | |
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 | |
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
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | |
build_import_session_parser()
Build parser for importing a full session package from directory or zip.
Source code in jumper_extension/core/parsers.py
134 135 136 137 138 139 140 141 142 | |
build_perfreport_parser()
Build an ArgumentParser instance for JUmPER commands.
Source code in jumper_extension/core/parsers.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |
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
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | |
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
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | |
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.')
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.'
|
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
965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 | |
build_perfmonitor_magic_adapter(plots_disabled=False, plots_disabled_reason='Plotting not available.', display_disabled=False, display_disabled_reason='Display not available.')
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.'
|
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
1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 | |