Open Code training helps researchers share software so that others can check their results and extend their work.
This training will teach researchers to:
use version control to transparently track the evolution of software and analysis scripts
licence software appropriately and publish code on public platforms
use good programming habits to create code that can be read, used, and extended by others
use literate programming tools to embed analysis code and its results directly into manuscripts
Open Code training introduces you to the fundamentals of writing and sharing good code, and
provides you with practical tools for sharing actual code. It also acts as a
platform for further self-directed learning.
Other UKRN Open Research topics can be found in the list of UKRN Primers.
Requirements
Participants must have access to a computer with a Mac, Linux, or Windows operating system (not a tablet, Chromebook, etc.) that they have administrative privileges on.
They should have a few specific software packages installed (listed below).
Accessibility
We are committed to making this workshop accessible to everybody. The workshop organizers have checked that:
The room is wheelchair / scooter accessible.
Accessible restrooms are available.
Materials will be provided in advance of the workshop and
large-print handouts are available if needed by notifying the
organizers in advance.
If we can help making learning easier for
you (e.g. sign-language interpreters, lactation facilities) please
get in touch (using contact details below) and we will
attempt to provide them.
We are dedicated to providing a positive and accessible learning environment for all.
Please notify the instructors in advance of the workshop if you require any accommodations or if there is anything we can do to make this workshop more accessible to you.
Contact:
Please email the instructors for more information.
The instructors' emails are:
Everyone who participates in UKRN activities is required to conform to the UKRN Code of Conduct. This document also outlines how to report an incident if needed.
Surveys
Please be sure to complete these surveys before and after the workshop.
Why share?
In this lesson we consider some of the reasons why people share code and software, and think about which of those reasons might apply to us.
09:30
Rights and Licensing
Licensing is a common difficulty in academia because universities usually have complex policies. In this lesson we figure out what we can and can't do with our own code and software.
To participate in a Foundations for open code and software
workshop,
you will need access to the software described below.
In addition, you will need an up-to-date web browser.
The Carpentries maintain a list of common issues that occur during installation as a reference for instructors
that may be useful on the
Configuration Problems and Solutions wiki.
Git
Git is a version control system that lets you track who made changes
to what when and has options for easily updating a shared or public
version of your code
on github.com. You will need a
supported
web browser.
You will need an account at github.com
for parts of the Git lesson. Basic GitHub accounts are free. We encourage
you to create a GitHub account if you don't have one already.
Please consider what personal information you'd like to reveal. For
example, you may want to review these
instructions
for keeping your email address private provided at GitHub.
Click on "Next" four times (two times if you've previously
installed Git). You don't need to change anything
in the Information, location, components, and start menu screens.
From the dropdown menu select "Use the Nano editor by default" (NOTE: you will need to scroll up to find it) and click on "Next".
On the page that says "Adjusting the name of the initial branch in new repositories", ensure that
"Let Git decide" is selected. This will ensure the highest level of compatibility for our lessons.
Ensure that "Git from the command line and also from 3rd-party software" is selected and
click on "Next". (If you don't do this Git Bash will not work properly, requiring you to
remove the Git Bash installation, re-run the installer and to select the "Git from the
command line and also from 3rd-party software" option.)
Ensure that "Use the native Windows Secure Channel Library" is selected and click on "Next".
Ensure that "Checkout Windows-style, commit Unix-style line endings" is selected and click on "Next".
Ensure that "Use Windows' default console window" is selected and click on "Next".
Ensure that "Default (fast-forward or merge) is selected and click "Next"
Ensure that "Git Credential Manager Core" is selected and click on "Next".
Ensure that "Enable file system caching" is selected and click on "Next".
Click on "Install".
Click on "Finish" or "Next".
If your "HOME" environment variable is not set (or you don't know what this is):
Open command prompt (Open Start Menu then type cmd and press Enter)
Type the following line into the command prompt window exactly as shown:
setx HOME "%USERPROFILE%"
Press Enter, you should see SUCCESS: Specified value was saved.
Quit command prompt by typing exit then pressing Enter
This will provide you with both Git and Bash in the Git Bash program.
Video Tutorial
For macOS, install Git for Mac
by downloading and running the most recent "mavericks" installer from
this list.
Because this installer is not signed by the developer, you may have to
right click (control click) on the .pkg file, click Open, and click
Open on the pop up window.
After installing Git, there will not be anything in your /Applications folder,
as Git is a command line program.
For older versions of OS X (10.5-10.8) use the
most recent available installer labelled "snow-leopard"
available here.
Video Tutorial
If Git is not already available on your machine you can try to
install it via your distro's package manager. For Debian/Ubuntu run
sudo apt-get install git and for Fedora run
sudo dnf install git.