Skip to content

Commit

Permalink
Add manual ruff commands
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartmaxwell committed Sep 25, 2024
1 parent b69714b commit a3e1b0c
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ python_version := "3.12"
# Set the uv run command
uv := "uv run --python 3.12 --extra test"

#Set the uv command to run a tool
uv-tool := "uv tool run"

# Run the Django development server
run:
@just sync
Expand Down Expand Up @@ -41,9 +44,17 @@ check:
test:
{{uv}} pytest

# Run Ruff linking
lint:
{{uv-tool}} ruff check

# Run Ruff formatting
format:
{{uv-tool}} ruff format

# Run nox
nox:
uv tool run nox --session test
{{uv-tool}} nox --session test

# Run coverage
cov:
Expand Down Expand Up @@ -71,13 +82,13 @@ build:
publish:
rm -rf ./dist/*
uv build
uv tool run twine check dist/*
uv tool run twine upload dist/*
{{uv-tool}} twine check dist/*
{{uv-tool}} twine upload dist/*

# Upgrade pre-commit hooks
pc-up:
uv tool run pre-commit autoupdate
{{uv-tool}} pre-commit autoupdate

# Run pre-commit hooks
pc-run:
uv tool run pre-commit run --all-files
{{uv-tool}} pre-commit run --all-files

0 comments on commit a3e1b0c

Please sign in to comment.