An internal library containing functions and classes that can be used across Quant models.
Project description
DET Quant Library
Table of Contents
Overview
The DET Quant Library is an internal library containing functions and classes that can be used across Quant models.
Exposed Symbols
Some of the package's symbols (i.e. functions, classes, modules, etc.) are exposed via
__init__.py files. They can therefore be imported with a more concise notation that does not
require specifying their full path.
This section references all exposed symbols, and for each one of them, provides an exhaustive list of the ways they can be imported.
Note: The list below is auto-generated and can be udpated with the following command in the terminal:
poetry run python docs.py
List of Exposed Symbols
Classes:
DetDatabase:from detquantlib.data import DetDatabasefrom detquantlib.data.databases.detdatabase import DetDatabase
Entsoe:from detquantlib.data import Entsoefrom detquantlib.data.entsoe.entsoe import Entsoe
OutputItem:from detquantlib.outputs import OutputItemfrom detquantlib.outputs.outputs_interface import OutputItem
OutputSet:from detquantlib.outputs import OutputSetfrom detquantlib.outputs.outputs_interface import OutputSet
PathDefinitions:from detquantlib.outputs import PathDefinitionsfrom detquantlib.outputs.outputs_interface import PathDefinitions
Sftp:from detquantlib.data import Sftpfrom detquantlib.data.sftp.sftp import Sftp
Functions:
list_to_sql_columns:from detquantlib.data import list_to_sql_columnsfrom detquantlib.data.databases.helpers import list_to_sql_columns
list_to_sql_set:from detquantlib.data import list_to_sql_setfrom detquantlib.data.databases.helpers import list_to_sql_set
Configuration
Project Structure
The project mainly follows the standard Poetry structure:
detquantlib
├── pyproject.toml
├── README.md
├── detquantlib
│ └── __init__.py
└── tests
└── __init__.py
Dependencies
Dependency Manager
Project dependencies are managed by Poetry.
Dependabot
Automated dependency updates are executed with Dependabot.
GitHub Actions
The project's CI/CD pipeline is enforced with GitHub actions workflows.
Workflow: Continuous Integration (CI)
The continuous integration (CI) workflow runs tests to check the integrity of the codebase's content, and linters to check the consistency of its format.
The workflow was inspired by the following preconfigured templates:
- Python package: A general workflow template for Python packages.
- Poetry action: A GitHub action for installing and configuring Poetry.
Invoke Tasks
The workflow's checks and linters are specified with Invoke tasks, defined in a tasks.py file.
Invoke tasks can be executed directly from the terminal, using the inv (or invoke)
command line tool.
For guidance on the available Invoke tasks, execute the following command in the terminal:
inv --list
Use the -h (or --help) argument for help about a particular Invoke task. For example:
inv lint -h
CI Check: Testing
Code changes are tested with the Pytest package.
The CI check is executed with the following Invoke task:
inv test -c
CI Check: Code Formatting
Linters are used to check that the code is properly formatted:
- Isort for the imports section
- Darglint for the docstrings description
- Black for the main code
- Pymarkdown for the markdown file README.md
The CI check is executed with the following Invoke task:
inv lint -c
If the CI check fails, execute the following command in the terminal:
inv lint
This command fixes the parts of the code that should be reformatted. Adding the -c (or
--check) optional argument instructs the command to only check if parts of the code should be
reformatted, without applying any actual changes.
Workflow: Package Publisher
The package publisher workflow checks the validity of package version updates, creates version tags, and publishes package updates to PyPI.
Checking Version Updates
The workflow enforces version control:
- The version number is specified via the
versionfield in the pyproject.toml file. - The version number needs to be updated with every new master commit. If the version is not updated, the GitHub workflow will fail.
- Version numbers should follow semantic versioning (i.e.
X.Y.Z). That is:Xincrements represent major, non-backward compatible updates.Yincrements represent minor, backward compatible functionality updates.Zincrements represent patch/bugfix, backward compatible updates.
Creating Version Tags
If the new package version is valid, the workflow automatically creates a new tag for every new master commit.
Publishing Package Updates to PyPI
The workflow automatically publishes every new master commit to PyPI.
Release Notes
When deemed necessary (especially in case of major updates), developers can document code changes in dedicated GitHub release notes.
Release notes can be created via https://github.com/Dynamic-Energy-Trading/detquantlib/releases.
In any case, all codes changes should always be properly described/documented in GitHub issues and/or pull requests.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file detquantlib-3.13.0.tar.gz.
File metadata
- Download URL: detquantlib-3.13.0.tar.gz
- Upload date:
- Size: 27.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.11.14 Linux/6.14.0-1017-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b564055508c8d5a57beed6eebb48db1b50638beb17954fd88b581d5994fe79a
|
|
| MD5 |
c02299cf18a31e3b170640dd5ac4dd2a
|
|
| BLAKE2b-256 |
ca379a76e50898c18a9174604ee623bedde2dbc8b0e3eb84fe115532a2a92268
|
File details
Details for the file detquantlib-3.13.0-py3-none-any.whl.
File metadata
- Download URL: detquantlib-3.13.0-py3-none-any.whl
- Upload date:
- Size: 32.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.11.14 Linux/6.14.0-1017-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d828855deb5320be1637c15a2931c71ea78d702767dea7688e91a6f92f1fcc7b
|
|
| MD5 |
465d312d3644f145adf47e1ce68e23c6
|
|
| BLAKE2b-256 |
fe1e5bc17b0b16ae21f4c8d35fe80119321bae757b200a150e94752155a2ddd5
|