Skip to content

Commit 7cf2ae3

Browse files
authored
V6.0.3 (#27)
* V6.0.3 * V6.0.3 * V6.0.3 * V6.0.3 * V6.0.3 * V6.0.3 * V6.0.3 * V6.0.3 --------- Co-authored-by: ddc <ddc@users.noreply.github.com>
1 parent bba3fa5 commit 7cf2ae3

File tree

7 files changed

+75
-183
lines changed

7 files changed

+75
-183
lines changed

.github/PULL_REQUEST_TEMPLATE

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,29 @@
11
## Summary
2+
<!-- Brief description of what this PR does and why -->
23

3-
<!-- What is this pull request for? Does it fix any issues? -->
4+
## Changes Made
5+
<!-- List the key changes -->
6+
7+
## Type of Change
8+
- [ ] Bug fix
9+
- [ ] New feature
10+
- [ ] Breaking change (existing functionality affected)
11+
- [ ] Refactoring (no functional changes)
12+
- [ ] Documentation
13+
- [ ] CI/CD or build configuration
14+
- [ ] Dependencies update
15+
16+
## Testing
17+
- [ ] Unit tests added/updated
18+
- [ ] Integration tests added/updated
19+
- [ ] All existing tests pass
20+
- [ ] Manual testing performed
421

522
## Checklist
6-
- [ ] If code changes were made, then they have been tested
7-
- [ ] I have updated the documentation to reflect any changes made
8-
- [ ] I have thought about how this code may affect other services
9-
- [ ] This PR fixes an issue
10-
- [ ] This PR is a breaking change (e.g. method, parameters, env variables)
11-
- [ ] This PR adds something new (e.g. method, parameters, env variables)
12-
- [ ] This PR change unit and integration tests
13-
- [ ] This PR is **NOT** a code change (e.g. documentation, packages)
23+
- [ ] Code follows the project's style and conventions
24+
- [ ] Documentation updated (if applicable)
25+
- [ ] No new warnings or linter errors introduced
26+
- [ ] I have considered how this change may affect other services
1427

1528
## Reviewer
16-
- [ ] I understand that approving this code, I am also responsible for it going into the codebase
29+
- [ ] I understand that by approving this PR, I share responsibility for these changes

.github/workflows/workflow.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ jobs:
4242
run: uv python install ${{ matrix.python-version }}
4343

4444
- name: Install dependencies
45-
run: uv sync --locked --all-extras --dev
46-
shell: bash
45+
run: uv sync --locked --all-extras --group dev
4746

4847
- name: Run tests with coverage
4948
uses: nick-fields/retry@v3

README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@
88
<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>
99
<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>
1010
<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/pythonLogs.svg?style=plastic&logo=python&cacheSeconds=3600" alt="Python"/></a>
1611
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg?style=plastic" alt="License: MIT"/></a>
1712
<a href="https://pepy.tech/projects/pythonLogs"><img src="https://static.pepy.tech/badge/pythonLogs?style=plastic" alt="PyPI Downloads"/></a>
1813
<a href="https://pypi.python.org/pypi/pythonLogs"><img src="https://img.shields.io/pypi/v/pythonLogs.svg?style=plastic&logo=python&cacheSeconds=3600" alt="PyPi"/></a>
1914
<br>
15+
<a href="https://www.python.org/downloads"><img src="https://img.shields.io/pypi/pyversions/pythonLogs.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>
2019
<a href="https://github.com/ddc/pythonLogs/issues"><img src="https://img.shields.io/github/issues/ddc/pythonLogs?style=plastic" alt="issues"/></a>
2120
<a href="https://codecov.io/gh/ddc/pythonLogs"><img src="https://codecov.io/gh/ddc/pythonLogs/graph/badge.svg?token=XWB53034GI&style=plastic" alt="codecov"/></a>
2221
<a href="https://sonarcloud.io/dashboard?id=ddc_pythonLogs"><img src="https://sonarcloud.io/api/project_badges/measure?project=ddc_pythonLogs&metric=alert_status&style=plastic" alt="Quality Gate Status"/></a>
@@ -40,7 +39,7 @@
4039
- [Environment Variables](#env-variables-optional)
4140
- [Settings Cache Management](#settings-cache-management)
4241
- [Flexible Configuration Options](#flexible-configuration-options)
43-
- [Development](#development)
42+
- [Development and Testing](#development-and-testing)
4443
- [Create DEV Environment and Running Tests](#create-dev-environment-and-running-tests)
4544
- [Update DEV Environment Packages](#update-dev-environment-packages)
4645
- [Building Wheel](#building-wheel)
@@ -349,17 +348,15 @@ RotateWhen.MONDAY # "W0"
349348

350349

351350

352-
# Development
351+
# Development and Testing
353352

354353
Must have [UV](https://uv.run/docs/getting-started/installation) installed.
355354

356355
## Create DEV Environment and Running Tests
357356

358-
> **Note:** All poe tasks automatically run ruff linter along with Black formatting
359-
360357
```shell
361358
uv sync --all-extras --all-groups
362-
poe test
359+
poe tests
363360
```
364361

365362

pyproject.toml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ packages = ["pythonLogs"]
1313

1414
[project]
1515
name = "pythonLogs"
16-
version = "6.0.2"
16+
version = "6.0.3"
1717
description = "High-performance Python logging library with file rotation and optimized caching for better performance"
1818
urls.Repository = "https://github.com/ddc/pythonLogs"
1919
urls.Homepage = "https://pypi.org/project/pythonLogs"
2020
license = {text = "MIT"}
2121
readme = "README.md"
2222
authors = [
23-
{name = "Daniel Costa", email = "ddcsoftwares@proton.me"},
23+
{name = "Daniel Costa", email = "daniel@ddcsoftwares.com"},
2424
]
2525
maintainers = [
2626
{name = "Daniel Costa"},
@@ -53,20 +53,19 @@ dependencies = [
5353
dev = [
5454
"psutil>=7.2.2",
5555
"pytest-cov>=7.0.0",
56-
"poethepoet>=0.41.0",
57-
"ruff>=0.15.0",
58-
"black>=26.1.0",
56+
"poethepoet>=0.42.0",
57+
"ruff>=0.15.2",
5958
]
6059

6160
[tool.poe.tasks]
62-
linter.shell = "uv run ruff check --fix . && uv run black ."
63-
profile.sequence = ["linter", {shell = "uv run python -m cProfile -o cprofile_unit.prof -m pytest --no-cov"}]
64-
test.sequence = ["linter", {shell = "uv run pytest"}]
61+
linter.shell = "uv run ruff check --fix . && uv run ruff format ."
62+
profile = "uv run python -m cProfile -o cprofile_unit.prof -m pytest --no-cov"
63+
tests.sequence = ["linter", {shell = "uv run pytest"}]
6564
updatedev.sequence = ["linter", {shell = "uv lock --upgrade && uv sync --all-extras --group dev"}]
66-
build.sequence = ["updatedev", "test", {shell = "uv build --wheel"}]
65+
build.sequence = ["updatedev", "tests", {shell = "uv build --wheel"}]
6766

6867
[tool.pytest.ini_options]
69-
addopts = "-v --cov --cov-report=term --cov-report=xml --junitxml=junit.xml"
68+
addopts = "-v --import-mode=importlib --cov --cov-report=term --cov-report=xml --junitxml=junit.xml"
7069
junit_family = "legacy"
7170
testpaths = ["tests"]
7271
markers = [
@@ -95,10 +94,6 @@ exclude_lines = [
9594
"@(abc\\.)?abstractmethod",
9695
]
9796

98-
[tool.black]
99-
line-length = 120
100-
skip-string-normalization = true
101-
10297
[tool.ruff]
10398
line-length = 120
10499
target-version = "py311"

pythonLogs/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
__title__ = "pythonLogs"
1818
__author__ = "Daniel Costa"
19-
__email__ = "ddcsoftwares@proton.me"
19+
__email__ = "daniel@ddcsoftwares.com"
2020
__license__ = "MIT"
2121
__copyright__ = "Copyright 2024-present DDC Softwares"
2222
__version__ = version(__title__)

tests/thread_safety/test_thread_safety.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,9 @@ def stress_worker():
240240
# Just verify it has at least some loggers and doesn't exceed the total
241241
registry = LoggerFactory.get_registered_loggers()
242242
assert len(registry) > 0, "Registry should have at least one logger"
243-
assert len(registry) <= len(
244-
logger_names
245-
), f"Registry has {len(registry)} loggers, expected at most {len(logger_names)}"
243+
assert len(registry) <= len(logger_names), (
244+
f"Registry has {len(registry)} loggers, expected at most {len(logger_names)}"
245+
)
246246

247247
# Verify that loggers in the registry are from our expected set
248248
for logger_name in registry.keys():
@@ -375,9 +375,9 @@ def _verify_thread_results(self, thread_results, num_threads):
375375
"""Helper to verify all thread results are successful."""
376376
for worker_id in range(num_threads):
377377
assert worker_id in thread_results
378-
assert (
379-
"error" not in thread_results[worker_id]
380-
), f"Thread {worker_id} failed: {thread_results[worker_id].get('error')}"
378+
assert "error" not in thread_results[worker_id], (
379+
f"Thread {worker_id} failed: {thread_results[worker_id].get('error')}"
380+
)
381381
assert "messages" in thread_results[worker_id]
382382
assert len(thread_results[worker_id]["messages"]) == 10
383383

0 commit comments

Comments
 (0)