Query Testing framework
Project description
ShreQT
⢀⡴⠑⡄⠀⠀⠀⠀⠀⠀⠀⣀⣀⣤⣤⣤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠸⡇⠀⠿⡀⠀⠀⠀⣀⡴⢿⣿⣿⣿⣿⣿⣿⣿⣷⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠑⢄⣠⠾⠁⣀⣄⡈⠙⣿⣿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⢀⡀⠁⠀⠀⠈⠙⠛⠂⠈⣿⣿⣿⣿⣿⠿⡿⢿⣆⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⢀⡾⣁⣀⠀⠴⠂⠙⣗⡀⠀⢻⣿⣿⠭⢤⣴⣦⣤⣹⠀⠀⠀⢀⢴⣶⣆
⠀⠀⢀⣾⣿⣿⣿⣷⣮⣽⣾⣿⣥⣴⣿⣿⡿⢂⠔⢚⡿⢿⣿⣦⣴⣾⠁⠸⣼⡿
⠀⢀⡞⠁⠙⠻⠿⠟⠉⠀⠛⢹⣿⣿⣿⣿⣿⣌⢤⣼⣿⣾⣿⡟⠉⠀⠀⠀⠀⠀
⠀⣾⣷⣶⠇⠀⠀⣤⣄⣀⡀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀ Tests have layers
⠀⠉⠈⠉⠀⠀⢦⡈⢻⣿⣿⣿⣶⣶⣶⣶⣤⣽⡹⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀ Ogres have layers
⠀⠀⠀⠀⠀⠀⠀⠉⠲⣽⡻⢿⣿⣿⣿⣿⣿⣿⣷⣜⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀ ~ Anonymous
⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣷⣶⣮⣭⣽⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⣀⣀⣈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠻⠿⠿⠿⠿⠛⠉
Overview
Query testing framework.
Currently supports only Exasol DB.
This project uses Poetry for dependency management and packaging.
Development
To setup your virtual environment run the following command. The default location for poetry venvs is ~/Library/Caches/pypoetry/virtualenvs
poetry install
To run tests and lint checks:
make checks
To format on all files:
make fmt
Usage
Prequisite
Currently we only support Exasol connections. To run local instance of Exasol as docker container run:
docker run -p 8999:8888 --detach --privileged --stop-timeout 120 exasol/docker-db:6.0.13-d1
(MacOS) Keep in mind that Exasol is memory-heavy and you need to increase docker memory limit to at least 4GB
Credentials
ShreQT uses following environment variables to connect to database.
Variable | Default Value |
---|---|
SHREQT_DSN | localhost:8999 |
SHREQT_USER | sys |
SHREQT_PASS | exasol |
Example
The example
directory contains simple example which illustrates the example usage.
conftest.py
includes simple User schema and code which sets up the database for test session.example.py
includes a tested function.example_test.py
include example test function.
You can run the example with:
make run-example
Build && Deploy
Setup ~/.pypirc
with credentials.
Run checks and build package:
make build
Deploy package to pypi using poetry:
make deploy
TODO
- Automate deployment step with travis
- Decorator functionality for temporary layer
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
File details
Details for the file shreqt-0.6.2.tar.gz
.
File metadata
- Download URL: shreqt-0.6.2.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 318a9f99a7c6f5be65e21b1cf7182d812dccedc64588d38d8cb91eee696c91bc |
|
MD5 | a5f13dc8b2d37bed796a97f024cf341a |
|
BLAKE2b-256 | cd6b69fec0cedda8df41de755e5d01357669c0beedec9d9912b3ccb65e43ef7e |
File details
Details for the file shreqt-0.6.2-py3-none-any.whl
.
File metadata
- Download URL: shreqt-0.6.2-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 915ec49ffa485cbf72e5eb0cb2a7847f5c92153c0ea91b3b23af9dc78c0e74dc |
|
MD5 | 99335910ef241bb284f228e6221c52ac |
|
BLAKE2b-256 | 230f9043c6591954b17e309bb196aa8bca62325e73cff914e73cb8a66e5d894d |