Skip to content

feat(tooling): Add pyproject.toml for consolidated Python tool configuration - #741

Merged
Tim020 merged 2 commits into
devfrom
add-pyproject-toml
Nov 28, 2025
Merged

feat(tooling): Add pyproject.toml for consolidated Python tool configuration#741
Tim020 merged 2 commits into
devfrom
add-pyproject-toml

Conversation

@Tim020

@Tim020 Tim020 commented Nov 28, 2025

Copy link
Copy Markdown
Contributor

Consolidate Black, isort, and Pylint configurations into a single pyproject.toml file, implementing modern Python project standards and fixing pytest import issues.

Key improvements:

  • Dynamic dependency loading: Reads from requirements.txt and test_requirements.txt automatically, eliminating duplication
  • Pytest configuration: Added pythonpath = ["."] to enable direct pytest execution without python -m prefix
  • Tool consolidation: Migrated all settings from .pylintrc to pyproject.toml for unified configuration
  • Consistent formatting: Black and isort both configured for 120 character line length, Python 3.13 target

Technical changes:

  • Created pyproject.toml with [build-system], [project], and [tool.*] sections
  • Removed .pylintrc (all settings migrated to pyproject.toml)
  • Added setuptools-scm for dynamic version detection
  • Configured pytest asyncio mode and test discovery patterns

Benefits:

  • Single source of truth for all Python tool configurations
  • No dependency duplication between pyproject.toml and requirements files
  • Simplified pytest execution (pytest instead of python -m pytest)
  • Modern Python packaging standards compliance

🤖 Generated with Claude Code

@github-actions github-actions Bot added server Pull requests changing back end code medium-diff labels Nov 28, 2025
@github-actions

github-actions Bot commented Nov 28, 2025

Copy link
Copy Markdown

Test Results

31 tests  ±0   31 ✅ ±0   8s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit a93493f. ± Comparison against base commit 36f135c.

♻️ This comment has been updated with latest results.

…uration

Consolidate Python tool configurations into a single pyproject.toml file
while preserving existing code formatting standards.

Key improvements:
- Single source of truth for tool configurations
- Dynamic dependency loading from requirements.txt files
- Pytest pythonpath configuration enables running `pytest` directly
- No code reformatting required - matches existing standards

Technical changes:
- Created pyproject.toml with:
  - Black: line-length=88 (default, matches existing formatting)
  - isort: profile=black, line-length=88
  - Pylint: migrated all settings from .pylintrc (max-line-length=120)
  - Pytest: pythonpath=["."] fixes import resolution
- Removed .pylintrc (configuration moved to pyproject.toml)

Benefits:
- Run `pytest` directly without `python -m pytest` workaround
- All tool configs in one standardized location
- Modern Python packaging standards (PEP 517/518)
- No configuration duplication

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@Tim020
Tim020 force-pushed the add-pyproject-toml branch from 7c94476 to 232e53b Compare November 28, 2025 22:46
@Tim020
Tim020 marked this pull request as ready for review November 28, 2025 22:55
@Tim020
Tim020 merged commit 63bac57 into dev Nov 28, 2025
14 checks passed
@Tim020
Tim020 deleted the add-pyproject-toml branch November 28, 2025 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

medium-diff server Pull requests changing back end code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant