detquantlib 5.7.1__tar.gz → 5.9.0__tar.gz

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 (46) hide show
  1. {detquantlib-5.7.1 → detquantlib-5.9.0}/PKG-INFO +40 -1
  2. {detquantlib-5.7.1 → detquantlib-5.9.0}/README.md +39 -0
  3. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/data/__init__.py +3 -0
  4. detquantlib-5.9.0/detquantlib/data/databases/azure_client.py +655 -0
  5. detquantlib-5.9.0/detquantlib/snapshot_testing/README.md +502 -0
  6. detquantlib-5.9.0/detquantlib/snapshot_testing/__init__.py +24 -0
  7. detquantlib-5.9.0/detquantlib/snapshot_testing/cases.py +195 -0
  8. detquantlib-5.9.0/detquantlib/snapshot_testing/comparison.py +183 -0
  9. detquantlib-5.9.0/detquantlib/snapshot_testing/config.py +90 -0
  10. detquantlib-5.9.0/detquantlib/snapshot_testing/errors.py +11 -0
  11. detquantlib-5.9.0/detquantlib/snapshot_testing/isolation.py +172 -0
  12. detquantlib-5.9.0/detquantlib/snapshot_testing/pytest_plugin.py +195 -0
  13. detquantlib-5.9.0/detquantlib/snapshot_testing/recording.py +492 -0
  14. detquantlib-5.9.0/detquantlib/snapshot_testing/tables.py +366 -0
  15. {detquantlib-5.7.1 → detquantlib-5.9.0}/pyproject.toml +2 -1
  16. {detquantlib-5.7.1 → detquantlib-5.9.0}/LICENSE.txt +0 -0
  17. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/__init__.py +0 -0
  18. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/assets/__init__.py +0 -0
  19. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/assets/battery.py +0 -0
  20. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/assets/wind_turbine.py +0 -0
  21. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/converters/__init__.py +0 -0
  22. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/converters/definitions.py +0 -0
  23. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/converters/energy.py +0 -0
  24. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/converters/helpers.py +0 -0
  25. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/converters/price.py +0 -0
  26. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/data/databases/detdatabase.py +0 -0
  27. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/data/databases/helpers.py +0 -0
  28. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/data/databases/snowflake_client.py +0 -0
  29. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/data/entsoe/entsoe.py +0 -0
  30. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/data/sftp/sftp.py +0 -0
  31. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/data/tennet/tennet_client.py +0 -0
  32. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/dates/__init__.py +0 -0
  33. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/dates/dates.py +0 -0
  34. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/figures/__init__.py +0 -0
  35. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/figures/plotly_figures.py +0 -0
  36. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/forecasting/__init__.py +0 -0
  37. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/forecasting/forecasting.py +0 -0
  38. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/outputs/__init__.py +0 -0
  39. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/outputs/outputs_interface.py +0 -0
  40. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/stats/__init__.py +0 -0
  41. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/stats/data_analysis.py +0 -0
  42. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/tradable_products/__init__.py +0 -0
  43. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/tradable_products/tradable_products.py +0 -0
  44. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/utils/__init__.py +0 -0
  45. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/utils/logging.py +0 -0
  46. {detquantlib-5.7.1 → detquantlib-5.9.0}/detquantlib/utils/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: detquantlib
3
- Version: 5.7.1
3
+ Version: 5.9.0
4
4
  Summary: An internal library containing functions and classes that can be used across Quant models.
5
5
  License-File: LICENSE.txt
6
6
  Author: Dynamic Energy Trading
