Redesign helix init: scaffold the helix layer, not the project#15
Merged
Conversation
- Remove solver.py and evaluate.py from the scaffold; helix should not prescribe codebase shape - Add pyproject.toml, .python-version, and uv.lock (via uv lock subprocess) for reproducible helices - Make helix.yaml and program.md generic fill-in-the-blanks templates - scaffold() is now non-destructive: existing files are never overwritten, making it safe to run against repos that already have pyproject.toml etc. - Add run_uv_lock() as a separate public function; CLI warns if uv is absent - Update tests: add coverage for pyproject.toml/.python-version creation, non-destructive behaviour, and run_uv_lock() success/failure paths Closes #14.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #15 +/- ##
==========================================
+ Coverage 99.05% 99.06% +0.01%
==========================================
Files 10 10
Lines 635 645 +10
==========================================
+ Hits 629 639 +10
Misses 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
solver.pyandevaluate.pyfrom the scaffold — helix should not prescribe codebase shapepyproject.toml,.python-version, anduv.lock(viauv locksubprocess) for reproducible heliceshelix.yamlandprogram.mdare now generic fill-in-the-blanks templates with clear TODOsscaffold()is non-destructive: existing files are never overwritten, making it safe to run against repos that already have apyproject.tomloruv.lockrun_uv_lock()extracted as a separate public function; CLI warns ifuvis absentCloses #14.
Test plan
uv run python -m pytest— 199 passedhelix init my-projectcreateshelix.yaml,program.md,pyproject.toml,.python-version,uv.lock,experiments.tsv— nosolver.pyorevaluate.pyhelix initin a repo that already haspyproject.tomldoes not overwrite it