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.
Files changed (212) hide show
  1. oscura/__init__.py +14 -14
  2. oscura/__main__.py +9 -9
  3. oscura/analyzers/__init__.py +1 -1
  4. oscura/analyzers/packet/daq.py +1 -1
  5. oscura/analyzers/patterns/__init__.py +2 -2
  6. oscura/analyzers/patterns/clustering.py +1 -1
  7. oscura/analyzers/patterns/discovery.py +1 -1
  8. oscura/analyzers/patterns/periodic.py +1 -1
  9. oscura/analyzers/patterns/sequences.py +1 -1
  10. oscura/analyzers/power/__init__.py +1 -1
  11. oscura/analyzers/power/ac_power.py +1 -1
  12. oscura/analyzers/power/basic.py +1 -1
  13. oscura/analyzers/power/conduction.py +1 -1
  14. oscura/analyzers/power/efficiency.py +1 -1
  15. oscura/analyzers/power/ripple.py +1 -1
  16. oscura/analyzers/power/soa.py +1 -1
  17. oscura/analyzers/power/switching.py +1 -1
  18. oscura/api/__init__.py +1 -1
  19. oscura/automotive/__init__.py +1 -1
  20. oscura/automotive/can/checksum.py +2 -2
  21. oscura/automotive/can/session.py +1 -1
  22. oscura/automotive/can/state_machine.py +1 -1
  23. oscura/automotive/dbc/generator.py +1 -1
  24. oscura/automotive/dbc/parser.py +1 -1
  25. oscura/automotive/loaders/pcap.py +1 -1
  26. oscura/batch/__init__.py +1 -1
  27. oscura/batch/aggregate.py +2 -2
  28. oscura/batch/analyze.py +3 -3
  29. oscura/builders/__init__.py +7 -7
  30. oscura/builders/signal_builder.py +4 -4
  31. oscura/cli/__init__.py +1 -1
  32. oscura/cli/batch.py +1 -1
  33. oscura/cli/characterize.py +2 -2
  34. oscura/cli/compare.py +4 -4
  35. oscura/cli/decode.py +1 -1
  36. oscura/cli/main.py +8 -8
  37. oscura/cli/shell.py +19 -19
  38. oscura/comparison/__init__.py +1 -1
  39. oscura/comparison/compare.py +1 -1
  40. oscura/comparison/golden.py +1 -1
  41. oscura/comparison/limits.py +1 -1
  42. oscura/comparison/mask.py +1 -1
  43. oscura/comparison/trace_diff.py +1 -1
  44. oscura/compliance/__init__.py +2 -2
  45. oscura/compliance/reporting.py +2 -2
  46. oscura/component/__init__.py +1 -1
  47. oscura/component/impedance.py +1 -1
  48. oscura/component/reactive.py +1 -1
  49. oscura/component/transmission_line.py +1 -1
  50. oscura/config/__init__.py +1 -1
  51. oscura/config/loader.py +1 -1
  52. oscura/config/memory.py +3 -3
  53. oscura/config/migration.py +1 -1
  54. oscura/config/preferences.py +1 -1
  55. oscura/config/schema.py +3 -3
  56. oscura/config/settings.py +1 -1
  57. oscura/convenience.py +13 -13
  58. oscura/core/__init__.py +6 -6
  59. oscura/core/cache.py +10 -10
  60. oscura/core/cancellation.py +1 -1
  61. oscura/core/confidence.py +1 -1
  62. oscura/core/config.py +1 -1
  63. oscura/core/correlation.py +1 -1
  64. oscura/core/debug.py +4 -4
  65. oscura/core/edge_cases.py +1 -1
  66. oscura/core/exceptions.py +14 -14
  67. oscura/core/gpu_backend.py +5 -5
  68. oscura/core/lazy.py +3 -3
  69. oscura/core/logging.py +6 -6
  70. oscura/core/logging_advanced.py +1 -1
  71. oscura/core/memoize.py +3 -3
  72. oscura/core/memory_check.py +1 -1
  73. oscura/core/memory_guard.py +1 -1
  74. oscura/core/memory_limits.py +1 -1
  75. oscura/core/memory_monitor.py +1 -1
  76. oscura/core/memory_progress.py +1 -1
  77. oscura/core/memory_warnings.py +1 -1
  78. oscura/core/progress.py +1 -1
  79. oscura/core/provenance.py +5 -5
  80. oscura/core/results.py +3 -3
  81. oscura/core/types.py +1 -1
  82. oscura/core/uncertainty.py +1 -1
  83. oscura/discovery/__init__.py +4 -4
  84. oscura/discovery/comparison.py +1 -1
  85. oscura/dsl/__init__.py +1 -1
  86. oscura/dsl/commands.py +22 -22
  87. oscura/dsl/interpreter.py +4 -4
  88. oscura/dsl/parser.py +4 -4
  89. oscura/dsl/repl.py +4 -4
  90. oscura/exceptions.py +3 -3
  91. oscura/export/__init__.py +2 -2
  92. oscura/export/wireshark/__init__.py +1 -1
  93. oscura/export/wireshark/generator.py +2 -2
  94. oscura/export/wireshark/templates/dissector.lua.j2 +1 -1
  95. oscura/export/wireshark/type_mapping.py +8 -8
  96. oscura/exporters/__init__.py +3 -3
  97. oscura/exporters/csv.py +1 -1
  98. oscura/exporters/html_export.py +5 -5
  99. oscura/exporters/json_export.py +9 -9
  100. oscura/exporters/markdown_export.py +3 -3
  101. oscura/exporters/npz_export.py +1 -1
  102. oscura/exporters/spice_export.py +1 -1
  103. oscura/extensibility/__init__.py +1 -1
  104. oscura/extensibility/docs.py +1 -1
  105. oscura/extensibility/extensions.py +7 -7
  106. oscura/extensibility/measurements.py +12 -12
  107. oscura/extensibility/plugins.py +12 -12
  108. oscura/extensibility/registry.py +12 -12
  109. oscura/extensibility/templates.py +16 -16
  110. oscura/extensibility/validation.py +3 -3
  111. oscura/filtering/__init__.py +1 -1
  112. oscura/filtering/base.py +1 -1
  113. oscura/filtering/convenience.py +1 -1
  114. oscura/filtering/design.py +1 -1
  115. oscura/filtering/introspection.py +1 -1
  116. oscura/guidance/__init__.py +1 -1
  117. oscura/guidance/recommender.py +1 -1
  118. oscura/guidance/wizard.py +1 -1
  119. oscura/inference/__init__.py +1 -1
  120. oscura/inference/adaptive_tuning.py +3 -3
  121. oscura/inference/logic.py +5 -5
  122. oscura/inference/protocol.py +5 -5
  123. oscura/inference/signal_intelligence.py +19 -19
  124. oscura/inference/spectral.py +6 -6
  125. oscura/integrations/__init__.py +1 -1
  126. oscura/integrations/llm.py +6 -6
  127. oscura/jupyter/__init__.py +3 -3
  128. oscura/jupyter/display.py +1 -1
  129. oscura/jupyter/magic.py +31 -31
  130. oscura/loaders/__init__.py +10 -10
  131. oscura/loaders/mmap_loader.py +1 -1
  132. oscura/loaders/pcap.py +1 -1
  133. oscura/math/__init__.py +1 -1
  134. oscura/math/arithmetic.py +1 -1
  135. oscura/math/interpolation.py +1 -1
  136. oscura/onboarding/__init__.py +1 -1
  137. oscura/onboarding/help.py +18 -18
  138. oscura/onboarding/tutorials.py +29 -29
  139. oscura/onboarding/wizard.py +22 -22
  140. oscura/pipeline/composition.py +15 -15
  141. oscura/pipeline/pipeline.py +10 -10
  142. oscura/plugins/__init__.py +2 -2
  143. oscura/plugins/base.py +5 -5
  144. oscura/plugins/discovery.py +6 -6
  145. oscura/plugins/registry.py +6 -6
  146. oscura/plugins/versioning.py +2 -2
  147. oscura/quality/__init__.py +1 -1
  148. oscura/quality/scoring.py +1 -1
  149. oscura/quality/warnings.py +1 -1
  150. oscura/reporting/__init__.py +1 -1
  151. oscura/reporting/advanced.py +1 -1
  152. oscura/reporting/analyze.py +1 -1
  153. oscura/reporting/auto_report.py +2 -2
  154. oscura/reporting/batch.py +3 -3
  155. oscura/reporting/chart_selection.py +1 -1
  156. oscura/reporting/comparison.py +1 -1
  157. oscura/reporting/core.py +4 -4
  158. oscura/reporting/export.py +1 -1
  159. oscura/reporting/formatting.py +1 -1
  160. oscura/reporting/html.py +3 -3
  161. oscura/reporting/multichannel.py +1 -1
  162. oscura/reporting/output.py +1 -1
  163. oscura/reporting/pdf.py +2 -2
  164. oscura/reporting/pptx_export.py +1 -1
  165. oscura/reporting/sections.py +1 -1
  166. oscura/reporting/standards.py +2 -2
  167. oscura/reporting/summary_generator.py +1 -1
  168. oscura/reporting/tables.py +1 -1
  169. oscura/reporting/template_system.py +1 -1
  170. oscura/reporting/templates/index.html +2 -2
  171. oscura/schemas/__init__.py +2 -2
  172. oscura/schemas/bus_configuration.json +1 -1
  173. oscura/schemas/device_mapping.json +1 -1
  174. oscura/schemas/packet_format.json +1 -1
  175. oscura/schemas/protocol_definition.json +1 -1
  176. oscura/search/__init__.py +1 -1
  177. oscura/session/__init__.py +4 -4
  178. oscura/session/history.py +7 -7
  179. oscura/session/session.py +2 -2
  180. oscura/streaming/chunked.py +7 -7
  181. oscura/testing/__init__.py +1 -1
  182. oscura/triggering/__init__.py +1 -1
  183. oscura/triggering/base.py +1 -1
  184. oscura/triggering/edge.py +1 -1
  185. oscura/triggering/pattern.py +1 -1
  186. oscura/triggering/pulse.py +1 -1
  187. oscura/triggering/window.py +1 -1
  188. oscura/ui/__init__.py +1 -1
  189. oscura/ui/formatters.py +1 -1
  190. oscura/ui/progressive_display.py +1 -1
  191. oscura/utils/__init__.py +1 -1
  192. oscura/utils/memory.py +3 -3
  193. oscura/utils/memory_extensions.py +1 -1
  194. oscura/visualization/__init__.py +1 -1
  195. oscura/visualization/accessibility.py +1 -1
  196. oscura/visualization/keyboard.py +1 -1
  197. oscura/visualization/palettes.py +1 -1
  198. oscura/visualization/spectral.py +9 -9
  199. oscura/visualization/waveform.py +4 -4
  200. oscura/workflows/__init__.py +5 -5
  201. oscura/workflows/compliance.py +5 -5
  202. oscura/workflows/digital.py +5 -5
  203. oscura/workflows/multi_trace.py +25 -25
  204. oscura/workflows/power.py +7 -7
  205. oscura/workflows/protocol.py +5 -5
  206. oscura/workflows/reverse_engineering.py +5 -5
  207. oscura/workflows/signal_integrity.py +6 -6
  208. {oscura-0.1.0.dist-info → oscura-0.1.1.dist-info}/METADATA +11 -11
  209. {oscura-0.1.0.dist-info → oscura-0.1.1.dist-info}/RECORD +212 -212
  210. {oscura-0.1.0.dist-info → oscura-0.1.1.dist-info}/WHEEL +0 -0
  211. {oscura-0.1.0.dist-info → oscura-0.1.1.dist-info}/entry_points.txt +0 -0
  212. {oscura-0.1.0.dist-info → oscura-0.1.1.dist-info}/licenses/LICENSE +0 -0
