Skip to content

Package refactoring#12

Merged
rnixx merged 17 commits intomasterfrom
refactor-package-layout
Nov 10, 2025
Merged

Package refactoring#12
rnixx merged 17 commits intomasterfrom
refactor-package-layout

Conversation

@rnixx
Copy link
Member

@rnixx rnixx commented Nov 4, 2025

  1. Package Structure Refactoring
  • Split monolithic _api.py (736 lines) into 7 semantic modules:
    • config.py, exceptions.py, base.py, resources.py, groups.py, resolver.py, renderer.py
  • Updated init.py with explicit all exports
  1. Test Suite Reorganization
  • Moved tests from webresource/tests.py to tests/ directory at package root
  • Split into 8 focused test files matching the module structure
  • Created tests/test_utils.py for shared test utilities
  • Updated Makefile to use pytest tests
  1. Build System Modernization
  • Migrated from setup.py to pyproject.toml with hatchling backend
  • Python 3.10-3.14 support
  1. Python 2 Cleanup
  • Removed all Python 2 compatibility code (is_py3, FileNotFoundError checks)
  1. Type Hints
  • Added comprehensive Python 3.10+ type hints to all production code
  • Configured mypy in pyproject.toml with strict settings

rnixx and others added 15 commits October 21, 2025 13:32
- Convert setup.py/setup.cfg to pyproject.toml
- Implement PEP 420 implicit namespaces (remove namespace declarations)
- Delete namespace-only __init__.py files
- Add /build to .gitignore

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove obsolete MANIFEST.in file (now using hatchling)
- Update Python classifiers to 3.10-3.14
- Update GitHub Actions workflows to test Python 3.10-3.14
- Remove PyPy from workflows

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

Co-Authored-By: Claude <noreply@anthropic.com>
@rnixx
Copy link
Member Author

rnixx commented Nov 4, 2025

supersedes #11

@rnixx rnixx requested review from jensens and thet November 4, 2025 09:48
Copy link
Member

@jensens jensens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@thet thet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@rnixx rnixx merged commit 19848c6 into master Nov 10, 2025
16 checks passed
@rnixx rnixx deleted the refactor-package-layout branch November 10, 2025 10:36
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.

3 participants