Guidance for Research Software: Licensing, Reproducibility, and Archiving
This guide provides practical recommendations for researchers developing software as part of their work. Proper handling of licensing, reproducibility, and archiving ensures your software is reusable, verifiable, and preserved for the long term. These practices align with FAIR principles (Findable, Accessible, Interoperable, Reusable) and enhance citation, collaboration, and impact.
1. Licensing Your Research Software
Licensing clarifies how others can use, modify, and distribute your software. Without a license, your code is under all rights reserved by default, limiting reuse.
Why License?
- Enables collaboration and citation.
- Protects your intellectual property while promoting open science.
- Required for publication in many journals (e.g., PLOS, Nature).
Best Practices
-
Choose an Appropriate License:
| License | Permissive (Easy Reuse) | Copyleft (Derivatives Must Share) | Best For |
|---|
| MIT | ✅ Yes | ❌ No | Simple, broad reuse (e.g., libraries) |
| Apache 2.0 | ✅ Yes | ❌ No | Patents, enterprise-friendly |
| GPL v3 | ❌ No | ✅ Yes | Ensures derivatives remain open |
| BSD 2-Clause | ✅ Yes | ❌ No | Minimal restrictions |
- Use choosealicense.com for guidance.
- For dual-licensing (open + commercial), consult legal experts.
-
Implementation:
- Add a
LICENSE file (or LICENSE.md) in your repository root.
- Include a
LICENSE header in every source file.
- For dependencies, use
pip-licenses or licensecheck to audit.
-
Common Pitfalls:
- Don't mix incompatible licenses in one project.
- If funded (e.g., NSF, NIH), check grant requirements for open licensing.
Example MIT License Snippet:
MIT License
Copyright (c) [year] [your name]
Permission is hereby granted, free of charge, to any person obtaining a copy...
2. Ensuring Reproducibility
Reproducibility allows others (and your future self) to recreate results exactly. Research software must include clear instructions for setup and execution.
Key Principles
- Version Everything: Code, data, environment.
- Document Dependencies: List exact versions.
- Automate Builds: Use CI/CD pipelines.
Best Practices
-
Version Control:
- Use Git with GitHub/GitLab/Bitbucket.
- Tag releases (e.g.,
v1.0.0) with semantic versioning (SemVer).
-
Environment Management:
| Tool | Language/Use Case | Pros |
|---|
| Docker | Any | Full OS/container isolation |
| Conda | Python/R/Julia | Cross-language envs + packages |
| venv/Pipenv | Python | Lightweight virtualenvs |
| Nix | Any | Declarative, reproducible builds |
Example Dockerfile:
FROM python:3.10-slim
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
CMD ["python", "main.py"]
-
Documentation:
README.md: Installation, usage, examples, hardware reqs.
environment.yml (Conda) or requirements.txt (frozen with pip freeze).
- Tests: Use pytest/JUnit; run via GitHub Actions.
- Data: Version with DVC or Git LFS; cite datasets with DOIs.
-
Verification:
- Include a
reproduce.sh script.
- Use Binder (mybinder.org) for instant Jupyter environments.
Checklist:
3. Archiving Your Software
Archiving creates a permanent, citable snapshot beyond volatile repositories like GitHub.
Why Archive?
- GitHub repos can be deleted/orphaned.
- Provides DOIs for citation (like papers).
- Ensures 10+ year preservation.
Best Practices
-
Choose a Platform:
| Platform | Features | DOI | Cost |
|---|
| Zenodo | Free, GitHub integration | ✅ | Free |
| Figshare | Datasets + software | ✅ | Free (up to 5GB) |
| Software Heritage | Automatic Git mirroring | ❌ | Free |
| GitHub Releases | Temporary; pair with Zenodo | ❌ | Free |
-
What to Archive:
- Tagged release tarball/zip (source code + docs).
- Binaries/executables if applicable.
- Exclude
.git, temp files (use .gitignore).
-
Process:
- On GitHub: Release → Upload assets → Link to Zenodo (auto-generates DOI).
- Metadata: Title, authors (ORCID), description, keywords, related publications.
- Update
CITATION.cff file for easy citation export.
Example Zenodo Workflow:
- Push tag:
git tag v1.0.0 && git push --tags.
- Zenodo auto-imports → Edit metadata → Publish.
Summary Checklist
| Aspect | Action Items |
|---|
| Licensing | Add LICENSE file; choose permissive if possible. |
| Reproducibility | Docker/Conda; README with steps; CI tests. |
| Archiving | Zenodo DOI on releases; Cite in papers. |
Additional Resources
Adopt these practices early to maximize your software's impact. For custom advice, provide details on your stack/language. Compiled by Sherlock, Trailblazer Labs.