Skip to content
Open
Show file tree
Hide file tree
Changes from 149 commits
Commits
Show all changes
859 commits
Select commit Hold shift + click to select a range
496e3a8
feat: add initial database schema migration
kzndotsh Nov 10, 2025
78856cf
feat: implement modular configuration management system
kzndotsh Nov 10, 2025
513ac53
feat: enhance documentation and restructure configuration references
kzndotsh Nov 10, 2025
3d2e06b
chore: update dependencies in configuration files
kzndotsh Nov 10, 2025
8118397
feat: add comprehensive database and tech stack documentation
kzndotsh Nov 10, 2025
cade91d
feat: update documentation structure and enhance content clarity
kzndotsh Nov 10, 2025
c526f3a
feat: add new features to user documentation
kzndotsh Nov 10, 2025
4e23b04
feat: expand user documentation structure in SUMMARY.md
kzndotsh Nov 10, 2025
d70c627
feat: enhance documentation layout and content clarity
kzndotsh Nov 10, 2025
2d5fd0e
feat: restructure documentation for improved navigation and clarity
kzndotsh Nov 10, 2025
efbb2e3
refactor: remove unused columns from Guild model and migration script
kzndotsh Nov 10, 2025
8b9b7a1
feat: update TuxApp run methods to return exit codes
kzndotsh Nov 10, 2025
caa1fa1
fix: improve error handling in emoji cache initialization
kzndotsh Nov 10, 2025
7261045
fix: clean up whitespace and improve Markdown file handling
kzndotsh Nov 10, 2025
ce7e6ce
chore: update commitlint configuration for improved commit message st…
kzndotsh Nov 10, 2025
b9debc8
feat: add initial database schema migration for guild management
kzndotsh Nov 10, 2025
a36cdce
feat: enhance CLI options for database and development commands
kzndotsh Nov 10, 2025
64e60f1
chore: update volume mounts in Docker Compose configuration
kzndotsh Nov 10, 2025
f6a57a5
chore: remove unused configuration files and update versioning
kzndotsh Nov 10, 2025
83f60b0
chore: remove adminer theme CSS file
kzndotsh Nov 10, 2025
66a77b2
docs: update README to enhance feature descriptions and add new sections
kzndotsh Nov 10, 2025
aaed755
docs: streamline README content and enhance feature descriptions
kzndotsh Nov 10, 2025
7699788
docs: update README for clarity and accuracy in licensing information
kzndotsh Nov 10, 2025
8bffcdc
docs: clean up ai-generated inaccuracies
electron271 Nov 11, 2025
16e6fa1
docs: add best practices for namespace packages and __all__ declaration
kzndotsh Nov 11, 2025
a1461ab
docs: update core concepts documentation for clarity and structure
kzndotsh Nov 11, 2025
a79556d
docs: reorganize developer guides and remove outdated content
kzndotsh Nov 11, 2025
f34ef9a
docs: update tutorials section with new content and structure
kzndotsh Nov 11, 2025
dcbf9c1
docs: enhance content structure and styling in partials
kzndotsh Nov 11, 2025
6de3df7
chore: update project configuration and improve error handling
kzndotsh Nov 11, 2025
caa03b1
docs: update developer index and enhance documentation structure
kzndotsh Nov 11, 2025
8fb7aa2
docs: update best practices documentation for async programming, cach…
kzndotsh Nov 11, 2025
8c1b26f
chore: update pre-commit configuration by removing pyupgrade hook
kzndotsh Nov 11, 2025
b48d3e9
chore: remove deployment workflow template from GitHub Actions
kzndotsh Nov 11, 2025
572f26c
docs: update tutorials with new content and structure
kzndotsh Nov 11, 2025
b97c777
docs: enhance README and update package versions in uv.lock
kzndotsh Nov 11, 2025
f0d455e
chore: update CHANGELOG with comprehensive feature and system enhance…
kzndotsh Nov 11, 2025
9eab851
docs: update issue templates for bug and feature reports
kzndotsh Nov 11, 2025
cdb9ca7
docs: enhance contributing guidelines with detailed workflows and set…
kzndotsh Nov 11, 2025
9115389
docs: improve pull request template for clarity and organization
kzndotsh Nov 11, 2025
4faf723
chore: update Renovate configuration for enhanced dependency management
kzndotsh Nov 11, 2025
dfca134
docs: update security contact information in SECURITY.md
kzndotsh Nov 11, 2025
0403e7d
chore: enhance Renovate configuration and pre-commit setup
kzndotsh Nov 11, 2025
560830c
fix: update working directory for build command in wrangler.toml
kzndotsh Nov 11, 2025
cd567b9
docs: update background color in mkdocs configuration
kzndotsh Nov 11, 2025
7ebb3ba
docs: update wrangler.toml for static asset configuration and build c…
kzndotsh Nov 12, 2025
9279b61
docs: update asset paths in mkdocs.yml and wrangler.toml
kzndotsh Nov 12, 2025
1758527
docs: refine mkdocs.yml and wrangler.toml configurations
kzndotsh Nov 12, 2025
f381d66
docs: update mkdocs.yml and material.css for consistency and readability
kzndotsh Nov 12, 2025
5097611
docs: update mkdocs.yml and content structure for improved navigation…
kzndotsh Nov 12, 2025
b47ec0d
docs: enhance documentation structure and update mkdocs.yml for bette…
kzndotsh Nov 12, 2025
66be9eb
docs: update database configuration documentation for clarity and com…
kzndotsh Nov 12, 2025
25ce381
docs: rename configuration title for clarity in self-host documentation
kzndotsh Nov 12, 2025
eafe3b1
docs: add comprehensive database installation guide for PostgreSQL 17+
kzndotsh Nov 12, 2025
66ffe99
docs: add database section to installation guide in SUMMARY.md
kzndotsh Nov 12, 2025
c155894
docs: enhance Docker installation instructions in self-host guide
kzndotsh Nov 12, 2025
394cb89
docs: update systemd installation guide for Tux
kzndotsh Nov 12, 2025
90a4d38
docs: streamline database configuration guide for Tux
kzndotsh Nov 12, 2025
b6f46cf
docs: update systemd installation instructions for Tux
kzndotsh Nov 12, 2025
fa29ba8
docs: add Admin Guide and update self-host management documentation
kzndotsh Nov 12, 2025
30d64f4
docs: add Logs section to Admin configuration in SUMMARY.md
kzndotsh Nov 12, 2025
b1bc01c
docs: update SUMMARY.md for improved navigation
kzndotsh Nov 12, 2025
2bba375
docs: restructure documentation for improved clarity and navigation
kzndotsh Nov 12, 2025
e8d19b9
docs: enhance navigation and structure in self-host and user document…
kzndotsh Nov 12, 2025
2d72e22
refactor: update method calls for building ranks mode in modals
kzndotsh Nov 12, 2025
5967dbf
docs: update getting started guide for improved clarity and navigation
kzndotsh Nov 12, 2025
08d67fd
refactor: improve type hinting and circular import handling in databa…
kzndotsh Nov 12, 2025
40adcde
fix(docs): fix navbar css on mobile
electron271 Nov 12, 2025
f4c40d3
fix(docs): fix backlink urls
electron271 Nov 12, 2025
345e6ce
fix(docs): improve card formatting on mobile
electron271 Nov 12, 2025
be96f38
docs: add new community section
electron271 Nov 12, 2025
f38d8e6
docs: improve requirements accuracy
electron271 Nov 12, 2025
5da8cbf
refactor: streamline command permission management and update user gu…
kzndotsh Nov 12, 2025
af07bc4
docs: update command permission guidance in permission system documen…
kzndotsh Nov 12, 2025
d9a1e70
feat: enhance copy page as Markdown functionality
kzndotsh Nov 13, 2025
3b24a6b
style: enhance layout stability and typography in CSS
kzndotsh Nov 13, 2025
f83fd52
feat: add MkDocs SBOM plugin and update dependencies
kzndotsh Nov 13, 2025
64b2f6e
docs: update documentation for Software Bill of Materials and depende…
kzndotsh Nov 13, 2025
f5a5863
docs: add troubleshooting section to reference documentation
kzndotsh Nov 13, 2025
78b19d4
docs: add "Work in Progress" notices to getting started sections
kzndotsh Nov 13, 2025
d550ce9
docs: update best practices documentation with "Work in Progress" not…
kzndotsh Nov 13, 2025
a52da33
docs: enhance navigation and auto-indexing features
kzndotsh Nov 13, 2025
53f2d0a
docs: refine auto-index plugin functionality and configuration
kzndotsh Nov 13, 2025
02d10e0
docs: temporarily disable push and pull_request triggers in workflow
kzndotsh Nov 13, 2025
0e6b1c3
docs: update index and navigation structure, add sitemap, and enhance…
kzndotsh Nov 13, 2025
9f2da7b
chore(pre-commit): comment out renovatebot hooks
kzndotsh Nov 15, 2025
be53f24
docs: branch naming conventions
ayrudev Nov 14, 2025
e0c8799
docs: fixed self-introduced typo in git.md
ayrudev Nov 14, 2025
ae7cffb
docs: improve branch naming and git best practices documentation
kzndotsh Nov 15, 2025
237eaf7
docs: remove unused asset index files and update styles for better la…
kzndotsh Nov 15, 2025
0ffd2eb
fix: downgrade click version to 8.2.1 to resolve file watching issue
kzndotsh Nov 15, 2025
5d2f8ce
docs: refine MkDocs watch configuration for improved build efficiency
kzndotsh Nov 15, 2025
35c88ac
docs: unify guide links in index for consistency
kzndotsh Nov 15, 2025
94b6a37
docs: update configuration priority section for clarity
kzndotsh Nov 15, 2025
9a5f0c7
docs: enhance grid card styles for improved layout and responsiveness
kzndotsh Nov 15, 2025
366cc78
chore: update pyproject.toml to refine exclusions and logging settings
kzndotsh Nov 16, 2025
a0e0fc2
chore: simplify pytest configuration by removing redundant marker def…
kzndotsh Nov 16, 2025
c7de34d
feat: add Python code snippets for Discord.py cogs
kzndotsh Nov 16, 2025
4df3f80
chore: update VSCode extensions configuration for improved developmen…
kzndotsh Nov 16, 2025
9e0d398
feat: add VSCode tasks configuration for streamlined development
kzndotsh Nov 16, 2025
0c2fb16
feat: add VSCode launch configuration for Python debugging
kzndotsh Nov 16, 2025
5f530a2
feat: update VSCode settings for enhanced development experience
kzndotsh Nov 16, 2025
bb6fc0a
feat: add validation script for VS Code and Python configuration
kzndotsh Nov 16, 2025
5e352e6
feat: enhance DevContainer setup for Tux development
kzndotsh Nov 16, 2025
94f329d
chore: update .gitignore to include additional editor and OS-specific…
kzndotsh Nov 16, 2025
28041b2
chore: reorganize pyproject.toml for build system clarity
kzndotsh Nov 16, 2025
53877ef
feat: enhance issue and pull request templates for better clarity and…
kzndotsh Nov 16, 2025
7fd266f
fix: improve command checks in post-create script for better error ha…
kzndotsh Nov 16, 2025
42baf16
refactor(docs): rename community to support and merge pages into one …
electron271 Nov 17, 2025
455c939
feat(docs): update navigation structure and enhance troubleshooting s…
kzndotsh Nov 17, 2025
6d2f578
docs: update navigation and add work-in-progress sections
kzndotsh Nov 17, 2025
376fc2b
style(docs): enhance CSS for improved layout and navigation
kzndotsh Nov 17, 2025
544e6c2
style(docs): update CSS for improved typography and layout consistency
kzndotsh Nov 18, 2025
e954c74
feat(docs): add hero background image for enhanced visual appeal
kzndotsh Nov 18, 2025
eba92ab
feat(docs): enhance homepage and typography styles
kzndotsh Nov 18, 2025
ed9a58b
feat(docs): add comprehensive typography style guide
kzndotsh Nov 18, 2025
c910185
refactor: standardize log messages and remove emojis for clarity
kzndotsh Nov 18, 2025
5f896ec
feat(deps): add mkdocs-glightbox and mkdocs-redirects plugins
kzndotsh Nov 18, 2025
d5c886d
chore(deps): update dependencies and configuration
kzndotsh Nov 18, 2025
ca9af73
fix(docs): correct site URL format and update theme settings
kzndotsh Nov 18, 2025
52d05c2
docs: improve self hosting docs, fix styles
electron271 Nov 18, 2025
0bddfa8
fix(compose): make database no longer accessible from outside contain…
electron271 Nov 18, 2025
05e0b54
feat(docs): update typography and navigation structure
kzndotsh Nov 18, 2025
983edbc
fix(docs): disable git-committers plugin in mkdocs.yml
kzndotsh Nov 18, 2025
7c71ae3
fix(docs): remove removed page from navigation
electron271 Nov 18, 2025
c24eb18
fix(cli): rename hard_reset command to nuke
electron271 Nov 18, 2025
060755e
fix(compose): add port to tux-postgres but only allow access from loc…
electron271 Nov 18, 2025
d8b9f38
feat(dashboard): add "Create Rank" button when no ranks
electron271 Nov 18, 2025
050fa53
fix: stop deleting my damn error messages
electron271 Nov 18, 2025
9cb8a06
fix: stop deleting my damn error messages 2
electron271 Nov 18, 2025
70338b4
fix(docs): re-enable git-committers plugin and update configuration
kzndotsh Nov 19, 2025
e7c3513
feat(docs): enhance ranks and roles configuration documentation
kzndotsh Nov 19, 2025
875bb2c
fix: awrnsrghag
electron271 Nov 20, 2025
c20a166
fix: fix verbose sqlalchemy logging
electron271 Nov 20, 2025
0b538c4
fix: change log level to debug for expired tempban checker
electron271 Nov 20, 2025
2212249
fix(help): add emojis for new categories
electron271 Nov 20, 2025
cb25d6a
refactor(permission_system): improve guild rank initialization logic
kzndotsh Nov 20, 2025
17a2c30
feat(coverage): unify test coverage reporting and enhance configuration
kzndotsh Nov 20, 2025
08f8304
fix(run): remove hardcoded loading emoji
electron271 Nov 20, 2025
d49242e
fix: stop truncating my damn error messages
electron271 Nov 20, 2025
b3a43d5
fix(afk): correct member ID deletion logic in remove_member_afk method
electron271 Nov 20, 2025
a7e9dc1
feat(remindme): add "aliases" remind rm
electron271 Nov 20, 2025
03c04d2
fix: update moderation logging references and improve test coverage
kzndotsh Nov 20, 2025
1f826bb
fix: update command usage references to include dynamic prefix
kzndotsh Nov 20, 2025
692f9f1
feat(error-handling): enhance error test registry and configuration
kzndotsh Nov 20, 2025
6ce348d
chore(ci): add permissions for file detection jobs in workflows
kzndotsh Nov 20, 2025
aece6b0
fix(tests): update error messages in tests for consistency with comma…
kzndotsh Nov 20, 2025
5ef8766
fix(error-handling): improve error message fallback behavior
kzndotsh Nov 20, 2025
4e92b9e
feat(todos): expand error handling system with comprehensive improvem…
kzndotsh Nov 20, 2025
3dea19e
chore(build): streamline dependency installation in build script
kzndotsh Nov 20, 2025
d6e4337
chore(dependencies): update package versions and remove coverage depe…
kzndotsh Nov 20, 2025
41e74e7
feat(ci): add documentation workflow for automated builds and deployment
kzndotsh Nov 20, 2025
cd96b5b
refactor(ci): rename documentation workflow components for clarity
kzndotsh Nov 20, 2025
9dd6347
fix(security): add link to main policy
Atmois Nov 20, 2025
0e76812
fix(communication): update user reference in DM embed creation
kzndotsh Nov 20, 2025
be25a80
refactor(ci): enhance workflow scripts and update action versions
kzndotsh Nov 21, 2025
e441585
fix(ci): update shfmt flags for bash compatibility in CI workflow
kzndotsh Nov 21, 2025
df9d2b5
refactor(regex): standardize regex variable naming and add new patterns
kzndotsh Nov 21, 2025
a683b81
fix(exceptions): sanitize language input in TuxUnsupportedLanguageError
kzndotsh Nov 21, 2025
7c3dddc
refactor(info): improve info command handling and documentation
kzndotsh Nov 21, 2025
4ecd847
chore(dependencies): update Pillow and MkDocs Material dependencies
kzndotsh Nov 21, 2025
b909640
fix(ci): remove unnecessary shfmt flag in CI workflow
kzndotsh Nov 21, 2025
5726dad
feat(permission): implement restricted commands handling in permissio…
kzndotsh Nov 22, 2025
82cbfe7
chore: add git blame ignore file for formatting commits
kzndotsh Nov 24, 2025
a74591a
style: reformat all files to 88 character line length
kzndotsh Nov 24, 2025
febe4e3
chore: add formatting commit to blame ignore list
kzndotsh Nov 24, 2025
2dd3ab4
docs: add git blame ignore config to setup instructions
kzndotsh Nov 24, 2025
a5f237c
chore(dependencies): update pre-commit hooks and package versions
kzndotsh Nov 24, 2025
0fe8bf9
chore: update CHANGELOG and add ROADMAP document
kzndotsh Nov 24, 2025
e1298ab
chore(dependencies): update fastapi and sentry-sdk versions
kzndotsh Nov 24, 2025
f4b93f7
refactor(help): reorder button additions in HelpNavigation class
kzndotsh Nov 24, 2025
c88a008
feat(typings): add type stubs for pydantic_settings_export modules
kzndotsh Nov 24, 2025
a214cbb
feat(config): enhance configuration documentation and examples
kzndotsh Nov 24, 2025
348aa2f
feat(config): integrate ConfigCLI into main application
kzndotsh Nov 24, 2025
fdae8af
feat(config): enhance Pydantic models with examples and annotations
kzndotsh Nov 24, 2025
4a14395
feat(config): update .env.example with detailed comments and examples
kzndotsh Nov 24, 2025
1d7523a
feat(dependencies): update package versions and add new dependencies
kzndotsh Nov 24, 2025
57345bf
feat(config): update example configuration files with placeholder bot…
kzndotsh Nov 24, 2025
55a19c0
feat(markdownlint): enhance markdownlint configuration and update com…
kzndotsh Nov 25, 2025
8b9917d
fix: resolve low-hanging fruit from Sentry errors
kzndotsh Nov 25, 2025
fcf9526
docs(sentry): enhance documentation for Sentry integration and error …
kzndotsh Nov 25, 2025
be8a0e8
refactor(setup): improve error handling and logging in setup processes
kzndotsh Nov 25, 2025
a78c763
refactor(bot): standardize transaction data logging during shutdown p…
kzndotsh Nov 25, 2025
bc3f39f
refactor(cog_loader): enhance error handling and telemetry for cog lo…
kzndotsh Nov 25, 2025
d54347b
refactor(error_handling): improve exception logging and telemetry in …
kzndotsh Nov 25, 2025
3d0b289
refactor(database_service): enhance error handling and telemetry for …
kzndotsh Nov 25, 2025
ca296ed
refactor(error_handling): enhance Sentry integration for improved exc…
kzndotsh Nov 25, 2025
c2e90f0
refactor(sentry_integration): enhance error handling and telemetry ac…
kzndotsh Nov 25, 2025
59566d4
refactor(workflows): remove unused CI and test scripts, streamline ou…
kzndotsh Nov 26, 2025
6b81c53
chore(workflows): update docs workflow to include timeout and regex f…
kzndotsh Nov 26, 2025
88ee795
chore(workflows): add system dependencies for image optimization in d…
kzndotsh Nov 26, 2025
b814b1d
chore(workflows): enhance documentation workflow with pull request su…
kzndotsh Nov 27, 2025
5f39860
chore(coverage): update coverage report paths to use 'docs/htmlcov'
kzndotsh Nov 27, 2025
8a16bc0
chore(workflows): update documentation workflow to improve pull reque…
kzndotsh Nov 27, 2025
f445480
chore(workflows): update documentation workflow to use latest comment…
kzndotsh Nov 27, 2025
943f346
chore(workflows): enhance documentation workflow with pull request de…
kzndotsh Nov 27, 2025
f2821c2
chore(workflows): update deployment actions in documentation workflow
kzndotsh Nov 27, 2025
3f241dc
chore(pre-commit): update configuration and dependencies
kzndotsh Nov 27, 2025
8dece02
chore(pyproject): remove unused mdformat configuration section
kzndotsh Nov 27, 2025
0d87ff3
chore(dependencies): update package versions and remove unused depend…
kzndotsh Nov 27, 2025
bd6b742
feat(dev): add clean command to remove temporary files and cache dire…
kzndotsh Nov 27, 2025
8eaf140
refactor(cli): remove emoji prefixes from console messages for cleane…
kzndotsh Nov 27, 2025
be42ad8
chore(config): add account_id to wrangler configuration
kzndotsh Nov 27, 2025
aa482ab
chore(workflows): refine documentation workflow conditions and commen…
kzndotsh Nov 27, 2025
4c3fafd
chore(workflows): update deployment arguments and enhance comment con…
kzndotsh Nov 27, 2025
1d05643
chore(workflows): add preview URL retrieval to documentation workflow
kzndotsh Nov 27, 2025
b118dd8
chore(config): clarify worker name in wrangler configuration
kzndotsh Nov 27, 2025
a02f038
chore(workflows): ensure Wrangler v4 is used and update deployment me…
kzndotsh Nov 27, 2025
548b35d
chore(workflows): enhance preview URL handling in documentation workflow
kzndotsh Nov 27, 2025
7f8cf42
chore(workflows): improve preview URL handling and documentation clarity
kzndotsh Nov 27, 2025
8fcabe3
chore(workflows): streamline preview deployment process and enhance U…
kzndotsh Nov 27, 2025
2680257
style: enhance typography and layout across stylesheets
kzndotsh Nov 28, 2025
9bed139
docs: update CLI reference documentation structure
kzndotsh Nov 28, 2025
7c38cd3
docs: preload Inter variable font for improved performance
kzndotsh Nov 28, 2025
1004028
docs: update coverage report directory in mkdocs configuration
kzndotsh Nov 28, 2025
597e2d9
style: enhance admonition borders and typography for better readability
kzndotsh Nov 28, 2025
6579f76
docs: update footer links and remove sitemap documentation
kzndotsh Nov 28, 2025
ebe28e7
fix: enhance time unit conversion in convert_to_seconds function
kzndotsh Nov 29, 2025
8dc7b7c
fix: improve reminder error handling and message formatting
kzndotsh Nov 29, 2025
0a45f30
refactor: update response methods in Random module to use ctx.reply
kzndotsh Nov 29, 2025
e81bef1
fix: escape curly braces in log messages to prevent formatting errors
kzndotsh Nov 29, 2025
1e81db8
feat: enhance deepfry image processing with adjustable quality settings
kzndotsh Nov 29, 2025
796a048
chore: update GitHub Actions workflow for sparse checkout
kzndotsh Nov 29, 2025
60e61c0
fix: adjust git-revision-date-localized plugin configuration for CI e…
kzndotsh Nov 29, 2025
4aac731
chore: update GitHub Actions workflow for test coverage and results u…
kzndotsh Nov 29, 2025
ec43721
chore: update VSCode settings for markdown processing
kzndotsh Nov 29, 2025
9cca093
refactor: enhance dark mode styling for tags and headers
kzndotsh Nov 29, 2025
bd5d17d
feat: add tags documentation page
kzndotsh Nov 29, 2025
73d4c50
chore: update mkdocs configuration for plugin settings and tag features
kzndotsh Nov 29, 2025
56db807
chore: update documentation for various sections
kzndotsh Nov 29, 2025
912db71
docs: improve TuxApp startup method documentation
kzndotsh Nov 29, 2025
7b3d04d
chore: update Codecov configuration for improved coverage tracking
kzndotsh Nov 29, 2025
79e7895
chore: enhance GitHub Actions workflow for sparse checkout
kzndotsh Nov 29, 2025
24d8de0
chore: add coverage file verification step in GitHub Actions workflow
kzndotsh Nov 29, 2025
09f0e0c
chore: enhance GitHub Actions workflow with additional logging and co…
kzndotsh Nov 29, 2025
59f8259
refactor: optimize imports to avoid circular dependencies
kzndotsh Nov 29, 2025
040cbc0
refactor: reorganize test fixtures for improved clarity and accessibi…
kzndotsh Nov 30, 2025
4737272
refactor: enhance parallel test execution with configurable options
kzndotsh Nov 30, 2025
635a030
chore: update testing dependencies and configuration
kzndotsh Nov 30, 2025
ce58921
refactor: enhance pytest configuration and cleanup processes
kzndotsh Nov 30, 2025
cfb20ef
chore: update mkdocs configuration for documentation assets
kzndotsh Nov 30, 2025
a71b8c3
feat: add custom path-item template for improved breadcrumb navigation
kzndotsh Nov 30, 2025
22c7089
docs: expand testing fixtures documentation for clarity and best prac…
kzndotsh Nov 30, 2025
da77f0b
feat: implement coverage report theme synchronization and styling
kzndotsh Nov 30, 2025
9d5281c
Merge branch 'main' into v0.1.0
electron271 Dec 1, 2025
9602e8e
style: auto fixes from pre-commit hooks
pre-commit-ci[bot] Dec 1, 2025
8547979
chore: update CHANGELOG and documentation styles
kzndotsh Dec 1, 2025
78a3a16
chore: update dependencies and configuration
kzndotsh Dec 1, 2025
aee2c8c
refactor: enhance core module structure and imports
kzndotsh Dec 1, 2025
7b0d20a
fix: clean up type hints and import statements across various modules
kzndotsh Dec 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@ coverage:
# BOT COMMANDS AND FEATURES (High standards - 75% target)
# User-facing commands and Discord integrations
# High standards because these directly impact user experience
cogs:
modules:
target: 75%
threshold: 2%
informational: true # Don't block PRs while building up test suite
flags:
- unit
paths:
- tux/cogs/**/* # All command cogs and Discord slash commands
- tux/modules/**/* # All command modules and Discord slash commands
only_pulls: true