oscura/core/exceptions.py CHANGED
@@ -1,4 +1,4 @@
1
- """TraceKit exception hierarchy with helpful error messages.
1
+ """Oscura exception hierarchy with helpful error messages.
2
2
 
3
3
  This module provides custom exception classes that follow a consistent
4
4
  template for error messages: WHAT, WHY, HOW TO FIX, DOCUMENTATION LINK.
@@ -28,10 +28,10 @@ from typing import Any
28
28
  DOCS_BASE_URL = "https://github.com/lair-click-bats/oscura/tree/main/docs"
29
29
 
30
30
 
31
- class TraceKitError(Exception):
32
- """Base exception for all TraceKit errors.
31
+ class OscuraError(Exception):
32
+ """Base exception for all Oscura errors.
33
33
 
34
- All TraceKit exceptions inherit from this class, providing a
34
+ All Oscura exceptions inherit from this class, providing a
35
35
  consistent interface for error handling.
36
36
 
37
37
  Attributes:
@@ -41,8 +41,8 @@ class TraceKitError(Exception):
41
41
  docs_path: Path to relevant documentation.
42
42
 
43
43
  Example:
44
- >>> raise TraceKitError("Something went wrong")
45
- TraceKitError: Something went wrong
44
+ >>> raise OscuraError("Something went wrong")
45
+ OscuraError: Something went wrong
46
46
  """
47
47
 
48
48
  docs_path: str = "errors"
@@ -55,7 +55,7 @@ class TraceKitError(Exception):
55
55
  fix_hint: str | None = None,
56
56
  docs_path: str | None = None,
57
57
  ) -> None:
58
- """Initialize TraceKitError.
58
+ """Initialize OscuraError.
59
59
 
60
60
  Args:
61
61
  message: Brief description of the error.
@@ -89,11 +89,11 @@ class TraceKitError(Exception):
89
89
  return "\n".join(parts)
90
90
 
91
91
 
92
- class LoaderError(TraceKitError):
92
+ class LoaderError(OscuraError):
93
93
  """Error loading trace data from file.
