detquantlib 2.0.4__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-2.0.4/LICENSE.txt +3 -0
- detquantlib-2.0.4/PKG-INFO +153 -0
- detquantlib-2.0.4/README.md +133 -0
- detquantlib-2.0.4/detquantlib/__init__.py +1 -0
- detquantlib-2.0.4/detquantlib/data/databases/detdatabase.py +535 -0
- detquantlib-2.0.4/detquantlib/data/entsoe/entsoe.py +174 -0
- detquantlib-2.0.4/detquantlib/data/sftp/sftp.py +89 -0
- detquantlib-2.0.4/detquantlib/dates/dates.py +154 -0
- detquantlib-2.0.4/detquantlib/figures/plotly_figures.py +82 -0
- detquantlib-2.0.4/detquantlib/stats/data_analysis.py +143 -0
- detquantlib-2.0.4/detquantlib/tradable_products/tradable_products.py +117 -0
- detquantlib-2.0.4/detquantlib/utils/utils.py +11 -0
- detquantlib-2.0.4/pyproject.toml +49 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: detquantlib
|
|
3
|
+
Version: 2.0.4
|
|
4
|
+
Summary: An internal library containing functions and classes that can be used across Quant models.
|
|
5
|
+
Author: DET
|
|
6
|
+
Requires-Python: >=3.10,<4.0
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
12
|
+
Requires-Dist: numpy (>=2.2.4,<3.0.0)
|
|
13
|
+
Requires-Dist: pandas (>=2.2.3,<3.0.0)
|
|
14
|
+
Requires-Dist: paramiko (>=3.5.1,<4.0.0)
|
|
15
|
+
Requires-Dist: plotly (>=6.0.1,<7.0.0)
|
|
16
|
+
Requires-Dist: pyodbc (>=5.2.0,<6.0.0)
|
|
17
|
+
Project-URL: Repository, https://github.com/Dynamic-Energy-Trading/detquantlib
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
|
|
20
|
+
# DET Quant Library
|
|
21
|
+
|
|
22
|
+
The DET Quant Library is an internal library containing functions and classes that can be used
|
|
23
|
+
across Quant models.
|
|
24
|
+
|
|
25
|
+
## Instructions
|
|
26
|
+
|
|
27
|
+
#### Version control
|
|
28
|
+
|
|
29
|
+
- This repository contains a version control workflow.
|
|
30
|
+
- The version number is specified via the `version` field in the pyproject.toml file.
|
|
31
|
+
- The version number needs to be updated with every new master commit. If the version is not
|
|
32
|
+
updated, the GitHub workflow will fail.
|
|
33
|
+
- Version numbers should follow semantic versioning (i.e. `X.Y.Z`). That is:
|
|
34
|
+
- `X` increments represent major, non-backward compatible updates.
|
|
35
|
+
- `Y` increments represent minor, backward compatible functionality updates.
|
|
36
|
+
- `Z` increments represent patch/bugfix, backward compatible updates.
|
|
37
|
+
|
|
38
|
+
#### Release notes
|
|
39
|
+
|
|
40
|
+
- When deemed necessary (especially in case of major updates), developers can document code
|
|
41
|
+
changes in dedicated GitHub release notes.
|
|
42
|
+
- Release notes can be created via
|
|
43
|
+
<https://github.com/Dynamic-Energy-Trading/detquantlib/releases.>
|
|
44
|
+
- In any case, all codes changes should always be properly described/documented in GitHub
|
|
45
|
+
issues and/or pull requests.
|
|
46
|
+
|
|
47
|
+
#### Installing the `detquantlib` package in other Python projects
|
|
48
|
+
|
|
49
|
+
To install the library in another project, use the following poetry command:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
poetry add git+https://github.com/Dynamic-Energy-Trading/detquantlib.git@vX.Y.Z
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
where `vX.Y.Z` should be replaced with the relevant version (e.g. `v1.2.3`).
|
|
56
|
+
|
|
57
|
+
## Development settings
|
|
58
|
+
|
|
59
|
+
### Dependency management
|
|
60
|
+
|
|
61
|
+
Project dependencies are managed by [Poetry](https://python-poetry.org/).
|
|
62
|
+
|
|
63
|
+
The project follows the standard Poetry structure:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
poetrytemplate
|
|
67
|
+
├── pyproject.toml
|
|
68
|
+
├── README.md
|
|
69
|
+
├── src
|
|
70
|
+
│ └── __init__.py
|
|
71
|
+
└── tests
|
|
72
|
+
└── __init__.py
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Dependency updates
|
|
76
|
+
|
|
77
|
+
This project is executing automated dependency updates using
|
|
78
|
+
[Dependabot with GitHub actions](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions).
|
|
79
|
+
|
|
80
|
+
### Invoke development tasks
|
|
81
|
+
|
|
82
|
+
Development tasks are defined with the [Invoke](https://www.pyinvoke.org/) package.
|
|
83
|
+
|
|
84
|
+
#### What is Invoke?
|
|
85
|
+
|
|
86
|
+
Invoke provides a clean, high level API for running shell commands and defining/organizing task
|
|
87
|
+
functions from a tasks.py file.
|
|
88
|
+
|
|
89
|
+
#### How to run development tasks?
|
|
90
|
+
|
|
91
|
+
Development tasks can be executed directly from the terminal, using the `inv` (or `invoke`)
|
|
92
|
+
command line tool.
|
|
93
|
+
|
|
94
|
+
For guidance on the available Invoke development tasks, execute the following command in the
|
|
95
|
+
terminal:
|
|
96
|
+
|
|
97
|
+
```cmd
|
|
98
|
+
inv --list
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Use the `-h` (or `--help`) argument for help about a particular development task. For example:
|
|
102
|
+
|
|
103
|
+
```cmd
|
|
104
|
+
inv lint -h
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### CI/CD process
|
|
108
|
+
|
|
109
|
+
This project is executing CI checks using [GitHub actions](https://docs.github.com/en/actions)
|
|
110
|
+
workflows.
|
|
111
|
+
|
|
112
|
+
The GitHub workflow defined in this project was inspired by the following preconfigured templates:
|
|
113
|
+
|
|
114
|
+
- [Python package](https://github.com/actions/starter-workflows/blob/main/ci/python-package.yml):
|
|
115
|
+
A general workflow template for Python packages.
|
|
116
|
+
- [Poetry action](https://github.com/marketplace/actions/install-poetry-action): A GitHub action
|
|
117
|
+
for installing and configuring Poetry.
|
|
118
|
+
|
|
119
|
+
#### CI check: Testing
|
|
120
|
+
|
|
121
|
+
Code changes are tested with the [Pytest](https://github.com/pytest-dev/pytest) package.
|
|
122
|
+
|
|
123
|
+
The CI check is executed with the following the development task:
|
|
124
|
+
|
|
125
|
+
```cmd
|
|
126
|
+
inv test -c
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
#### CI check: Code formatting
|
|
130
|
+
|
|
131
|
+
Linters are used to check that the code is properly formatted:
|
|
132
|
+
|
|
133
|
+
- [Isort](https://github.com/timothycrosley/isort) for the imports section
|
|
134
|
+
- [Darglint](https://github.com/terrencepreilly/darglint) for the docstrings description
|
|
135
|
+
- [Black](https://github.com/psf/black) for the main code
|
|
136
|
+
- [Pymarkdown](https://github.com/jackdewinter/pymarkdown) for the markdown file README.md
|
|
137
|
+
|
|
138
|
+
The CI check is executed with the following development task:
|
|
139
|
+
|
|
140
|
+
```cmd
|
|
141
|
+
inv lint -c
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
If the CI check fails, execute the following command in the terminal:
|
|
145
|
+
|
|
146
|
+
```cmd
|
|
147
|
+
inv lint
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
This command fixes the parts of the code that should be reformatted. Adding the `-c` (or
|
|
151
|
+
`--check`) optional argument instructs the command to only _check_ if parts of the code should be
|
|
152
|
+
reformatted, without applying any actual changes.
|
|
153
|
+
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# DET Quant Library
|
|
2
|
+
|
|
3
|
+
The DET Quant Library is an internal library containing functions and classes that can be used
|
|
4
|
+
across Quant models.
|
|
5
|
+
|
|
6
|
+
## Instructions
|
|
7
|
+
|
|
8
|
+
#### Version control
|
|
9
|
+
|
|
10
|
+
- This repository contains a version control workflow.
|
|
11
|
+
- The version number is specified via the `version` field in the pyproject.toml file.
|
|
12
|
+
- The version number needs to be updated with every new master commit. If the version is not
|
|
13
|
+
updated, the GitHub workflow will fail.
|
|
14
|
+
- Version numbers should follow semantic versioning (i.e. `X.Y.Z`). That is:
|
|
15
|
+
- `X` increments represent major, non-backward compatible updates.
|
|
16
|
+
- `Y` increments represent minor, backward compatible functionality updates.
|
|
17
|
+
- `Z` increments represent patch/bugfix, backward compatible updates.
|
|
18
|
+
|
|
19
|
+
#### Release notes
|
|
20
|
+
|
|
21
|
+
- When deemed necessary (especially in case of major updates), developers can document code
|
|
22
|
+
changes in dedicated GitHub release notes.
|
|
23
|
+
- Release notes can be created via
|
|
24
|
+
<https://github.com/Dynamic-Energy-Trading/detquantlib/releases.>
|
|
25
|
+
- In any case, all codes changes should always be properly described/documented in GitHub
|
|
26
|
+
issues and/or pull requests.
|
|
27
|
+
|
|
28
|
+
#### Installing the `detquantlib` package in other Python projects
|
|
29
|
+
|
|
30
|
+
To install the library in another project, use the following poetry command:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
poetry add git+https://github.com/Dynamic-Energy-Trading/detquantlib.git@vX.Y.Z
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
where `vX.Y.Z` should be replaced with the relevant version (e.g. `v1.2.3`).
|
|
37
|
+
|
|
38
|
+
## Development settings
|
|
39
|
+
|
|
40
|
+
### Dependency management
|
|
41
|
+
|
|
42
|
+
Project dependencies are managed by [Poetry](https://python-poetry.org/).
|
|
43
|
+
|
|
44
|
+
The project follows the standard Poetry structure:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
poetrytemplate
|
|
48
|
+
├── pyproject.toml
|
|
49
|
+
├── README.md
|
|
50
|
+
├── src
|
|
51
|
+
│ └── __init__.py
|
|
52
|
+
└── tests
|
|
53
|
+
└── __init__.py
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Dependency updates
|
|
57
|
+
|
|
58
|
+
This project is executing automated dependency updates using
|
|
59
|
+
[Dependabot with GitHub actions](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions).
|
|
60
|
+
|
|
61
|
+
### Invoke development tasks
|
|
62
|
+
|
|
63
|
+
Development tasks are defined with the [Invoke](https://www.pyinvoke.org/) package.
|
|
64
|
+
|
|
65
|
+
#### What is Invoke?
|
|
66
|
+
|
|
67
|
+
Invoke provides a clean, high level API for running shell commands and defining/organizing task
|
|
68
|
+
functions from a tasks.py file.
|
|
69
|
+
|
|
70
|
+
#### How to run development tasks?
|
|
71
|
+
|
|
72
|
+
Development tasks can be executed directly from the terminal, using the `inv` (or `invoke`)
|
|
73
|
+
command line tool.
|
|
74
|
+
|
|
75
|
+
For guidance on the available Invoke development tasks, execute the following command in the
|
|
76
|
+
terminal:
|
|
77
|
+
|
|
78
|
+
```cmd
|
|
79
|
+
inv --list
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Use the `-h` (or `--help`) argument for help about a particular development task. For example:
|
|
83
|
+
|
|
84
|
+
```cmd
|
|
85
|
+
inv lint -h
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### CI/CD process
|
|
89
|
+
|
|
90
|
+
This project is executing CI checks using [GitHub actions](https://docs.github.com/en/actions)
|
|
91
|
+
workflows.
|
|
92
|
+
|
|
93
|
+
The GitHub workflow defined in this project was inspired by the following preconfigured templates:
|
|
94
|
+
|
|
95
|
+
- [Python package](https://github.com/actions/starter-workflows/blob/main/ci/python-package.yml):
|
|
96
|
+
A general workflow template for Python packages.
|
|
97
|
+
- [Poetry action](https://github.com/marketplace/actions/install-poetry-action): A GitHub action
|
|
98
|
+
for installing and configuring Poetry.
|
|
99
|
+
|
|
100
|
+
#### CI check: Testing
|
|
101
|
+
|
|
102
|
+
Code changes are tested with the [Pytest](https://github.com/pytest-dev/pytest) package.
|
|
103
|
+
|
|
104
|
+
The CI check is executed with the following the development task:
|
|
105
|
+
|
|
106
|
+
```cmd
|
|
107
|
+
inv test -c
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
#### CI check: Code formatting
|
|
111
|
+
|
|
112
|
+
Linters are used to check that the code is properly formatted:
|
|
113
|
+
|
|
114
|
+
- [Isort](https://github.com/timothycrosley/isort) for the imports section
|
|
115
|
+
- [Darglint](https://github.com/terrencepreilly/darglint) for the docstrings description
|
|
116
|
+
- [Black](https://github.com/psf/black) for the main code
|
|
117
|
+
- [Pymarkdown](https://github.com/jackdewinter/pymarkdown) for the markdown file README.md
|
|
118
|
+
|
|
119
|
+
The CI check is executed with the following development task:
|
|
120
|
+
|
|
121
|
+
```cmd
|
|
122
|
+
inv lint -c
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
If the CI check fails, execute the following command in the terminal:
|
|
126
|
+
|
|
127
|
+
```cmd
|
|
128
|
+
inv lint
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
This command fixes the parts of the code that should be reformatted. Adding the `-c` (or
|
|
132
|
+
`--check`) optional argument instructs the command to only _check_ if parts of the code should be
|
|
133
|
+
reformatted, without applying any actual changes.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Empty file required by poetry. Do not delete.
|