Codync
免费开源的 1:1 Grok Bot 与 Muse 替代方案。可在 iPhone、Mac 或 Linux 桌面上将 Claude 代码、Codex、Cursor 以及 40 多个编码代理作为持久机器人使用。支持群组聊天、线程、应用。
AI 翻译
尚未收集仓库信息。
尚未检测到更新。GitHub 发布版本后会显示在这里。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗Ginkgo is a scientific workflow orchestrator built for the 21st century.
@flow and @task() — define workflows in plain Python, no DSL to learnA bacterial GWAS, from 60 assemblies to resistance-associated unitigs: dynamic
task graphs, pixi environments, caching, provenance, measured resource usage, and
resuming after a failure. The workflow is in
examples/bacterial_gwas.
It covers installation, quickstart, core concepts, environments, notebook tasks, caching, CLI usage, and a canonical example workflow.
Install the ginkgo CLI in one line. Requires uv
to be installed:
curl -LsSf https://raw.githubusercontent.com/sanjaynagi/ginkgo/main/install.sh | sh
This installs the ginkgo-workflow package from PyPI into an isolated
environment via uv tool install. Re-run the same command to upgrade. The
package is ginkgo-workflow; the command and the import are both ginkgo:
pip install ginkgo-workflow
The installer gives you core plus ginkgo-pixi, which runs tasks' bare
env="name" Pixi environments. Other optional integrations ship as separate
plugins in this repository, each one an extra of ginkgo-workflow:
ginkgo-aws: the s3:// object store and the mountpoint-s3 FUSE driverginkgo-gcp: the gs:// object store, the gcsfuse FUSE driver and the GCP
Batch executorginkgo-oci: the oci:// object store and the rclone FUSE driverginkgo-pixi: Pixi environments for tasks' env="name", and ginkgo envginkgo-k8s: the Kubernetes executorginkgo-notebook: @task("notebook"), which runs marimo notebooksginkgo-report: the ginkgo report command, for HTML run reportsginkgo-slack: Slack run notificationsTo install ginkgo with every first-party plugin:
uv tool install --force "ginkgo-workflow[all]"
Or name only the plugins you want:
uv tool install --force "ginkgo-workflow[pixi,k8s]"
ginkgo plugins lists what is installed. A remote_file() or
remote_folder() URI needs the plugin for its scheme; without it, ginkgo names
the plugin to install.
For local development:
pixi install
pixi run test
pixi run typecheck
The default environment installs every first-party plugin editable, and
pixi run test runs core's tests and the plugins' (tests/ and plugins/).
To check that core works with no plugin installed, as CI does:
pixi run -e core test-core
After pixi install, build the uncoded
symbol index used by AI coding tools (regenerated automatically by the
pre-commit hook, but useful to seed up front):
pixi run uncoded sync
If your workflows use Pixi-backed task environments, pixi must also be
available on PATH when you run them.
Run the CLI with either:
pixi run python -m ginkgo.cli --help
or:
ginkgo --help
If you prefer a plain Python environment:
pip install -e .
A population-genetics workflow that filters a VCF, computes per-population
allele frequencies, and renders a summary marimo notebook (the notebook task
needs the ginkgo-notebook plugin).
from pathlib import Path
import numpy as np
from ginkgo import file, flow, shell, task
from ginkgo_notebook import notebook
POPULATIONS = ["YRI", "CEU", "CHB"]
NOTEBOOKS_DIR = Path(__file__).resolve().parent / "notebooks"
# shell task — runs bcftools in a subprocess
@task("shell", env="genomics_tools")
def filter_snps(vcf_path: file, min_maf: float) -> file:
"""Filter to biallelic SNPs above a minor-allele-frequency threshold."""
output = "results/filtered.vcf.gz"
return shell(
cmd=(
f"bcftools view -m2 -M2 -v snps -i 'MAF>={min_maf}' "
f"{vcf_path} -Oz -o {output} && bcftools index {output}"
),
output=output,
)
# python task — uses scikit-allel, fanned out per population via .map()
@task()
def allele_frequencies(vcf_path: file, population: str) -> file:
"""Compute per-SNP alt-allele frequencies for one population."""
import allel
callset = allel.read_vcf(str(vcf_path), fields=["calldata/GT"])
ac = allel.GenotypeArray(callset["calldata/GT"]).count_alleles()
freqs = ac.to_frequencies()[:, 1] # alt allele frequency
output = f"results/af_{population}.npy"
np.save(output, freqs)
return file(output)
# notebook task — runs a marimo notebook and renders it to HTML
@task("notebook")
def population_structure(af_files: list[file], populations: list[str]) -> file:
"""Render an HTML population-genetics summary notebook."""
return notebook(NOTEBOOKS_DIR / "population_structure.py")
# flow
@flow
def main():
filtered = filter_snps(vcf_path="data/chr22.vcf.gz", min_maf=0.05)
af_results = allele_frequencies(vcf_path=filtered).map(population=POPULATIONS)
return population_structure(af_files=af_results, populations=POPULATIONS)
Run it with:
ginkgo run flow.py
All three tasks above share one file, and a task's cache identity covers the
whole module it is defined in — so editing any one of them invalidates the
cached results of all three. That is what makes an edit to module-level state
such as POPULATIONS invalidate the tasks that read it. Once a step is
expensive enough that you mind re-running it, give it its own module; see the
caching guide.
The docs and examples are centered on
examples/bioinfo, which demonstrates:
.map() fan-out across samplesRun it with:
cd examples/bioinfo
ginkgo run
To confirm a workflow is wired correctly, run ginkgo run --dry-run: it previews
the plan for the entrypoint you actually run without executing any task body.
Validation workflows a project keeps under tests/workflows/ are workflows too,
so they run by path: ginkgo run tests/workflows/smoke.py. See the
CLI guide.
ginkgo runginkgo doctorginkgo debugginkgo initginkgo inspect workflowginkgo runs (runs ls, runs show)ginkgo historyginkgo queryginkgo export (export events, export manifest)ginkgo report (from the ginkgo-report plugin)ginkgo whyginkgo secrets (secrets list, secrets validate)ginkgo cache lsginkgo cache clearginkgo cache pruneginkgo cache explainginkgo env ls (from the ginkgo-pixi plugin)ginkgo db (db path, db check, db prune, db vacuum)For full details on every command, see the CLI reference.
ginkgo/
├── core/
├── runtime/
├── envs/
└── cli/
core/ contains the user-facing DSLruntime/ contains evaluation, scheduling, caching, provenance, and value transportenvs/ contains execution backendscli/ contains the ginkgo command-line interfaceGinkgo is licensed under the Apache License, Version 2.0. See
LICENSE.