94
94
 
95
95
  Raised when a file cannot be read, parsed, or converted to
96
- a TraceKit data structure.
96
+ a Oscura data structure.
97
97
 
98
98
  Attributes:
99
99
  file_path: Path to the file that failed to load.
@@ -227,7 +227,7 @@ class FormatError(LoaderError):
227
227
  )
228
228
 
229
229
 
230
- class AnalysisError(TraceKitError):
230
+ class AnalysisError(OscuraError):
231
231
  """Error during signal analysis.
232
232
 
233
233
  Raised when an analysis function encounters invalid data
@@ -358,7 +358,7 @@ class SampleRateError(AnalysisError):
358
358
  )
359
359
 
360
360
 
361
- class ConfigurationError(TraceKitError):
361
+ class ConfigurationError(OscuraError):
362
362
  """Invalid configuration parameters.
363
363
 
364
364
  Raised when configuration is invalid, missing required fields,
@@ -418,7 +418,7 @@ class ConfigurationError(TraceKitError):
418
418
  )
419
419
 
420
420
 
421
- class ValidationError(TraceKitError):
421
+ class ValidationError(OscuraError):
422
422
  """Data validation failed.
423
423
 
424
424
  Raised when input data does not meet validation requirements.
@@ -470,7 +470,7 @@ class ValidationError(TraceKitError):
470
470
  )
471
471
 
472
472
 
473
- class ExportError(TraceKitError):
473
+ class ExportError(OscuraError):
474
474
  """Error exporting data.
475
475
 
476
476
  Raised when data cannot be exported to the requested format.
@@ -528,8 +528,8 @@ __all__ = [
528
528
  "FormatError",
529
529
  "InsufficientDataError",
530
530
  "LoaderError",
531
+ "OscuraError",
531
532
  "SampleRateError",
532
- "TraceKitError",
533
533
  "UnsupportedFormatError",
534
534
  "ValidationError",
535
535
  ]
