Better Python: Introduction

RSE Team, University of Sheffield, September 2021

Acknowledgements

Based on “Best Practises in Software Engineering” by Matt Williams.

Thank you!

Thanks for coming - this course is under development and we’d like feedback.

About Bob

Bob Turner

Mix of software engineering and research experience.

About David

David Wilby

Former chicken/physics researcher, now research software engineer.

RSE at Sheffield

RSE

13 RSEs, 35 projects / year worth ~£11m total

Learning Objectives

  • Add documentation directly into python code using “docstrings”.
  • Write tests (using pytest) so you can update your code with confidence.

Delivery

  • Mix of short presentations and self directed exercises.
  • Ask questions in chat.
  • Use “Raise hand” when you finish an exercise.

Blackboard Collaborate

Principles are general

We’re doing this in Python.

C, C++, R, Fortran, Julia, Go and Rust have their own specific tools and techniques.

Running order

  1. Presentation - why bother with documentation?
  2. Exercise - documentation.
  3. Presentation - why bother with testing?
  4. Exercise - testing.
  5. Check in!
  6. Exercise - fixtures.
  7. Close.