# UTILITIES AND HELPERS (Moderate standards - 70% target)
Expand Down Expand Up @@ -366,10 +366,10 @@ component_management:
# User-facing Discord commands and integrations
- unit
- database
- component_id: cogs
- component_id: modules
name: Bot Commands & Features
paths:
- tux/cogs/**/* # All command cogs organized by category
- tux/modules/**/* # All command modules organized by category
flag_regexes:
- unit

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from typing import TypeVar

from loguru import logger

from prisma import Prisma

T = TypeVar("T")
Expand Down Expand Up @@ -76,7 +75,7 @@ async def connect(self) -> None:
Notes
-----
The DATABASE_URL environment variable should be set before calling
this method, which is handled by the tux.utils.env module.
this method, which is handled by the tux.shared.config.env module.
"""
if self._client is not None:
logger.warning(CLIENT_ALREADY_CONNECTED)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
"""Database controller module providing access to all model controllers."""

import functools
import inspect
import importlib
from typing import Any, ClassVar, TypeVar

import sentry_sdk

from tux.database.controllers.afk import AfkController
from tux.database.controllers.case import CaseController
from tux.database.controllers.guild import GuildController
from tux.database.controllers.guild_config import GuildConfigController
from tux.database.controllers.levels import LevelsController
from tux.database.controllers.note import NoteController
from tux.database.controllers.reminder import ReminderController
from tux.database.controllers.snippet import SnippetController
from tux.database.controllers.starboard import StarboardController, StarboardMessageController
from tux.services.database.controllers.afk import AfkController
from tux.services.database.controllers.case import CaseController
from tux.services.database.controllers.guild import GuildController
from tux.services.database.controllers.guild_config import GuildConfigController
from tux.services.database.controllers.levels import LevelsController
from tux.services.database.controllers.note import NoteController
from tux.services.database.controllers.reminder import ReminderController
from tux.services.database.controllers.snippet import SnippetController
from tux.services.database.controllers.starboard import (
StarboardController,
StarboardMessageController,
)

# Note: Avoid importing tracing at module import time to prevent circular imports.
_TRACING_AVAILABLE = True

# Define a TypeVar that can be any BaseController subclass
ControllerType = TypeVar("ControllerType")
Expand Down Expand Up @@ -67,7 +70,9 @@ def __init__(self) -> None:

def _get_controller(self, controller_type: type[ControllerType]) -> ControllerType:
"""
Helper method to instantiate a controller with proper Sentry instrumentation.
Helper to instantiate a controller with selective Sentry instrumentation.

