chore(deps): migrate from Poetry to Rye for dependency management#93
chore(deps): migrate from Poetry to Rye for dependency management#93
Conversation
- Replace Poetry with Rye for faster, standards-compliant dependency management - Convert pyproject.toml to PEP 621 standard format with Hatchling backend - Update all documentation (README, CLAUDE.md) with Rye commands - Replace setup-poetry.sh with setup-rye.sh interactive script - Update GitHub Actions workflow to use Rye instead of Poetry - Update all Dockerfiles for Rye-based builds - Add comprehensive migration guides and documentation - Remove poetry.lock, add Rye-specific .gitignore entries - Preserve all functionality: same CLI, dependencies, and optional features BREAKING CHANGE: Development workflow now requires Rye instead of Poetry Migration guide available in MIGRATION_GUIDE.md
- Remove setup-poetry.sh (replaced by setup-rye.sh) - Remove setup.cfg (flake8 config replaced by Ruff) - Remove llm_context.txt (dev documentation) - Clean up cache and build directories
- Remove incorrect 'rye install' usage in containers - Use requirements.lock + pip install approach (Rye recommended) - Add comprehensive .dockerignore file - Simplify Dockerfiles for faster, smaller builds - Update migration guide with correct Docker usage The previous Docker setup was using 'rye install' which is incorrect for containers. Now following official Rye documentation for containerization.
- Add Docker build and publish workflow (.github/workflows/docker.yml) - Build multi-arch images (linux/amd64, linux/arm64) for GitHub Container Registry - Support multiple Docker variants (base, full, tensorflow) - Add Docker testing to existing CI workflow - Create comprehensive test script (test_migration.sh) - Update README with Docker usage and testing instructions New features: - Automated Docker builds on push/release - Multi-platform container support - Comprehensive testing including Docker builds - GitHub Container Registry integration - Full validation script for migration
- Delete setup-rye.sh script (87 lines removed) - Update documentation to use standard 'rye sync --features all' command - Simplify setup process for modern Python developers - Update MIGRATION_GUIDE.md, CLAUDE.md, and MIGRATION_SUMMARY.md The interactive setup script was redundant since: - Modern developers expect standard package manager commands - README already provides comprehensive installation instructions - test_migration.sh covers all validation needs - Reduces maintenance overhead
…nners while preserving Rye config
…eping Rye configuration and removing poetry.lock
There was a problem hiding this comment.
Bug: Docker Build Fails Due to Incorrect Dependency Installation Order
The Dockerfiles (Dockerfile.full, Dockerfile.tensorflow) attempt to install dependencies from requirements.lock (line 7) before copying the application source code (line 10). This causes the Docker build to fail because requirements.lock includes an editable install (-e file:.) that requires the source code to be present. Additionally, a subsequent pip install command (line 13) attempts to install the application again with specific extras, which is redundant and could lead to conflicts.
Dockerfile.tensorflow#L4-L13
modelaudit/Dockerfile.tensorflow
Lines 4 to 13 in baac873
Dockerfile.full#L5-L13
Lines 5 to 13 in baac873
Bug: Editable Install Fails Before Source Code
The Dockerfile attempts to install dependencies from requirements.lock before copying the source code. Since requirements.lock contains an editable install entry (-e file:.), pip fails because the project's source code (e.g., pyproject.toml) is not yet present in the current directory to perform the editable installation.
Dockerfile.full#L4-L13
Lines 4 to 13 in baac873
Was this report helpful? Give feedback by reacting with 👍 or 👎
Summary
Migrates the project from Poetry to Rye for dependency management and build tooling.
Changes Made
Build System Migration
pyproject.tomlto use Rye configurationpoetry.lock: No longer needed with Rye's lockfile systemDependency Management
joblib>=1.0.0for Joblib scanner supportallextra to include new dependenciesdill>=0.4.0for testingDocumentation Updates
New Features Merged
.joblibfiles.npy/.npzfilesBenefits
Testing
Breaking Changes
None - this is purely a build system migration that doesn't affect end users.
Migration Notes
For developers:
rye sync --features allinstead ofpoetry installrye run <command>instead ofpoetry run <command>rye buildinstead ofpoetry build