Best Practices for Sharing Research Software and Source Code

Sharing research software and source code openly requires selecting a public repository like GitHub or Zenodo, applying an approved open-source licence such as MIT or Apache 2.0, minting a persistent Digital Object Identifier (DOI) for citations, and providing reproducible runtime documentation. By structuring academic code according to FAIR principles, research teams preserve scientific integrity while keeping pathways clear for future spinout creation or commercial licencing.

Why Sharing Research Software and Source Code Matters More Than Ever

Writing academic code is often messy. We build prototypes late at night, patch scripts together to produce a figure for a grant deadline, and promise ourselves we will clean it up later. Yet, sharing research software and source code has become an indispensable requirement of modern science and technology development. Funders across the UK and internationally now expect researchers to publish their algorithms alongside peer-reviewed findings, treating software as an equal first-class research output rather than an afterthought. When you share clear, tested repositories, you give external peers the ability to reproduce your experiments, critique your methodology, and accelerate scientific discovery.

Beyond basic academic compliance, sharing research software and source code effectively sets the foundation for real-world impact and commercial development. Clean code repositories make it vastly simpler to translate university inventions into commercial ventures or attract private capital. When academic founders decide to take algorithms out of the laboratory and into the marketplace, early diligence frequently hinges on code quality, dependency audits, and licensing clarity. If you plan to scale a university spinout and connect with commercial backers, you can explore Startup funding for entrepreneurs to learn how early-stage ventures turn technical IP into funded businesses.

What Are the Core Principles of Reusable Research Code?

To share code that peers can actually run without tearing their hair out, you must follow established scientific computing frameworks. The scientific community relies heavily on the FAIR data principles, adapted specifically for software: Findable, Accessible, Interoperable, and Reusable.

Findability means your software possesses descriptive metadata and a permanent web location. Accessibility means humans and automated web scrapers alike can download your repository without meeting paywalls, broken links, or obscure private university servers. Interoperability means your code interacts predictably with standard file formats, common libraries, and community protocols. Finally, reusability demands that your software includes clear build instructions, sensible dependencies, and explicit licensing conditions.

If someone cannot download your repository, install dependencies in five minutes, and replicate a demo calculation, your code is technically visible, but practically useless. Creating reproducible code is an act of consideration for your future self, your collaborators, and future commercial partners who may audit your tech stack.

How to Choose the Right Repository and Archival Platform

Many researchers make the fatal error of believing that putting a project on GitHub or GitLab is sufficient for long-term preservation. It is not. Code hosting services are private businesses. Repositories can be accidentally deleted, accounts suspended, or commit histories rewritten. You need a two-tier strategy for sharing research software and source code.

First, use an active version control platform (like GitHub or GitLab) for live collaborative development, issue tracking, and community feedback. Version control maintains every edit your team makes, making debugging simple and multi-author collaboration tidy.

Second, pair that active repository with an archival repository when you release a formal version or publish a paper. Archival services like Zenodo, Figshare, or your university’s institutional repository mint a persistent Digital Object Identifier (DOI). When you create a formal release on GitHub, Zenodo can automatically snapshot your entire code state, assign it a permanent DOI, and preserve it across decades. This guarantees that even if your active GitHub repo changes, readers of your paper ten years from now can access the exact commit that produced your published numbers.

How to Select an Open-Source Licence Without Losing Your Rights

Publishing software without a licence does not mean it is in the public domain. Under UK and international copyright law, unlicensed code remains under default exclusive copyright. This means other researchers have no legal right to copy, adapt, run, or distribute your software, even if it is publicly visible on the internet.

Choosing a licence clarifies precisely what users can and cannot do with your work:

  • Permissive Licences (MIT, Apache 2.0, BSD): These licences give everyone complete freedom to use, modify, distribute, and even commercialise your code, provided they retain your original copyright notice. Apache 2.0 also includes an explicit patent grant, which protects users from patent infringement claims by contributors.
  • Copyleft or Reciprocal Licences (GNU General Public Licence, GPL v3): These licences require any derivative software that incorporates your code to also be open-sourced under the exact same terms. This protects your work from being swallowed whole by proprietary commercial systems without contributing modifications back to the community.
  • Creative Commons (CC-BY, CC0): Great for text, figures, and research datasets, but generally discouraged for software source code. Creative Commons licences lack essential provisions regarding patent grants and source code distribution.

