Repository navigation
feat(workspace): language-neutral scaffold + opt-in Python flake template - #933
Merged
Merged
Conversation
Assert the copied scaffold ships no pyproject.toml/src/tests and that init-workspace.sh no longer renames a template Python package. Adjust the manifest-upgrade and bare-mode assertions to a language-neutral survival marker (justfile.project) instead of the renamed src/<name> package. Refs: #929
Drop the shipped Python package starter (pyproject.toml, src/template_project/, tests/) so a non-Python consumer no longer inherits a package layout it must delete. Guard the Python task recipes (lint/format/test/test-cov) behind a pyproject.toml check, mirroring the existing sync guard, so `just sync|test` and both CI contracts stay green on a repo with no Python. Remove the now-dead src/template_project rename and test-import rewrite from init-workspace.sh; pyproject.toml stays in PRESERVE_FILES so a consumer's own manifest is never clobbered. Python becomes opt-in via a flake template (see #930). Refs: #929
Flip test_install_creates_pyproject to assert no pyproject.toml is scaffolded; repoint the SHORT_NAME-derivation and placeholder-manifest checks at justfile.project (still placeholder-bearing). Drop test_project_installed_after_init: with no scaffold pyproject, init no longer produces a uv.lock, so its premise no longer holds. Refs: #929
Record the removal of the shipped Python starter and the guarded recipes in the changelog (Changed + Removed), reframe the MIGRATION Python note as image-provides / scaffold-opt-in, drop pyproject from the bare-mode file list, add a README note, and mark in manifest.toml that the Python package files are intentionally never synced into the scaffold. Refs: #929
…thon) Add templates/python/ (pyproject + src/ + tests/) and register it as templates.python so a consumer can restore a Python package layout onto the now language-neutral scaffold with `nix flake init -t github:vig-os/devcontainer#python`. The template uses a concrete example_pkg name the user renames — `nix flake init` does no placeholder substitution — and ships a minimal pytest dev group. Covered by tests/test_flake_checks.py::test_python_template_is_exposed. Refs: #930
test_just_test_recipe asserted pytest actually ran ("test session starts"),
which no longer holds now the scaffold ships no pyproject.toml: the guarded
recipe no-ops and exits 0. Assert that contract instead — exit 0 with no
pytest session — matching the shipped ci.yml and the release smoke-test
dispatch, which gate on `just test`'s exit code (green on a base project).
Refs: #929
test_install_creates_src_directory / _tests_directory asserted the installed workspace has a Python package layout; the language-neutral scaffold ships neither. Flip both to assert absence, matching the dropped pyproject.toml. Refs: #929
This was referenced Jul 8, 2026
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
Makes the copied project scaffold language-neutral and ships Python as an
opt-in flake template. Historically every consumer inherited a Python
package starter (
pyproject.toml,src/template_project/,tests/) plus auv/ruff/pytest CI contract — wrong for the many non-Python repos (Rust, TS
actions, data mirrors), whose CI even failed on adoption (
just test→uv run pytestexits 5 with no project).Closes #929
Closes #930
What changed
Language-neutral scaffold (#929)
assets/workspace/(pyproject.toml,src/template_project/,tests/).lint/format/test/test-covinjustfile.projectonpyproject.toml(mirroring the existingsyncguard), sojust sync|precommit|testand both CI contracts stay green on a repo with no Python.
src/template_projectrename + test-import rewrite frominit-workspace.sh;pyproject.tomlstays inPRESERVE_FILES, so a consumerthat brings its own is never clobbered.
MIGRATION.md, the README template,manifest.toml(documents that Python files are intentionally never synced), and
CHANGELOG.md.Opt-in Python starter (#930)
templates/python/(concreteexample_pkg, minimal pytest dev group),registered as
templates.python. Restore a Python layout on demand withnix flake init -t github:vig-os/devcontainer#python.Why one PR
#929 and #930 must ship together (removal + restore path), so they are bundled
here; each commit carries its own
Refs:.Verification (local, all green)
just sync && just testexit 0with no
pyproject.toml.nix flake init -t .#python→ renameexample_pkg→uv sync+pytest→ 1 passed.nix flake check --no-build: all checks pass (validatestemplates.python).prek run --all-files: green.test_install_script.py,test_image.py,test_integration.py) edited + syntax/lint-clean; exercised by thetest-integrationCI job.