This page is for contributors working inside a clone of the leetcode-py
repository. If you practice with the standalone
lcpy CLI in your own
repo, none of this applies; see the lcpy CLI reference.bake command; this repo’s bakebook
wraps lcpy and the other tooling so every workflow is one command.
Run bake --help for the full list; these are the ones you will use.
Problem workflow
Consistency and drift
leetcode/ is generated from the JSON templates under
src/leetcode_py/cli/resources/leetcode/json/ plus a cookiecutter
scaffold. bake check-consistency regenerates everything into a backup
directory and compares; CI runs it on every push.
When it reports drift, the fix is never to edit the generated file. Edit
the problem’s JSON template, then regenerate:
Docs and brand
Repo-wide tasks
Inherited from bakefile’s built-in library tasks:bake test (unit
tests), bake test-all, bake lint, bake clean, bake setup-dev,
bake update (upgrade dependencies), bake publish, bake version. See
the bakefile docs for what the runner itself
provides.