detquantlib 3.7.2__tar.gz → 3.8.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.
- {detquantlib-3.7.2 → detquantlib-3.8.0}/PKG-INFO +7 -5
- {detquantlib-3.7.2 → detquantlib-3.8.0}/detquantlib/figures/plotly_figures.py +7 -7
- {detquantlib-3.7.2 → detquantlib-3.8.0}/detquantlib/outputs/outputs_interface.py +13 -4
- {detquantlib-3.7.2 → detquantlib-3.8.0}/pyproject.toml +9 -9
- {detquantlib-3.7.2 → detquantlib-3.8.0}/LICENSE.txt +0 -0
- {detquantlib-3.7.2 → detquantlib-3.8.0}/README.md +0 -0
- {detquantlib-3.7.2 → detquantlib-3.8.0}/detquantlib/__init__.py +0 -0
- {detquantlib-3.7.2 → detquantlib-3.8.0}/detquantlib/data/__init__.py +0 -0
- {detquantlib-3.7.2 → detquantlib-3.8.0}/detquantlib/data/databases/detdatabase.py +0 -0
- {detquantlib-3.7.2 → detquantlib-3.8.0}/detquantlib/data/entsoe/entsoe.py +0 -0
- {detquantlib-3.7.2 → detquantlib-3.8.0}/detquantlib/data/sftp/sftp.py +0 -0
- {detquantlib-3.7.2 → detquantlib-3.8.0}/detquantlib/dates/__init__.py +0 -0
- {detquantlib-3.7.2 → detquantlib-3.8.0}/detquantlib/dates/dates.py +0 -0
- {detquantlib-3.7.2 → detquantlib-3.8.0}/detquantlib/figures/__init__.py +0 -0
- {detquantlib-3.7.2 → detquantlib-3.8.0}/detquantlib/outputs/__init__.py +0 -0
- {detquantlib-3.7.2 → detquantlib-3.8.0}/detquantlib/stats/__init__.py +0 -0
- {detquantlib-3.7.2 → detquantlib-3.8.0}/detquantlib/stats/data_analysis.py +0 -0
- {detquantlib-3.7.2 → detquantlib-3.8.0}/detquantlib/tradable_products/__init__.py +0 -0
- {detquantlib-3.7.2 → detquantlib-3.8.0}/detquantlib/tradable_products/tradable_products.py +0 -0
- {detquantlib-3.7.2 → detquantlib-3.8.0}/detquantlib/utils/__init__.py +0 -0
- {detquantlib-3.7.2 → detquantlib-3.8.0}/detquantlib/utils/utils.py +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: detquantlib
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.8.0
|
|
4
4
|
Summary: An internal library containing functions and classes that can be used across Quant models.
|
|
5
|
+
License-File: LICENSE.txt
|
|
5
6
|
Author: DET
|
|
6
7
|
Requires-Python: >=3.10,<4.0
|
|
7
8
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -9,10 +10,11 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
9
10
|
Classifier: Programming Language :: Python :: 3.11
|
|
10
11
|
Classifier: Programming Language :: Python :: 3.12
|
|
11
12
|
Classifier: Programming Language :: Python :: 3.13
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
12
14
|
Requires-Dist: numpy (>=2.2.6,<3.0.0)
|
|
13
|
-
Requires-Dist: pandas (>=2.3.
|
|
14
|
-
Requires-Dist: paramiko (>=
|
|
15
|
-
Requires-Dist: plotly (>=6.1
|
|
15
|
+
Requires-Dist: pandas (>=2.3.3,<3.0.0)
|
|
16
|
+
Requires-Dist: paramiko (>=4.0.0,<5.0.0)
|
|
17
|
+
Requires-Dist: plotly (>=6.3.1,<7.0.0)
|
|
16
18
|
Requires-Dist: pyodbc (>=5.2.0,<6.0.0)
|
|
17
19
|
Requires-Dist: python-dotenv (>=1.1.0,<2.0.0)
|
|
18
20
|
Requires-Dist: scipy (>=1.15.2,<2.0.0)
|
|
@@ -5,10 +5,8 @@ from pathlib import Path
|
|
|
5
5
|
import plotly.graph_objects as go
|
|
6
6
|
import plotly.io as pio
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
# Default path to output folder containing plotly figures.
|
|
11
|
-
return Path.cwd().joinpath("Outputs", "PlotlyFigures")
|
|
8
|
+
# Internal modules
|
|
9
|
+
from detquantlib.outputs.outputs_interface import PathDefinitions
|
|
12
10
|
|
|
13
11
|
|
|
14
12
|
def set_standard_layout(fig: go.Figure) -> go.Figure:
|
|
@@ -34,7 +32,7 @@ def set_standard_layout(fig: go.Figure) -> go.Figure:
|
|
|
34
32
|
def save_plotly_fig_to_json(
|
|
35
33
|
fig: go.Figure,
|
|
36
34
|
filename: str,
|
|
37
|
-
folder_dir: Path =
|
|
35
|
+
folder_dir: Path = PathDefinitions.get_outputs_plotly_folder_dir(),
|
|
38
36
|
standard_layout: bool = True,
|
|
39
37
|
):
|
|
40
38
|
"""
|
|
@@ -65,7 +63,7 @@ def save_plotly_fig_to_json(
|
|
|
65
63
|
def save_plotly_fig_to_html(
|
|
66
64
|
fig: go.Figure,
|
|
67
65
|
filename: str,
|
|
68
|
-
folder_dir: Path =
|
|
66
|
+
folder_dir: Path = PathDefinitions.get_outputs_plotly_folder_dir(),
|
|
69
67
|
standard_layout: bool = True,
|
|
70
68
|
):
|
|
71
69
|
"""
|
|
@@ -91,7 +89,9 @@ def save_plotly_fig_to_html(
|
|
|
91
89
|
fig.write_html(file_dir)
|
|
92
90
|
|
|
93
91
|
|
|
94
|
-
def show_plotly_fig_json(
|
|
92
|
+
def show_plotly_fig_json(
|
|
93
|
+
filename: str, folder_dir: Path = PathDefinitions.get_outputs_plotly_folder_dir()
|
|
94
|
+
):
|
|
95
95
|
"""
|
|
96
96
|
Short helper function to display a plotly figure stored in a json file.
|
|
97
97
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# Python built-in packages
|
|
2
2
|
import json
|
|
3
|
+
import os
|
|
3
4
|
from pathlib import Path
|
|
4
5
|
|
|
5
6
|
# Third-party packages
|
|
@@ -184,20 +185,28 @@ class PathDefinitions:
|
|
|
184
185
|
"""A class containing hard-coded path definitions."""
|
|
185
186
|
|
|
186
187
|
@staticmethod
|
|
187
|
-
def
|
|
188
|
+
def default_outputs_folder_name():
|
|
188
189
|
return "Outputs"
|
|
189
190
|
|
|
190
191
|
@staticmethod
|
|
191
|
-
def
|
|
192
|
+
def outputs_plotly_folder_name():
|
|
192
193
|
return "PlotlyFigures"
|
|
193
194
|
|
|
195
|
+
@staticmethod
|
|
196
|
+
def get_outputs_folder_name():
|
|
197
|
+
# Get name from environment variable if it exists, otherwise use default name
|
|
198
|
+
folder_name = os.getenv("OUTPUTS_FOLDER")
|
|
199
|
+
if folder_name is None:
|
|
200
|
+
folder_name = PathDefinitions.default_outputs_folder_name()
|
|
201
|
+
return folder_name
|
|
202
|
+
|
|
194
203
|
@staticmethod
|
|
195
204
|
def get_outputs_folder_dir():
|
|
196
205
|
# Base directory of the folder containing all model outputs
|
|
197
|
-
return Path.cwd().joinpath(PathDefinitions.
|
|
206
|
+
return Path.cwd().joinpath(PathDefinitions.get_outputs_folder_name())
|
|
198
207
|
|
|
199
208
|
@staticmethod
|
|
200
209
|
def get_outputs_plotly_folder_dir():
|
|
201
210
|
# Directory of the output folder containing all plotly figures
|
|
202
211
|
base_dir = PathDefinitions.get_outputs_folder_dir()
|
|
203
|
-
return base_dir.joinpath(PathDefinitions.
|
|
212
|
+
return base_dir.joinpath(PathDefinitions.outputs_plotly_folder_name())
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "detquantlib"
|
|
3
|
-
version = "3.
|
|
3
|
+
version = "3.8.0"
|
|
4
4
|
description = "An internal library containing functions and classes that can be used across Quant models."
|
|
5
5
|
authors = ["DET"]
|
|
6
6
|
readme = "README.md"
|
|
@@ -11,10 +11,10 @@ packages = [
|
|
|
11
11
|
|
|
12
12
|
[tool.poetry.dependencies]
|
|
13
13
|
python = ">=3.10,<4.0"
|
|
14
|
-
paramiko = "^
|
|
14
|
+
paramiko = "^4.0.0"
|
|
15
15
|
numpy = "^2.2.6"
|
|
16
|
-
pandas = "^2.3.
|
|
17
|
-
plotly = "^6.1
|
|
16
|
+
pandas = "^2.3.3"
|
|
17
|
+
plotly = "^6.3.1"
|
|
18
18
|
pyodbc = "^5.2.0"
|
|
19
19
|
python-dotenv = "^1.1.0"
|
|
20
20
|
scipy = "^1.15.2"
|
|
@@ -22,13 +22,13 @@ scipy = "^1.15.2"
|
|
|
22
22
|
[tool.poetry.group.dev.dependencies]
|
|
23
23
|
toml = "^0.10.2"
|
|
24
24
|
invoke = "^2.2.0"
|
|
25
|
-
pytest = "^8.
|
|
26
|
-
pytest-cov = "^
|
|
27
|
-
black = "^25.
|
|
25
|
+
pytest = "^8.4.2"
|
|
26
|
+
pytest-cov = "^7.0.0"
|
|
27
|
+
black = "^25.9.0"
|
|
28
28
|
darglint = "^1.8.1"
|
|
29
|
-
isort = "^6.0
|
|
29
|
+
isort = "^6.1.0"
|
|
30
30
|
colorama = "^0.4.6"
|
|
31
|
-
pymarkdownlnt = "^0.9.
|
|
31
|
+
pymarkdownlnt = "^0.9.32"
|
|
32
32
|
md-toc = "^9.0.0"
|
|
33
33
|
|
|
34
34
|
[build-system]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|