Skip to content

Pre PR Checklist For A New Disease Module

Tim Hallett edited this page Jan 12, 2023 · 2 revisions

Things To Do Before Submitting a Pull Request For a New Disease Module

NB. If you are not ready to complete all these steps and want help and advice: submit a Draft Pull Request

  1. Check that all the usual coding conventions have been used for file names and location of files.

  2. Check that extensive comments are made throughout - including:

    • docstring at the top of each module file
    • docstring for each function definition
    • throughout at each piece of logic
    • throughout the pytests
    • throughout the formatting scripts (explaining source of data, purpose of reformatting etc)
    • throughout the analysis scripts (what is being demonstrated and why; similar to a figure legend for each figure that is generated)
  3. Check that the latest version of master has been merged into the branch

  4. Check that a file test_YourModuleName is included in that confirms operation of the module:

    • Minimally, one test in which the module is registered, the simulation run, the module used, and at the end checks that datatypes in population.props is unchanged from initiation
    • Further tests that check for the the correct basic logical behaviour of the module
  5. Check that the entire set of tests run and that the docs build correctly (tox)

  6. Check that the code works with an arbitrarily small population size (any pop_size>100 should work)

  7. Check that the formatting of the code is correct (check with flake8 src tests and isort src tests --interactive

  8. Only include commits that have changed from the master and should be included in the new master (i.e. not other files that have been added or edited in the course of the development of the code).

  9. Check any necessary documentation is placed in the the docs/write-ups folder and edit docs/write-up.rst as needed.

  10. Explain what this PR represents in the first comment. Also including explanations about any changes that have occurred to any ResourceFile.

Then submit Pull Request

Clone this wiki locally