Selecting tools to fight complexity in large Python projects
summary
Claim: refactoring or moving to microservices is often infeasible for 100k+ line Python monoliths, so extract runnable entry points as standalone units. A small tool uses AST-based dependency extractor to trace imports from one entry script, copy ~2,000 analyzed files and their deps into a package, and build a container per entry point. On six large projects it works but fails for dynamic importlib/C extensions and undeclared or unversioned requirements. Deleting 7,000 type hints and running unused-import removal yields ~25% fewer lines and ~15% smaller packages via de-hinting to reduce imports and split entry-point into standalone containers.
AI-written summary · about
