-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from AlessandroMiola/add_justfile
feat: add justfile, update pre-commit and github actions configs accordingly
- Loading branch information
Showing
4 changed files
with
59 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Use PowerShell instead of sh | ||
# set shell := ["powershell.exe", "-c"] | ||
|
||
help: | ||
@just --list | ||
|
||
install: | ||
@echo "🚀 Installing dependencies" | ||
@poetry install --with dev | ||
|
||
install-pre-commit: | ||
@echo "🚀 Setting up the hooks" | ||
@poetry run pre-commit install | ||
|
||
check-project: | ||
@echo "🚀 Checking consistency between poetry.lock and pyproject.toml" | ||
@poetry check --lock | ||
@echo "🚀 Running the hooks against all files" | ||
@poetry run pre-commit run --all-files | ||
|
||
ruff: | ||
@echo "🚀 Linting the project with Ruff" | ||
@poetry run ruff check src tests | ||
|
||
ruff-show-violations: | ||
@echo "🚀 Linting the project with Ruff and show violations" | ||
@poetry run ruff check --show-source --show-fixes src tests | ||
|
||
ruff-fix: | ||
@echo "🚀 Linting the project with Ruff and autofix violations (where possible)" | ||
@poetry run ruff check --fix src tests | ||
|
||
black: | ||
@echo "🚀 Formatting the code with Black" | ||
@poetry run black src tests | ||
|
||
black-check: | ||
@echo "🚀 Checking formatting advices from Black" | ||
@poetry run black --check --diff src tests | ||
|
||
lint-and-format: ruff black | ||
|
||
test: | ||
@echo "🚀 Testing code with pytest" | ||
@poetry run pytest --verbose tests | ||
|
||
test-and-report-cov: | ||
@echo "🚀 Testing code with pytest and generating coverage report" | ||
@poetry run pytest --cov=./ --cov-report=xml |