Integrations#

As a growing open-source project, scope has made use of a number of freely available integrations and services, which are summarized below:

Code style#

With a consistent style, bugs are easier to find, code is easier to maintain, and enhancements are easier to make.

  • black: a Python code-formatter. It generally conforms to PEP-8 standards, but it does so in a very deterministic manner, which is helpful for our code. The basic pre-commit configuration is location in .pre-commit-config.yaml, while more detailed configuration is detailed in pyproject.toml. black is also implemented as a GitHub action, with the relevant configuration in .github/workflows/style. To apply the same methodology to our Jupyter notebooks, we also make use of black_nbconvert.

  • isort: a tool for sorting imports in Python files. As with black, the basic pre-commit configuration is location in .pre-commit-config.yaml, while more detailed configuration is detailed in pyproject.toml. black is also implemented as a GitHub action, with the relevant configuration in .github/workflows/style.

  • yamllint: lints our YAML files, checking them for bugs, syntax errors, and general style. The associated configuration file is .yamllint. Implemented as a GitHub check and pre-commit hook.

Continuous integration#

With continuous integration, our testing and releasing processes are automated, allowing for minimization of bugs and ultimately improvement of user experience.

  • Codecov: checks what percentage of our code base is covered in our automated tests. Ideally, we’d like to keep our coverage above 95% if it is in a production environment. Relevant configurations are noted in codecov.yml.

  • Dependabot: automatically checks whether dependencies are kept up-to-date. Configuration is held in .github/dependabot.yml.

  • GitHub Actions: A number of the services described in this page are implemented as GitHub Actions, which manifest as checks on different commits. In general, we would like all of our checks to pass before pull requests are merged. Configuration files for GitHub Actions are contained in .github/workflows.

  • pre-commit hooks: these can be applied to any local commits. The associated configuration file is .pre-commit-config.yml.