Add dev dependency and shortcuts

This commit is contained in:
kagami 2023-12-08 18:04:16 +08:00
parent 688bae92a8
commit 4e565fab0f
3 changed files with 26 additions and 0 deletions

20
Makefile Normal file
View File

@ -0,0 +1,20 @@
div = $(shell printf '=%.0s' {1..120})
setup-dev:
@echo "Setting up development environment..."
@echo "Installing dev dependencies..."
@~/.chat/mamba/envs/devchat-commands/bin/pip install -r requirements-dev.txt
@echo "Done!"
check:
@echo ${div}
~/.chat/mamba/envs/devchat-commands/bin/python -m ruff check .
~/.chat/mamba/envs/devchat-commands/bin/python -m ruff format . --check
@echo "Done!"
fix:
@echo ${div}
~/.chat/mamba/envs/devchat-commands/bin/python -m ruff format .
@echo ${div}
~/.chat/mamba/envs/devchat-commands/bin/python -m ruff check . --fix
@echo "Done!"

5
pyproject.toml Normal file
View File

@ -0,0 +1,5 @@
[tool.ruff]
line-length = 100
[tool.ruff.lint]
extend-select = ["E501"] # explicitly adding the rules

1
requirements-dev.txt Normal file
View File

@ -0,0 +1 @@
ruff~=0.1.7