Only instruments meaningful database operations to reduce span noise.

Parameters
----------
Expand All @@ -77,84 +82,65 @@ def _get_controller(self, controller_type: type[ControllerType]) -> ControllerTy
Returns
-------
ControllerType
The instantiated controller
The instantiated controller with selectively instrumented methods
"""
instance = controller_type()
if sentry_sdk.is_initialized():
# Get all public methods to wrap
methods = [attr for attr in dir(instance) if callable(getattr(instance, attr)) and not attr.startswith("_")]

# Wrap each public method with Sentry transaction
for method_name in methods:
# Exclude internal/utility helpers that create noise
excluded_methods = {
"safe_get_attr",
"connect_or_create_relation",
"_add_include_arg_if_present",
"_build_find_args",
"_build_simple_args",
"_build_create_args",
"_build_update_args",
"_build_delete_args",
"_build_upsert_args",
"_execute_query",
"_set_scope_context",
}

# Include common CRUD/meaningful patterns
include_prefixes = (
"get_",
"find_",
"create_",
"update_",
"delete_",
"count_",
"increment_",
"toggle_",
"lock_",
"unlock_",
"bulk_",
)

# Lazy import via importlib to avoid circular import during package init
try:
_tracing = importlib.import_module("tux.services.tracing")
_span = getattr(_tracing, "span", None)
except Exception:
_span = None

# Get public methods that aren't excluded
method_names = [
attr
for attr in dir(instance)
if callable(getattr(instance, attr)) and not attr.startswith("_") and attr not in excluded_methods
]

# Wrap only methods that match meaningful operation patterns
for method_name in method_names:
if method_name.startswith(include_prefixes):
original_method = getattr(instance, method_name)
# Use a factory function to capture loop variables
self._create_wrapped_method(instance, method_name, original_method)
if _span is not None:
op = f"db.controller.{method_name}"
wrapped = _span(op=op)(original_method)
setattr(instance, method_name, wrapped)

return instance

def _create_wrapped_method(self, instance: Any, method_name: str, original_method: Any) -> None:
"""
Create a wrapped method with proper sentry instrumentation.