@@ -5,7 +5,7 @@ fallback to NumPy when CuPy is unavailable or GPU processing is disabled.
5
5
 
6
6
  The GPU backend is lazy-initialized and memory-safe, automatically transferring
7
7
  data to/from GPU as needed. GPU usage can be controlled via the environment
8
- variable TRACEKIT_USE_GPU (0 to disable, 1 to enable).
8
+ variable OSCURA_USE_GPU (0 to disable, 1 to enable).
9
9
 
10
10
 
11
11
  Example:
@@ -19,9 +19,9 @@ Example:
19
19
  >>> freqs = cpu_only.fft(signal_data)
20
20
 
21
21
  Configuration:
22
- Set TRACEKIT_USE_GPU environment variable to control GPU usage:
23
- - TRACEKIT_USE_GPU=0: Force CPU-only operation
24
- - TRACEKIT_USE_GPU=1: Enable GPU if available (default)
22
+ Set OSCURA_USE_GPU environment variable to control GPU usage:
23
+ - OSCURA_USE_GPU=0: Force CPU-only operation
24
+ - OSCURA_USE_GPU=1: Enable GPU if available (default)
25
25
 
26
26
  References:
27
27
  - CuPy documentation: https://docs.cupy.dev/
@@ -98,7 +98,7 @@ class GPUBackend:
98
98
  self._initialized = True
99
99
 
100
100
  # Check environment variable override
101
- use_gpu_env = os.environ.get("TRACEKIT_USE_GPU", "1")
101
+ use_gpu_env = os.environ.get("OSCURA_USE_GPU", "1")
102
102
  if use_gpu_env == "0" or self._force_cpu:
103
103
  self._gpu_available = False
104
104
  return False
oscura/core/lazy.py CHANGED
@@ -1,4 +1,4 @@
1
- """Lazy evaluation module for deferred computation in TraceKit workflows.
1
+ """Lazy evaluation module for deferred computation in Oscura workflows.
2
2
 
3
3
  This module provides lazy evaluation primitives that defer computation until
4
4
  results are actually accessed. Designed for analysis workflows where not all
@@ -9,7 +9,7 @@ Key features:
9
9
  - Chained operations without eager evaluation
10
10
  - Partial evaluation (compute subset of results)
11
11
  - Memory-efficient release of source data after computation
12
- - Integration with TraceKit's memory monitoring and progress tracking
12
+ - Integration with Oscura's memory monitoring and progress tracking
13
13
 
14
14
 
15
15
  Example:
@@ -41,7 +41,7 @@ Example:
41
41
  References:
42
42
  Python lazy evaluation patterns
43
43
  Threading locks for thread-safe computation
44
- TraceKit memory monitoring (core.memory_monitor)
44
+ Oscura memory monitoring (core.memory_monitor)
45
45
  """
46
46
 
47
47
  from __future__ import annotations
oscura/core/logging.py CHANGED
@@ -1,4 +1,4 @@
1
- """Structured logging infrastructure for TraceKit.
1
+ """Structured logging infrastructure for Oscura.
2
2
 
3
3
  This module provides structured logging with JSON/logfmt support,
4
4
  hierarchical loggers, log rotation, and error context capture.
@@ -468,7 +468,7 @@ def configure_logging(
468
468
  timestamp_format: Literal["iso8601", "iso8601_local", "unix"] = "iso8601",
469
469
  handlers: dict[str, dict[str, Any]] | None = None,
470
470
  ) -> None:
471
- """Configure TraceKit logging.
471
+ """Configure Oscura logging.
472
472
 
473
473
  Sets up structured logging with the specified format and handlers.
474
474
  Supports both size-based and time-based log rotation with optional
@@ -864,15 +864,15 @@ def _init_logging() -> None:
864
864
  """Initialize logging with environment variable configuration.
865
865
 
866
866
  Reads:
867
- TRACEKIT_LOG_LEVEL: Log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
868
- TRACEKIT_LOG_FORMAT: Log format (json, logfmt, text)
867
+ OSCURA_LOG_LEVEL: Log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
868
+ OSCURA_LOG_FORMAT: Log format (json, logfmt, text)
869
869
 
870
870
  References:
871
871
  LOG-001: Structured Logging Framework
872
872
  LOG-002: Hierarchical Log Levels
