repo-development
Guides DataChain repository maintenance, packaging, focused tests, contributor workflows, and backend-sensitive source changes.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- repo-development
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Guides DataChain repository maintenance, packaging, focused tests, contributor workflows, and backend-sensitive source changes.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/development-and-testing.md5.5 KB
- 参考文档references/schema-backend-change-matrix.md5.4 KB
- 参考文档references/troubleshooting.md4.7 KB
- 脚本scripts/select_tests.py5.3 KB
- 脚本scripts/snapshot_repo_state.py3.9 KB
03 SKILL.md 正文
Repo Development
Use this sub-skill when the user is working inside a DataChain checkout and asks how to edit, test, package, document, or review the repository itself. It is for maintainer workflows, not ordinary DataChain SDK usage.
Trigger Phrases
Load this sub-skill for prompts containing or implying:
- contributor setup,
nox, pytest, lint, docs build, package build, optional extras, Python version support, or repository test layout; - changes to signal schemas,
DataModel, flatten/unflatten, Python↔SQL type conversion, physical storage, warehouse SQL, or nested field exports; - backend divergence between local SQLite, Studio ClickHouse, and future BigQuery/Snowflake/Postgres support;
- source edits under
src/datachain/lib,src/datachain/func,src/datachain/sql,src/datachain/query,src/datachain/cli, orsrc/datachain/skill; - dirty/stale checkout checks, generated repo skill refresh decisions, or repository provenance.
First Decision
- Need setup, tests, nox sessions, optional extras, or focused test choice → read development-and-testing and use select_tests.py for suggestions.
- Changing schema, nested signal mapping, SQL types, export/read-back, or backend-sensitive behavior → read schema-backend-change-matrix before proposing completion criteria.
- Need stale-skill or checkout provenance evidence → run snapshot_repo_state.py in the current checkout and compare with the root skill provenance.
- Debugging maintainer failures → read troubleshooting, then pick the narrowest reproducible test before running broad sessions.
Durable Maintainer Rules
- A signal is a typed column. A nested
DataModelflattens into DB columns; the logicalSignalSchematravels with every dataset version. - Chain operations return new chains and must not mutate the receiver in place.
- Logical schema and physical columns are mapped in many paths: ingestion, export, query operations, object hydration, flat tabular export, and each backend. There is no single chokepoint.
- Local SQLite is the convenient default, not proof of backend parity. ClickHouse has stricter nullability and array/map behavior; future backends add more divergence. Verify target behavior on the actual backend when the change depends on backend semantics.
- For signal→column work, done means a literal matrix of affected paths × backend(s) × composition axes with permanent tests and read-back assertions. A green smoke test is not enough.
- Keep comments sparse and timeless. Public APIs need docstrings; internal helpers usually need clear names instead of explanatory comments.
Boundaries and Reroutes
- This sub-skill owns DataChain source maintenance, packaging, nox/pytest, test selection, backend-sensitive review, and stale-skill provenance.
- For user-facing SDK code patterns, UDFs, saves, exports, File/DataModel usage,
and LLM operations, read
sdk-pipelines. - For native query operations, function expressions, and schema/backend behavior
as an SDK user, read
query-engine. - For
datachainCLI command usage or Studio job/pipeline operation, readcli-and-studio. - For DataChain bundled coding-agent skills or
dc-knowledge, readagent-harness.
Safety Rules
- Do not run full
noxor broad example/cloud/Studio tests when a focused test can isolate the issue first. - Treat tests that need cloud credentials, Studio tokens, model downloads, optional GPU/torch/HF/video extras, or shared remote services as optional or credential-gated unless the user explicitly supplies access.
- Do not claim backend parity from a local CPU/SQLite run.
- Do not overwrite generated repo skill directories or live managed skills from maintainer scripts; refresh/import workflows are owned by DisCo meta skills.
- Do not include local environment paths, secrets, or machine-specific checkout paths in public docs or skill content.
Native Verification Candidates Owned Here
- Optional-dependency import gate: base
import datachainmust not require torch, whiledatachain.torchshould explain the missingtorchextra. - CLI/skill/knowledge tests for changes under
src/datachain/cliorsrc/datachain/skill. - Signal/schema/type conversion tests for changes under
lib/convert,lib/signal_schema,data_storage,sql, and query operations. nox -s tests -- <focused pytest path>for a selected subset after narrow pytest commands pass.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).