Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 1.68 KB

coding_style.md

File metadata and controls

24 lines (18 loc) · 1.68 KB

Code formatting

We use Black to format our Python code. We use these changes to Black's default settings:

Docstrings

We use Google-style docstrings.

Unittesting

In terms of requirements around unittesting etc, please see our Pull Request template (which lists all the criteria we hope each pull request satisfies).

Jupyter Notebooks

For now, we maintain the .py files, and try to ensure they're all internally consistent, but we don't promise to maintain all our notebooks! (That might change if our code starts being used by lots of people!)

Spelling

We use American English in our code (for example, so we use 'center' rather than 'centre'). This is true for variable namings and docstrings.

Repository Template

If making a new OCF Repository, please try using our template here which should help with boilerplate linting and setup.

TODO

  • publish black config file
  • find a good way to automatically check that docstrings comply with Google style
  • Change to using ruff for most linting
  • Repo template