Skip to content

[DRAFT] Logging#95

Draft
pfouque wants to merge 2 commits intomainfrom
logging_freshstart
Draft

[DRAFT] Logging#95
pfouque wants to merge 2 commits intomainfrom
logging_freshstart

Conversation

@pfouque
Copy link
Copy Markdown
Member

@pfouque pfouque commented Jan 28, 2026

Description

Inspired by discussion in #47 and the awesome work of @ticosax I drafted this solution (using codex).
It's probably not perfect but gives us a good support to discuss the target and the path to migrate.
As discussed previously, I'd like to kill 2 birds with one rock and make it possible to store all logs in a single table or having a dedicated table for each model to track.
I kept the centralized table (and its GenericForeignKey) but it's providing a "Bring your own model" where you can have a strong foreignkey.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Other (no functional changes)

Checklist

  • I have read the CONTRIBUTING.md guide
  • Tests added/updated for the changes
  • All tests pass locally (uv run pytest or pytest)
  • Linting passes (uv run ruff check .)
  • Documentation updated (if applicable)
  • CHANGELOG.rst updated (for user-facing changes)

Testing

# Commands used to test
uv run pytest tests/test_xxx.py -v

Related Issues

@pfouque pfouque changed the base branch from main to mypy_level_1 January 28, 2026 17:02
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 28, 2026

Codecov Report

❌ Patch coverage is 99.18033% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
django_fsm/log.py 96.77% 1 Missing ⚠️
Files with missing lines Coverage Δ
django_fsm/__init__.py 95.58% <100.00%> (+0.28%) ⬆️
django_fsm/admin.py 99.44% <100.00%> (-0.56%) ⬇️
django_fsm/apps.py 100.00% <100.00%> (ø)
django_fsm/migrations/0001_initial.py 100.00% <100.00%> (ø)
django_fsm/models.py 100.00% <100.00%> (ø)
django_fsm/log.py 96.77% <96.77%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pfouque pfouque force-pushed the logging_freshstart branch from f6a1cae to cf152b5 Compare January 29, 2026 08:55
@RemiDesgrange
Copy link
Copy Markdown

I won't comment on the code in model directly (looks clean, but I've only looked at it)

But the track decorator is a clean and wonderful idea ! Nice job.

@pfouque
Copy link
Copy Markdown
Member Author

pfouque commented Jan 29, 2026

But the track decorator is a clean and wonderful idea ! Nice job.

Congrats need to be addressed to pg-history! 😉

@pfouque pfouque force-pushed the logging_freshstart branch from cf152b5 to e74e29a Compare January 29, 2026 13:37
@pfouque pfouque changed the title [DRAFT] Logging freshstart [DRAFT] Logging Feb 2, 2026
@pfouque pfouque force-pushed the mypy_level_1 branch 6 times, most recently from 6f5e624 to dde82e8 Compare February 4, 2026 16:17
Base automatically changed from mypy_level_1 to main February 4, 2026 17:33
@pfouque pfouque force-pushed the logging_freshstart branch 3 times, most recently from 7e4a599 to fb7e406 Compare March 9, 2026 06:13
@pfouque pfouque force-pushed the logging_freshstart branch 2 times, most recently from 6ce4d04 to ab48e4a Compare March 18, 2026 12:32
@pfouque pfouque force-pushed the logging_freshstart branch from ab48e4a to 6445960 Compare March 27, 2026 18:55
@pfouque pfouque force-pushed the logging_freshstart branch from 6445960 to dbaf35c Compare March 29, 2026 17:11
@pfouque pfouque marked this pull request as draft March 29, 2026 17:26
@pfouque pfouque force-pushed the logging_freshstart branch 2 times, most recently from e8f3e21 to 7fb68f7 Compare March 29, 2026 18:36
@pfouque pfouque force-pushed the logging_freshstart branch from 7fb68f7 to 5e9ae42 Compare March 29, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants