Skip to main content

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 DetDatabase
    • from detquantlib.data.databases.detdatabase import DetDatabase
  • Entsoe:
    • from detquantlib.data import Entsoe
    • from detquantlib.data.entsoe.entsoe import Entsoe
  • Sftp:
    • from detquantlib.data import Sftp
    • from detquantlib.data.sftp.sftp import Sftp

Configuration

Dependencies

Dependency manager

Project dependencies are managed by Poetry.

The project follows the standard Poetry structure:

detquantlib
├── pyproject.toml
├── README.md
├── detquantlib
│   └── __init__.py
└── tests
    └── __init__.py

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:

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 version field 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:
    • X increments represent major, non-backward compatible updates.
    • Y increments represent minor, backward compatible functionality updates.
    • Z increments 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

detquantlib-3.0.1.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

detquantlib-3.0.1-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file detquantlib-3.0.1.tar.gz.

File metadata

  • Download URL: detquantlib-3.0.1.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.11.12 Linux/6.8.0-1021-azure

File hashes

Hashes for detquantlib-3.0.1.tar.gz
Algorithm Hash digest
SHA256 11d2e435cd43896956e465a78a4ecbff699ab271f428a061e5d441e235f2569b
MD5 8f5d30eac97129cf345ff1361c0fa8a3
BLAKE2b-256 9168df332479445c086683b1d75b2f7bc1da3add1ef679372664a2769a0fb6ee

See more details on using hashes here.

File details

Details for the file detquantlib-3.0.1-py3-none-any.whl.

File metadata

  • Download URL: detquantlib-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.11.12 Linux/6.8.0-1021-azure

File hashes

Hashes for detquantlib-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 68f320691b4a1b62f00cce40124c67be792bd6c7930939c2c5467c87a50ceb48
MD5 b3581026647d8023ffc128242ec9e9f4
BLAKE2b-256 24b9628d865c6dfaf8f3aa11be5e95f9508e7156e7d4addd26cb3e13c1014659

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page