Before picking a licence, consult your university’s technology transfer office (TTO). If your research was funded by specific grants or if your institution claims ownership of academic intellectual property, specific rules may govern your licensing choices.

How Do You Make Research Software Properly Citable?

If you spend six months crafting an optimised numerical package, you deserve academic credit every time someone uses it to publish a paper. Citations are the currency of academia, yet software often gets overlooked in bibliographies.

To ensure proper citation of your research software and source code, follow these steps:

  1. Add a CITATION.cff File: Create a simple text file named CITATION.cff in the root of your repository. This format, known as Citation File Format, is machine-readable and natively recognised by GitHub, Zenodo, and reference managers like Zotero. It specifies author names, affiliations, preferred paper citations, and version numbers.
  2. Provide a Human-Readable Guide: In your README.md file, include a clear section titled “How to Cite”. Provide both an APA-style reference and an exportable BibTeX entry. Make it effortless for a rushed author to paste your credit straight into their LaTeX document.
  3. Link the Software DOI to Your Paper: Cite your archived software DOI directly inside the methodology and data availability sections of your associated journal publications.

Tracking software citations not only bolsters your academic track record; it also demonstrates technical traction when you approach commercial investors or apply for translational grants.

Essential Documentation: What Every Repository Must Include

Nothing deters a researcher faster than a repository containing naked code with no instructions. Effective documentation turns an obscure script into an enduring tool.

Every repository should contain the following standard files:

The README File

Your README is the front door of your project. It must explain what the software does in plain language, what problems it solves, and why it is better or different than existing solutions. Include minimum system requirements, supported operating systems, and a copy-pasteable “quick start” code snippet.

Installation Instructions and Dependency Locks

Document your dependencies meticulously. State which programming language version was used (for instance, Python 3.11 or R 4.3). Use standard environment definitions: a requirements.txt or pyproject.toml file for Python, a renv.lock for R, or a Project.toml for Julia. If your software requires specific compiled libraries (like CUDA or OpenBLAS), state those prerequisites prominently.

Minimal Working Examples and Test Datasets

Include small, anonymised toy datasets that run in under 30 seconds. This allows peers to test their installation and confirm that your calculations return expected outputs before they feed in their own massive research datasets.

Automated Testing and Continuous Integration

Write unit tests to verify that your core mathematical functions calculate numbers correctly. Use free continuous integration runners (such as GitHub Actions) to run your tests across different operating systems whenever code is updated. This prevents subtle bugs from creeping into your repository unnoticed.

Packaging and Containerisation for Ultimate Reproducibility

Dependencies break over time. A script that runs flawlessly on your laptop today may fail to run two years from now because an underlying library updated its API or deprecated a function. Advanced packaging ensures your code survives the test of time.

Distribute your software through language-specific package registries like the Comprehensive R Archive Network (CRAN), PyPI, Bioconductor, or Conda Forge. Packaging your code this way lets users install your software and all of its underlying dependencies with a single terminal command.

For complex pipelines with multiple external software tools, consider containerisation using Docker or Apptainer (formerly Singularity). Containers bundle your code, operating system packages, environment variables, and specific library versions into an isolated, executable environment. Containers eliminate the classic excuse: “It works on my machine.” Other researchers simply run the container, ensuring total execution reproducibility regardless of their local machine setup.

Balancing Open Source with Commercialisation and Intellectual Property

Researchers often assume that sharing research software and source code prevents them from ever commercialising their ideas. That is a myth. Open-source models and commercial ventures coexist across the technology landscape. Many high-growth software and deep-tech companies operate on open-core models, where fundamental scientific algorithms are shared openly to build a massive global user base, while proprietary enterprise modules, cloud interfaces, or managed services are monetised.

However, you must be strategic before pushing code live:

  • Patent Considerations: If your software contains a patentable industrial method, sharing the source code publicly before filing a patent application constitutes “prior art” or public disclosure. Under UK and European patent law, prior art immediately destroys the novelty required to secure a patent. Always speak with your institutional technology transfer officers before public dissemination if patent protection is on the table.
  • Data Privacy and Confidentiality: Ensure you have not accidentally embedded proprietary API keys, passwords, unpublished clinical records, or identifiable personal data in your commit history. Once pushed to a public git server, commit logs are permanently recorded, even if you delete the file later.
  • Clean Intellectual Property Audits: If you plan to found a commercial startup based on your research software, investors will conduct technical due diligence. They will look at every line of code to verify who owns it, ensure open-source licences do not restrict commercialisation, and confirm that your development team is legally authorised to spin the company out.

