|
8 | 8 | <a href="https://www.paypal.com/ncp/payment/6G9Z78QHUD4RJ"><img src="https://img.shields.io/badge/Donate-PayPal-brightgreen.svg?style=plastic" alt="Donate"/></a> |
9 | 9 | <a href="https://github.com/sponsors/ddc"><img src="https://img.shields.io/static/v1?style=plastic&label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=ff69b4" alt="Sponsor"/></a> |
10 | 10 | <br> |
11 | | - <a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg?style=plastic" alt="Code style: black"/></a> |
12 | | - <a href="https://github.com/astral-sh/uv"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json?style=plastic" alt="uv"/></a> |
13 | | - <a href="https://github.com/astral-sh/ruff"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json?style=plastic" alt="Ruff"/></a> |
14 | | - <br> |
15 | | - <a href="https://www.python.org/downloads"><img src="https://img.shields.io/pypi/pyversions/ddcDatabases.svg?style=plastic&logo=python&cacheSeconds=3600" alt="Python"/></a> |
16 | 11 | <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg?style=plastic" alt="License: MIT"/></a> |
17 | 12 | <a href="https://pepy.tech/projects/ddcDatabases"><img src="https://static.pepy.tech/badge/ddcDatabases?style=plastic" alt="PyPI Downloads"/></a> |
18 | 13 | <a href="https://pypi.python.org/pypi/ddcDatabases"><img src="https://img.shields.io/pypi/v/ddcDatabases.svg?style=plastic&logo=python&cacheSeconds=3600" alt="PyPi"/></a> |
19 | 14 | <br> |
| 15 | + <a href="https://www.python.org/downloads"><img src="https://img.shields.io/pypi/pyversions/ddcDatabases.svg?style=plastic&logo=python&cacheSeconds=3600" alt="Python"/></a> |
| 16 | + <a href="https://github.com/astral-sh/uv"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json?style=plastic" alt="uv"/></a> |
| 17 | + <a href="https://github.com/astral-sh/ruff"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json?style=plastic" alt="Ruff"/></a> |
| 18 | + <br> |
20 | 19 | <a href="https://github.com/ddc/ddcDatabases/issues"><img src="https://img.shields.io/github/issues/ddc/ddcDatabases?style=plastic" alt="issues"/></a> |
21 | 20 | <a href="https://codecov.io/gh/ddc/ddcDatabases"><img src="https://codecov.io/gh/ddc/ddcDatabases/graph/badge.svg?token=XWB53034GI&style=plastic" alt="codecov"/></a> |
22 | 21 | <a href="https://sonarcloud.io/dashboard?id=ddc_ddcDatabases"><img src="https://sonarcloud.io/api/project_badges/measure?project=ddc_ddcDatabases&metric=alert_status&style=plastic" alt="Quality Gate Status"/></a> |
|
48 | 47 | - [Database Utilities](#database-utilities) |
49 | 48 | - [Available Methods](#available-methods) |
50 | 49 | - [Logging](#logging) |
51 | | -- [Development](#development) |
| 50 | +- [Development and Testing](#development-and-testing) |
52 | 51 | - [Create DEV Environment and Running Tests](#create-dev-environment-and-running-tests) |
53 | 52 | - [Update DEV Environment Packages](#update-dev-environment-packages) |
54 | 53 | - [Building Wheel](#building-wheel) |
|
89 | 88 |
|
90 | 89 | Database classes use structured configuration dataclasses instead of flat keyword arguments: |
91 | 90 |
|
92 | | -| Class | Purpose | Fields | |
93 | | -|------------------------------|---------------------------------|-------------------------------------------------------------------------------------| |
94 | | -| `{DB}PoolConfig` | Connection pool settings | `pool_size`, `max_overflow`, `pool_recycle`, `connection_timeout` | |
95 | | -| `{DB}SessionConfig` | SQLAlchemy session settings | `echo`, `autoflush`, `expire_on_commit`, `autocommit` | |
96 | | -| `{DB}ConnectionRetryConfig` | Connection-level retry settings | `enable_retry`, `max_retries`, `initial_retry_delay`, `max_retry_delay` | |
97 | | -| `{DB}OperationRetryConfig` | Operation-level retry settings | `enable_retry`, `max_retries`, `initial_retry_delay`, `max_retry_delay`, `jitter` | |
98 | | -| `PersistentConnectionConfig` | Persistent connection settings | `idle_timeout`, `health_check_interval`, `auto_reconnect` | |
| 91 | +| Class | Purpose | Fields | |
| 92 | +|------------------------------|---------------------------------|-----------------------------------------------------------------------------------| |
| 93 | +| `{DB}PoolConfig` | Connection pool settings | `pool_size`, `max_overflow`, `pool_recycle`, `connection_timeout` | |
| 94 | +| `{DB}SessionConfig` | SQLAlchemy session settings | `echo`, `autoflush`, `expire_on_commit`, `autocommit` | |
| 95 | +| `{DB}ConnectionRetryConfig` | Connection-level retry settings | `enable_retry`, `max_retries`, `initial_retry_delay`, `max_retry_delay` | |
| 96 | +| `{DB}OperationRetryConfig` | Operation-level retry settings | `enable_retry`, `max_retries`, `initial_retry_delay`, `max_retry_delay`, `jitter` | |
| 97 | +| `PersistentConnectionConfig` | Persistent connection settings | `idle_timeout`, `health_check_interval`, `auto_reconnect` | |
99 | 98 |
|
100 | 99 | **Note:** Replace `{DB}` with the database prefix: `PostgreSQL`, `MySQL`, `MSSQL`, `Oracle`, `MongoDB`, or `Sqlite`. |
101 | 100 |
|
@@ -689,18 +688,15 @@ logging.getLogger("ddcDatabases").addHandler(logging.StreamHandler()) |
689 | 688 | ``` |
690 | 689 |
|
691 | 690 |
|
692 | | -# Development |
| 691 | +# Development and Testing |
693 | 692 |
|
694 | 693 | Must have [UV](https://uv.run/docs/getting-started/installation) installed. |
695 | 694 |
|
696 | 695 | ## Create DEV Environment and Running Tests |
697 | 696 |
|
698 | | -> **Note:** All poe tasks automatically run ruff linter along with Black formatting |
699 | | -
|
700 | 697 | ```shell |
701 | 698 | uv sync --all-extras --all-groups |
702 | | -poe test |
703 | | -poe test-integration |
| 699 | +poe tests |
704 | 700 | ``` |
705 | 701 |
|
706 | 702 | ## Update DEV Environment Packages |
|
0 commit comments