# Test Common Utils
A collection of common utilities including a configurable logger with type hints and Pydantic integration.
## Installation
You can install this package directly from GitHub using pip:
```bash
pip install git+https://github.com/YOUR_USERNAME/test-common-utils.git
```
Or add it to your project's requirements.txt:
```
git+https://github.com/YOUR_USERNAME/test-common-utils.git
```
To install a specific version:
```bash
pip install git+https://github.com/YOUR_USERNAME/test-common-utils.git@v0.1.2
```
## Usage
### Logger
```python
from test_common_utils.utils import create_logger
# Basic usage
logger = create_logger(name="my_app")
logger.info("Hello, world!")
# Custom configuration
logger = create_logger(
name="my_app",
level="DEBUG",
format="%(asctime)s - %(levelname)s - %(message)s"
)
```
## Development
To set up the development environment:
```bash
# Clone the repository
git clone https://github.com/YOUR_USERNAME/test-common-utils.git
cd test-common-utils
# Install with development dependencies
pip install -e ".[dev]"
```
### Running Tests
```bash
pytest
```
### Code Quality
```bash
# Format code
black .
# Lint code
ruff check .
# Type check
mypy src tests
```
### Version Management
To bump the version:
```bash
# Bump patch version (0.1.0 -> 0.1.1)
./scripts/bump_version.py patch
# Bump minor version (0.1.0 -> 0.2.0)
./scripts/bump_version.py minor
# Bump major version (0.1.0 -> 1.0.0)
./scripts/bump_version.py major
```
### CI/CD
The project uses GitHub Actions for:
- Running tests on Python 3.8, 3.9, 3.10, and 3.11
- Code quality checks (black, ruff, mypy)
- Automatic publishing to PyPI when a version tag is pushed
To release a new version:
1. Bump the version using the script
2. Push the changes and tags
3. The CI/CD pipeline will automatically publish to PyPI
Raw data
{
"_id": null,
"home_page": null,
"name": "test-common-utils",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "fastapi, logging, pydantic, utilities",
"author": null,
"author_email": "Your Name <your.email@example.com>",
"download_url": "https://files.pythonhosted.org/packages/46/52/86de2fa9c78e2b96fa921eef816fc855cd88b38ee8f4aaa0e2c44bd8c382/test_common_utils-0.1.2.tar.gz",
"platform": null,
"description": "# Test Common Utils\n\nA collection of common utilities including a configurable logger with type hints and Pydantic integration.\n\n## Installation\n\nYou can install this package directly from GitHub using pip:\n\n```bash\npip install git+https://github.com/YOUR_USERNAME/test-common-utils.git\n```\n\nOr add it to your project's requirements.txt:\n\n```\ngit+https://github.com/YOUR_USERNAME/test-common-utils.git\n```\n\nTo install a specific version:\n\n```bash\npip install git+https://github.com/YOUR_USERNAME/test-common-utils.git@v0.1.2\n```\n\n## Usage\n\n### Logger\n\n```python\nfrom test_common_utils.utils import create_logger\n\n# Basic usage\nlogger = create_logger(name=\"my_app\")\nlogger.info(\"Hello, world!\")\n\n# Custom configuration\nlogger = create_logger(\n name=\"my_app\",\n level=\"DEBUG\",\n format=\"%(asctime)s - %(levelname)s - %(message)s\"\n)\n```\n\n## Development\n\nTo set up the development environment:\n\n```bash\n# Clone the repository\ngit clone https://github.com/YOUR_USERNAME/test-common-utils.git\ncd test-common-utils\n\n# Install with development dependencies\npip install -e \".[dev]\"\n```\n\n### Running Tests\n\n```bash\npytest\n```\n\n### Code Quality\n\n```bash\n# Format code\nblack .\n\n# Lint code\nruff check .\n\n# Type check\nmypy src tests\n```\n\n### Version Management\n\nTo bump the version:\n\n```bash\n# Bump patch version (0.1.0 -> 0.1.1)\n./scripts/bump_version.py patch\n\n# Bump minor version (0.1.0 -> 0.2.0)\n./scripts/bump_version.py minor\n\n# Bump major version (0.1.0 -> 1.0.0)\n./scripts/bump_version.py major\n```\n\n### CI/CD\n\nThe project uses GitHub Actions for:\n- Running tests on Python 3.8, 3.9, 3.10, and 3.11\n- Code quality checks (black, ruff, mypy)\n- Automatic publishing to PyPI when a version tag is pushed\n\nTo release a new version:\n1. Bump the version using the script\n2. Push the changes and tags\n3. The CI/CD pipeline will automatically publish to PyPI ",
"bugtrack_url": null,
"license": "MIT",
"summary": "Common utilities using FastAPI and Pydantic",
"version": "0.1.2",
"project_urls": {
"Documentation": "https://github.com/YOUR_USERNAME/test-common-utils#readme",
"Homepage": "https://github.com/YOUR_USERNAME/test-common-utils",
"Issues": "https://github.com/YOUR_USERNAME/test-common-utils/issues",
"Repository": "https://github.com/YOUR_USERNAME/test-common-utils.git"
},
"split_keywords": [
"fastapi",
" logging",
" pydantic",
" utilities"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "52007abd367b690a65f3657cac4589fd8f646114a6331719c778effdbd06ae85",
"md5": "596409bb10545642bdade18527a2ebc5",
"sha256": "00391f6b9cc8a80de43d91b5a9c773f7e943d56eb9ca230dfd4ebbe52034ed0d"
},
"downloads": -1,
"filename": "test_common_utils-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "596409bb10545642bdade18527a2ebc5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 2037,
"upload_time": "2024-12-27T17:42:30",
"upload_time_iso_8601": "2024-12-27T17:42:30.116267Z",
"url": "https://files.pythonhosted.org/packages/52/00/7abd367b690a65f3657cac4589fd8f646114a6331719c778effdbd06ae85/test_common_utils-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "465286de2fa9c78e2b96fa921eef816fc855cd88b38ee8f4aaa0e2c44bd8c382",
"md5": "6e4a8ce86532d0c0a53c29a92388bbc0",
"sha256": "7a83ab6524145bfa07f9aa5ee2912879637fb0259e7497b9aefb939213dadcf4"
},
"downloads": -1,
"filename": "test_common_utils-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "6e4a8ce86532d0c0a53c29a92388bbc0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 2845,
"upload_time": "2024-12-27T17:42:34",
"upload_time_iso_8601": "2024-12-27T17:42:34.983254Z",
"url": "https://files.pythonhosted.org/packages/46/52/86de2fa9c78e2b96fa921eef816fc855cd88b38ee8f4aaa0e2c44bd8c382/test_common_utils-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-27 17:42:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "YOUR_USERNAME",
"github_project": "test-common-utils#readme",
"github_not_found": true,
"lcname": "test-common-utils"
}