Software Publication#

Publishing your software provides open access, increasing visibility and facilitating collaboration within the research community. Assigning a DOI to your software enables proper citation, enhancing your academic and professional recognition.

When should I publish?#

While there is no “right” time to publish your software, we suggest to publish your software as early as possible. This allows others to use your software and provide feedback. This can help you to improve your software and to find bugs. Additionally, publishing your software early can help you to get more citations. At the very least we suggest a publication of your software when you publish a paper that uses the software.

Where to publish?#

While there are many platforms avaiable, we currently suggest to publish your software on zenodo. The platform supports versioning, ensuring users can access the latest updates while preserving earlier versions for reference. Zenodo’s commitment to long-term preservation aligns with the requirements of funding agencies and institutions, offering a stable and accessible repository for your software. Additionally zenodo offers a GitHub integration which allows you to automatically create a new version of your software on zenodo whenever you create a new release on GitHub.

Add a license to your software#

Before publishing your software, you need to add a license to your software.

Publish your software on zenodo manually#

Publishing software on zenodo is easy. However, it is recommended to automatize the process, when it comes to publishing new versions of your software. This is discussed in the next section. To publish your software on zenodo, you need to create an account. Afterwards you can log in, create a new upload, and upload your software as a zip file. Zenodo will automatically create a DOI for your software.

Automate the publication of your software on zenodo from github#

Add Citation file to your repository#

To automate the publication of your software on zenodo, you need to add a citation file to your repository. This can be done by creating a file called CITATION.cff in the root directory of your repository. The file should at least contain the authors information. More information about the citation file format can be found here. This nice thing about this file format is that GitHub also uses it to display the citation information of your repository. You can find the documentation here

Give zenodo access to your github repository#

To automate the publication of your software on zenodo, you need to connect your zenodo to github here. If you want to publish the code from an organization’s repositories, zenodo needs to get access. This can be done by clicking on “Authorize GitHub” and then selecting the organization. If you want to publish the code from your personal repositories, you need to click on “Authorize GitHub” and then select your username.

Enable repository on zenodo#

After giving zenodo access to your github repositories, you see the list of your public repositories here. Switch the toggle button to “on” for the repository you want to publish on zenodo.

Create a new release on github#

You need to create a new GitHub release. This can be done by clicking on the “Releases” tab in your GitHub repository and then clicking on “Draft a new release”. You need to choose a tag and the target branch for your release. Then you can add a description for your release and finally click on “Publish release”. This will trigger the zenodo GitHub integration and create a new version of your software on zenodo. After the publication, you are not able to change the source code of the software on zenodo. Whenever you want to publish a new version of your software, you need to create a new release on GitHub.

Curating the meta data#

After the publication you are still able to edit the meta data of your software on zenodo. This can be done by clicking on “Edit” on the zenodo page of your software.

Publishing from Gitlab (git.rz.tu-bs.de) using a Mirror#

Currently zenodo does not allow to publish software directly from gitlab to zenodo. However, you can use a the mirror feature of gitlab to mirror your gitlab repository to GitHub. You can then use the GitHub integration of zenodo to publish your software on zenodo. To mirror your repository from gitlab to github we recommend to follow these steps:

  1. Create a new public and empty repository on GitHub (no README, no license, no .gitignore)

  2. Go to your gitlab repository and click on “Settings” -> “Repository” -> “Mirroring repositories” -> “add new”

    • Enter the URL of your GitHub repository: E.g. for irmb/virtualfluids it would be ssh://git@github.com/irmb/virtualfluids.git

    • Click “detect host keys” and choose “Authentication method: SSH public key”

    • Leave “username” empty and choose “Mirror repository: only protected branches”

    • Click “Mirror repository”

  3. On the page “Mirroring repositories” copy the SSH key by clicking on the copy button: Alt text

  4. Go to your GitHub repository and click on “Settings” -> “Deploy keys” -> “Add deploy key”

    • Enter a title for the key

    • Paste the SSH key from gitlab into the “Key” field

    • Choose “Allow write access”

    • Click “Add key”

  5. On the page “Mirroring repositories” click on “Update now” to mirror your repository from gitlab to GitHub

Done! Gitlab will automatically mirror your protected branches and also tags based on this branch to GitHub. The last thing you need to do to get the zenodo publication is to create a new release on GitHub manually.