Parameters
----------
instance : Any
The controller instance
method_name : str
The name of the method to wrap
original_method : Any
The original method to wrap
"""

# Check if the original method is async
is_async = inspect.iscoroutinefunction(original_method)

if is_async:

@functools.wraps(original_method)
async def async_wrapped_method(*args: Any, **kwargs: Any) -> Any:
controller_name = instance.__class__.__name__
with sentry_sdk.start_span(
op=f"db.controller.{method_name}",
description=f"{controller_name}.{method_name}",
) as span:
span.set_tag("db.controller", controller_name)
span.set_tag("db.operation", method_name)
try:
result = await original_method(*args, **kwargs)
except Exception as e:
span.set_status("internal_error")
span.set_data("error", str(e))
raise
else:
span.set_status("ok")
return result

setattr(instance, method_name, async_wrapped_method)

else:

@functools.wraps(original_method)
def sync_wrapped_method(*args: Any, **kwargs: Any) -> Any:
controller_name = instance.__class__.__name__
with sentry_sdk.start_span(
op=f"db.controller.{method_name}",
description=f"{controller_name}.{method_name}",
) as span:
span.set_tag("db.controller", controller_name)
span.set_tag("db.operation", method_name)
try:
result = original_method(*args, **kwargs)
except Exception as e:
span.set_status("internal_error")
span.set_data("error", str(e))
raise
else:
span.set_status("ok")
return result

setattr(instance, method_name, sync_wrapped_method)

_controller_mapping: ClassVar[dict[str, type]] = {
"afk": AfkController,
"case": CaseController,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

from prisma.actions import GuildActions
from prisma.models import AFKModel, Guild
from tux.database.client import db
from tux.database.controllers.base import BaseController

from tux.services.database.client import db
from tux.services.database.controllers.base import BaseController


class AfkController(BaseController[AFKModel]):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""Base controller module providing common database functionality."""

