Home › Learn › Shift left › What is missing

Shift left · page 9 of 13

The gap report: what a repo is missing

A gap report for data engineering repos: missing tests, checks, lockfiles and CI setup, built on repo-review and OpenSSF Scorecard plus per-function gaps.

↑ All of shift leftShift left, explainedHow software solved itSyntax treesPure functionsTests, coverage, complexityTesting data logic offlineClean codeSecurity and costWhat is missingThe bundleHow it is builtAll the checksOpen source and ours

In plain words

Point it at a repo; it lists the gaps

Findings say what is wrong in the code that exists. The gap report says what should exist but doesn't: a test for a function, a check in CI, a lockfile, a coverage threshold. It is the first thing to run on an inherited repo.

SETUP
  missing  pre-commit configuration          -> add .pre-commit-config.yaml (template provided)
  missing  SQL lint for 14 .sql files and 9 SQL notebook cells
  missing  coverage threshold in CI
  missing  dependency lockfile
  present  tests folder, CI workflow, bundle validated before deploy
SECURITY PRACTICES
  pinned dependencies: no    branch protection: yes    static analysis in CI: no
TESTS
  17 pure functions with no test (listed)    3 modules with no test file
  29 impure functions that could be pure (listed, with a hint each)

Illustrative report, not measured on a real repo.

Built from

Off the shelf, plus data-specific checks

PartToolVerdictWhy
Framework for 'is this repo set up right?' checksrepo-review (BSD licence)PursueChecks are small plugins; we write the data-repo ones
Python project checkssp-repo-review (Scientific Python's checks)Borrowpyproject, pre-commit and Ruff checks reused as they are
Security practices scoreOpenSSF ScorecardPursuePinned dependencies, branch protection, static analysis in CI, and more
Per-function gapsthe purity, coverage and complexity reportsBuildJoins the three into one list
Data-repo checksour pluginsBuildSQL lint present, bundle validated, notebooks thin, contract files present, plan check wired

The report ends with one list in fix-first order: missing setup that blocks everything else, then complex untested functions, then pure untested ones.

FAQ

Questions people ask

Is there a tool that reports what a Python repo is missing?

repo-review is a framework for repo checks, and Scientific Python's sp-repo-review ships many checks on it. OpenSSF Scorecard scores security practices. Data-specific checks are added as plugins.

What should a data engineering repo have before code review?

A tests folder with unit tests for the pure logic, pre-commit with Python and SQL lint, a lockfile, CI that runs tests with a coverage threshold on changed lines, secret scanning, and bundle validation before deploy.

Next

Where to go next

Next page: The shift-left bundle: design, tools and status

↑ All of shift left · The repo on GitHub · Data project review