Summary and Schedule
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.
Other related lessons
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.
Do you want to teach this lesson? Find more help in the README Feel free to reach out to us with any questions that you have. Just open a new issue. We also value any feedback on the lesson!
Setup Instructions | Download files required for the lesson | |
Duration: 00h 00m | 1. Introduction to good practices in research software development |
What are benefits of applying software engineering good
practices? How does software engineering differ from programming? When to use which tools? |
Duration: 00h 15m | 2. Modular Code Development |
What are the benefits of writing modular code in terms of maintenance
and scalability? How can nested code be targeted and improved through modularization? |
Duration: 01h 15m | 3. Document your research software |
What can I do to make my code more easily understandable? What information should go into comments? What are docstrings and what information should go into docstrings? |
Duration: 02h 10m | 4. Testing |
Why should I write automated tests for my code? How do I write a good unit test? |
Duration: 03h 10m | 5. Continuous Integration | How can we implement automatic testing each time we push changes to the repository? |
Duration: 04h 25m | Finish |
The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.
Software Setup
Details
- Git is required for this lesson. Please follow this link for detailed setup instructions.
- 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:
Create a conda environment and install pytest
.
You should now have a conda environment with pytest in it. Verify the environment:
which should return something like:
OUTPUT
Python 3.13.1
pytest 8.3.4
To deactivate the environment, run