@@ -37,6 +37,7 @@ Description-Content-Type: text/markdown
37
37
  - [DET Quant Library](#det-quant-library)
38
38
  - [Table of Contents](#table-of-contents)
39
39
  - [Overview](#overview)
40
+ - [Snapshot Testing](#snapshot-testing)
40
41
  - [Exposed Symbols](#exposed-symbols)
41
42
  - [List of Exposed Symbols](#list-of-exposed-symbols)
42
43
  - [Configuration](#configuration)
@@ -62,6 +63,17 @@ Description-Content-Type: text/markdown
62
63
  The DET Quant Library is an internal library containing functions and classes that can be used
63
64
  across Quant models.
64
65
 
66
+ ## Snapshot Testing
67
+
68
+ The `detquantlib.snapshot_testing` package provides snapshot (regression) tests for Quant models:
69
+ each test runs a model end to end on a fixed set of inputs, and compares its outputs with a
70
+ reviewed reference copy. Database calls are recorded once, locally, and replayed from disk in CI,
71
+ which has no database access. The `SnowflakeClient` and `AzureClient` classes are supported out of
72
+ the box.
73
+
74
+ See [the snapshot testing guide](detquantlib/snapshot_testing/README.md) for how the framework
75
+ works and how to set it up in a model repository.
76
+
65
77
  ## Exposed Symbols
66
78
 
67
79
  Some of the package's symbols (i.e. functions, classes, modules, etc.) are exposed via
@@ -84,15 +96,27 @@ poetry run python docs.py
84
96
 
85
97
  Classes:
86
98
 
99
+ - `AzureClient`:
100
+ - `from detquantlib.data import AzureClient`
101
+ - `from detquantlib.data.databases.azure_client import AzureClient`
102
+ - `AzureConfig`:
103
+ - `from detquantlib.data import AzureConfig`
104
+ - `from detquantlib.data.databases.azure_client import AzureConfig`
87
105
  - `BatteryState`:
88
106
  - `from detquantlib.assets import BatteryState`
89
107
  - `from detquantlib.assets.battery import BatteryState`
108
+ - `DbCacheMissError`:
109
+ - `from detquantlib.snapshot_testing import DbCacheMissError`
110
+ - `from detquantlib.snapshot_testing.errors import DbCacheMissError`
90
111
  - `DetDatabase`:
91
112
  - `from detquantlib.data import DetDatabase`
92
113
  - `from detquantlib.data.databases.detdatabase import DetDatabase`
93
114
  - `Entsoe`:
94
115
  - `from detquantlib.data import Entsoe`
95
116
  - `from detquantlib.data.entsoe.entsoe import Entsoe`
117
+ - `NetworkAccessBlockedError`:
118
+ - `from detquantlib.snapshot_testing import NetworkAccessBlockedError`
119
+ - `from detquantlib.snapshot_testing.errors import NetworkAccessBlockedError`
96
120
  - `OutputItem`:
97
121
  - `from detquantlib.outputs import OutputItem`
98
122
  - `from detquantlib.outputs.outputs_interface import OutputItem`
@@ -105,6 +129,12 @@ Classes:
105
129
  - `Sftp`:
106
130
  - `from detquantlib.data import Sftp`
107
131
  - `from detquantlib.data.sftp.sftp import Sftp`
132
+ - `SnapshotCase`:
133
+ - `from detquantlib.snapshot_testing import SnapshotCase`
134
+ - `from detquantlib.snapshot_testing.cases import SnapshotCase`
135
+ - `SnapshotConfig`:
136
+ - `from detquantlib.snapshot_testing import SnapshotConfig`
137
+ - `from detquantlib.snapshot_testing.config import SnapshotConfig`
108
138
  - `SnowflakeClient`:
109
139
  - `from detquantlib.data import SnowflakeClient`
110
140
  - `from detquantlib.data.databases.snowflake_client import SnowflakeClient`
@@ -126,12 +156,21 @@ Classes:
126
156
 
127
157
  Functions:
128
158
 
159
+ - `create_case`:
160
+ - `from detquantlib.snapshot_testing import create_case`
161
+ - `from detquantlib.snapshot_testing.cases import create_case`
162
+ - `discover_cases`:
163
+ - `from detquantlib.snapshot_testing import discover_cases`
164
+ - `from detquantlib.snapshot_testing.cases import discover_cases`
129
165
  - `list_to_sql_columns`:
130
166
  - `from detquantlib.data import list_to_sql_columns`
131
167
  - `from detquantlib.data.databases.helpers import list_to_sql_columns`
132
168
  - `list_to_sql_set`:
133
169
  - `from detquantlib.data import list_to_sql_set`
134
170
  - `from detquantlib.data.databases.helpers import list_to_sql_set`
171
+ - `print_cases`:
172
+ - `from detquantlib.snapshot_testing import print_cases`
173
+ - `from detquantlib.snapshot_testing.cases import print_cases`
135
174
 
136
175
  <!-- END EXPOSED SYMBOLS AUTO-GENERATED -->
137
176
 
@@ -7,6 +7,7 @@
7
7
  - [DET Quant Library](#det-quant-library)
8
8
  - [Table of Contents](#table-of-contents)
9
9
  - [Overview](#overview)
10
+ - [Snapshot Testing](#snapshot-testing)
10
11
  - [Exposed Symbols](#exposed-symbols)
11
12
  - [List of Exposed Symbols](#list-of-exposed-symbols)
12
13
  - [Configuration](#configuration)
@@ -32,6 +33,17 @@
32
33
  The DET Quant Library is an internal library containing functions and classes that can be used
33
34
  across Quant models.
34
35
 
36
+ ## Snapshot Testing
37
+
38
+ The `detquantlib.snapshot_testing` package provides snapshot (regression) tests for Quant models:
39
+ each test runs a model end to end on a fixed set of inputs, and compares its outputs with a
40
+ reviewed reference copy. Database calls are recorded once, locally, and replayed from disk in CI,
41
+ which has no database access. The `SnowflakeClient` and `AzureClient` classes are supported out of
42
+ the box.
43
+
44
+ See [the snapshot testing guide](detquantlib/snapshot_testing/README.md) for how the framework
45
+ works and how to set it up in a model repository.
46
+
35
47
  ## Exposed Symbols
36
48
 
37
49
  Some of the package's symbols (i.e. functions, classes, modules, etc.) are exposed via
@@ -54,15 +66,27 @@ poetry run python docs.py
54
66
 
55
67
  Classes:
56
68
 
69
+ - `AzureClient`:
70
+ - `from detquantlib.data import AzureClient`
71
+ - `from detquantlib.data.databases.azure_client import AzureClient`
72
+ - `AzureConfig`:
73
+ - `from detquantlib.data import AzureConfig`
74
+ - `from detquantlib.data.databases.azure_client import AzureConfig`
57
75
  - `BatteryState`:
58
76
  - `from detquantlib.assets import BatteryState`
59
77
  - `from detquantlib.assets.battery import BatteryState`
78
+ - `DbCacheMissError`:
79
+ - `from detquantlib.snapshot_testing import DbCacheMissError`
80
+ - `from detquantlib.snapshot_testing.errors import DbCacheMissError`
60
81
  - `DetDatabase`:
61
82
  - `from detquantlib.data import DetDatabase`
62
83
  - `from detquantlib.data.databases.detdatabase import DetDatabase`
63
84
  - `Entsoe`:
64
85
  - `from detquantlib.data import Entsoe`
65
86
  - `from detquantlib.data.entsoe.entsoe import Entsoe`
87
+ - `NetworkAccessBlockedError`:
88
+ - `from detquantlib.snapshot_testing import NetworkAccessBlockedError`
89
+ - `from detquantlib.snapshot_testing.errors import NetworkAccessBlockedError`
66
90
  - `OutputItem`:
67
91
  - `from detquantlib.outputs import OutputItem`
68
92
  - `from detquantlib.outputs.outputs_interface import OutputItem`
@@ -75,6 +99,12 @@ Classes:
75
99
  - `Sftp`:
76
100
  - `from detquantlib.data import Sftp`
77
101
  - `from detquantlib.data.sftp.sftp import Sftp`
102
+ - `SnapshotCase`:
103
+ - `from detquantlib.snapshot_testing import SnapshotCase`
104
+ - `from detquantlib.snapshot_testing.cases import SnapshotCase`
105
+ - `SnapshotConfig`:
106
+ - `from detquantlib.snapshot_testing import SnapshotConfig`
107
+ - `from detquantlib.snapshot_testing.config import SnapshotConfig`
78
108
  - `SnowflakeClient`:
79
109
  - `from detquantlib.data import SnowflakeClient`
80
110
  - `from detquantlib.data.databases.snowflake_client import SnowflakeClient`
@@ -96,12 +126,21 @@ Classes:
96
126
 
97
127
  Functions:
98
128
 
129
+ - `create_case`:
130
+ - `from detquantlib.snapshot_testing import create_case`
131
+ - `from detquantlib.snapshot_testing.cases import create_case`
132
+ - `discover_cases`:
133
+ - `from detquantlib.snapshot_testing import discover_cases`
134
+ - `from detquantlib.snapshot_testing.cases import discover_cases`
99
135
  - `list_to_sql_columns`:
100
136
  - `from detquantlib.data import list_to_sql_columns`
101
137
  - `from detquantlib.data.databases.helpers import list_to_sql_columns`
102
138
  - `list_to_sql_set`:
103
139
  - `from detquantlib.data import list_to_sql_set`
104
140
  - `from detquantlib.data.databases.helpers import list_to_sql_set`
141
+ - `print_cases`:
142
+ - `from detquantlib.snapshot_testing import print_cases`
143
+ - `from detquantlib.snapshot_testing.cases import print_cases`
105
144
 
106
145
  <!-- END EXPOSED SYMBOLS AUTO-GENERATED -->
107
146
 
@@ -1,3 +1,4 @@
1
+ from .databases.azure_client import AzureClient, AzureConfig
1
2
  from .databases.detdatabase import DetDatabase
2
3
  from .databases.helpers import *
3
4
  from .databases.snowflake_client import SnowflakeClient, SnowflakeConfig
@@ -6,6 +7,8 @@ from .sftp.sftp import Sftp
6
7
  from .tennet.tennet_client import TennetAPIError, TennetClient
7
8
 
8
9
  __all__ = [
10
+ "AzureClient",
11
+ "AzureConfig",
9
12
  "DetDatabase",
10
13
  "Entsoe",
11
14
  "Sftp",