When you are ready to explore turning technological breakthroughs into commercial companies, you can evaluate Startup investment opportunities to understand how private investors evaluate scientific innovations and invest capital into early-stage ventures.

Managing Community Contributions and Long-Term Maintenance

When code becomes useful, other scientists will start suggesting improvements, reporting bugs, and submitting patches. While this is flattering, managing an open-source project can quickly drain your time if you do not establish healthy boundaries.

Protect your sanity by adding two essential governance files to your repository:

  • CONTRIBUTING.md: Explain clearly how external peers can contribute. Specify your coding style guidelines, how to run tests, and how bug reports should be submitted. Explicitly state whether you are actively seeking external contributions or merely maintaining the software for scientific archival purposes.
  • CODE_OF_CONDUCT.md: Establish expectations for respectful, constructive community interactions. Standard templates like the Contributor Covenant are widely accepted and easy to adapt.

Set realistic expectations regarding maintenance. It is perfectly acceptable to state in your documentation that the software is provided as-is to support a specific publication and that your academic team cannot provide unpaid technical support. Clear boundaries prevent burnout while keeping the code accessible to the wider public.

How UK Startups Can Leverage Academic Research Code

Great scientific code frequently serves as the launchpad for high-growth commercial technology startups. In the UK, early-stage ventures developing cutting-edge software and hardware enjoy exceptional support through government tax incentive schemes.

The Seed Enterprise Investment Scheme (SEIS) and Enterprise Investment Scheme (EIS) are designed to encourage investment into early-stage, innovation-led enterprises by offering attractive tax reliefs to private angel investors. When university researchers transition their code into commercial startups, understanding these schemes makes raising seed capital substantially more achievable.

If you want to understand how these tax-efficient funding routes work in practice, you can Learn about SEIS and its generous relief rules for early investment. Additionally, founders moving toward larger investment rounds can Learn about EIS to see how scaling ventures structure tax-efficient equity financing.

Early-stage founders also benefit from working alongside accountants and financial planners who understand the commercial realities of tech development. Many founders access Educational Tools through financial professionals to navigate statutory tax filings, investor compliance, and the structural requirements of running an eligible tech venture.

Practical Checklist for Sharing Research Software and Source Code

Before you press the button to make your repository public, run through this final checklist:

  1. Repository Audit: Have you removed all hardcoded passwords, personal file paths, API tokens, and private research data?
  2. Licence Inclusion: Does your repository root include a clearly named LICENSE file containing standard OSI-approved terms?
  3. Comprehensive README: Does your README clearly state the software purpose, system prerequisites, and a 30-second quick-start command?
  4. Citation File: Is there a valid CITATION.cff and a clear BibTeX reference for journal authors to cite your work?
  5. Archival Preservation: Have you linked your repository to an archival platform like Zenodo to mint a permanent DOI?
  6. Working Test Suite: Can an independent user run your unit tests and replicate sample outputs using an included minimal dataset?
  7. Institutional Approval: Have you checked in with your university tech transfer office to confirm there are no patent filings or commercial agreements that restrict open publication?

Sharing research software and source code following this framework ensures that your hard work stands the test of time, accelerates scientific breakthroughs, and leaves open every opportunity for commercial exploitation.

Connecting Scientific Innovation with Early-Stage Investment

Translating robust research software into a commercial company is one of the most rewarding journeys a technologist can take. When code leaves the academic environment, founders need practical access to capital, supportive investors, and tax-efficient structures to scale their ideas.

The Oriel Investment Marketplace brings together ambitious startup founders and forward-thinking angel investors on a clear, commission-free platform. Whether you are building an algorithm-driven enterprise or looking to back promising, high-growth UK startups, aligning technical innovation with smart funding transforms scientific research into real-world commercial success.

more from this section

Receive the latest news

Stay Connected with Oriel IPO

Be first to recieve…