labtrail
Git is the state machine.
labtrail is a methodology for building and running lab courses, plus the tooling that makes the methodology checkable.
A course is a git repository. A trail is a tree of labs rooted at a base commit, and each lab is exactly two consecutive commits, named by refs:
base ── 01-greet/start ── 01-greet/complete ── 02-shout/start ── 02-shout/complete
(the exercise) (the solution)
A learner's position is which branch they are on. Their work is their
commits. Going back is git switch; getting a correction is git pull --rebase. There is no progress file and no command that advances anybody.
The invariant
Everything labtrail checks reduces to one property:
At
<lab>/startthe check must fail. At<lab>/completeit must pass.
A lab that already passes at its start ref asks the learner for nothing. A lab that fails at its complete ref cannot be finished. A lab whose check cannot run at the start ref looks broken rather than unsolved. All three are invisible to the author who wrote the lab; all three are found by running the same check at both ends.
For a learner
git clone <course-url> && cd <course>
ivpm update -d dev # or whatever the course README says
labtrail doctor # is this environment going to work?
labtrail status # where am I, and what is next?
labtrail open 01-greet # a worktree on my/01-greet, ready to work
labtrail check # 0 correct, 1 not yet, 2 the lab is broken
For an author
labtrail validate # start fails, complete passes, for every lab
labtrail propagate 01-greet # replay a revision through the descendants
labtrail collect -o out.json # lab metadata for a docs build
labtrail propagate is the part worth knowing about. When a lab is revised,
every descendant must both rebase cleanly and still pass its check —
and those are unrelated properties. A revision that renames a token can
leave a descendant rebasing with no conflict at all and no longer testing
anything. Git reports success. Only re-running the invariant at each hop
finds it, which is what propagate does, on scratch refs, publishing
nothing until you ask.
For an agent
labtrail ships four agent skills — labtrail, labtrail-learner,
labtrail-authoring, labtrail-checks — generated from the documentation
and registered in the agent.skills entry-point group. A course that
depends on labtrail gets them linked into .agents/skills/ by ivpm update,
with nothing to vendor and nothing to keep in sync. See
the agent skills.
The first line of all four is that the check script is the authority: never tell someone their work is correct because it looks correct.
Install
pip install labtrail
Python 3.10+. One runtime dependency (PyYAML), because labtrail installs into every learner's environment and each dependency is an installation that can fail on someone else's machine for a reason unrelated to the course.
Documentation
docs/ builds with Sphinx. Start with
the methodology; the
check contract is the part authors
most need.
docs/requirements.md is the specification and docs/plan.md is the
implementation plan and running log.
Licence
Apache-2.0.
Metadata
Release files for labtrail 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| labtrail-0.1.0.tar.gz | 235.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| labtrail-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 364.9 kB
Release files / labtrail-0.1.0.tar.gz
| Download URL | labtrail-0.1.0.tar.gz |
|---|---|
| Size | 235.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
34a1730efbb097fa4ceb54684d59fec1b588737617f4f214c5132f57b0a7c5b0
|
|
BLAKE2b-256 checksum How to use checksums |
7c3351b5bdf02ab8e52e653f797cf48912c4fee9f62b5c8e9f7062824f10796b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / labtrail-0.1.0-py3-none-any.whl
| Download URL | labtrail-0.1.0-py3-none-any.whl |
|---|---|
| Size | 129.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
62535e9ad15357f7a90aff57fe961ede3cac145a86b87215a565a2522d437e6f
|
|
BLAKE2b-256 checksum How to use checksums |
aa298b5e4cfe8b767a83b4d25ed448714f0c9bf65cbf024636c201f14bf72ef6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Security for labtrail 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.