Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
reference/
design/*.png
.venv/
*.egg-info/
mechababs/_version.py
__pycache__/
.pytest_cache/
.ruff_cache/
processing/
local-notes/
repronim-containers/
# setuptools' build tree, left behind by `uv build` when checking what ships.
build/
build.stale_*/
151 changes: 0 additions & 151 deletions bootstrap.sh

This file was deleted.

65 changes: 0 additions & 65 deletions design/openneuro-findings.md

This file was deleted.

4 changes: 2 additions & 2 deletions mechababs/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

TSV disambiguation — several "tsv/csv" artifacts are in play; this one is the
per-study metadata (per subject/session: ``datatypes``, ``t1w_num``, ``bold_num``),
NOT OpenNeuro's all-studies ``studies.tsv``, our ledger ``desc-mechababs_datasets.tsv``, or
babs's in-project ``processing_inclusion.csv``.
NOT OpenNeuro's all-studies ``studies.tsv``, the campaign statefile
``sourcedata+derivatives.tsv``, or babs's in-project ``processing_inclusion.csv``.
"""

import csv
Expand Down
4 changes: 2 additions & 2 deletions mechababs/testing/e2e/test_spine.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ def _run_record(study):
def _iterate(study, *args):
"""One iterate, run the way a user runs it: sourced env.sh, then `iterate`.

No `--campaign-path` and no cell named: where you stand is the study, the env var
is the campaign, and which cell moves is the reconciler's decision, not ours. That
No path and no cell named: where you stand is the study, the env var is the
campaign, and which cell moves is the reconciler's decision, not ours. That
is the whole difference between this and `_dispatch`.
"""
return _in_campaign(study, LABEL, "iterate", *args)
Expand Down
34 changes: 0 additions & 34 deletions mechababs/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,40 +42,6 @@
WORKDIR_ENV = "MECHABABS_E2E_WORKDIR"


class RefError(Exception):
"""A checkout is not on anything ``git clone --branch`` could re-clone."""


def clone_ref(clone):
"""The branch or tag a checkout is on, as something re-clonable.

A code pin is set with `git clone --branch <ref>`, which takes a branch or a tag,
so the ref handed back has to be one of those. A tag pin leaves the clone on a
detached HEAD, where `rev-parse --abbrev-ref HEAD` reports the literal "HEAD";
passing that on fails later with "Remote branch HEAD not found". So fall back to
the exact tag, and raise when it is neither.
"""
ref = subprocess.run(
["git", "-C", str(clone), "rev-parse", "--abbrev-ref", "HEAD"],
check=True,
text=True,
capture_output=True,
).stdout.strip()
if ref != "HEAD":
return ref
tag = subprocess.run(
["git", "-C", str(clone), "describe", "--tags", "--exact-match"],
text=True,
capture_output=True,
)
if tag.returncode == 0 and tag.stdout.strip():
return tag.stdout.strip()
raise RefError(
f"{clone} is on a detached HEAD with no exact tag, so there is no branch or "
f"tag to re-clone; check out a branch or tag first"
)


def resolve_cluster(arg):
"""The cluster config to validate, as a path that exists.

Expand Down
Loading
Loading