Setting the Scene


Figure 1

Course overview diagram

Section 1: Setting Up Environment For Collaborative Code Development


Figure 1

Tools needed to collaborate on code development effectively

1.1 Introduction to Our Software Project


Figure 1

Snapshot of the LOCAR dataset

Figure 2

Software project template repository in GitHub

Figure 3

Making a copy of the software project template repository in GitHub

Figure 4

View of the own copy of the software template repository in GitHub

Figure 5

URL to clone the repository in GitHub

Figure 6

MVC example of a DNA Guide Graphical User Interface application

1.2 Virtual Environments For Software Development


Figure 1

Python environment hell XKCD comic

Figure 2

This will produce the following figure: Rainfall daily metrics We can see now that the software calculates, and plots, for each site the daily sum, average, maximum and minimum values of the data provided. The presentation of the data is not perfect, but it is still a helpful overview of the data.


1.3 Integrated Software Development Environments


Figure 1

View of selecting the Python Extension for VS Code

Figure 2

View of an opened project in VS Code

Figure 3

Updating the virtual environment in VS Code

Figure 4

Using the Python Environment Manager in VS Code

Figure 5

  • In the window that appears, search for the name of the library (pytest), then click on this package in the list below to install it. Installing a package in VS Code

  • Figure 6

    Running single scripts in VS Code

    Figure 7

    Syntax Highlighting Functionality in VS Code

    Figure 8

    Code Completion Functionality in VS Code

    Figure 9

    Code References Functionality in VS Code

    Figure 10

    Code Search Functionality in VS Code VS Code will list the search strings and all the files that contain them. You can also group the files by folder/sub-folder names.


    Figure 11

    Code Search Functionality in VS Code, using a seperate tab

    Figure 12

    Version Control Functionality in VS Code

    Figure 13

    River Data Error Message in VS Code

    1.4 Collaborative Software Development Using Git and GitHub


    Figure 1

    Development lifecycle with Git, containing Git commands add, commit, push, fetch, checkout, merge and pull

    Figure 2

    git-distributed

    Figure 3

    Git feature branch workflow diagram

    Figure 4

    Software project's main branch

    Figure 5

    Software project's develop branch

    1.5 Python Code Style Conventions


    Figure 1

    View of selecting the Flake8 Extension for VS Code

    Figure 2

    Python code indentation settings in VS Code

    Figure 3

    Python code whitespace settings in VS Code

    1.6 Verifying Code Style Using Linters


    Section 2: Ensuring Correctness of Software at Scale


    Figure 1

    Tools for scaled software testing

    2.1 Automatically Testing Software


    2.2 Scaling Up Unit Testing


    2.3 Continuous Integration for Automated Testing


    Figure 1

    YAML language support is available within VS Code. Select the Extensions tab, and type ‘YAML’ into the extension search bar. The first result should be the YAML extension from redhat (see graphic below). Select and install this extension. YAML language extension in VS Code


    Figure 2

    Continuous Integration with GitHub Actions - Initial Build

    Figure 3

    Continuous Integration with GitHub Actions - Build Log

    Figure 4

    Continuous Integration with GitHub Actions - Build Details

    Figure 5

    Continuous Integration with GitHub Actions - Build Matrix

    2.4 Diagnosing Issues and Improving Robustness


    Figure 1

    NumPy arrays of incompatible shapes

    Figure 2

    NumPy arrays' shapes after adding a new_axis

    Figure 3

    NumPy arrays' shapes after broadcasting

    Figure 4

    Setting up test framework in VS Code

    Figure 5

    Running pytest in VS Code

    Figure 6

    Running a single test in VS Code

    Figure 7

    Setting a breakpoint in VS Code

    Figure 8

    Debugging in VS Code

    Figure 9

    Debugging in VS Code

    Figure 10

    All tests in VS Code are successful

    Section 3: Software Development as a Process


    Figure 1

    Software design and architecture

    3.1 Software Requirements


    3.2 Software Architecture and Design


    Figure 1

    Writing good code comic

    3.3 Programming Paradigms


    3.4 Functional Programming


    3.5 Object Oriented Programming


    3.6 Architecture Revisited: Extending Software


    Figure 1

    Rainfall daily metrics

    Figure 2

    River pH daily metrics

    Section 4: Collaborative Software Development for Reuse


    Figure 1

    Software design and architecture

    4.1 Developing Software In a Team: Code Review


    Figure 1

    Branches for a feature and its tests

    Figure 2

  • Head over to Settings section of your software project’s repository in GitHub. Accessing settings for a repository in GitHub

  • Figure 3

  • Select the vertical tab ‘Collaborators’ from the left and click the ‘Add people’ button. Managing access to a repository in GitHub

  • Figure 4

  • Add your collaborator(s) by their GitHub username(s), full name(s) or email address(es). Adding collaborators to a repository in GitHub

  • Figure 5

  • Head over to the remote repository in GitHub and locate your new (feature-x-tests) branch from the dropdown box on the Code tab (you can search for your branch or use the “View all branches” option). All repository branches in GitHub

  • Figure 6

  • Open a pull request by clicking “Compare & pull request” button. Submitting a pull request in GitHub

  • Figure 7

  • Once the moderator approves your changes, either one of you can merge onto the base branch. Typically, it is the responsibility of the code’s author to do the merge but this may differ from team to team. Merging a pull request in GitHub

  • 4.2 Preparing Software for Reuse and Release


    4.3 Packaging Code for Release and Distribution


    Section 5: Managing and Improving Software Over Its Lifetime


    Figure 1

    Managing software

    5.1 Managing a Collaborative Software Project


    Figure 1

    List of project issues in GitHub

    Figure 2

    Creating a new issue in GitHub

    Figure 3

    Referencing comments and commits in GitHub

    Figure 4

    Adding a new project board in GitHub

    Figure 5

    Selecting a project board template in GitHub

    Figure 6

    Project board setting in GitHub

    Figure 7

    Naming a project in GitHub

    Figure 8

    Default card board in GitHub

    Figure 9

    Adding issues and notes to a project board in GitHub

    Figure 10

    Coverting a task to issue

    5.2 Assessing Software for Suitability and Improvement


    5.3 Software Improvement Through Feedback


    Figure 1

    Milestones in GitHub

    Figure 2

    Create a milestone in GitHub

    Figure 3

    Create a milestone in GitHub

    Figure 4

    Milestones in GitHub

    Wrap-up


    Figure 1

    Usefulness versus time to master grid

    Figure 2

    Overview of tools and techniques covered in the course

    Figure 3

    Overview of topics covered in the course based on level of difficulty