Skip to content

Maintainer notes

Joe Wallwork edited this page Feb 2, 2024 · 2 revisions

PSyACC is a small package with only a few dependencies, and isn't particularly complex, so hopefully it should be simple to maintain. However, there are a few key things to be aware of:

Coding practices

The Coding Practices are essential reading for all development in PSyACC.

Test suite

PSyACC's test suite is run automatically using GitHub Actions. The configuration is specified in .github/workflows/default.yml. At time of writing, the time taken to run the test suite is less than two minutes, so we are nowhere near the limit of the GitHub plan. As such, we simply use an instance of the latest available Ubuntu OS, hosted on GitHub's cloud platform.

  • The block starting with on indicates when the tests should be run.

    • Tests are run when a PR is opened and whenever a commit is pushed to an open pull request.
    • Tests may be run manually (e.g., from the Actions tab).
    • Tests are at the same time every weekend, regardless of whether there have been any changes to PSyACC. This helps us to check that updates to PSyclone (or another dependency) haven't caused PSyACC to get out-of-date.
  • The block starting with jobs describes the tasks within the test suite.

    • The first task is to create a Python virtual environment.
    • Next, we install PSyclone and PSyACC.
    • The linting test is run before the main test suite so that any formatting errors can be caught more quickly.
    • The main test run is actually a code coverage check. This only adds a small overhead. At time of writing, PSyACC has 100% code coverage. However, it is worth noting that the test harness does not currently enforce this - it simply allows us to check the status.

Pre-commit hooks

As mentioned in the Coding Practices, PSyACC uses two pre-commit hooks, for flake8 and Black. These are configured in .pre-commit-config.yaml and will only work if installed properly (e.g., with the make install recipe). Note that we use a mirror for the Black hook because it doesn't support pre-commit hooks at time of writing.

Clone this wiki locally