|
| 1 | +# Migration from make/poetry to just/uv |
| 2 | + |
| 3 | +## Quick Start |
| 4 | + |
| 5 | +1. **Install just and uv** (if not already installed): |
| 6 | + ```bash |
| 7 | + brew install just uv |
| 8 | + ``` |
| 9 | + |
| 10 | +2. **Initialize the environment**: |
| 11 | + ```bash |
| 12 | + just init |
| 13 | + ``` |
| 14 | + |
| 15 | +3. **Common commands**: |
| 16 | + ```bash |
| 17 | + just test # Run tests |
| 18 | + just docs # Build documentation |
| 19 | + just docs-serve # Serve docs locally |
| 20 | + just format # Format code |
| 21 | + just build # Build package |
| 22 | + just clean # Clean build artifacts |
| 23 | + ``` |
| 24 | + |
| 25 | +## Command Mapping |
| 26 | + |
| 27 | +| Old (make) | New (just) | Description | |
| 28 | +|------------|------------|-------------| |
| 29 | +| `source ./make -a && make tests` | `just test` | Run tests | |
| 30 | +| `make docs` | `just docs` | Build documentation | |
| 31 | +| `make docs-serve` | `just docs-serve` | Serve documentation | |
| 32 | +| `make clean` | `just clean` | Clean build artifacts | |
| 33 | +| `make release <version>` | `just release <version>` | Release new version | |
| 34 | + |
| 35 | +## Key Changes |
| 36 | + |
| 37 | +### Dependencies Management |
| 38 | +- **Before**: Poetry managed dependencies |
| 39 | +- **After**: uv manages dependencies (much faster) |
| 40 | +- **Migration**: Dependencies moved from `[tool.poetry.dependencies]` to `[project.dependencies]` in pyproject.toml |
| 41 | + |
| 42 | +### Build System |
| 43 | +- **Before**: Poetry build backend |
| 44 | +- **After**: Hatchling build backend (modern, standards-compliant) |
| 45 | + |
| 46 | +### System Dependencies |
| 47 | +- **Before**: Installed via conda through `environ` file |
| 48 | +- **After**: Installed via `brew install` in `just init` |
| 49 | +- **Dependencies**: tmux, poetry, graphviz, imagemagick |
| 50 | + |
| 51 | +### Task Runner |
| 52 | +- **Before**: Bash functions in `make` script |
| 53 | +- **After**: Just recipes in `justfile` |
| 54 | +- **Benefits**: |
| 55 | + - Better syntax highlighting |
| 56 | + - Built-in help system (`just --list`) |
| 57 | + - Cross-platform compatibility |
| 58 | + - More readable recipe syntax |
| 59 | + |
| 60 | +## Environment Setup |
| 61 | + |
| 62 | +The old `environ` file approach is replaced by: |
| 63 | + |
| 64 | +1. System dependencies via `just init` (uses brew) |
| 65 | +2. Python dependencies via `uv sync` |
| 66 | +3. Environment variables can be set in `.env` files (uv loads them automatically) |
| 67 | + |
| 68 | +## Development Workflow |
| 69 | + |
| 70 | +```bash |
| 71 | +# One-time setup |
| 72 | +just init |
| 73 | + |
| 74 | +# Daily development |
| 75 | +just test # Run tests |
| 76 | +just format # Format code before committing |
| 77 | +just docs-serve # Preview documentation |
| 78 | + |
| 79 | +# Release workflow |
| 80 | +just test # Ensure tests pass |
| 81 | +just build # Build package |
| 82 | +just release 2024.01.15 # Release with version |
| 83 | +``` |
| 84 | + |
| 85 | +## Migration Status |
| 86 | + |
| 87 | +✅ **Completed**: |
| 88 | +- Basic task runner (just) |
| 89 | +- Dependency management (uv) |
| 90 | +- Build system (hatchling) |
| 91 | +- Common development tasks |
| 92 | +- System dependency installation |
| 93 | + |
| 94 | +⏳ **Not Yet Migrated**: |
| 95 | +- All advanced make functions (conda environment management, etc.) |
| 96 | +- Git hooks and automation |
| 97 | +- Advanced CI/CD integrations |
| 98 | +- Coverage combination logic |
| 99 | +- Changelog generation |
| 100 | + |
| 101 | +These can be added incrementally as needed. |
0 commit comments