import importlib
from collections.abc import Callable
from typing import Any, TypeVar

import sentry_sdk
from loguru import logger

from prisma.models import (
AFKModel,
Case,
Expand All @@ -18,7 +17,8 @@
Starboard,
StarboardMessage,
)
from tux.database.client import db

from tux.services.database.client import db

# Explicitly define ModelType to cover all potential models used by controllers
ModelType = TypeVar(
Expand Down Expand Up @@ -84,6 +84,7 @@ async def _execute_query(
self,
operation: Callable[[], Any],
error_msg: str,
op_name: str,
) -> Any:
"""Executes a database query with standardized error logging.

Expand All @@ -107,17 +108,25 @@ async def _execute_query(
Exception
Re-raises any exception caught during the database operation.
"""
# Create a Sentry span to track database query performance
if sentry_sdk.is_initialized():
with sentry_sdk.start_span(op="db.query", description=f"Database query: {self.table_name}") as span:
span.set_tag("db.table", self.table_name)
# Lazy import via importlib to avoid circular import through package __init__
try:
_tracing = importlib.import_module("tux.services.tracing")
_start_span = getattr(_tracing, "start_span", None)
except Exception:
_start_span = None

if _start_span is not None:
with _start_span(op=f"db.query.{op_name}", name=self.table_name) as span: # type: ignore
try:
result = await operation()
span.set_status("ok")
if hasattr(span, "set_status"):
span.set_status("ok")
return result # noqa: TRY300
except Exception as e:
span.set_status("internal_error")
span.set_data("error", str(e))
if hasattr(span, "set_status"):
span.set_status("internal_error")
if hasattr(span, "set_data"):
span.set_data("error", str(e))
logger.error(f"{error_msg}: {e}")
raise
else:
Expand Down Expand Up @@ -238,6 +247,7 @@ async def find_one(
return await self._execute_query(
lambda: self.table.find_first(**find_args),
f"Failed to find record in {self.table_name} with criteria {where}",
"find_one",
)

async def find_unique(
Expand All @@ -263,6 +273,7 @@ async def find_unique(
return await self._execute_query(
lambda: self.table.find_unique(**find_args),
f"Failed to find unique record in {self.table_name} with criteria {where}",
"find_unique",
)

async def find_many(
Expand Down Expand Up @@ -307,6 +318,7 @@ async def find_many(
return await self._execute_query(
lambda: self.table.find_many(**find_args),
f"Failed to find records in {self.table_name} with criteria {where}",
"find_many",
)

async def count(
Expand All @@ -328,6 +340,7 @@ async def count(
return await self._execute_query(
lambda: self.table.count(where=where),
f"Failed to count records in {self.table_name} with criteria {where}",
"count",
)

async def create(
Expand All @@ -353,6 +366,7 @@ async def create(
return await self._execute_query(
lambda: self.table.create(**create_args),
f"Failed to create record in {self.table_name} with data {data}",
"create",
)

async def update(
Expand Down Expand Up @@ -381,6 +395,7 @@ async def update(
return await self._execute_query(
lambda: self.table.update(**update_args),
f"Failed to update record in {self.table_name} with criteria {where} and data {data}",
"update",
)

async def delete(
Expand All @@ -406,6 +421,7 @@ async def delete(
return await self._execute_query(
lambda: self.table.delete(**delete_args),
f"Failed to delete record in {self.table_name} with criteria {where}",
"delete",
)

async def upsert(
Expand Down Expand Up @@ -437,6 +453,7 @@ async def upsert(
return await self._execute_query(
lambda: self.table.upsert(**upsert_args),
f"Failed to upsert record in {self.table_name} with where={where}, create={create}, update={update}",
"upsert",
)

async def update_many(
Expand Down Expand Up @@ -466,6 +483,7 @@ async def update_many(
result = await self._execute_query(
lambda: self.table.update_many(where=where, data=data),
f"Failed to update records in {self.table_name} with criteria {where} and data {data}",
"update_many",
)
# Validate and return count
count_val = getattr(result, "count", None)
Expand Down Expand Up @@ -498,6 +516,7 @@ async def delete_many(
result = await self._execute_query(
lambda: self.table.delete_many(where=where),
f"Failed to delete records in {self.table_name} with criteria {where}",
"delete_many",
)
# Validate and return count
count_val = getattr(result, "count", None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
from prisma.enums import CaseType
from prisma.models import Case, Guild
from prisma.types import CaseWhereInput
from tux.database.client import db
from tux.database.controllers.base import BaseController

from tux.services.database.client import db
from tux.services.database.controllers.base import BaseController


class CaseController(BaseController[Case]):
Expand Down
Loading
Loading