Python client for running CAT tests in a Python codebase
Project description
CAT Test Framework - Python Version
This project implements the CAT (Continuous Alignment Testing) framework for Python, providing tools for recording and validating test experiments with confidence levels.
Prerequisites
- Python 3.13 or higher
- Poetry for dependency management
Installation
-
Clone the repository
-
Install dependencies with Poetry:
poetry install
Development
Running Tests
Run all tests:
poetry run pytest
Run tests with output:
poetry run pytest -v
Code Quality
# Format code
poetry run black .
# Check style
poetry run flake8 src tests
# Type checking
poetry run mypy .
Project Structure
src/cat_python/cat.py: Main CAT implementation with core functionalitysrc/cat_python/db.py: Database utilities and connection managementsrc/cat_python/types.py: Shared type definitions and interfacestests/: Test suite using pytestconftest.py: Common test fixturessrc/cat/test_cat.py: Test implementations
pyproject.toml: Project configuration and dependencies
Implementation Notes
This is an alpha version converted from the TypeScript implementation. The main differences include:
- Use of Python's type hints instead of TypeScript types
- Async/await implementation using Python's native coroutines
- SQLite integration using Python's built-in sqlite3 module
- Testing with pytest instead of Jest
- Context managers for resource management
- Poetry for dependency management and project configuration
How to Publish this Library
- set up your api key
poetry config pypi-token.pypi YOUR_PYPI_TOKEN - run
poetry publish --build
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 catest-0.0.1a0.tar.gz.
File metadata
- Download URL: catest-0.0.1a0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.13.1 Darwin/24.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75626ca2dd2f3b2a68d33b04f7ce2a727ebaf2e68439590436938f5a5f35c3f1
|
|
| MD5 |
a2a29b9ce00a266acbdae6542379297b
|
|
| BLAKE2b-256 |
3d3b1b2957d3e366cf17ba0ed3bab5433971eee7f9bd8c2c388363effaf17dd6
|
File details
Details for the file catest-0.0.1a0-py3-none-any.whl.
File metadata
- Download URL: catest-0.0.1a0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.13.1 Darwin/24.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67a6ef79ba21aaf33ec8ba611b77d4dd84c3b215267c5a01e18f8680f38fe6c4
|
|
| MD5 |
3d63cf6ec23cc31cbd170975b63f1f77
|
|
| BLAKE2b-256 |
047225e6b44fd073f6685257b44f0c470d2c15544aced51616487bbe677dd2ca
|