👩‍💻 Software Development for Self-driving Labs

Elevate your software development skills in the context of self-driving laboratories. This asynchronous, remote course introduces software development concepts and best practices and productivity tools such as integrated development environments (IDEs) with VS Code, unit testing with pytest, continuous integration via GitHub actions, and documentation creation using Sphinx and Read the Docs. You’ll also learn to deploy materials discovery campaigns on cloud servers or dedicated hardware and run offline simulations using cloud hosting.

🎯 Learning Outcomes

  • Enumerate and explain software development best practices along with their corresponding benefits, demonstrating understanding and recall

  • Identify and evaluate various productivity tools for developers, highlighting how they enhance efficiency, to demonstrate analytical and selection skill

  • Compose and execute unit tests using pytest to validate code functionality, demonstrating application and analysis skills in software testing

  • Generate comprehensive Python documentation utilizing Sphinx and Read The Docs, illustrating proficiency in documentation practices and tools

  • Design and deploy a continuous integration (CI) pipeline using GitHub Actions, showcasing the ability to integrate and automate software development processes

  • Construct a reusable project template using PyScaffold, demonstrating skills in enhancing project setup efficiency and standardization

  • Initiate and manage a cloud or local hardware server to execute a materials discovery campaign, demonstrating capabilities in server management and deployment for scientific computing

  • Set up and execute an offline simulation on a cloud hosting service, illustrating the ability to leverage cloud resources for complex computational tasks

🛠️ Competencies/Skills

  • Software development literacy

  • Version control

  • Unit testing

  • Documentation

  • Compute hardware

  • Cloud computing

🧩 Modules

Each module is intended to take approximately 3-4 hours, assuming that the recommended prerequisites have been met.

Module Name

Topics

Learning Outcomes

Deep dive into Git and GitHub

  • GitHub issues

  • Pull requests

  • Collaborative coding

  • Branches

  • Merge conflicts

  • Project management

  • Open a GitHub issue on a repository

  • Create a new branch

  • Merge a GitHub pull request

  • Resolve a merge conflict

Setting up VS Code

  • IDEs

  • Miniconda

  • VS Code extensions

  • Black formatting

  • Pylance

  • GitHub Copilot Chat

  • MicroPico

  • SSH

  • autoDocstring

  • Set up VS Code

  • Install Miniconda

  • Install VS Code extensions

Debugging in VS Code

  • Print statements

  • Setting breakpoints

  • Inspecting variables

  • Stepping through code

  • Debug console

  • Debug configurations

  • Use print statements to debug code

  • Set breakpoints

  • Inspect variables

  • Step through code

  • Use the debug console

  • Set up debug configurations

Unit testing

  • pytest

  • Test result interpretation

  • Debugging

  • Test-driven development

  • Explain the purpose of unit tests

  • Write unit tests for the light-mixing demo

  • Run and interpret unit tests to fix code

  • Explain test-driven development

Automated documentation

  • Markdown

  • Documentation as code

  • Docstrings

  • Sphinx

  • Readthedocs

  • Write documentation in Markdown

  • Explain what documentation as code means

  • Write a docstring for a Python function

  • Set up a readthedocs account and publish a readthedocs page

Continuous integration (CI)

  • Continuous integration

  • GitHub actions

  • Unit tests

  • Documentation

  • Explain the purpose of continuous integration

  • Set up a GitHub actions workflow

  • Run unit tests and documentation builds on GitHub actions

Project templates

  • PyScaffold

  • Cookiecutter

  • Project initialization

  • Project adaptation

  • Python packages

  • PyPi

  • Dependency management

  • Create a project template using PyScaffold

  • Add project content

  • Publish a Python package to PyPI

  • Outline the key benefits of dependency management during software development

Launching a free cloud server

  • Serverless computing

  • PythonAnywhere

  • Hugging Face

  • Deploying Applications

  • Launch a free cloud server

  • Use a container

  • Create a container

  • Deploy a materials discovery campaign on a cloud server

On-demand cloud simulations

  • Cloud computing

  • Setting up an AWS account

  • AWS Lambda

  • Docker containers

  • Apptainer

  • Prefect

  • Run an on-demand cloud simulation

  • Integrate a cloud simulation into a materials discovery campaign

⚖️ Course Assessments and Grading Schema

Each student is required to complete various quizzes and GitHub Classroom assignments. The course is structured into an orientation module followed by six subsequent modules. The course is graded on a pass/fail basis with 70% as the threshold for passing. Here is the breakdown of the points for each part of the course:

  • 🧭 Orientation Module: Worth 15 points.
  • 📚 Modules 1-6: Each includes:
    • 🧭 A guided notebook tutorial (ungraded)
    • 📓 A knowledge check (graded, 5 points)
    • 🛠️ A GitHub Classroom assignment (graded, 10 points*)

*The final module's GitHub Classroom assignment is worth 30 points.

Note that partial points are available on certain assignments.

👤 Course developer(s)

  • Sterling Baird, PhD Materials Science and Engineering (Acceleration Consortium)