873
873
  """
874
- level = os.environ.get("TRACEKIT_LOG_LEVEL", "WARNING")
875
- log_format = os.environ.get("TRACEKIT_LOG_FORMAT", "text")
874
+ level = os.environ.get("OSCURA_LOG_LEVEL", "WARNING")
875
+ log_format = os.environ.get("OSCURA_LOG_FORMAT", "text")
876
876
 
877
877
  if log_format in ("json", "logfmt", "text"):
878
878
  configure_logging(level=level, format=log_format) # type: ignore[arg-type]
@@ -1,4 +1,4 @@
1
- """Advanced logging features for TraceKit.
1
+ """Advanced logging features for Oscura.
2
2
 
3
3
  This module provides advanced logging capabilities including log aggregation,
4
4
  analysis, alerting, sampling, and external system integration.
oscura/core/memoize.py CHANGED
@@ -1,7 +1,7 @@
1
- """Memory-safe memoization decorators for TraceKit analyzer functions.
1
+ """Memory-safe memoization decorators for Oscura analyzer functions.
2
2
 
3
3
  This module provides lightweight memoization decorators optimized for analyzer
4
- functions that process numpy arrays. Unlike the full TraceKitCache, these
4
+ functions that process numpy arrays. Unlike the full OscuraCache, these
5
5
  decorators provide simple in-memory caching with bounded size.
6
6
 
7
7
 
@@ -92,7 +92,7 @@ def memoize_analysis(maxsize: int = 32) -> Callable[[Callable[..., T]], Callable
92
92
  >>> assert edges1 is edges2
93
93
 
94
94
  Note:
95
- Cache is stored per-function. Use TraceKitCache from core.cache
95
+ Cache is stored per-function. Use OscuraCache from core.cache
96
96
  for persistent cross-function caching.
97
97
 
98
98
  References:
@@ -1,4 +1,4 @@
1
- """Pre-flight memory checking for TraceKit operations.
1
+ """Pre-flight memory checking for Oscura operations.
2
2
 
3
3
  This module provides automatic memory verification before executing
4
4
  memory-intensive operations to prevent OOM crashes.
@@ -1,4 +1,4 @@
1
- """Memory-safe guards for TraceKit analysis.
1
+ """Memory-safe guards for Oscura analysis.
2
2
 
3
3
  This module provides memory guards and resource limiting utilities to prevent
4
4
  out-of-memory conditions during analysis operations.
@@ -1,4 +1,4 @@
1
- """Per-operation memory limits for TraceKit.
1
+ """Per-operation memory limits for Oscura.
2
2
 
3
3
  This module provides fine-grained memory control for individual operations
4
4
  with automatic parameter adjustment to fit memory constraints.
@@ -1,4 +1,4 @@
1
- """Memory monitoring and OOM prevention for TraceKit.
1
+ """Memory monitoring and OOM prevention for Oscura.
2
2
 
3
3
  This module provides runtime memory monitoring to prevent out-of-memory crashes
4
4
  and gracefully handle memory exhaustion scenarios.
@@ -1,4 +1,4 @@
1
- """Memory usage logging and progress tracking for TraceKit operations.
1
+ """Memory usage logging and progress tracking for Oscura operations.
2
2
 
3
3
  This module provides detailed memory profiling logs for debugging and monitoring
4
4
  memory usage during long-running operations.
@@ -1,4 +1,4 @@
1
- """Memory warning threshold system for TraceKit.
1
+ """Memory warning threshold system for Oscura.
2
2
 
3
3
  This module provides configurable memory pressure warnings with
4
4
  automatic alerts and optional operation cancellation.
oscura/core/progress.py CHANGED
@@ -1,4 +1,4 @@
1
- """Progress tracking and cancellation support for TraceKit operations.
1
+ """Progress tracking and cancellation support for Oscura operations.
2
2
 
3
3
  This module provides progress callbacks, cancellation tokens, and memory warnings
4
4
  for long-running operations.
oscura/core/provenance.py CHANGED
@@ -17,8 +17,8 @@ import numpy as np
17
17
  if TYPE_CHECKING:
18
18
  from numpy.typing import NDArray
19
19
 
20
- # TraceKit version (in production would import from __version__)
21
- TRACEKIT_VERSION = "0.1.0"
20
+ # Oscura version (in production would import from __version__)
21
+ OSCURA_VERSION = "0.1.0"
22
22
 
23
23
 
24
24
  @dataclass
@@ -32,7 +32,7 @@ class Provenance:
32
32
  algorithm: Name of algorithm or method used.
33
33
  parameters: Dictionary of parameters passed to the algorithm.
34
34
  timestamp: ISO 8601 timestamp of computation.
35
- library_version: Version of TraceKit used.
35
+ library_version: Version of Oscura used.
36
36
  input_hash: Optional hash of input data for change detection.
37
37
  metadata: Additional context information.
38
38
 
@@ -51,7 +51,7 @@ class Provenance:
51
51
  algorithm: str
52
52
  parameters: dict[str, Any] = field(default_factory=dict)
53
53
  timestamp: str = field(default_factory=lambda: datetime.now(UTC).isoformat())
54
- library_version: str = TRACEKIT_VERSION
54
+ library_version: str = OSCURA_VERSION
55
55
  input_hash: str | None = None
56
56
  metadata: dict[str, Any] = field(default_factory=dict)
57
57
 
@@ -92,7 +92,7 @@ class Provenance:
92
92
  algorithm=data["algorithm"],
93
93
  parameters=data.get("parameters", {}),
94
94
  timestamp=data.get("timestamp", ""),
95
- library_version=data.get("library_version", TRACEKIT_VERSION),
95
+ library_version=data.get("library_version", OSCURA_VERSION),
96
96
  input_hash=data.get("input_hash"),
97
97
  metadata=data.get("metadata", {}),
98
98
  )
oscura/core/results.py CHANGED
@@ -109,7 +109,7 @@ class FFTResult(AnalysisResult):
109
109
  trace: Original or transformed trace (optional).
110
110
 
111
111
  Example:
112
- >>> fft_result = tk.fft(trace, nfft=8192)
112
+ >>> fft_result = osc.fft(trace, nfft=8192)
113
113
  >>> spectrum = fft_result.spectrum
114
114
  >>> frequencies = fft_result.frequencies
115
115
  >>> power = fft_result.power
@@ -186,7 +186,7 @@ class FilterResult(AnalysisResult):
186
186
  filter_coefficients: Filter coefficients (sos or ba format) (optional).
187
187
 
188
188
  Example:
189
- >>> filter_result = tk.low_pass(trace, cutoff=1e6, return_details=True)
189
+ >>> filter_result = osc.low_pass(trace, cutoff=1e6, return_details=True)
190
190
  >>> filtered_trace = filter_result.trace
191
191
  >>> transfer_func = filter_result.transfer_function
192
192
  >>> impulse_resp = filter_result.impulse_response
@@ -233,7 +233,7 @@ class WaveletResult(AnalysisResult):
233
233
  trace: Original trace (optional).
234
234
 
235
235
  Example:
236
- >>> wavelet_result = tk.wavelet_transform(trace)
236
+ >>> wavelet_result = osc.wavelet_transform(trace)
237
237
  >>> coeffs = wavelet_result.coeffs
238
238
  >>> scales = wavelet_result.scales
239
239
  >>> frequencies = wavelet_result.frequencies
oscura/core/types.py CHANGED
@@ -1,4 +1,4 @@
1
- """Core data types for TraceKit signal analysis framework.
1
+ """Core data types for Oscura signal analysis framework.
2
2
 
3
3
  This module implements the fundamental data structures for oscilloscope
4
4
  and logic analyzer data analysis.
@@ -1,7 +1,7 @@
1
1
  """Measurement uncertainty propagation and estimation.
