Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions .pre-commit-config.yaml

This file was deleted.

28 changes: 22 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,10 @@ help::
@echo "Available commands"
@echo " help -- (default) print this message"

ci: pre-commit $(call FORALL_PKGS,tests)
ci: ruff $(call FORALL_PKGS,tests)
help::
@echo " ci -- Run tests for all packages, the same way as CI does"

pre-commit:
uv run pre-commit run --all-files
help::
@echo " pre-commit -- Run pre-commit on all files"

clean: $(call FORALL_PKGS,clean)
rm -rf dist .ruff_cache .pytest_cache
help::
Expand All @@ -36,6 +31,27 @@ help::
@echo " NOTE: run this command to ensure all containers are stopped after tests"


ruff:
@uv run ruff check --fix
@uv run ruff format
help::
@echo " ruff -- Run ruff checks on all files."

define COMMITIZEN_HOOK_CONTENTS
#!/bin/sh
MSG_FILE=$$1
uv tool run --from commitizen cz check --allow-abort --commit-msg-file $$MSG_FILE
endef
export COMMITIZEN_HOOK_CONTENTS
install-hooks:
@echo "make ruff" > .git/hooks/pre-commit
@chmod +x .git/hooks/pre-commit
@echo "$$COMMITIZEN_HOOK_CONTENTS" > .git/hooks/commit-msg
@chmod +x .git/hooks/commit-msg
help::
@echo " install-hooks -- Install custom pre-commit hooks locally."
@echo " -- NOTE: Do this at least once after cloning the repo."

realtime.%:
@$(MAKE) -C src/realtime $*

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ To run each of the packages' tests in parallel. This should be generally faster

Other relevant commands include
```bash
make pre-commit # run lints and formmating before commiting
make install-hooks # install all commit hooks into the local .git folder
make stop-infra # stops all running containers from all packages
make clean # delete all intermediary files created by testing
```
Expand Down