Skip to content

tooling: Add Makefile for common development commands. #201

@nedseb

Description

@nedseb

Description

Unified developer tooling setup: Makefile as primary interface + npm for git hooks and release management.

Makefile targets

Run `make help` to see all available commands:

Command Description
`make install` Install pip + npm dependencies
`make prepare` Install git hooks (husky)
`make setup` Full dev setup (install + prepare)
`make lint` / `make lint-fix` Ruff linter / auto-fix
`make test` Mock tests (suggests test-all for hardware)
`make test-mock` Mock tests only
`make test-hardware` All hardware tests (needs board)
`make test-board` Board tests (buttons, LEDs, buzzer)
`make test-sensors` Sensor hardware tests (I2C)
`make test-all` All tests (mock + hardware)
`make test-` Per-scenario (e.g. `make test-hts221`)
`make test-examples` Validate example files
`make ci` Full CI pipeline (lint + tests + examples)
`make build` Build (lint + test)
`make repl` / `make mount` REPL / mount lib/
`make clean` / `make deepclean` Caches / everything including node_modules

Per-scenario targets are generated dynamically from `tests/scenarios/*.yaml`.

Git hooks (npm + husky)

  • commit-msg : commitlint (conventional commits, per-driver scopes, max 78 chars)
  • pre-commit : validate-branch-name + git-precommit-checks + lint-staged (ruff)

npm scripts

Scripts delegate to make targets:

  • `npm run build` → `make build`
  • `npm run ci` → `make ci`
  • `npm run setup` → `make setup`
  • `npm run commit` → commitizen (interactive commit assistant)

Configuration files

File Purpose
`Makefile` Primary command interface
`env.mk` Environment variables (PATH, PORT)
`package.json` npm scripts + devDependencies
`commitlint.config.js` Commit message rules
`.validate-branch-namerc.js` Branch name patterns
`git-precommit-checks.config.js` Pre-commit content checks
`.prettierrc.json` Prettier (JS/JSON/YAML)
`.releaserc.json` semantic-release

Related

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions