oscura 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl
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.
- oscura/__init__.py +14 -14
- oscura/__main__.py +9 -9
- oscura/analyzers/__init__.py +1 -1
- oscura/analyzers/packet/daq.py +1 -1
- oscura/analyzers/patterns/__init__.py +2 -2
- oscura/analyzers/patterns/clustering.py +1 -1
- oscura/analyzers/patterns/discovery.py +1 -1
- oscura/analyzers/patterns/periodic.py +1 -1
- oscura/analyzers/patterns/sequences.py +1 -1
- oscura/analyzers/power/__init__.py +1 -1
- oscura/analyzers/power/ac_power.py +1 -1
- oscura/analyzers/power/basic.py +1 -1
- oscura/analyzers/power/conduction.py +1 -1
- oscura/analyzers/power/efficiency.py +1 -1
- oscura/analyzers/power/ripple.py +1 -1
- oscura/analyzers/power/soa.py +1 -1
- oscura/analyzers/power/switching.py +1 -1
- oscura/api/__init__.py +1 -1
- oscura/automotive/__init__.py +1 -1
- oscura/automotive/can/checksum.py +2 -2
- oscura/automotive/can/session.py +1 -1
- oscura/automotive/can/state_machine.py +1 -1
- oscura/automotive/dbc/generator.py +1 -1
- oscura/automotive/dbc/parser.py +1 -1
- oscura/automotive/loaders/pcap.py +1 -1
- oscura/batch/__init__.py +1 -1
- oscura/batch/aggregate.py +2 -2
- oscura/batch/analyze.py +3 -3
- oscura/builders/__init__.py +7 -7
- oscura/builders/signal_builder.py +4 -4
- oscura/cli/__init__.py +1 -1
- oscura/cli/batch.py +1 -1
- oscura/cli/characterize.py +2 -2
- oscura/cli/compare.py +4 -4
- oscura/cli/decode.py +1 -1
- oscura/cli/main.py +8 -8
- oscura/cli/shell.py +19 -19
- oscura/comparison/__init__.py +1 -1
- oscura/comparison/compare.py +1 -1
- oscura/comparison/golden.py +1 -1
- oscura/comparison/limits.py +1 -1
- oscura/comparison/mask.py +1 -1
- oscura/comparison/trace_diff.py +1 -1
- oscura/compliance/__init__.py +2 -2
- oscura/compliance/reporting.py +2 -2
- oscura/component/__init__.py +1 -1
- oscura/component/impedance.py +1 -1
- oscura/component/reactive.py +1 -1
- oscura/component/transmission_line.py +1 -1
- oscura/config/__init__.py +1 -1
- oscura/config/loader.py +1 -1
- oscura/config/memory.py +3 -3
- oscura/config/migration.py +1 -1
- oscura/config/preferences.py +1 -1
- oscura/config/schema.py +3 -3
- oscura/config/settings.py +1 -1
- oscura/convenience.py +13 -13
- oscura/core/__init__.py +6 -6
- oscura/core/cache.py +10 -10
- oscura/core/cancellation.py +1 -1
- oscura/core/confidence.py +1 -1
- oscura/core/config.py +1 -1
- oscura/core/correlation.py +1 -1
- oscura/core/debug.py +4 -4
- oscura/core/edge_cases.py +1 -1
- oscura/core/exceptions.py +14 -14
- oscura/core/gpu_backend.py +5 -5
- oscura/core/lazy.py +3 -3
- oscura/core/logging.py +6 -6
- oscura/core/logging_advanced.py +1 -1
- oscura/core/memoize.py +3 -3
- oscura/core/memory_check.py +1 -1
- oscura/core/memory_guard.py +1 -1
- oscura/core/memory_limits.py +1 -1
- oscura/core/memory_monitor.py +1 -1
- oscura/core/memory_progress.py +1 -1
- oscura/core/memory_warnings.py +1 -1
- oscura/core/progress.py +1 -1
- oscura/core/provenance.py +5 -5
- oscura/core/results.py +3 -3
- oscura/core/types.py +1 -1
- oscura/core/uncertainty.py +1 -1
- oscura/discovery/__init__.py +4 -4
- oscura/discovery/comparison.py +1 -1
- oscura/dsl/__init__.py +1 -1
- oscura/dsl/commands.py +22 -22
- oscura/dsl/interpreter.py +4 -4
- oscura/dsl/parser.py +4 -4
- oscura/dsl/repl.py +4 -4
- oscura/exceptions.py +3 -3
- oscura/export/__init__.py +2 -2
- oscura/export/wireshark/__init__.py +1 -1
- oscura/export/wireshark/generator.py +2 -2
- oscura/export/wireshark/templates/dissector.lua.j2 +1 -1
- oscura/export/wireshark/type_mapping.py +8 -8
- oscura/exporters/__init__.py +3 -3
- oscura/exporters/csv.py +1 -1
- oscura/exporters/html_export.py +5 -5
- oscura/exporters/json_export.py +9 -9
- oscura/exporters/markdown_export.py +3 -3
- oscura/exporters/npz_export.py +1 -1
- oscura/exporters/spice_export.py +1 -1
- oscura/extensibility/__init__.py +1 -1
- oscura/extensibility/docs.py +1 -1
- oscura/extensibility/extensions.py +7 -7
- oscura/extensibility/measurements.py +12 -12
- oscura/extensibility/plugins.py +12 -12
- oscura/extensibility/registry.py +12 -12
- oscura/extensibility/templates.py +16 -16
- oscura/extensibility/validation.py +3 -3
- oscura/filtering/__init__.py +1 -1
- oscura/filtering/base.py +1 -1
- oscura/filtering/convenience.py +1 -1
- oscura/filtering/design.py +1 -1
- oscura/filtering/introspection.py +1 -1
- oscura/guidance/__init__.py +1 -1
- oscura/guidance/recommender.py +1 -1
- oscura/guidance/wizard.py +1 -1
- oscura/inference/__init__.py +1 -1
- oscura/inference/adaptive_tuning.py +3 -3
- oscura/inference/logic.py +5 -5
- oscura/inference/protocol.py +5 -5
- oscura/inference/signal_intelligence.py +19 -19
- oscura/inference/spectral.py +6 -6
- oscura/integrations/__init__.py +1 -1
- oscura/integrations/llm.py +6 -6
- oscura/jupyter/__init__.py +3 -3
- oscura/jupyter/display.py +1 -1
- oscura/jupyter/magic.py +31 -31
- oscura/loaders/__init__.py +10 -10
- oscura/loaders/mmap_loader.py +1 -1
- oscura/loaders/pcap.py +1 -1
- oscura/math/__init__.py +1 -1
- oscura/math/arithmetic.py +1 -1
- oscura/math/interpolation.py +1 -1
- oscura/onboarding/__init__.py +1 -1
- oscura/onboarding/help.py +18 -18
- oscura/onboarding/tutorials.py +29 -29
- oscura/onboarding/wizard.py +22 -22
- oscura/pipeline/composition.py +15 -15
- oscura/pipeline/pipeline.py +10 -10
- oscura/plugins/__init__.py +2 -2
- oscura/plugins/base.py +5 -5
- oscura/plugins/discovery.py +6 -6
- oscura/plugins/registry.py +6 -6
- oscura/plugins/versioning.py +2 -2
- oscura/quality/__init__.py +1 -1
- oscura/quality/scoring.py +1 -1
- oscura/quality/warnings.py +1 -1
- oscura/reporting/__init__.py +1 -1
- oscura/reporting/advanced.py +1 -1
- oscura/reporting/analyze.py +1 -1
- oscura/reporting/auto_report.py +2 -2
- oscura/reporting/batch.py +3 -3
- oscura/reporting/chart_selection.py +1 -1
- oscura/reporting/comparison.py +1 -1
- oscura/reporting/core.py +4 -4
- oscura/reporting/export.py +1 -1
- oscura/reporting/formatting.py +1 -1
- oscura/reporting/html.py +3 -3
- oscura/reporting/multichannel.py +1 -1
- oscura/reporting/output.py +1 -1
- oscura/reporting/pdf.py +2 -2
- oscura/reporting/pptx_export.py +1 -1
- oscura/reporting/sections.py +1 -1
- oscura/reporting/standards.py +2 -2
- oscura/reporting/summary_generator.py +1 -1
- oscura/reporting/tables.py +1 -1
- oscura/reporting/template_system.py +1 -1
- oscura/reporting/templates/index.html +2 -2
- oscura/schemas/__init__.py +2 -2
- oscura/schemas/bus_configuration.json +1 -1
- oscura/schemas/device_mapping.json +1 -1
- oscura/schemas/packet_format.json +1 -1
- oscura/schemas/protocol_definition.json +1 -1
- oscura/search/__init__.py +1 -1
- oscura/session/__init__.py +4 -4
- oscura/session/history.py +7 -7
- oscura/session/session.py +2 -2
- oscura/streaming/chunked.py +7 -7
- oscura/testing/__init__.py +1 -1
- oscura/triggering/__init__.py +1 -1
- oscura/triggering/base.py +1 -1
- oscura/triggering/edge.py +1 -1
- oscura/triggering/pattern.py +1 -1
- oscura/triggering/pulse.py +1 -1
- oscura/triggering/window.py +1 -1
- oscura/ui/__init__.py +1 -1
- oscura/ui/formatters.py +1 -1
- oscura/ui/progressive_display.py +1 -1
- oscura/utils/__init__.py +1 -1
- oscura/utils/memory.py +3 -3
- oscura/utils/memory_extensions.py +1 -1
- oscura/visualization/__init__.py +1 -1
- oscura/visualization/accessibility.py +1 -1
- oscura/visualization/keyboard.py +1 -1
- oscura/visualization/palettes.py +1 -1
- oscura/visualization/spectral.py +9 -9
- oscura/visualization/waveform.py +4 -4
- oscura/workflows/__init__.py +5 -5
- oscura/workflows/compliance.py +5 -5
- oscura/workflows/digital.py +5 -5
- oscura/workflows/multi_trace.py +25 -25
- oscura/workflows/power.py +7 -7
- oscura/workflows/protocol.py +5 -5
- oscura/workflows/reverse_engineering.py +5 -5
- oscura/workflows/signal_integrity.py +6 -6
- {oscura-0.1.0.dist-info → oscura-0.1.1.dist-info}/METADATA +11 -11
- {oscura-0.1.0.dist-info → oscura-0.1.1.dist-info}/RECORD +212 -212
- {oscura-0.1.0.dist-info → oscura-0.1.1.dist-info}/WHEEL +0 -0
- {oscura-0.1.0.dist-info → oscura-0.1.1.dist-info}/entry_points.txt +0 -0
- {oscura-0.1.0.dist-info → oscura-0.1.1.dist-info}/licenses/LICENSE +0 -0
oscura/pipeline/composition.py
CHANGED
|
@@ -34,14 +34,14 @@ def compose(*funcs: TraceFunc) -> TraceFunc:
|
|
|
34
34
|
ValueError: If no functions provided.
|
|
35
35
|
|
|
36
36
|
Example:
|
|
37
|
-
>>> import oscura as
|
|
37
|
+
>>> import oscura as osc
|
|
38
38
|
>>> from functools import partial
|
|
39
39
|
>>> # Create composed analysis function
|
|
40
|
-
>>> analyze_signal =
|
|
41
|
-
...
|
|
42
|
-
... partial(
|
|
43
|
-
... partial(
|
|
44
|
-
... partial(
|
|
40
|
+
>>> analyze_signal = osc.compose(
|
|
41
|
+
... osc.extract_thd,
|
|
42
|
+
... partial(osc.fft, nfft=8192, window='hann'),
|
|
43
|
+
... partial(osc.normalize, method='peak'),
|
|
44
|
+
... partial(osc.low_pass, cutoff=5e6)
|
|
45
45
|
... )
|
|
46
46
|
>>> # Apply to trace: low_pass -> normalize -> fft -> extract_thd
|
|
47
47
|
>>> thd = analyze_signal(trace)
|
|
@@ -84,24 +84,24 @@ def pipe(data: WaveformTrace, *funcs: TraceFunc) -> WaveformTrace:
|
|
|
84
84
|
Transformed WaveformTrace after applying all functions.
|
|
85
85
|
|
|
86
86
|
Example:
|
|
87
|
-
>>> import oscura as
|
|
87
|
+
>>> import oscura as osc
|
|
88
88
|
>>> # Apply operations left-to-right
|
|
89
|
-
>>> result =
|
|
89
|
+
>>> result = osc.pipe(
|
|
90
90
|
... trace,
|
|
91
|
-
...
|
|
92
|
-
...
|
|
93
|
-
...
|
|
91
|
+
... osc.low_pass(cutoff=1e6),
|
|
92
|
+
... osc.resample(rate=1e9),
|
|
93
|
+
... osc.fft(nfft=8192)
|
|
94
94
|
... )
|
|
95
95
|
>>> # Equivalent to: fft(resample(low_pass(trace)))
|
|
96
96
|
|
|
97
97
|
Advanced Example:
|
|
98
98
|
>>> # Use with partial application
|
|
99
99
|
>>> from functools import partial
|
|
100
|
-
>>> result =
|
|
100
|
+
>>> result = osc.pipe(
|
|
101
101
|
... trace,
|
|
102
|
-
... partial(
|
|
103
|
-
... partial(
|
|
104
|
-
... partial(
|
|
102
|
+
... partial(osc.low_pass, cutoff=1e6),
|
|
103
|
+
... partial(osc.normalize, method='zscore'),
|
|
104
|
+
... partial(osc.fft, nfft=8192, window='hann')
|
|
105
105
|
... )
|
|
106
106
|
|
|
107
107
|
References:
|
oscura/pipeline/pipeline.py
CHANGED
|
@@ -30,21 +30,21 @@ class Pipeline(TraceTransformer):
|
|
|
30
30
|
named_steps: Dictionary mapping step names to transformers.
|
|
31
31
|
|
|
32
32
|
Example:
|
|
33
|
-
>>> import oscura as
|
|
34
|
-
>>> pipeline =
|
|
35
|
-
... ('lowpass',
|
|
36
|
-
... ('resample',
|
|
37
|
-
... ('normalize',
|
|
33
|
+
>>> import oscura as osc
|
|
34
|
+
>>> pipeline = osc.Pipeline([
|
|
35
|
+
... ('lowpass', osc.LowPassFilter(cutoff=1e6)),
|
|
36
|
+
... ('resample', osc.Resample(rate=1e9)),
|
|
37
|
+
... ('normalize', osc.Normalize())
|
|
38
38
|
... ])
|
|
39
39
|
>>> result = pipeline.transform(trace)
|
|
40
40
|
|
|
41
41
|
Advanced Example:
|
|
42
42
|
>>> # Create analysis pipeline with fit/transform
|
|
43
|
-
>>> pipeline =
|
|
44
|
-
... ('filter',
|
|
45
|
-
... ('normalize',
|
|
46
|
-
... ('fft',
|
|
47
|
-
... ('extract',
|
|
43
|
+
>>> pipeline = osc.Pipeline([
|
|
44
|
+
... ('filter', osc.BandPassFilter(low=1e5, high=1e6)),
|
|
45
|
+
... ('normalize', osc.Normalize(method='zscore')),
|
|
46
|
+
... ('fft', osc.FFT(nfft=8192, window='hann')),
|
|
47
|
+
... ('extract', osc.ExtractMeasurement('thd'))
|
|
48
48
|
... ])
|
|
49
49
|
>>> # Fit on reference trace
|
|
50
50
|
>>> pipeline.fit(reference_trace)
|
oscura/plugins/__init__.py
CHANGED
oscura/plugins/base.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Plugin base classes and metadata.
|
|
2
2
|
|
|
3
|
-
This module defines the base class for
|
|
3
|
+
This module defines the base class for Oscura plugins and
|
|
4
4
|
the metadata structures for plugin registration.
|
|
5
5
|
|
|
6
6
|
|
|
@@ -52,7 +52,7 @@ class PluginMetadata:
|
|
|
52
52
|
Attributes:
|
|
53
53
|
name: Unique plugin identifier.
|
|
54
54
|
version: Plugin version (semver).
|
|
55
|
-
api_version: Required
|
|
55
|
+
api_version: Required Oscura API version.
|
|
56
56
|
author: Plugin author.
|
|
57
57
|
description: Human-readable description.
|
|
58
58
|
homepage: Plugin homepage URL.
|
|
@@ -99,7 +99,7 @@ class PluginMetadata:
|
|
|
99
99
|
Uses semver compatibility rules (major version must match).
|
|
100
100
|
|
|
101
101
|
Args:
|
|
102
|
-
api_version:
|
|
102
|
+
api_version: Oscura API version to check against.
|
|
103
103
|
|
|
104
104
|
Returns:
|
|
105
105
|
True if compatible.
|
|
@@ -113,7 +113,7 @@ class PluginMetadata:
|
|
|
113
113
|
|
|
114
114
|
|
|
115
115
|
class PluginBase(ABC): # noqa: B024
|
|
116
|
-
"""Base class for all
|
|
116
|
+
"""Base class for all Oscura plugins.
|
|
117
117
|
|
|
118
118
|
Subclass this to create a plugin. Define class attributes for
|
|
119
119
|
metadata and implement lifecycle methods.
|
|
@@ -123,7 +123,7 @@ class PluginBase(ABC): # noqa: B024
|
|
|
123
123
|
... name = "uart_decoder"
|
|
124
124
|
... version = "1.0.0"
|
|
125
125
|
... api_version = "1.0.0"
|
|
126
|
-
... author = "
|
|
126
|
+
... author = "Oscura Contributors"
|
|
127
127
|
... description = "UART protocol decoder"
|
|
128
128
|
...
|
|
129
129
|
... def on_load(self):
|
oscura/plugins/discovery.py
CHANGED
|
@@ -36,8 +36,8 @@ except ImportError:
|
|
|
36
36
|
YAML_AVAILABLE = False
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
#
|
|
40
|
-
|
|
39
|
+
# Oscura API version for compatibility checking
|
|
40
|
+
OSCURA_API_VERSION = "1.0.0"
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
@dataclass
|
|
@@ -218,7 +218,7 @@ def scan_entry_points() -> Iterator[DiscoveredPlugin]:
|
|
|
218
218
|
instance = plugin_class()
|
|
219
219
|
metadata = instance.metadata
|
|
220
220
|
|
|
221
|
-
compatible = metadata.is_compatible_with(
|
|
221
|
+
compatible = metadata.is_compatible_with(OSCURA_API_VERSION)
|
|
222
222
|
|
|
223
223
|
yield DiscoveredPlugin(
|
|
224
224
|
metadata=metadata,
|
|
@@ -297,7 +297,7 @@ def _load_plugin_from_yaml(yaml_path: Path) -> DiscoveredPlugin | None:
|
|
|
297
297
|
metadata.provides[key] = []
|
|
298
298
|
metadata.provides[key].append(value)
|
|
299
299
|
|
|
300
|
-
compatible = metadata.is_compatible_with(
|
|
300
|
+
compatible = metadata.is_compatible_with(OSCURA_API_VERSION)
|
|
301
301
|
|
|
302
302
|
return DiscoveredPlugin(
|
|
303
303
|
metadata=metadata,
|
|
@@ -376,7 +376,7 @@ def _load_plugin_from_module(module_path: Path) -> DiscoveredPlugin | None:
|
|
|
376
376
|
metadata = instance.metadata
|
|
377
377
|
metadata.path = module_path
|
|
378
378
|
|
|
379
|
-
compatible = metadata.is_compatible_with(
|
|
379
|
+
compatible = metadata.is_compatible_with(OSCURA_API_VERSION)
|
|
380
380
|
|
|
381
381
|
return DiscoveredPlugin(
|
|
382
382
|
metadata=metadata,
|
|
@@ -402,7 +402,7 @@ def _load_plugin_from_module(module_path: Path) -> DiscoveredPlugin | None:
|
|
|
402
402
|
|
|
403
403
|
|
|
404
404
|
__all__ = [
|
|
405
|
-
"
|
|
405
|
+
"OSCURA_API_VERSION",
|
|
406
406
|
"DiscoveredPlugin",
|
|
407
407
|
"discover_plugins",
|
|
408
408
|
"get_plugin_paths",
|
oscura/plugins/registry.py
CHANGED
|
@@ -16,7 +16,7 @@ import logging
|
|
|
16
16
|
from typing import TYPE_CHECKING, Any
|
|
17
17
|
|
|
18
18
|
from oscura.plugins.discovery import (
|
|
19
|
-
|
|
19
|
+
OSCURA_API_VERSION,
|
|
20
20
|
DiscoveredPlugin,
|
|
21
21
|
discover_plugins,
|
|
22
22
|
)
|
|
@@ -55,7 +55,7 @@ class PluginVersionError(Exception):
|
|
|
55
55
|
|
|
56
56
|
Attributes:
|
|
57
57
|
plugin_api_version: Plugin's required API version.
|
|
58
|
-
oscura_api_version: Current
|
|
58
|
+
oscura_api_version: Current Oscura API version.
|
|
59
59
|
"""
|
|
60
60
|
|
|
61
61
|
def __init__(
|
|
@@ -135,12 +135,12 @@ class PluginRegistry:
|
|
|
135
135
|
metadata = instance.metadata
|
|
136
136
|
|
|
137
137
|
# Check compatibility
|
|
138
|
-
if check_compatibility and not metadata.is_compatible_with(
|
|
138
|
+
if check_compatibility and not metadata.is_compatible_with(OSCURA_API_VERSION):
|
|
139
139
|
raise PluginVersionError(
|
|
140
140
|
f"Plugin '{metadata.name}' requires API v{metadata.api_version}, "
|
|
141
|
-
f"but
|
|
141
|
+
f"but Oscura API is v{OSCURA_API_VERSION}",
|
|
142
142
|
plugin_api_version=metadata.api_version,
|
|
143
|
-
oscura_api_version=
|
|
143
|
+
oscura_api_version=OSCURA_API_VERSION,
|
|
144
144
|
)
|
|
145
145
|
|
|
146
146
|
# Check conflicts (PLUG-002: conflict detection for duplicate plugins)
|
|
@@ -272,7 +272,7 @@ class PluginRegistry:
|
|
|
272
272
|
metadata = self._metadata.get(name)
|
|
273
273
|
if metadata is None:
|
|
274
274
|
return False
|
|
275
|
-
return metadata.is_compatible_with(
|
|
275
|
+
return metadata.is_compatible_with(OSCURA_API_VERSION)
|
|
276
276
|
|
|
277
277
|
def discover_and_load(
|
|
278
278
|
self,
|
oscura/plugins/versioning.py
CHANGED
|
@@ -163,7 +163,7 @@ class VersionCompatibilityLayer:
|
|
|
163
163
|
"""Multi-version compatibility layer for plugins.
|
|
164
164
|
|
|
165
165
|
Allows plugins to support multiple API versions by adapting
|
|
166
|
-
the interface based on the current
|
|
166
|
+
the interface based on the current Oscura API version.
|
|
167
167
|
|
|
168
168
|
References:
|
|
169
169
|
PLUG-003: Plugin Versioning - multi-version compatibility layer
|
|
@@ -183,7 +183,7 @@ class VersionCompatibilityLayer:
|
|
|
183
183
|
"""Set target API version.
|
|
184
184
|
|
|
185
185
|
Args:
|
|
186
|
-
api_version:
|
|
186
|
+
api_version: Oscura API version
|
|
187
187
|
|
|
188
188
|
References:
|
|
189
189
|
PLUG-003: Plugin Versioning - multi-version compatibility
|
oscura/quality/__init__.py
CHANGED
oscura/quality/scoring.py
CHANGED
oscura/quality/warnings.py
CHANGED
oscura/reporting/__init__.py
CHANGED
oscura/reporting/advanced.py
CHANGED
oscura/reporting/analyze.py
CHANGED
oscura/reporting/auto_report.py
CHANGED
|
@@ -11,7 +11,7 @@ Example:
|
|
|
11
11
|
>>> report.save_pdf("analysis_report.pdf")
|
|
12
12
|
|
|
13
13
|
References:
|
|
14
|
-
|
|
14
|
+
Oscura Auto-Discovery Specification
|
|
15
15
|
"""
|
|
16
16
|
|
|
17
17
|
from __future__ import annotations
|
|
@@ -40,7 +40,7 @@ class ReportMetadata:
|
|
|
40
40
|
"""
|
|
41
41
|
|
|
42
42
|
title: str = "Signal Analysis Report"
|
|
43
|
-
author: str = "
|
|
43
|
+
author: str = "Oscura"
|
|
44
44
|
date: str = field(default_factory=lambda: datetime.now().strftime("%Y-%m-%d"))
|
|
45
45
|
project: str | None = None
|
|
46
46
|
tags: list[str] = field(default_factory=list)
|
oscura/reporting/batch.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""Batch report generation for
|
|
1
|
+
"""Batch report generation for Oscura.
|
|
2
2
|
|
|
3
3
|
This module provides utilities for generating reports across multiple DUTs
|
|
4
4
|
or files with summary reports and yield analysis.
|
|
@@ -114,7 +114,7 @@ def batch_report(
|
|
|
114
114
|
References:
|
|
115
115
|
RPT-003: Batch Report Generation
|
|
116
116
|
"""
|
|
117
|
-
import oscura as
|
|
117
|
+
import oscura as osc
|
|
118
118
|
from oscura.reporting.template_system import load_template
|
|
119
119
|
|
|
120
120
|
output_path = Path(output_dir)
|
|
@@ -143,7 +143,7 @@ def batch_report(
|
|
|
143
143
|
|
|
144
144
|
try:
|
|
145
145
|
# Load trace
|
|
146
|
-
trace =
|
|
146
|
+
trace = osc.load(str(file_path))
|
|
147
147
|
|
|
148
148
|
# Run analysis
|
|
149
149
|
if analyzer is not None:
|
oscura/reporting/comparison.py
CHANGED
oscura/reporting/core.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""Core report generation for
|
|
1
|
+
"""Core report generation for Oscura.
|
|
2
2
|
|
|
3
3
|
This module provides the main report generation functionality including
|
|
4
4
|
report structure, configuration, and output generation.
|
|
@@ -58,7 +58,7 @@ class ReportConfig:
|
|
|
58
58
|
show_page_numbers: Include page numbers.
|
|
59
59
|
"""
|
|
60
60
|
|
|
61
|
-
title: str = "
|
|
61
|
+
title: str = "Oscura Analysis Report"
|
|
62
62
|
author: str = ""
|
|
63
63
|
verbosity: Literal["executive", "summary", "standard", "detailed", "debug"] = "standard"
|
|
64
64
|
format: Literal["pdf", "html", "markdown", "docx"] = "pdf"
|
|
@@ -380,7 +380,7 @@ def generate_report(
|
|
|
380
380
|
results: dict[str, Any],
|
|
381
381
|
output_path: str | Path | None = None,
|
|
382
382
|
*,
|
|
383
|
-
title: str = "
|
|
383
|
+
title: str = "Oscura Analysis Report",
|
|
384
384
|
verbosity: Literal["executive", "summary", "standard", "detailed", "debug"] = ("standard"),
|
|
385
385
|
template: str = "default",
|
|
386
386
|
formats: list[str] | None = None,
|
|
@@ -413,7 +413,7 @@ def generate_report(
|
|
|
413
413
|
**{k: v for k, v in kwargs.items() if hasattr(ReportConfig, k)},
|
|
414
414
|
)
|
|
415
415
|
|
|
416
|
-
report = Report(config=config, metadata={"source": "
|
|
416
|
+
report = Report(config=config, metadata={"source": "Oscura"})
|
|
417
417
|
|
|
418
418
|
# Add executive summary
|
|
419
419
|
if verbosity in ("executive", "summary", "standard", "detailed", "debug"):
|
oscura/reporting/export.py
CHANGED
oscura/reporting/formatting.py
CHANGED
oscura/reporting/html.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""HTML report generation for
|
|
1
|
+
"""HTML report generation for Oscura.
|
|
2
2
|
|
|
3
3
|
This module provides professional HTML report generation with modern features
|
|
4
4
|
including responsive design, interactive plots, and collapsible sections.
|
|
@@ -73,8 +73,8 @@ def _generate_html_header(report: Report, dark_mode: bool, responsive: bool) ->
|
|
|
73
73
|
<head>
|
|
74
74
|
<meta charset="UTF-8">
|
|
75
75
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
76
|
-
<meta name="author" content="{report.config.author or "
|
|
77
|
-
<meta name="generator" content="
|
|
76
|
+
<meta name="author" content="{report.config.author or "Oscura"}">
|
|
77
|
+
<meta name="generator" content="Oscura Reporting System">
|
|
78
78
|
<title>{report.config.title}</title>"""
|
|
79
79
|
|
|
80
80
|
|
oscura/reporting/multichannel.py
CHANGED
oscura/reporting/output.py
CHANGED
|
@@ -38,7 +38,7 @@ def _sanitize_for_serialization(obj: Any, max_depth: int = 10) -> Any:
|
|
|
38
38
|
return "<max depth exceeded>"
|
|
39
39
|
|
|
40
40
|
try:
|
|
41
|
-
# Don't sanitize
|
|
41
|
+
# Don't sanitize Oscura types - let the JSONEncoder handle them
|
|
42
42
|
if isinstance(obj, WaveformTrace | DigitalTrace | TraceMetadata):
|
|
43
43
|
return obj
|
|
44
44
|
if isinstance(obj, dict):
|
oscura/reporting/pdf.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""PDF report generation for
|
|
1
|
+
"""PDF report generation for Oscura.
|
|
2
2
|
|
|
3
3
|
This module provides high-quality PDF report generation with embedded plots,
|
|
4
4
|
metadata, and PDF/A compliance for archival.
|
|
@@ -86,7 +86,7 @@ def generate_pdf_report(
|
|
|
86
86
|
topMargin=margin,
|
|
87
87
|
bottomMargin=margin,
|
|
88
88
|
title=report.config.title,
|
|
89
|
-
author=report.config.author or "
|
|
89
|
+
author=report.config.author or "Oscura",
|
|
90
90
|
)
|
|
91
91
|
|
|
92
92
|
# Build document story
|
oscura/reporting/pptx_export.py
CHANGED
oscura/reporting/sections.py
CHANGED
oscura/reporting/standards.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""Professional formatting standards and visual emphasis for reports.
|
|
2
2
|
|
|
3
3
|
This module provides professional formatting standards, visual emphasis
|
|
4
|
-
systems, and executive summary generation for
|
|
4
|
+
systems, and executive summary generation for Oscura reports.
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Example:
|
|
@@ -88,7 +88,7 @@ class FormatStandards:
|
|
|
88
88
|
REPORT-001: Professional Formatting Standards
|
|
89
89
|
"""
|
|
90
90
|
return f"""
|
|
91
|
-
/*
|
|
91
|
+
/* Oscura Professional Report Styles - REPORT-001 */
|
|
92
92
|
:root {{
|
|
93
93
|
--heading-font: {self.heading_font};
|
|
94
94
|
--body-font: {self.body_font};
|
oscura/reporting/tables.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
-
<title>{{title}} -
|
|
6
|
+
<title>{{title}} - Oscura Analysis Report</title>
|
|
7
7
|
<style>
|
|
8
8
|
:root {
|
|
9
9
|
--bg-primary: #ffffff;
|
|
@@ -642,7 +642,7 @@
|
|
|
642
642
|
</section>
|
|
643
643
|
|
|
644
644
|
<footer>
|
|
645
|
-
<p>Generated by
|
|
645
|
+
<p>Generated by Oscura Comprehensive Analysis System</p>
|
|
646
646
|
<p>Report generated at {{timestamp}}</p>
|
|
647
647
|
</footer>
|
|
648
648
|
</body>
|
oscura/schemas/__init__.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"""JSON Schema definitions for
|
|
1
|
+
"""JSON Schema definitions for Oscura configuration types.
|
|
2
2
|
|
|
3
3
|
This module provides JSON Schema definitions for validating various
|
|
4
|
-
configuration file types used in
|
|
4
|
+
configuration file types used in Oscura, including packet formats,
|
|
5
5
|
device mappings, bus configurations, and protocol definitions.
|
|
6
6
|
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://
|
|
3
|
+
"$id": "https://oscura.io/schemas/bus_configuration.json",
|
|
4
4
|
"title": "Bus Configuration Schema",
|
|
5
5
|
"description": "Schema for validating parallel bus configurations for multi-bit protocols (CFG-001).",
|
|
6
6
|
"type": "object",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://
|
|
3
|
+
"$id": "https://oscura.io/schemas/device_mapping.json",
|
|
4
4
|
"title": "Device Mapping Configuration Schema",
|
|
5
5
|
"description": "Schema for validating device ID to name mappings and device-specific parameters (CFG-001).",
|
|
6
6
|
"type": "object",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://
|
|
3
|
+
"$id": "https://oscura.io/schemas/packet_format.json",
|
|
4
4
|
"title": "Packet Format Configuration Schema",
|
|
5
5
|
"description": "Schema for validating binary packet format configurations for custom DAQ systems and packet captures (CFG-001).",
|
|
6
6
|
"type": "object",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://
|
|
3
|
+
"$id": "https://oscura.io/schemas/protocol_definition.json",
|
|
4
4
|
"title": "Protocol Definition Schema",
|
|
5
5
|
"description": "Schema for validating protocol DSL definitions for automatic decoder/encoder generation (CFG-001).",
|
|
6
6
|
"type": "object",
|
oscura/search/__init__.py
CHANGED
oscura/session/__init__.py
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"""Session management for
|
|
1
|
+
"""Session management for Oscura analysis sessions.
|
|
2
2
|
|
|
3
3
|
This module provides session save/restore, trace annotations, and
|
|
4
4
|
operation history tracking.
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Example:
|
|
8
|
-
>>> import oscura as
|
|
9
|
-
>>> session =
|
|
8
|
+
>>> import oscura as osc
|
|
9
|
+
>>> session = osc.Session()
|
|
10
10
|
>>> session.load_trace('capture.wfm')
|
|
11
11
|
>>> session.annotate(time=1.5e-6, text='Glitch here')
|
|
12
12
|
>>> session.save('debug_session.tks')
|
|
13
13
|
>>>
|
|
14
14
|
>>> # Later...
|
|
15
|
-
>>> session =
|
|
15
|
+
>>> session = osc.load_session('debug_session.tks')
|
|
16
16
|
>>> print(session.annotations)
|
|
17
17
|
"""
|
|
18
18
|
|