Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
59ce0dc
save
atharvas Mar 9, 2026
59463a8
Remove old core/ infrastructure module
atharvas Mar 9, 2026
52abb16
Remove old execution/ module
atharvas Mar 9, 2026
cb7a0a3
Replace scrape/ with github/ module
atharvas Mar 9, 2026
ca32c0d
Rewrite agents/ module
atharvas Mar 9, 2026
bfa1f8b
Rewrite docker/ module
atharvas Mar 9, 2026
7bf2a86
Add utils/ package
atharvas Mar 9, 2026
1cd6d0c
Add publish/ module
atharvas Mar 9, 2026
dcf2f44
Add runners/ module
atharvas Mar 9, 2026
0c83ac2
Add update/ module and preflight
atharvas Mar 9, 2026
fa4c6f8
Add integration tests and test infrastructure
atharvas Mar 9, 2026
724251a
Add Supabase migration and migration script
atharvas Mar 9, 2026
ec2d780
Update package config, README, and .gitignore
atharvas Mar 9, 2026
b99936f
Update scratch configs and notebooks
atharvas Mar 9, 2026
a07e106
Update documentation
atharvas Mar 9, 2026
35f4a5f
Update formulacode_verified verification results
atharvas Mar 9, 2026
2be282d
Update formulacode_verified_new verification results
atharvas Mar 9, 2026
4dd5d4c
Update dataset task lists and verification tooling
atharvas Mar 9, 2026
82bc24e
Fix lint issues in github/ module
atharvas Mar 9, 2026
5fe83f3
Add GitHub integration, filters, update pipeline improvements, datase…
atharvas Mar 9, 2026
51eaf31
Rename run_tests.sh to run-tests.sh and update Dockerfiles in dataset…
atharvas Mar 21, 2026
146c8bf
Rename run_tests.sh to run-tests.sh and update Dockerfiles in dataset…
atharvas Mar 21, 2026
3e0b435
Update dataset verification results and analysis notebook
atharvas Mar 21, 2026
6f59c98
Improve GitHub client, models, and scrape commits runner with expande…
atharvas Mar 21, 2026
bc655ea
Refactor agents classifiers, extractors, and config with improved tes…
atharvas Mar 21, 2026
6825302
Enhance Docker image management and publishing with expanded tests
atharvas Mar 21, 2026
548bd4b
Update utils, db helpers, publish records, and package init
atharvas Mar 21, 2026
3522db3
Update runners, classify_prs, and pipeline CLI with test fixes
atharvas Mar 21, 2026
41f1a62
Update project documentation, CLAUDE.md, AGENTS.md, and Makefile
atharvas Mar 21, 2026
6176b92
Add agent sandbox, installed configs, templates, and update synthesiz…
atharvas Mar 21, 2026
fbb1fa2
Update Docker context builder, verifiers, add templates, and exclude …
atharvas Mar 21, 2026
0f83f21
Update synthesize_images runner, pipeline, and add render_problems ru…
atharvas Mar 21, 2026
56eff94
Add Supabase migrations for build_attempts sha and docker_contexts
atharvas Mar 21, 2026
f63a817
Update verify.py, archive docs, add synthesizer design doc and init t…
atharvas Mar 21, 2026
a45c3b3
Add pandas synthesis output for 9ff14a3
atharvas Mar 21, 2026
ba7b296
Add prior_attempts to sandbox/synthesizer and prioritize direct API k…
atharvas Mar 21, 2026
c2bcdda
Add file_change_summary and formatted description to classify_prs pip…
atharvas Mar 21, 2026
fbdec7d
Run classifier and judge calls in executor to avoid blocking the even…
atharvas Mar 21, 2026
5822139
Update CLAUDE.md with ds-update CLI and revised pipeline stages
atharvas Mar 22, 2026
e04ce2e
Add terminal-bench evaluation variable defaults to run-tests.sh
atharvas Mar 22, 2026
77ab7c5
Refactor sandbox container execution with host-side timeouts
atharvas Mar 22, 2026
d3c1967
Add resolve_packages as pipeline stage 4
atharvas Mar 22, 2026
b4ae593
Update design docs to reference resolution module and packages table
atharvas Mar 22, 2026
c1232bd
Add gte/lte/neq filter support to fetch_all
atharvas Mar 22, 2026
a23c64c
Extract run_agent_subprocess with process-group cleanup
atharvas Mar 22, 2026
893b233
Add pull=never to verifier container runs
atharvas Mar 22, 2026
6871473
Add GraphQL paginate_merged_prs to GitHubClient
atharvas Mar 22, 2026
57f4611
Add cancellation handling to BaseRunner
atharvas Mar 22, 2026
2a60f38
Switch scrape_commits to GraphQL with idempotency and text sanitization
atharvas Mar 22, 2026
39e6b84
Add build/push and prerequisite image handling to synthesize runner
atharvas Mar 22, 2026
c05a651
Use fetch_all in records_from_supabase
atharvas Mar 22, 2026
28574d4
Add tasks_per_repo flag and use fetch_all in pipeline
atharvas Mar 22, 2026
102db06
Handle KeyboardInterrupt in container timeout cleanup
atharvas Mar 22, 2026
7365c20
Add resolution module for dependency resolution
atharvas Mar 22, 2026
4aed495
Add resolve_packages runner
atharvas Mar 22, 2026
a2d9c7d
Archive old source modules
atharvas Mar 22, 2026
7020766
Add scratch scripts for prefill and smoke testing
atharvas Mar 22, 2026
7df5a6e
Add packages table migration and query snippets
atharvas Mar 22, 2026
29ade8f
Add package.json for node dependencies
atharvas Mar 22, 2026
0f4e09d
Accept JSON array format for env_payload in docker_build_env.sh
atharvas Mar 22, 2026
7ec5b6d
Fill all missing shell scripts from templates in Docker build context
atharvas Mar 22, 2026
b27fa44
Lowercase Docker image tags to fix uppercase owner/repo names
atharvas Mar 23, 2026
36d429d
Unify template and synthesized Dockerfiles to use the same shell scripts
atharvas Mar 23, 2026
6466c87
Improve Docker templates: live ASV discovery, shallow clones, longer …
atharvas Mar 29, 2026
3f3b6f1
Add process registry, partial timeout output, and longer agent timeouts
atharvas Mar 29, 2026
84644c5
Sandbox: immutable file hashes, template-based workspace, repo_image …
atharvas Mar 29, 2026
df661ae
Synthesizer: sandbox-based generation, force flag, attempt logging
atharvas Mar 29, 2026
54a1448
Add GitHub code search API and render_problem initial_observations param
atharvas Mar 29, 2026
14349fe
Render problems: persist deconstructed PR context; update synthesize_…
atharvas Mar 29, 2026
03e9b05
Pipeline: add render_problems stage, SIGINT handler, --agent/--force/…
atharvas Mar 29, 2026
dd6acf4
Add offline parquet import module for PR data
atharvas Mar 29, 2026
87c7dc9
Add pr_contexts table and problem_description column migration
atharvas Mar 29, 2026
83540bc
Verify: check for empty benchmarks, fix pandas run-tests.sh typo
atharvas Mar 29, 2026
47a3303
Update README with new pipeline stages and CLI flags
atharvas Mar 29, 2026
2824bed
Archive old verify.py
atharvas Mar 29, 2026
d64e4e2
Add error_logs table migration for synthesis attempt tracking
atharvas Apr 4, 2026
d3add39
Add stage 6 failure analysis doc
atharvas Apr 4, 2026
2acfeab
Document Supabase tables, migrations, and connection details
atharvas Apr 4, 2026
e6f133b
Update AGENTS.md for current project structure
atharvas Apr 4, 2026
5448e42
Add NoneAgent, set model defaults for claude/codex/gemini agents
atharvas Apr 4, 2026
16f67d1
Synthesizer: add similar-context reuse with temporal ordering
atharvas Apr 4, 2026
e66b77d
Sandbox verify: expand resource tracking and failure reporting
atharvas Apr 4, 2026
a584a8e
Normalize owner/repo to lowercase in repo image names
atharvas Apr 4, 2026
3cc6900
Pipeline: add none agent, random sampling for tasks-per-repo cap
atharvas Apr 4, 2026
089e78a
Tests: expand synthesizer and agent test coverage
atharvas Apr 4, 2026
6ab1856
Add resource_metrics columns to docker_contexts and error_logs
atharvas Apr 4, 2026
46cd0e1
Propagate resource_metrics from sandbox verify through synthesizer
atharvas Apr 4, 2026
111f348
Tests: cover resource_metrics extraction and propagation
atharvas Apr 4, 2026
022da67
Remove unused supabase snippet
atharvas Apr 8, 2026
6979d4d
Rename docker_contexts table to candidate_containers
atharvas Apr 8, 2026
fa75e30
Rename pr_contexts table to candidate_prs
atharvas Apr 8, 2026
6fb7ead
Fix stale stage numbers and extract flag in tests
atharvas Apr 8, 2026
9cd5e72
Merge origin/main into rewrite (resolving all conflicts in favor of r…
atharvas Apr 8, 2026
484ca9a
Allow unsafe YAML tags in pre-commit check
atharvas Apr 8, 2026
31b673a
Add website snippet tests
atharvas Apr 8, 2026
8785147
Add GitHub Pages deploy workflow
atharvas Apr 8, 2026
6b62db5
Update .gitignore for site, scratch, and temp files
atharvas Apr 8, 2026
35367b6
Fix mypy errors: exclude docker templates, fix Supabase typing, add m…
atharvas Apr 8, 2026
5327e0a
Fix deptry: remove unused deps, add json5/tomli, configure exclusions
atharvas Apr 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
29 changes: 0 additions & 29 deletions .devcontainer/devcontainer.json

This file was deleted.

10 changes: 0 additions & 10 deletions .devcontainer/postCreateCommand.sh

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Deploy Docs

on:
push:
branches:
- main
paths:
- "docs/**"
- "mkdocs.yml"
- "src/**"
workflow_dispatch:

permissions:
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4

- name: Set up the environment
uses: ./.github/actions/setup-python-env

- name: Build docs
run: uv run mkdocs build --strict

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: site

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
64 changes: 22 additions & 42 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ venv.bak/
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
Expand Down Expand Up @@ -194,46 +193,27 @@ cython_debug/
.cursorindexingignore

tokens.env
benchmark_results/
scratch/artifacts/
scratch/example-docker-task
scratch/rsync-backups/
scratch/artifacts/tarballs/
asv-output/
output
*context_registry*.json
# Database files
*.db
scratch/artifacts/git/
scratch/artifacts/.git/
scratch/notebooks/git/
scratch/artifacts/**/*.parquet
scratch/**/*.json
scratch/pr_runs/arrow_36738_after.md
scratch/pr_runs/arrow_36738_final.md
scratch/pr_runs/arrow_36738.md
scratch/pr_runs/arrow_adbc_2697_final.md
scratch/pr_runs/arrow_adbc_2697.md
scratch/pr_runs/astropy_13498_after.md
scratch/pr_runs/astropy_13498_after2.md
scratch/pr_runs/astropy_13498_final1.md
scratch/pr_runs/astropy_13498_final2.md
scratch/pr_runs/astropy_13498_run1_head.txt
scratch/pr_runs/astropy_13498_run1.md
scratch/pr_runs/astropy_13498_run2.md
scratch/pr_runs/qiskit_10651_after.md
scratch/pr_runs/qiskit_10651_after2.md
scratch/pr_runs/qiskit_10651_final.md
scratch/pr_runs/qiskit_10651_head.txt
scratch/pr_runs/qiskit_10651.md
scratch/pr_runs/qiskit_12869_final.md
scratch/pr_runs/qiskit_12869.md
.aider*

# Dataset artifacts (kept locally, not tracked)
dataset/

# Scratch artifacts (kept locally, not tracked)
scratch/example-repo/
scratch/merged_context_registry_*.json
scratch/artifacts/raw/online_dashboards.jsonl

# Supabase
supabase/.temp/
supabase/.branches/

# MkDocs build output
site/

# Node (Gemini CLI)
node_modules/
package-lock.json

# Scratch / dev artifacts
scratch/
fc_record.pkl
GEMINI.md
PARITY_TODOs.md

# One-off scripts
backup
rebuild
run_interpreter.py
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ repos:
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
args: [--unsafe]
- id: check-json
exclude: ^.devcontainer/devcontainer.json
- id: pretty-format-json
exclude: ^.devcontainer/devcontainer.json
args: [--autofix, --no-sort-keys]
- id: end-of-file-fixer
exclude: ^supabase/snippets/
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
Expand Down
25 changes: 13 additions & 12 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,41 @@
This guide helps contributors work effectively in the datasmith repository.

## Project Structure & Module Organization
- Source: `src/datasmith/` — core modules: `agents/`, `docker/`, `scrape/`, `benchmark/`, `detection/`, `execution/`, `collation/`, `core/`.
- Tests: `tests/` — pytest suites (e.g., `tests/test_docker_*`, `tests/agents/`).
- Assets/Docs: `static/`, `docs/`.
- Artifacts: `scratch/` (generated data), `dist/` (wheels). Do not commit contents.
- Source: `src/datasmith/` — current modules: `agents/`, `docker/`, `github/`, `publish/`, `resolution/`, `runners/`, `update/`, `utils/`, plus helper modules like `filters.py` and `preflight.py`.
- Tests: `tests/` — pytest suites in grouped folders (e.g., `tests/agents/`, `tests/docker/`, `tests/github/`, `tests/publish/`, `tests/runners/`, `tests/update/`).
- Assets/Docs/Configs: `static/`, `docs/`, `dataset/`, `scripts/`, `supabase/`.
- Generated artifacts: `dataset/` task outputs, `scratch/`, and `dist/` should be treated as build/runtime artifacts and not committed.

## Build, Test, and Development Commands
- `make install` — create env with uv and install pre-commit.
- `make check` — lock check, ruff lint/format, mypy, deptry.
- `make check` — run lock check, pre-commit, mypy, deptry.
- `make test` — run pytest with coverage (XML for CI/Codecov).
- `make build` — build wheel into `dist/`.
- `uv run <cmd>` — run tools inside the env (e.g., `uv run pytest`).
- `uvx tox -q` — run the tox matrix (py39–py312) if tox is installed.
- Optional: `make backup` uses `tokens.env` for `BACKUP_DIR` rsync.
- `uv run <cmd>` — run tools inside the env (e.g., `uv run pytest`, `uv run mypy`, `uv run pre-commit run -a`).
- `uv run python -m pytest --doctest-modules` — run doctests with the standard test suite.
- `uvx tox -q` — run the tox matrix (py39–py312) as defined in `tox.ini`.
- To run commands using the same environment variables as the user, use `uv run <command>`.
- Pipeline entrypoint: `ds-update --help` and `ds-update --start-date ... --end-date ...`.

## Coding Style & Naming Conventions
- Python 3.9–3.12. 4‑space indentation, type hints required (mypy strict; see `pyproject.toml`).
- Lint/format via Ruff (line length 120). Run `make check` before pushing.
- Naming: modules/functions `snake_case`, classes `CamelCase`, constants `UPPER_SNAKE_CASE`.
- Prefer `logging` (see `src/datasmith/logging_config.py`) over prints.
- Prefer package logging via `datasmith.utils.core` over `print`.

## Testing Guidelines
- Framework: pytest + pytest‑cov. Place tests in `tests/` named `test_*.py`.
- Run locally: `make test` or `uv run pytest`.
- Coverage: Codecov target 90% (see `codecov.yaml`). Add tests for new code paths.
- Tests must be deterministic and offline; use fakes for network calls.
- Tests must be deterministic and offline; use fakes for network/AWS.

## Commit & Pull Request Guidelines
- History is informal; please use clear, present‑tense summaries, optionally prefixing a subsystem tag: `docker: prune dangling layers`, `agents: improve build plan`.
- PRs must include: description, rationale, test coverage notes, and any docs updates. Link issues. For CLI/UX changes, include sample output or screenshots.
- PRs must include: description, rationale, test coverage notes, and any docs updates. Link issues. For CLI/UX changes, include sample output.
- Ensure `make check` and `make test` pass; CI should be green.

## Security & Configuration Tips
- Create `tokens.env` (ignored) for `GH_TOKEN`, `CODECOV_TOKEN`, `CACHE_LOCATION`, `BACKUP_DIR`. Never commit secrets.
- Create `tokens.env` (git-ignored) for environment credentials (`GH_TOKENS` or `GH_TOKEN`, `SUPABASE_URL`, `SUPABASE_KEY`, `CACHE_LOCATION`) and any service tokens used by your workflow.
- Docker tooling exists in `src/datasmith/docker/`; validate locally before pushing remote runs.

## Agent‑Specific Instructions
Expand Down
113 changes: 113 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## What is this project?

DataSmith is the Python toolchain for building the **FormulaCode** dataset — a benchmark of 67+ repositories with 964+ performance-improving commits, designed to evaluate LLMs' ability to optimize real-world codebases. It scores LLMs relative to the human-authored speedup using ASV (Airspeed Velocity) benchmarks rather than binary pass/fail tests.

## Common commands

```bash
# Setup
make install # Create venv with uv, install pre-commit hooks
make check # Lint (ruff), format, type-check (mypy), dependency check (deptry)
make test # Run pytest with coverage

# Development
uv run pytest tests/ # Run all tests
uv run pytest tests/test_docker_context.py # Run a single test file
uv run pytest -xvs tests/test_scraper.py # Verbose, stop on first failure
uv run mypy # Type checking
uv run pre-commit run -a # Run all pre-commit hooks

# Dataset verification (iterative Docker build debugging)
python dataset/verify.py --task dataset/formulacode_verified/<owner_repo>/<sha>

# Pipeline update (monthly, the primary entrypoint for DataSmith)
ds-update --start-date YYYY-MM-DD --end-date YYYY-MM-DD # Run all 6 stages
ds-update --start-date 2026-01-01 --end-date 2026-01-31 --stage 4 # Run a single stage
ds-update --start-date 2026-01-01 --end-date 2026-01-31 --resume # Resume from last completed
ds-update --help # See all options
```

## Architecture

### Source modules (`src/datasmith/`)

| Module | Purpose |
|--------|---------|
| `core/` | Infrastructure: SQLite storage (`storage.py`), GitHub/Codecov API clients (`api/`), caching (`cache/`), git operations (`git/`), data models (`models/`) |
| `docker/` | Docker image lifecycle: build context creation (`context.py` — largest file), orchestration, DockerHub publishing (`dockerhub.py`), AWS Batch integration, multi-stage shell scripts |
| `scrape/` | GitHub PR scraping, report generation with Jinja2 templates, issue extraction, code coverage integration. See `src/datasmith/scrape/CLAUDE.md` for report builder data flow |
| `agents/` | DSPy-based LLM agents for build context synthesis and performance commit classification |
| `resolution/` | Dependency resolution: parses pyproject.toml/setup.py/setup.cfg, resolves pinned deps via `uv pip compile`, validates installability. Pipeline stage 4. |
| `execution/` | Commit collection/filtering from GitHub, Python environment management |
| `detection/` | Performance breakpoint detection in benchmark results |
| `benchmark/` | ASV benchmark collection |
| `collation/` | Data aggregation |

### Pipeline stages (`ds-update`)

1. **scrape_repos** — Fetch repository metadata from GitHub
2. **scrape_commits** — Scrape merged PR commits and patches
3. **classify_prs** — LLM-based performance classification
4. **resolve_packages** — Resolve Python dependencies via `uv pip compile`, persist to `packages` table
5. **synthesize_images** — Agent-based Docker build context synthesis (uses env_payload/python_version from stage 4)
6. **publish** — Build, verify, and publish Docker images to DockerHub

### Dataset verification (`dataset/`)

Each task lives in `dataset/formulacode_verified/<owner_repo>/<sha>/` with a multi-stage Dockerfile, shell build scripts, and validation scripts. The verification loop is:
1. Run `verify.py` → check `failure.json` for errors → edit `docker_build_pkg.sh` and/or `docker_build_run.sh` → rerun until `verification_success.json` appears.

**Only modify `docker_build_pkg.sh` and `docker_build_run.sh`** during verification fixes. See `dataset/CLAUDE.md` and `dataset/AGENTS.md` for detailed guidance.

## Code quality standards

- **Python**: 3.9–3.12, type hints required (mypy strict)
- **Linting**: Ruff with 120-char line length
- **Testing**: pytest + pytest-cov
- **Build**: hatchling backend, uv for dependency management
- **CI**: GitHub Actions runs `make check` + tests on Python 3.11 and 3.12

## Supabase (local)

DataSmith uses a **local Supabase** instance for all persistent state. Connection details live in `tokens.env`:

- `SUPABASE_URL=http://127.0.0.1:54321` (PostgREST API)
- `SUPABASE_KEY=sb_secret_...` (service-role key)
- Direct Postgres: `host=127.0.0.1 port=54322 dbname=postgres user=postgres password=postgres`

### Key tables

| Table | Purpose | Populated by |
|-------|---------|-------------|
| `pull_requests` | All scraped PRs with classification, patches, rendered problems, container names | Stages 1-3, 5-6 |
| `packages` | Resolved `env_payload` (pinned deps) and `python_version` per commit | Stage 4 |
| `candidate_containers` | Successful agent-generated `build_pkg_sh` / `build_run_sh` per SHA | Stage 6 (on success) |
| `error_logs` | Per-attempt synthesis results: agent output, failure stage/return code, error messages | Stage 6 (`Synthesizer._log_attempt`) |
| `runner_progress` | Live progress counters (total/completed/failed) per pipeline run | `BaseRunner` (all stages) |
| `runner_failures` | One row per item failure with error message + traceback | `BaseRunner._log_failure` |
| `candidate_prs` | Deconstructed PR context components for re-rendering | Stage 5 |
| `hook_cache` | Memoization cache for `@supabase_cached` decorated functions | Various |

### Migrations

SQL migrations live in `supabase/migrations/` (numbered `00001_` through `00007_`). To apply a new migration against the local instance:

```python
import psycopg2
conn = psycopg2.connect(host='127.0.0.1', port=54322, dbname='postgres', user='postgres', password='postgres')
conn.autocommit = True
conn.cursor().execute(open('supabase/migrations/00007_error_logs.sql').read())
# Don't forget: GRANT ALL ON <table> TO anon, authenticated;
```

### Querying

Use `datasmith.utils.db.fetch_all(table, select=..., filters=..., gte_filters=..., ...)` for paginated reads, or `get_client()` for direct Supabase client access.

## Environment setup

Requires a `tokens.env` file in the repo root with `GH_TOKEN`, `CACHE_LOCATION`, `SUPABASE_URL`, `SUPABASE_KEY`, and optionally `DSPY_*` vars for LLM backends and `DOCKERHUB_*` vars for publishing. See README.md for the full template.
16 changes: 0 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,6 @@ install: ## Install the virtual environment and install the pre-commit hooks
@uv pip install -e .
@uv run pre-commit install

.PHONY: backup
backup: ## Create a backup of the datasets, results, and analysis directories
@echo "Syncing backup mirror with rsync"
@/usr/bin/env bash -euo pipefail -c '\
if [ ! -f tokens.env ]; then \
echo "❌ Error: tokens.env file not found"; exit 1; \
fi; \
BACKUP_DIR=$$(awk -F= '"'"'/^BACKUP_DIR=/{print $$2; exit}'"'"' tokens.env); \
if [ -z "$$BACKUP_DIR" ]; then \
echo "❌ Error: BACKUP_DIR not defined in tokens.env"; exit 1; \
fi; \
DEST="$$BACKUP_DIR/datasmith.mirror"; \
mkdir -p "$$DEST"; \
rsync -a --delete --human-readable --info=stats1 \
scratch/ "$$DEST/scratch/"; \
'
.PHONY: check
check: ## Run code quality tools.
@echo "Checking lock file consistency with 'pyproject.toml'"
Expand Down
Loading
Loading