Skip to content

Commit

Permalink
👷 update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
zrquan committed Nov 1, 2024
1 parent 03c04d5 commit 2a54a7e
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ install: ## Install the virtual environment and install the pre-commit hooks
@uv run pre-commit install

.PHONY: check
check: ## Run code quality tools.
check: ## Run code quality tools
@echo "🚀 Checking lock file consistency with 'pyproject.toml'"
@uv lock --locked
@echo "🚀 Linting code: Running pre-commit"
Expand All @@ -16,13 +16,13 @@ check: ## Run code quality tools.
@uv run deptry .

.PHONY: unit-test
unit-test: ## Test the code with pytest
@echo "🚀 Testing code: Running pytest"
unit-test: ## Test the code in tests/unit with pytest
@echo "🚀 Testing code: Running unit tests"
@uv run python -m pytest tests/unit --cov --cov-config=pyproject.toml --cov-report=xml

.PHONY: integration-test
integration-test: ## Test the code with pytest
@echo "🚀 Testing code: Running pytest"
integration-test: ## Test the code in tests/integration with pytest
@echo "🚀 Testing code: Running integration tests"
@uv run python -m pytest tests/integration --cov --cov-config=pyproject.toml --cov-report=xml

.PHONY: build
Expand All @@ -36,12 +36,12 @@ clean-build: ## Clean build artifacts
@uv run python -c "import shutil; import os; shutil.rmtree('dist') if os.path.exists('dist') else None"

.PHONY: publish
publish: ## Publish a release to PyPI.
@echo "🚀 Publishing."
publish: ## Publish a release to PyPI
@echo "🚀 Publishing the package"
@uvx twine upload --repository-url https://upload.pypi.org/legacy/ dist/*

.PHONY: build-and-publish
build-and-publish: build publish ## Build and publish.
build-and-publish: build publish ## Build and publish

.PHONY: docs-test
docs-test: ## Test if documentation can be built without warnings or errors
Expand All @@ -51,6 +51,11 @@ docs-test: ## Test if documentation can be built without warnings or errors
docs: ## Build and serve the documentation
@uv run mkdocs serve

.PHONY: docs-deploy
docs-deploy: ## Build and publish to GitHub
@echo "🚀 Deploying the GitHub page"
@uv run mkdocs gh-deploy --force

.PHONY: help
help:
@uv run python -c "import re; \
Expand Down

0 comments on commit 2a54a7e

Please sign in to comment.