Links

The GOOD Model Checklist

What makes a good model? In general, good Models should be:
  • Generalized
  • Short
  • Legible
  • Strict
These checks either ARE or WILL be added as automated Checks on PRs.
Here’s a passing test on github: ✅
Here’s a failing test on github: ❌

The GOOD Model Checklist

Check your model.describe() decorator:
  • Increment the Version Number when you update your model
  • The Slug is Unique
  • The Slug is correctly Name-spaced
  • The Display Name is descriptive but not too long
  • The Description describes what the model does
  • The DTOs describe the Inputs and Outputs schemas
Check the model’s content:
  • It does one thing, and it does it well
  • It conforms to it’s type definition
  • Does the client have the ability to ask for what they want?
  • Do you set good default inputs?
  • Don’t make historical calls within models unless absolutely necessary
Check the code:
  • It raises ModelDataError instead of returning None or 0
  • It returns a DTO, and uses a framework DTO if it exists.
  • It doesn’t have any print() statements.
  • It passes linting tests.
  • There are no global functions that aren’t models
Check the legibility:
  • It is a minimal number of lines of code to get the job done
  • It uses descriptive variable names
Check for repetition:
  • It calls other models if they exist
  • It uses the framework tools if they exist
Check that your actions are allowed on your model type:
Models that fetches data
⚠️
Algorithmic models
⚠️ only other algorithms
Models that stitch together other models
Models that have hardcoded configuration