[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75KMC51BHPHWAXM75AN3B0C":3,"skill-same:01M75KMC51BHPHWAXM75AN3B0C":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M75KMC51BHPHWAXM75AN3B0C","code-release",null,"Use when releasing research code: Zenodo-GitHub integration for a citable DOI, Citation File Format (CFF), containerization with Docker\u002FApptainer, conda lockfiles, and reproducibility badges for end-to-end reproducibility.","pradyumnasagar\u002Fopen-research-skills","pradyumnasagar","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F10559871?v=4","01M75K78MYCCVKRTYGT8KKC380","Pradyumna Jayaram","01M75K78NTNE41F2PE1XBVFHAS",8,"MIT","https:\u002F\u002Fgithub.com\u002Fpradyumnasagar\u002Fopen-research-skills\u002Fblob\u002Fmain\u002Fskills\u002Fopen-science\u002Fcode-release\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\n\n\nname: code-release\ndescription: \"Use when releasing research code: Zenodo-GitHub integration for a citable DOI, Citation File Format (CFF), containerization with Docker\u002FApptainer, conda lockfiles, and reproducibility badges for end-to-end reproducibility.\"\nlicense: MIT\n---\n\u003C!-- metadata:\n  category: open-science\n  oversight: medium\n  version: 1.0.0\n  author: Pradyumna Jayaram\n  tags: [open-science, research]\n  difficulty: intermediate\n-->\n\n# Code Release\n\n## Hard rules\n\n1. **No fabricated citations.** Every cited work must resolve to a verifiable\n2. **No claim without provenance.** Every quantitative or factual claim\n3. **No silent failure.** Every script invocation, API call, or tool use must declare its exit status and what to do on non-zero. A skill that silently swallows errors is a violation.\n\n## When to use\n\n- Tagging and **archiving a release** of a research code repository.\n- Minting a **DOI** for a specific version of a code repository.\n- Writing a **CITATION.cff** so users get the right citation when they cite the code.\n- Creating a **Docker container** or **Apptainer (formerly Singularity) image** for an analysis environment.\n- Pinning dependencies with a **conda lockfile** (`conda-lock`, `pixi`, or `pyproject.toml`).\n- Preparing a **JOSS (Journal of Open Source Software)** submission.\n- Earning a **reproducibility badge** from a journal (e.g., PLOS, eLife) or a conference (e.g., ML Reproducibility Challenge).\n- Building a **reproducibility report** (an artifact with the paper).\n\n## When NOT to use\n\n- For **data release** (the data behind the code) — see `ors-open-science-fair-data`.\n- For **licensing the code** — see `ors-open-science-licensing` (this skill defers to it).\n- For **preprinting the paper** — see `ors-open-science-preprints`.\n- For **production-grade software** that is not a research output — the rules are different (semantic versioning, changelogs, deprecation policies).\n- For **internal lab code** that you do not intend to release — the discipline still applies if you want to reuse it in 2 years.\n\n## Prerequisites\n\n- A working code repository (git, on GitHub, GitLab, or Bitbucket).\n- A clear license (default: MIT or Apache-2.0; see `ors-open-science-licensing`).\n- A README with install + run instructions.\n- Tests that pass (the code must work in a fresh environment).\n- An ORCID iD for the maintainer.\n- (Optional) Docker installed; (optional) Apptainer installed; (optional) conda\u002Fmamba\u002Fpixi.\n\n## Core workflow\n\n1. **Pick a license.** MIT, Apache-2.0, GPL — see `ors-open-science-licensing`. Add `LICENSE` to the root.\n2. **Write a `CITATION.cff`.** Use the CFF schema; commit it to the repo.\n3. **Tag a release.** `git tag -a v1.0.0 -m \"Release for the 2025 paper\"`; push the tag.\n4. **Mint a DOI on Zenodo.** Connect GitHub repo to Zenodo; each release gets a Zenodo DOI. Record it in the paper.\n5. **Pin the environment.**\n   - **Python**: `pyproject.toml` + `pixi.lock` or `conda-lock.yml`; or a `requirements.txt` with hashes.\n   - **R**: `renv.lock`.\n   - **Julia**: `Manifest.toml` + `Project.toml`.\n   - **Containers**: build a Docker image and push to Docker Hub or GHCR; mirror as an Apptainer `.sif` for HPC.\n6. **Document the test.** A `reproduce.sh` (or `Makefile`) that goes from a fresh clone to the figure\u002Fresult. The test should be runnable on a clean container.\n7. **Add badges.** CI passing, license, DOI, version, coverage, JOSS status.\n8. **Submit to JOSS or apply for a reproducibility badge** (optional).\n9. **Archive to Software Heritage** (automatic for GitHub via the SWH plugin).\n\n## Code and document patterns\n\n### Pattern 1: A code-release checklist\n\n```\n- [ ] Public repository (GitHub, GitLab, Bitbucket, SourceHut, Codeberg)\n- [ ] LICENSE file in root\n- [ ] README with: title, description, install, usage, citation\n- [ ] CITATION.cff (Citation File Format)\n- [ ] Tag v1.0.0 (semantic version)\n- [ ] GitHub release \u002F Zenodo DOI minted\n- [ ] Tests passing (CI green)\n- [ ] Dependencies pinned (lockfile or hashes)\n- [ ] Dockerfile OR Apptainer def file\n- [ ] reproduce.sh or Makefile that runs the analysis end-to-end\n- [ ] Badges in README\n- [ ] Software Heritage archived\n- [ ] DOI included in manuscript\n- [ ] (Optional) JOSS submission\n```\n\n### Pattern 2: `CITATION.cff` example\n\n```yaml\n# This file is in the Citation File Format (CFF).\n# See https:\u002F\u002Fcitation-file-format.github.io\u002F\ncff-version: 1.2.0\nmessage: \"If you use this software, please cite it as below.\"\ntype: software\ntitle: \"scvi-batch-correction\"\nversion: 1.0.0\ndate-released: 2026-03-15\nlicense: MIT\nurl: \"https:\u002F\u002Fgithub.com\u002Fyourname\u002Fscvi-batch-correction\"\nrepository-code: \"https:\u002F\u002Fgithub.com\u002Fyourname\u002Fscvi-batch-correction\"\ndoi: 10.5281\u002Fzenodo.1234567\nauthors:\n  - family-names: Jayaram\n    given-names: Pradyumna\n    orcid: https:\u002F\u002Forcid.org\u002F0000-0000-0000-0000\n  - family-names: Doe\n    given-names: Jane\n    orcid: https:\u002F\u002Forcid.org\u002F0000-0000-0000-0001\nkeywords:\n  - single-cell\n  - batch-correction\n  - variational-inference\n  - scvi-tools\npreferred-citation:\n  type: article\n  title: \"A scvi-tools workflow for batch correction in single-cell RNA-seq\"\n  authors:\n    - family-names: Jayaram\n      given-names: Pradyumna\n    - family-names: Doe\n      given-names: Jane\n  - family-names: Smith\n    given-names: Bob\n  journal: \"Nature Methods\"\n  year: 2026\n  volume: 23\n  start: 100  # first page\n  end: 115\n  doi: 10.1038\u002Fs41592-026-00000-0\n```\n\n### Pattern 3: Dockerfile (lightweight Python analysis)\n\n```dockerfile\nFROM mambaorg\u002Fmicromamba:1.5-jammy\n\n# Set the working directory\nWORKDIR \u002Fapp\n\n# Copy the lockfile and environment file FIRST (for cache efficiency)\nCOPY environment.yml \u002Fapp\u002Fenvironment.yml\nCOPY pixi.lock \u002Fapp\u002Fpixi.lock 2>\u002Fdev\u002Fnull || true\n\n# Install the conda environment\nRUN micromamba env create -f \u002Fapp\u002Fenvironment.yml && \\\n    micromamba clean --all --yes\n\n# Activate the environment for subsequent commands\nSHELL [\"bash\", \"-lc\"]\nARG MAMBA_DOCKERFILE_ACTIVATE=1\n\n# Copy the source code\nCOPY . \u002Fapp\n\n# Make the reproduce script executable\nRUN chmod +x \u002Fapp\u002Freproduce.sh\n\n# Default command: run the reproduction\nCMD [\"\u002Fapp\u002Freproduce.sh\"]\n```\n\n### Pattern 4: Apptainer definition (for HPC)\n\n```apptainer\nBootstrap: docker\nFrom: mambaorg\u002Fmicromamba:1.5-jammy\n\n%files\n    environment.yml \u002Fopt\u002Fenvironment.yml\n    . \u002Fapp\n\n%post\n    micromamba env create -f \u002Fopt\u002Fenvironment.yml\n    micromamba clean --all --yes\n    chmod +x \u002Fapp\u002Freproduce.sh\n\n%environment\n    export MAMBA_DOCKERFILE_ACTIVATE=1\n    export PATH=\"\u002Fopt\u002Fconda\u002Fenvs\u002Fmyenv\u002Fbin:$PATH\"\n\n%runscript\n    exec \u002Fapp\u002Freproduce.sh \"$@\"\n\n%labels\n    Author Pradyumna Jayaram\n    Version 1.0.0\n```\n\nBuild with `apptainer build my-tool_v1.0.0.sif my-tool.def`.\n\n### Pattern 5: `environment.yml` (with lockfile comment)\n\n```yaml\nname: scvi-batch\nchannels:\n  - conda-forge\n  - bioconda\n  - pytorch\ndependencies:\n  - python=3.11\n  - numpy=1.26\n  - pandas=2.2\n  - scikit-learn=1.4\n  - pytorch::pytorch=2.2\n  - scvi-tools=1.1\n  - muon=0.1.5\n  - jupyterlab=4.1\n  - pip\n  - pip:\n    - \"git+https:\u002F\u002Fgithub.com\u002FYale-Sandbox\u002Fscvi-tools.git@main#egg=scvi-tools\"\n```\n\nTo pin: `conda-lock lock -f environment.yml -p linux-64 -p osx-64 -p osx-arm64`. This produces `conda-lock.yml` that downstream users can install from: `conda-lock install -n myenv conda-lock.yml`.\n\n### Pattern 6: `reproduce.sh` (end-to-end test)\n\n```bash\n#!\u002Fusr\u002Fbin\u002Fenv bash\n# Reproduce all results for the manuscript.\n# Tested on: Linux x86_64, macOS arm64, Apptainer 1.3\nset -euo pipefail\n\necho \"==> Downloading data\"\npython -m my_tool.download \\\n    --accession PRJNA123456 \\\n    --output data\u002Fraw\u002F\n\necho \"==> Preprocessing\"\npython -m my_tool.preprocess \\\n    --input data\u002Fraw\u002F \\\n    --output data\u002Fprocessed\u002F\n\necho \"==> Running the model\"\npython -m my_tool.train \\\n    --config configs\u002Fmain.yaml \\\n    --output results\u002F\n\necho \"==> Generating figures\"\npython -m my_tool.plot \\\n    --results results\u002F \\\n    --output figures\u002F\n\necho \"==> Comparing to expected results\"\npython tests\u002Fcheck_results.py --tolerance 0.01\n\necho \"Done. Figures in figures\u002F, results in results\u002F.\"\n```\n\nThe corresponding `tests\u002Fcheck_results.py` is what proves end-to-end reproducibility. If the output of `reproduce.sh` matches the figures in the paper, the code is reproducible.\n\n### Pattern 7: `reproduce-apptainer.sh` (HPC version)\n\n```bash\n#!\u002Fusr\u002Fbin\u002Fenv bash\n# Run the analysis inside an Apptainer container.\nset -euo pipefail\nAPPTAINER_IMG=\"docker:\u002F\u002Fghcr.io\u002Fyourname\u002Fmy-tool:v1.0.0\"\napptainer run \\\n    --bind \"$PWD:\u002Fwork\" \\\n    \"$APPTAINER_IMG\" \\\n    \u002Fwork\u002Freproduce.sh\n```\n\n### Pattern 8: Badges in README\n\n```markdown\n[![DOI](https:\u002F\u002Fzenodo.org\u002Fbadge\u002FDOI\u002F10.5281\u002Fzenodo.1234567.svg)](https:\u002F\u002Fdoi.org\u002F10.5281\u002Fzenodo.1234567)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n[![Tests](https:\u002F\u002Fgithub.com\u002Fyourname\u002Fmy-tool\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fyourname\u002Fmy-tool\u002Factions)\n[![Coverage](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fyourname\u002Fmy-tool\u002Fbranch\u002Fmain\u002Fgraph\u002Fbadge.svg)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fyourname\u002Fmy-tool)\n[![Software Heritage](https:\u002F\u002Farchive.softwareheritage.org\u002Fbadge\u002Forigin\u002Fhttps:\u002F\u002Fgithub.com\u002Fyourname\u002Fmy-tool\u002F)](https:\u002F\u002Farchive.softwareheritage.org\u002Fbrowse\u002Forigin\u002F?origin_url=https:\u002F\u002Fgithub.com\u002Fyourname\u002Fmy-tool)\n[![JOSS](https:\u002F\u002Fjoss.theoj.org\u002Fpapers\u002F10.21105\u002Fjoss.01234\u002Fstatus.svg)](https:\u002F\u002Fjoss.theoj.org\u002Fpapers\u002F10.21105\u002Fjoss.01234)\n```\n\n## Common pitfalls\n\n| Pitfall | Why it fails | Fix |\n|---------|-------------|-----|\n| **No license** | Code is not legally reusable | Add `LICENSE` (MIT, Apache-2.0, etc.). |\n| **No DOI** | Code is citable but not citation-tracked | Mint a Zenodo DOI for each release tag. |\n| **Dependencies unpinned** | \"Works on my machine\" → broken elsewhere | Use `conda-lock`, `pixi.lock`, `requirements.txt` with hashes. |\n| **Data path hard-coded** | `reproduce.sh` fails on someone else's machine | Use relative paths, environment variables, or config files. |\n| **Random seeds not set** | Results differ run-to-run | Set `np.random.seed(42)`, `torch.manual_seed(42)`, etc. |\n| **GPU-required code on a CPU machine** | Reviewer cannot reproduce | Test on both GPU and CPU; fall back to a small-data demo. |\n| **GPU-specific PyTorch build on CPU** | `libcudart.so: cannot open` | Provide a CPU-only `requirements-cpu.txt` or a Docker build arg. |\n| **Secrets in the repo (API keys, tokens)** | Security breach; revoked and broken immediately | Use environment variables; check `gitleaks` \u002F `trufflehog`. |\n| **Generated outputs checked in** | Git blame is contaminated; reviewer sees stale data | Add `results\u002F`, `data\u002F`, `*.pkl` to `.gitignore`. |\n| **Huge data files in git** | Repo bloats; clone is slow | Use Git LFS or external data storage (Zenodo, S3, Open Science Framework). |\n| **Container image with no entrypoint** | User has to guess how to run it | Provide a `Dockerfile` ENTRYPOINT or a `reproduce.sh` runscript. |\n| **DOI version doesn't match code** | Reviewer tries to reproduce a different version | Tag the release BEFORE the paper is published; use the tag's DOI in the paper. |\n| **No test for the analysis** | A bug slips into the published code | Add a smoke test (smoke runs in \u003C1 min, verifies the pipeline runs). |\n| **README says \"data available upon request\"** | The reviewer cannot reproduce | Put the data on Zenodo and link it in the README. |\n| **License mismatch with dependencies** | If a dependency is GPL, your MIT code may need to re-license | Run `pip-licenses` to check; re-license or replace as needed. |\n\n## Validation\n\nA code release is \"good\" when:\n\n- [ ] A stranger can `git clone` the repository.\n- [ ] A stranger can `pip install` (or `conda env create`) and get a working environment.\n- [ ] A stranger can run `reproduce.sh` and get the same numbers \u002F figures as the paper.\n- [ ] The README has a DOI badge linking to the Zenodo record.\n- [ ] The CITATION.cff yields a valid BibTeX entry via `cffconvert` (https:\u002F\u002Fcitation-file-format.github.io\u002Fcff-converter-python\u002F).\n- [ ] The container image builds in CI and is published to a registry.\n- [ ] The Software Heritage archive has the version (check the SWH badge).\n- [ ] The version of the code matches the version cited in the paper.\n\nA simple reproducibility test:\n\n```bash\n# In a clean environment:\ngit clone https:\u002F\u002Fgithub.com\u002Fyourname\u002Fmy-tool\ncd my-tool\ngit checkout v1.0.0\ndocker build -t my-tool:v1.0.0 .\ndocker run --rm -v \"$PWD:\u002Fwork\" my-tool:v1.0.0 \u002Fwork\u002Freproduce.sh\ndiff -r results\u002F expected_results\u002F  # should be empty (or small tolerance)\n```\n\n## Open alternatives\n\n| Commercial \u002F restricted | Open alternative | Trade-off |\n|--------------------------|------------------|-----------|\n| Docker Hub (private repos) | GitHub Container Registry (GHCR) | GHCR is free for public; Docker Hub has rate limits. |\n| Docker Desktop (proprietary build) | Podman, Apptainer | Podman is daemonless; Apptainer is built for HPC. |\n| Anaconda (commercial default channel) | conda-forge, mamba, micromamba, pixi | conda-forge is community-driven; pixi is Rust-based, fast. |\n| PyPI (full Python) | conda-forge, BioConda | BioConda is biology-specific. |\n| Travis CI (now limited free) | GitHub Actions, GitLab CI | GitHub Actions is free for public repos. |\n| CodeOcean (commercial reproducibility platform) | Repo2Docker (Jupyter), SingularityHub, Renku | All open source; CodeOcean has nicer UX. |\n| GitHub (Microsoft-owned) | GitLab, Codeberg, SourceHut | GitLab is fully open-source (community edition); Codeberg is non-profit. |\n| ReadTheDocs (hosted) | mkdocs + GitHub Pages, Quarto | All open source; ReadTheDocs has nicer versioning. |\n\n## References\n\n- Zenodo GitHub integration: https:\u002F\u002Fdocs.zenodo.org\u002Fdocs\u002Fintegrations\u002Fgithub\n- Zenodo help: https:\u002F\u002Fhelp.zenodo.org\u002F\n- Citation File Format (CFF): https:\u002F\u002Fcitation-file-format.github.io\u002F\n- CFF converter (cffconvert, cff-init): https:\u002F\u002Fcitation-file-format.github.io\u002Fcff-converter-python\u002F\n- Open Container Initiative (OCI): https:\u002F\u002Fopencontainers.org\u002F\n- Docker docs: https:\u002F\u002Fdocs.docker.com\u002F\n- Apptainer (formerly Singularity) docs: https:\u002F\u002Fapptainer.org\u002Fdocumentation\u002F\n- conda-forge: https:\u002F\u002Fconda-forge.org\u002F\n- conda-lock: https:\u002F\u002Fgithub.com\u002Fconda\u002Fconda-lock\n- pixi (Astral): https:\u002F\u002Fpixi.sh\u002F\n- BioConda: https:\u002F\u002Fbioconda.github.io\u002F\n- Software Heritage Archive: https:\u002F\u002Fwww.softwareheritage.org\u002F\n- Software Heritage GitHub integration: https:\u002F\u002Fdocs.softwareheritage.org\u002F\n- JOSS (Journal of Open Source Software): https:\u002F\u002Fjoss.theoj.org\u002F\n- JOSS reviewer checklist: https:\u002F\u002Fjoss.readthedocs.io\u002Fen\u002Flatest\u002Freview_checklist.html\n- OCI image spec: https:\u002F\u002Fgithub.com\u002Fopencontainers\u002Fimage-spec\n- Singularity user guide: https:\u002F\u002Fdocs.sylabs.io\u002Fguides\u002Flatest\u002Fuser_guide\u002F\n\n## Related skills\n\n- `ors-open-science-fair-data` — releasing the data behind the code.\n- `ors-open-science-licensing` — picking a license for the code.\n- `ors-open-science-preprints` — posting the manuscript that uses this code.\n- `ors-data-engineering-snakemake-workflow-engine` \u002F `ors-data-engineering-nextflow-workflow-engine` — workflow managers for reproducible pipelines.\n- `ors-data-engineering-docker-singularity-containers` — deeper dive on containerization.\n- `ors-data-engineering-conda-pixi-environments` — deeper dive on environments.\n\n## Changelog\n\n- 1.0.0 (2026-06-10): Initial adaptation by Pradyumna Jayaram. Synthesised Zenodo GitHub integration; Citation File Format (CFF) Initiative; Open Container Initiative; Apptainer docs; conda-forge lockfile spec; Software Heritage; JOSS reviewer checklist. Code-release checklist, CITATION.cff template, Dockerfile, Apptainer def file, environment.yml, reproduce.sh, and end-to-end test protocol are original compositions.\n\n## Cross-references\n\nOther skills in this category:\n\n- fair-data\n- licensing\n- preprints\n- preregistration\n","\u003C!-- metadata:\n  category: open-science\n  oversight: medium\n  version: 1.0.0\n  author: Pradyumna Jayaram\n  tags: [open-science, research]\n  difficulty: intermediate\n-->\n\n# Code Release\n\n## Hard rules\n\n1. **No fabricated citations.** Every cited work must resolve to a verifiable\n2. **No claim without provenance.** Every quantitative or factual claim\n3. **No silent failure.** Every script invocation, API call, or tool use must declare its exit status and what to do on non-zero. A skill that silently swallows errors is a violation.\n\n## When to use\n\n- Tagging and **archiving a release** of a research code repository.\n- Minting a **DOI** for a specific version of a code repository.\n- Writing a **CITATION.cff** so users get the right citation when they cite the code.\n- Creating a **Docker container** or **Apptainer (formerly Singularity) image** for an analysis environment.\n- Pinning dependencies with a **conda lockfile** (`conda-lock`, `pixi`, or `pyproject.toml`).\n- Preparing a **JOSS (Journal of Open Source Software)** submission.\n- Earning a **reproducibility badge** from a journal (e.g., PLOS, eLife) or a conference (e.g., ML Reproducibility Challenge).\n- Building a **reproducibility report** (an artifact with the paper).\n\n## When NOT to use\n\n- For **data release** (the data behind the code) — see `ors-open-science-fair-data`.\n- For **licensing the code** — see `ors-open-science-licensing` (this skill defers to it).\n- For **preprinting the paper** — see `ors-open-science-preprints`.\n- For **production-grade software** that is not a research output — the rules are different (semantic versioning, changelogs, deprecation policies).\n- For **internal lab code** that you do not intend to release — the discipline still applies if you want to reuse it in 2 years.\n\n## Prerequisites\n\n- A working code repository (git, on GitHub, GitLab, or Bitbucket).\n- A clear license (default: MIT or Apache-2.0; see `ors-open-science-licensing`).\n- A README with install + run instructions.\n- Tests that pass (the code must work in a fresh environment).\n- An ORCID iD for the maintainer.\n- (Optional) Docker installed; (optional) Apptainer installed; (optional) conda\u002Fmamba\u002Fpixi.\n\n## Core workflow\n\n1. **Pick a license.** MIT, Apache-2.0, GPL — see `ors-open-science-licensing`. Add `LICENSE` to the root.\n2. **Write a `CITATION.cff`.** Use the CFF schema; commit it to the repo.\n3. **Tag a release.** `git tag -a v1.0.0 -m \"Release for the 2025 paper\"`; push the tag.\n4. **Mint a DOI on Zenodo.** Connect GitHub repo to Zenodo; each release gets a Zenodo DOI. Record it in the paper.\n5. **Pin the environment.**\n   - **Python**: `pyproject.toml` + `pixi.lock` or `conda-lock.yml`; or a `requirements.txt` with hashes.\n   - **R**: `renv.lock`.\n   - **Julia**: `Manifest.toml` + `Project.toml`.\n   - **Containers**: build a Docker image and push to Docker Hub or GHCR; mirror as an Apptainer `.sif` for HPC.\n6. **Document the test.** A `reproduce.sh` (or `Makefile`) that goes from a fresh clone to the figure\u002Fresult. The test should be runnable on a clean container.\n7. **Add badges.** CI passing, license, DOI, version, coverage, JOSS status.\n8. **Submit to JOSS or apply for a reproducibility badge** (optional).\n9. **Archive to Software Heritage** (automatic for GitHub via the SWH plugin).\n\n## Code and document patterns\n\n### Pattern 1: A code-release checklist\n\n```\n- [ ] Public repository (GitHub, GitLab, Bitbucket, SourceHut, Codeberg)\n- [ ] LICENSE file in root\n- [ ] README with: title, description, install, usage, citation\n- [ ] CITATION.cff (Citation File Format)\n- [ ] Tag v1.0.0 (semantic version)\n- [ ] GitHub release \u002F Zenodo DOI minted\n- [ ] Tests passing (CI green)\n- [ ] Dependencies pinned (lockfile or hashes)\n- [ ] Dockerfile OR Apptainer def file\n- [ ] reproduce.sh or Makefile that runs the analysis end-to-end\n- [ ] Badges in README\n- [ ] Software Heritage archived\n- [ ] DOI included in manuscript\n- [ ] (Optional) JOSS submission\n```\n\n### Pattern 2: `CITATION.cff` example\n\n```yaml\n# This file is in the Citation File Format (CFF).\n# See https:\u002F\u002Fcitation-file-format.github.io\u002F\ncff-version: 1.2.0\nmessage: \"If you use this software, please cite it as below.\"\ntype: software\ntitle: \"scvi-batch-correction\"\nversion: 1.0.0\ndate-released: 2026-03-15\nlicense: MIT\nurl: \"https:\u002F\u002Fgithub.com\u002Fyourname\u002Fscvi-batch-correction\"\nrepository-code: \"https:\u002F\u002Fgithub.com\u002Fyourname\u002Fscvi-batch-correction\"\ndoi: 10.5281\u002Fzenodo.1234567\nauthors:\n  - family-names: Jayaram\n    given-names: Pradyumna\n    orcid: https:\u002F\u002Forcid.org\u002F0000-0000-0000-0000\n  - family-names: Doe\n    given-names: Jane\n    orcid: https:\u002F\u002Forcid.org\u002F0000-0000-0000-0001\nkeywords:\n  - single-cell\n  - batch-correction\n  - variational-inference\n  - scvi-tools\npreferred-citation:\n  type: article\n  title: \"A scvi-tools workflow for batch correction in single-cell RNA-seq\"\n  authors:\n    - family-names: Jayaram\n      given-names: Pradyumna\n    - family-names: Doe\n      given-names: Jane\n  - family-names: Smith\n    given-names: Bob\n  journal: \"Nature Methods\"\n  year: 2026\n  volume: 23\n  start: 100  # first page\n  end: 115\n  doi: 10.1038\u002Fs41592-026-00000-0\n```\n\n### Pattern 3: Dockerfile (lightweight Python analysis)\n\n```dockerfile\nFROM mambaorg\u002Fmicromamba:1.5-jammy\n\n# Set the working directory\nWORKDIR \u002Fapp\n\n# Copy the lockfile and environment file FIRST (for cache efficiency)\nCOPY environment.yml \u002Fapp\u002Fenvironment.yml\nCOPY pixi.lock \u002Fapp\u002Fpixi.lock 2>\u002Fdev\u002Fnull || true\n\n# Install the conda environment\nRUN micromamba env create -f \u002Fapp\u002Fenvironment.yml && \\\n    micromamba clean --all --yes\n\n# Activate the environment for subsequent commands\nSHELL [\"bash\", \"-lc\"]\nARG MAMBA_DOCKERFILE_ACTIVATE=1\n\n# Copy the source code\nCOPY . \u002Fapp\n\n# Make the reproduce script executable\nRUN chmod +x \u002Fapp\u002Freproduce.sh\n\n# Default command: run the reproduction\nCMD [\"\u002Fapp\u002Freproduce.sh\"]\n```\n\n### Pattern 4: Apptainer definition (for HPC)\n\n```apptainer\nBootstrap: docker\nFrom: mambaorg\u002Fmicromamba:1.5-jammy\n\n%files\n    environment.yml \u002Fopt\u002Fenvironment.yml\n    . \u002Fapp\n\n%post\n    micromamba env create -f \u002Fopt\u002Fenvironment.yml\n    micromamba clean --all --yes\n    chmod +x \u002Fapp\u002Freproduce.sh\n\n%environment\n    export MAMBA_DOCKERFILE_ACTIVATE=1\n    export PATH=\"\u002Fopt\u002Fconda\u002Fenvs\u002Fmyenv\u002Fbin:$PATH\"\n\n%runscript\n    exec \u002Fapp\u002Freproduce.sh \"$@\"\n\n%labels\n    Author Pradyumna Jayaram\n    Version 1.0.0\n```\n\nBuild with `apptainer build my-tool_v1.0.0.sif my-tool.def`.\n\n### Pattern 5: `environment.yml` (with lockfile comment)\n\n```yaml\nname: scvi-batch\nchannels:\n  - conda-forge\n  - bioconda\n  - pytorch\ndependencies:\n  - python=3.11\n  - numpy=1.26\n  - pandas=2.2\n  - scikit-learn=1.4\n  - pytorch::pytorch=2.2\n  - scvi-tools=1.1\n  - muon=0.1.5\n  - jupyterlab=4.1\n  - pip\n  - pip:\n    - \"git+https:\u002F\u002Fgithub.com\u002FYale-Sandbox\u002Fscvi-tools.git@main#egg=scvi-tools\"\n```\n\nTo pin: `conda-lock lock -f environment.yml -p linux-64 -p osx-64 -p osx-arm64`. This produces `conda-lock.yml` that downstream users can install from: `conda-lock install -n myenv conda-lock.yml`.\n\n### Pattern 6: `reproduce.sh` (end-to-end test)\n\n```bash\n#!\u002Fusr\u002Fbin\u002Fenv bash\n# Reproduce all results for the manuscript.\n# Tested on: Linux x86_64, macOS arm64, Apptainer 1.3\nset -euo pipefail\n\necho \"==> Downloading data\"\npython -m my_tool.download \\\n    --accession PRJNA123456 \\\n    --output data\u002Fraw\u002F\n\necho \"==> Preprocessing\"\npython -m my_tool.preprocess \\\n    --input data\u002Fraw\u002F \\\n    --output data\u002Fprocessed\u002F\n\necho \"==> Running the model\"\npython -m my_tool.train \\\n    --config configs\u002Fmain.yaml \\\n    --output results\u002F\n\necho \"==> Generating figures\"\npython -m my_tool.plot \\\n    --results results\u002F \\\n    --output figures\u002F\n\necho \"==> Comparing to expected results\"\npython tests\u002Fcheck_results.py --tolerance 0.01\n\necho \"Done. Figures in figures\u002F, results in results\u002F.\"\n```\n\nThe corresponding `tests\u002Fcheck_results.py` is what proves end-to-end reproducibility. If the output of `reproduce.sh` matches the figures in the paper, the code is reproducible.\n\n### Pattern 7: `reproduce-apptainer.sh` (HPC version)\n\n```bash\n#!\u002Fusr\u002Fbin\u002Fenv bash\n# Run the analysis inside an Apptainer container.\nset -euo pipefail\nAPPTAINER_IMG=\"docker:\u002F\u002Fghcr.io\u002Fyourname\u002Fmy-tool:v1.0.0\"\napptainer run \\\n    --bind \"$PWD:\u002Fwork\" \\\n    \"$APPTAINER_IMG\" \\\n    \u002Fwork\u002Freproduce.sh\n```\n\n### Pattern 8: Badges in README\n\n```markdown\n[![DOI](https:\u002F\u002Fzenodo.org\u002Fbadge\u002FDOI\u002F10.5281\u002Fzenodo.1234567.svg)](https:\u002F\u002Fdoi.org\u002F10.5281\u002Fzenodo.1234567)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n[![Tests](https:\u002F\u002Fgithub.com\u002Fyourname\u002Fmy-tool\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fyourname\u002Fmy-tool\u002Factions)\n[![Coverage](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fyourname\u002Fmy-tool\u002Fbranch\u002Fmain\u002Fgraph\u002Fbadge.svg)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fyourname\u002Fmy-tool)\n[![Software Heritage](https:\u002F\u002Farchive.softwareheritage.org\u002Fbadge\u002Forigin\u002Fhttps:\u002F\u002Fgithub.com\u002Fyourname\u002Fmy-tool\u002F)](https:\u002F\u002Farchive.softwareheritage.org\u002Fbrowse\u002Forigin\u002F?origin_url=https:\u002F\u002Fgithub.com\u002Fyourname\u002Fmy-tool)\n[![JOSS](https:\u002F\u002Fjoss.theoj.org\u002Fpapers\u002F10.21105\u002Fjoss.01234\u002Fstatus.svg)](https:\u002F\u002Fjoss.theoj.org\u002Fpapers\u002F10.21105\u002Fjoss.01234)\n```\n\n## Common pitfalls\n\n| Pitfall | Why it fails | Fix |\n|---------|-------------|-----|\n| **No license** | Code is not legally reusable | Add `LICENSE` (MIT, Apache-2.0, etc.). |\n| **No DOI** | Code is citable but not citation-tracked | Mint a Zenodo DOI for each release tag. |\n| **Dependencies unpinned** | \"Works on my machine\" → broken elsewhere | Use `conda-lock`, `pixi.lock`, `requirements.txt` with hashes. |\n| **Data path hard-coded** | `reproduce.sh` fails on someone else's machine | Use relative paths, environment variables, or config files. |\n| **Random seeds not set** | Results differ run-to-run | Set `np.random.seed(42)`, `torch.manual_seed(42)`, etc. |\n| **GPU-required code on a CPU machine** | Reviewer cannot reproduce | Test on both GPU and CPU; fall back to a small-data demo. |\n| **GPU-specific PyTorch build on CPU** | `libcudart.so: cannot open` | Provide a CPU-only `requirements-cpu.txt` or a Docker build arg. |\n| **Secrets in the repo (API keys, tokens)** | Security breach; revoked and broken immediately | Use environment variables; check `gitleaks` \u002F `trufflehog`. |\n| **Generated outputs checked in** | Git blame is contaminated; reviewer sees stale data | Add `results\u002F`, `data\u002F`, `*.pkl` to `.gitignore`. |\n| **Huge data files in git** | Repo bloats; clone is slow | Use Git LFS or external data storage (Zenodo, S3, Open Science Framework). |\n| **Container image with no entrypoint** | User has to guess how to run it | Provide a `Dockerfile` ENTRYPOINT or a `reproduce.sh` runscript. |\n| **DOI version doesn't match code** | Reviewer tries to reproduce a different version | Tag the release BEFORE the paper is published; use the tag's DOI in the paper. |\n| **No test for the analysis** | A bug slips into the published code | Add a smoke test (smoke runs in \u003C1 min, verifies the pipeline runs). |\n| **README says \"data available upon request\"** | The reviewer cannot reproduce | Put the data on Zenodo and link it in the README. |\n| **License mismatch with dependencies** | If a dependency is GPL, your MIT code may need to re-license | Run `pip-licenses` to check; re-license or replace as needed. |\n\n## Validation\n\nA code release is \"good\" when:\n\n- [ ] A stranger can `git clone` the repository.\n- [ ] A stranger can `pip install` (or `conda env create`) and get a working environment.\n- [ ] A stranger can run `reproduce.sh` and get the same numbers \u002F figures as the paper.\n- [ ] The README has a DOI badge linking to the Zenodo record.\n- [ ] The CITATION.cff yields a valid BibTeX entry via `cffconvert` (https:\u002F\u002Fcitation-file-format.github.io\u002Fcff-converter-python\u002F).\n- [ ] The container image builds in CI and is published to a registry.\n- [ ] The Software Heritage archive has the version (check the SWH badge).\n- [ ] The version of the code matches the version cited in the paper.\n\nA simple reproducibility test:\n\n```bash\n# In a clean environment:\ngit clone https:\u002F\u002Fgithub.com\u002Fyourname\u002Fmy-tool\ncd my-tool\ngit checkout v1.0.0\ndocker build -t my-tool:v1.0.0 .\ndocker run --rm -v \"$PWD:\u002Fwork\" my-tool:v1.0.0 \u002Fwork\u002Freproduce.sh\ndiff -r results\u002F expected_results\u002F  # should be empty (or small tolerance)\n```\n\n## Open alternatives\n\n| Commercial \u002F restricted | Open alternative | Trade-off |\n|--------------------------|------------------|-----------|\n| Docker Hub (private repos) | GitHub Container Registry (GHCR) | GHCR is free for public; Docker Hub has rate limits. |\n| Docker Desktop (proprietary build) | Podman, Apptainer | Podman is daemonless; Apptainer is built for HPC. |\n| Anaconda (commercial default channel) | conda-forge, mamba, micromamba, pixi | conda-forge is community-driven; pixi is Rust-based, fast. |\n| PyPI (full Python) | conda-forge, BioConda | BioConda is biology-specific. |\n| Travis CI (now limited free) | GitHub Actions, GitLab CI | GitHub Actions is free for public repos. |\n| CodeOcean (commercial reproducibility platform) | Repo2Docker (Jupyter), SingularityHub, Renku | All open source; CodeOcean has nicer UX. |\n| GitHub (Microsoft-owned) | GitLab, Codeberg, SourceHut | GitLab is fully open-source (community edition); Codeberg is non-profit. |\n| ReadTheDocs (hosted) | mkdocs + GitHub Pages, Quarto | All open source; ReadTheDocs has nicer versioning. |\n\n## References\n\n- Zenodo GitHub integration: https:\u002F\u002Fdocs.zenodo.org\u002Fdocs\u002Fintegrations\u002Fgithub\n- Zenodo help: https:\u002F\u002Fhelp.zenodo.org\u002F\n- Citation File Format (CFF): https:\u002F\u002Fcitation-file-format.github.io\u002F\n- CFF converter (cffconvert, cff-init): https:\u002F\u002Fcitation-file-format.github.io\u002Fcff-converter-python\u002F\n- Open Container Initiative (OCI): https:\u002F\u002Fopencontainers.org\u002F\n- Docker docs: https:\u002F\u002Fdocs.docker.com\u002F\n- Apptainer (formerly Singularity) docs: https:\u002F\u002Fapptainer.org\u002Fdocumentation\u002F\n- conda-forge: https:\u002F\u002Fconda-forge.org\u002F\n- conda-lock: https:\u002F\u002Fgithub.com\u002Fconda\u002Fconda-lock\n- pixi (Astral): https:\u002F\u002Fpixi.sh\u002F\n- BioConda: https:\u002F\u002Fbioconda.github.io\u002F\n- Software Heritage Archive: https:\u002F\u002Fwww.softwareheritage.org\u002F\n- Software Heritage GitHub integration: https:\u002F\u002Fdocs.softwareheritage.org\u002F\n- JOSS (Journal of Open Source Software): https:\u002F\u002Fjoss.theoj.org\u002F\n- JOSS reviewer checklist: https:\u002F\u002Fjoss.readthedocs.io\u002Fen\u002Flatest\u002Freview_checklist.html\n- OCI image spec: https:\u002F\u002Fgithub.com\u002Fopencontainers\u002Fimage-spec\n- Singularity user guide: https:\u002F\u002Fdocs.sylabs.io\u002Fguides\u002Flatest\u002Fuser_guide\u002F\n\n## Related skills\n\n- `ors-open-science-fair-data` — releasing the data behind the code.\n- `ors-open-science-licensing` — picking a license for the code.\n- `ors-open-science-preprints` — posting the manuscript that uses this code.\n- `ors-data-engineering-snakemake-workflow-engine` \u002F `ors-data-engineering-nextflow-workflow-engine` — workflow managers for reproducible pipelines.\n- `ors-data-engineering-docker-singularity-containers` — deeper dive on containerization.\n- `ors-data-engineering-conda-pixi-environments` — deeper dive on environments.\n\n## Changelog\n\n- 1.0.0 (2026-06-10): Initial adaptation by Pradyumna Jayaram. Synthesised Zenodo GitHub integration; Citation File Format (CFF) Initiative; Open Container Initiative; Apptainer docs; conda-forge lockfile spec; Software Heritage; JOSS reviewer checklist. Code-release checklist, CITATION.cff template, Dockerfile, Apptainer def file, environment.yml, reproduce.sh, and end-to-end test protocol are original compositions.\n\n## Cross-references\n\nOther skills in this category:\n\n- fair-data\n- licensing\n- preprints\n- preregistration\n",{"name":5,"license":15,"description":7},"main","9c0b41e2036cc5588c699f06e658ea6dc3b9685d","skills\u002Fopen-science\u002Fcode-release",2,"https:\u002F\u002Fgithub.com\u002Fpradyumnasagar\u002Fopen-research-skills","https:\u002F\u002Fgithub.com\u002Fpradyumnasagar","PhD Scholar,\r\nManipal School Of Life Sciences, Manipal\r\n #OpenSourceDeveloper #LifeSciences #ComputationalBiology","2026-10-30 01:30:52",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add pradyumnasagar\u002Fopen-research-skills --skill code-release",{"tool":38,"command":39},"bunx","bunx skills add pradyumnasagar\u002Fopen-research-skills --skill code-release",{"tool":41,"command":42},"pnpm","pnpm dlx skills add pradyumnasagar\u002Fopen-research-skills --skill code-release","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fpradyumnasagar\u002Fopen-research-skills\u002Fblob\u002Fmain\u002Fskills\u002Fopen-science\u002Fcode-release\u002FSKILL.md",true,[],[47,54,60,67,74,81],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M75KTS5K9QNX8FQBTJW2GQSH","good-skill","A well-formed test fixture for the validation script.","https:\u002F\u002Fgithub.com\u002Fpradyumnasagar\u002Fopen-research-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fgood-skill\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M75KTR7FAT0MMMED2EGC9WZZ","BadSkill","https:\u002F\u002Fgithub.com\u002Fpradyumnasagar\u002Fopen-research-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fbad-skill\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M75KTN949EDF77GJDS8H6VR8","my-new-skill","One sentence (max 200 chars) — what the skill does and when to use it.","https:\u002F\u002Fgithub.com\u002Fpradyumnasagar\u002Fopen-research-skills\u002Fblob\u002Fmain\u002Ftemplate\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M75KTHTFS121SSF1Q5X2FXDA","thesis-structure","Use when planning or checking the architecture of a PhD \u002F MPhil thesis in the life sciences or bioinformatics — monograph vs article-based, chapter sequence, IMRaD-based chapters, abstract-to-conclusion flow, and the examiner expectations that the structure must meet.","https:\u002F\u002Fgithub.com\u002Fpradyumnasagar\u002Fopen-research-skills\u002Fblob\u002Fmain\u002Fskills\u002Fthesis-writing\u002Fthesis-structure\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M75KTE3WKW46FXFHQ579H8YP","thesis-methods-reproducibility","Use when writing or checking the Methods, figures, data, and code of a bioinformatics \u002F microbiology \u002F life-science PhD thesis — the FAIR data, versioned code, report-generation, figure-and-table discipline, and the reproducibility expectations that examiners probe at viva.","https:\u002F\u002Fgithub.com\u002Fpradyumnasagar\u002Fopen-research-skills\u002Fblob\u002Fmain\u002Fskills\u002Fthesis-writing\u002Fthesis-methods-reproducibility\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M75KTA033ZQCJY3DC8P5VQET","thesis-defense-viva","Use when preparing for the viva voce \u002F oral thesis defense — building the examiner's question set, rehearsing the presentation, and the pre-defense polish (slides, summary, the 'what if I'm stuck' responses) for a life-science or bioinformatics PhD.","https:\u002F\u002Fgithub.com\u002Fpradyumnasagar\u002Fopen-research-skills\u002Fblob\u002Fmain\u002Fskills\u002Fthesis-writing\u002Fthesis-defense-viva\u002FSKILL.md",[],[]]