Skip to content

build: 🔨 remove Python specific recipes from justfile #88

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 15, 2025
Merged
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
25 changes: 6 additions & 19 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
just --list --unsorted

# Run all build-related recipes in the justfile
run-all: install-deps format-python check-python check-spelling check-commits test
run-all: check-spelling check-commits test

# Install the pre-commit hooks
install-precommit:
Expand All @@ -13,34 +13,21 @@ install-precommit:
# Update versions of pre-commit hooks
uvx pre-commit autoupdate

# Install Python package dependencies
install-deps:
uv sync --upgrade --dev --all-extras

# Check Python code with the linter for any errors that need manual attention
check-python:
uv run ruff check .

# Reformat Python code to match coding style and general structure
format-python:
uv run ruff check --fix .
uv run ruff format .

# Run checks on commits with non-main branches
# Check the commit messages on the current branch that are not on the main branch
check-commits:
#!/bin/zsh
branch_name=$(git rev-parse --abbrev-ref HEAD)
number_of_commits=$(git rev-list --count HEAD ^$branch_name)
number_of_commits=$(git rev-list --count HEAD ^main)
if [[ ${branch_name} != "main" && ${number_of_commits} -gt 0 ]]
then
uv run cz check --rev-range main..HEAD
uvx --from commitizen cz check --rev-range main..HEAD
else
echo "Not on main or haven't committed yet."
echo "On `main` or current branch doesn't have any commits."
fi

# Check for spelling errors in files
check-spelling:
uv run typos
uvx typos

test:
#!/bin/zsh
Expand Down