Use a publicly accessible repository with version control.
Add a license.
Register your code in a community registry.
Enable citation of the software.
Use a software quality checklist.
Use version control + a repository
Version control systems help to organize and collaborate on code.
Using a public repository contributes to the reproducibility, reusability and quality of your code.
How to stay in control of your versions
There is some support ;)
Add a license
Creative Commons licenses
Copyleft vs Permissive
An example
Suppose you wrote a small code snippet and want to share it with the rest of your research group. While writing the code, you copied a couple of snippets from Stack Overflow. What do you have to do to not get into trouble over copyright infringement?
Read the Stack Overflow post: Code snippets published since 01.02.2016 are under the MIT license, but you do not have to add the MIT license. A link to the post is enough as attribution.
Add it to your project directory (and repository if possible)
Bonus exercise part1
If needed, make a new public repository on GitHub.
Click on ‘uploading an existing file’, and drag and drop the contents of a folder/file to the repository.
Click on ‘commit changes’ to complete the upload.
Add a license to the project
Edit the changelog to reflect the addition of your license, and prepare for a new version release.
You can do this from inside GitHub, by clicking on the file, and then on the pen-icon to edit it. Don’t forget to click ‘Commit changes’ when you are done, to save your changes.
You can also edit it locally and upload the changelog to your repository.
Why are we using a Sandbox? Hint: the Sandbox is non-permanent, and forgets its “archived” projects!
Click ‘log in with GitHub’ and authorize Zenodo to connect to your GitHub account.
On Zenodo’s main page, click on the triangle next to your name, and choose ‘GitHub’. Find the repository you just created, and enable Zenodo’s access by toggling the switch to ‘on’.
Bonus exercise part2
Make a release from the GitHub main page:
Click ‘create a new release’
Tag the release with the version number. Note that it is common practice to prefix the letter ‘v’ to your version number; e.g.: v0.1.0.
Name the release. For example, using the version tag and the date (in YYYY-MM-DD format!)
Use the description field to copy the changelog information. Since this is the first release on GitHub, you can copy the entire changelog into the description. Future releases can be described by the changes made between the previous release and that one.
Click ‘Publish release’.
Return to the GitHub page in your Zenodo profile. Verify that the repository is uploading. After the release is complete (this can take a while!), you should be able to click through to the sandbox page of your released project!
Under normal circumstances, you would get the DOI and place a badge in your GitHub README. Why should you not do this now you are working in the Zenodo sandbox?