Summary and Setup

Summary


This lesson grows a researchers’ software skills necessary to apply good practices that enable open and reproducible research. The lesson focuses on building modular, reusable, maintainable, sustainable, reproducible, testable, and robust software. This will allow you to more easily organize, maintain and share your code.

The main themes that are addressed are generically applicable, but please note that a lot of the exercises and demonstrations are in Python.

This workshop is heavily inspired by and based on the awesome CodeRefinery training materials.

Intermediate research software development?

If you find the topics that are covered in this lesson too basic, you could consider the Intermediate Research Software Development lesson. That lesson has a similar focus, but also teaches more intermediate topics like software architecture, advanced coding best practices, Integrated Software Development environments and is targeted to slightly more advanced research software engineers.

Collaborative version control with Git and GitHub

For this lesson you need some basic knowledge of Git and GitHub. We recommend going through the Collaborative version control with Git and GitHub lesson before going through this material.

Prerequisites

Learners are expected to have the following knowledge:

  • Basic Git and GitHub knowledge is required.
  • You already write code for your research, but no expertise is required.
  • Some experience in navigating file trees and editing files in a terminal session, as well as basic knowledge of Python programming is recommended.

Software Setup


Details

  1. Git is required for this lesson. Please follow this link for detailed setup instructions.
  2. Additionally you want to install Miniconda and dependencies. There are different ways of installing it, we describe below a quick command line install. If you are not comfortable with it, please refer to this installation using graphical installer.

Note: Of course, you can use venv and pip, but those will not be covered here.

After installing, close and reopen your terminal application or refresh it by running the following command:

BASH

source ~/miniconda3/bin/activate

Create a conda environment and install pytest.

BASH

conda create --name myenv
conda activate myenv
conda install pytest

You should now have a conda environment with pytest in it. Verify the environment:

BASH

python --version
pytest --version

which should return something like:

OUTPUT

Python 3.13.1
pytest 8.3.4

To deactivate the environment, run

BASH

conda deactivate