2
2
 
3
3
  This module provides data structures and utilities for tracking measurement
4
- uncertainty through TraceKit analysis operations, following GUM (Guide to the
4
+ uncertainty through Oscura analysis operations, following GUM (Guide to the
5
5
  Expression of Uncertainty in Measurement) principles.
6
6
 
7
7
  References:
@@ -6,13 +6,13 @@ assessment, and automatic protocol decoding.
6
6
 
7
7
 
8
8
  Example:
9
- >>> import oscura as tk
10
- >>> trace = tk.load("capture.wfm")
11
- >>> result = tk.discovery.characterize_signal(trace)
9
+ >>> import oscura as osc
10
+ >>> trace = osc.load("capture.wfm")
11
+ >>> result = osc.discovery.characterize_signal(trace)
12
12
  >>> print(f"Signal type: {result.signal_type} (confidence: {result.confidence:.2f})")
13
13
 
14
14
  References:
15
- TraceKit Auto-Discovery Requirements
15
+ Oscura Auto-Discovery Requirements
16
16
  """
17
17
 
18
18
  from oscura.discovery.anomaly_detector import (
@@ -11,7 +11,7 @@ Example:
11
11
  ... print(f"{d.category}: {d.description}")
12
12
 
13
13
  References:
14
- TraceKit Auto-Discovery Specification
14
+ Oscura Auto-Discovery Specification
15
15
  """
16
16
 
17
17
  from __future__ import annotations
oscura/dsl/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- """TraceKit DSL - Domain-Specific Language for trace analysis.
1
+ """Oscura DSL - Domain-Specific Language for trace analysis.
2
2
 
3
3
  Provides a simple, declarative language for defining trace analysis workflows.
4
4
 
oscura/dsl/commands.py CHANGED
@@ -1,4 +1,4 @@
1
- """TraceKit DSL Commands.
1
+ """Oscura DSL Commands.
2
2
 
3
3
  Built-in command implementations for DSL.
4
4
  """
@@ -7,7 +7,7 @@ import sys
7
7
  from pathlib import Path
8
8
  from typing import Any
9
9
 
10
- from oscura.core.exceptions import TraceKitError
10
+ from oscura.core.exceptions import OscuraError
11
11
 
12
12
 
13
13
  def cmd_load(filename: str) -> Any:
@@ -20,12 +20,12 @@ def cmd_load(filename: str) -> Any:
20
20
  Loaded trace object
21
21
 
22
22
  Raises:
23
- TraceKitError: If file cannot be loaded
23
+ OscuraError: If file cannot be loaded
24
24
  """
25
25
  path = Path(filename)
26
26
 
27
27
  if not path.exists():
28
- raise TraceKitError(f"File not found: {filename}")
28
+ raise OscuraError(f"File not found: {filename}")
29
29
 
30
30
  # Determine loader based on extension
31
31
  ext = path.suffix.lower()
@@ -50,10 +50,10 @@ def cmd_load(filename: str) -> Any:
50
50
 
51
51
  return load_hdf5(str(path))
52
52
  else:
53
- raise TraceKitError(f"Unsupported file format: {ext}")
53
+ raise OscuraError(f"Unsupported file format: {ext}")
54
54
 
55
55
  except ImportError as e:
56
- raise TraceKitError(f"Loader not available for {ext}: {e}") # noqa: B904
56
+ raise OscuraError(f"Loader not available for {ext}: {e}") # noqa: B904
57
57
 
58
58
 
59
59
  def cmd_filter(trace: Any, filter_type: str, *args: Any, **kwargs: Any) -> Any:
@@ -69,36 +69,36 @@ def cmd_filter(trace: Any, filter_type: str, *args: Any, **kwargs: Any) -> Any:
69
69
  Filtered trace
70
70
 
71
71
  Raises:
72
- TraceKitError: If filter cannot be applied
72
+ OscuraError: If filter cannot be applied
73
73
  """
74
74
  try:
75
75
  from oscura.filtering import filters # type: ignore[attr-defined]
76
76
 
77
77
  if filter_type.lower() == "lowpass":
78
78
  if len(args) < 1:
79
- raise TraceKitError("lowpass filter requires cutoff frequency")
79
+ raise OscuraError("lowpass filter requires cutoff frequency")
80
80
  return filters.low_pass(trace, cutoff=args[0], **kwargs)
81
81
 
82
82
  elif filter_type.lower() == "highpass":
83
83
  if len(args) < 1:
84
- raise TraceKitError("highpass filter requires cutoff frequency")
84
+ raise OscuraError("highpass filter requires cutoff frequency")
85
85
  return filters.high_pass(trace, cutoff=args[0], **kwargs)
86
86
 
87
87
  elif filter_type.lower() == "bandpass":
88
88
  if len(args) < 2:
89
- raise TraceKitError("bandpass filter requires low and high cutoff frequencies")
89
+ raise OscuraError("bandpass filter requires low and high cutoff frequencies")
90
90
  return filters.band_pass(trace, low=args[0], high=args[1], **kwargs)
91
91
 
92
92
  elif filter_type.lower() == "bandstop":
93
93
  if len(args) < 2:
94
- raise TraceKitError("bandstop filter requires low and high cutoff frequencies")
94
+ raise OscuraError("bandstop filter requires low and high cutoff frequencies")
95
95
  return filters.band_stop(trace, low=args[0], high=args[1], **kwargs)
96
96
 
97
97
  else:
98
- raise TraceKitError(f"Unknown filter type: {filter_type}")
98
+ raise OscuraError(f"Unknown filter type: {filter_type}")
99
99
 
100
100
  except ImportError:
101
- raise TraceKitError("Filtering module not available") # noqa: B904
101
+ raise OscuraError("Filtering module not available") # noqa: B904
102
102
 
103
103
 
104
104
  def cmd_measure(trace: Any, *measurements: str) -> Any:
@@ -112,7 +112,7 @@ def cmd_measure(trace: Any, *measurements: str) -> Any:
112
112
  Measurement results (single value or dict)
113
113
 
114
114
  Raises:
115
- TraceKitError: If measurement cannot be performed
115
+ OscuraError: If measurement cannot be performed
116
116
  """
117
117
  try:
118
118
  from oscura.analyzers import ( # type: ignore[attr-defined]
@@ -120,7 +120,7 @@ def cmd_measure(trace: Any, *measurements: str) -> Any:
120
120
  )
121
121
 
122
122
  if len(measurements) == 0:
123
- raise TraceKitError("measure command requires at least one measurement name")
123
+ raise OscuraError("measure command requires at least one measurement name")
124
124
 
125
125
  results = {}
126
126
 
@@ -146,7 +146,7 @@ def cmd_measure(trace: Any, *measurements: str) -> Any:
146
146
  results = meas.measure_all(trace)
147
147
  break
148
148
  else:
149
- raise TraceKitError(f"Unknown measurement: {measurement}")
149
+ raise OscuraError(f"Unknown measurement: {measurement}")
150
150
 
151
151
  # Return single value if only one measurement
152
152
  if len(results) == 1:
@@ -155,7 +155,7 @@ def cmd_measure(trace: Any, *measurements: str) -> Any:
155
155
  return results
156
156
 
157
157
  except ImportError:
158
- raise TraceKitError("Measurements module not available") # noqa: B904
158
+ raise OscuraError("Measurements module not available") # noqa: B904
159
159
 
160
160
 
161
161
  def cmd_plot(trace: Any, **options: Any) -> None:
@@ -166,7 +166,7 @@ def cmd_plot(trace: Any, **options: Any) -> None:
166
166
  **options: Plot options (title, annotate, etc.)
167
167
 
168
168
  Raises:
169
- TraceKitError: If plotting fails
169
+ OscuraError: If plotting fails
170
170
  """
171
171
  try:
172
172
  from oscura.visualization import ( # type: ignore[attr-defined]
@@ -184,7 +184,7 @@ def cmd_plot(trace: Any, **options: Any) -> None:
184
184
  plot_module.show()
185
185
 
186
186
  except ImportError:
187
- raise TraceKitError("Visualization module not available") # noqa: B904
187
+ raise OscuraError("Visualization module not available") # noqa: B904
188
188
 
189
189
 
190
190
  def cmd_export(data: Any, format_type: str, filename: str | None = None) -> None:
@@ -196,7 +196,7 @@ def cmd_export(data: Any, format_type: str, filename: str | None = None) -> None
196
196
  filename: Output filename (optional, auto-generated if None)
197
197
 
198
198
  Raises:
199
- TraceKitError: If export fails
199
+ OscuraError: If export fails
200
200
  """
201
201
  try:
202
202
  from oscura.exporters import exporters # type: ignore[attr-defined]
@@ -213,12 +213,12 @@ def cmd_export(data: Any, format_type: str, filename: str | None = None) -> None
213
213
  elif fmt in ("h5", "hdf5"):
214
214
  exporters.hdf5(data, filename)
215
215
  else:
216
- raise TraceKitError(f"Unknown export format: {format_type}")
216
+ raise OscuraError(f"Unknown export format: {format_type}")
217
217
 
218
218
  print(f"Exported to {filename}", file=sys.stderr)
219
219
 
220
220
  except ImportError:
221
- raise TraceKitError("Export module not available") # noqa: B904
221
+ raise OscuraError("Export module not available") # noqa: B904
222
222
 
223
223
 
224
224
  def cmd_glob(pattern: str) -> list[str]:
oscura/dsl/interpreter.py CHANGED
@@ -1,4 +1,4 @@
1
- """TraceKit DSL Interpreter.
1
+ """Oscura DSL Interpreter.
2
2
 
3
3
  Executes parsed DSL programs.
4
4
  """
@@ -30,7 +30,7 @@ class InterpreterError(Exception):
30
30
 
31
31
 
32
32
  class Interpreter:
33
- """DSL interpreter for TraceKit commands.
33
+ """DSL interpreter for Oscura commands.
34
34
 
35
35
  Executes parsed AST with Python implementations of DSL commands.
36
36
  """
@@ -69,7 +69,7 @@ class Interpreter:
69
69
  if not path.exists():
70
70
  raise InterpreterError(f"File not found: {filename}")
71
71
 
72
- # Load the file using TraceKit's loader
72
+ # Load the file using Oscura's loader
73
73
  return load(str(path))
74
74
 
75
75
  except ImportError as e:
@@ -434,7 +434,7 @@ class Interpreter:
434
434
 
435
435
 
436
436
  def execute_dsl(source: str, variables: dict[str, Any] | None = None) -> dict[str, Any]:
437
- """Execute TraceKit DSL source code.
437
+ """Execute Oscura DSL source code.
438
438
 
439
439
  Args:
440
440
  source: DSL source code
oscura/dsl/parser.py CHANGED
@@ -1,4 +1,4 @@
1
- """TraceKit DSL Parser.
1
+ """Oscura DSL Parser.
2
2
 
3
3
  Implements simple domain-specific language for trace analysis workflows.
4
4
  """
@@ -53,7 +53,7 @@ class Token:
53
53
 
54
54
 
55
55
  class Lexer:
56
- """Tokenizer for TraceKit DSL.
56
+ """Tokenizer for Oscura DSL.
57
57
 
58
58
  Breaks input text into tokens for parsing.
59
59
  Supports indentation-based block structure (Python-style).
@@ -407,7 +407,7 @@ Statement = Union[Assignment, Pipeline, ForLoop, FunctionCall]
407
407
 
408
408
 
409
409
  class Parser:
410
- """Recursive descent parser for TraceKit DSL.
410
+ """Recursive descent parser for Oscura DSL.
411
411
 
412
412
  Parses token stream into abstract syntax tree.
413
413
  Supports indentation-based block structure.
@@ -661,7 +661,7 @@ class Parser:
661
661
 
662
662
 
663
663
  def parse_dsl(source: str) -> list[Statement]:
664
- """Parse TraceKit DSL source code.
664
+ """Parse Oscura DSL source code.
665
665
 
666
666
  Args:
667
667
  source: DSL source code
oscura/dsl/repl.py CHANGED
@@ -1,6 +1,6 @@
1
- """TraceKit DSL REPL (Read-Eval-Print Loop).
1
+ """Oscura DSL REPL (Read-Eval-Print Loop).
2
2
 
3
- Interactive shell for TraceKit DSL.
3
+ Interactive shell for Oscura DSL.
4
4
  """
5
5
 
6
6
  import sys
@@ -19,13 +19,13 @@ class REPL:
19
19
 
20
20
  def print_banner(self) -> None:
21
21
  """Print welcome banner."""
22
- print("TraceKit DSL REPL v0.1.0")
22
+ print("Oscura DSL REPL v0.1.0")
23
23
  print("Type 'exit' or 'quit' to exit, 'help' for help")
24
24
  print()
25
25
 
26
26
  def print_help(self) -> None:
27
27
  """Print help message."""
28
- print("TraceKit DSL Commands:")
28
+ print("Oscura DSL Commands:")
29
29
  print(" load <filename> - Load a trace file")
30
30
  print(" filter <type> <params> - Apply filter (lowpass, highpass, etc.)")
31
31
  print(" measure <name> - Measure property (rise_time, etc.)")
oscura/exceptions.py CHANGED
@@ -1,4 +1,4 @@
1
- """TraceKit exception hierarchy - DEPRECATED compatibility module.
1
+ """Oscura exception hierarchy - DEPRECATED compatibility module.
2
2
 
3
3
  .. deprecated:: 1.0.0
4
4
  This module is deprecated for backward compatibility only.
@@ -39,8 +39,8 @@ from oscura.core.exceptions import ( # noqa: E402
39
39
  FormatError,
40
40
  InsufficientDataError,
41
41
  LoaderError,
42
+ OscuraError,
42
43
  SampleRateError,
43
- TraceKitError,
44
44
  UnsupportedFormatError,
45
45
  ValidationError,
46
46
  )
@@ -52,8 +52,8 @@ __all__ = [
52
52
  "FormatError",
53
53
  "InsufficientDataError",
54
54
  "LoaderError",
55
+ "OscuraError",
55
56
  "SampleRateError",
56
- "TraceKitError",
57
57
  "UnsupportedFormatError",
58
58
  "ValidationError",
59
59
  ]