Skip to content
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

[chore] Add some additional commands to the Makefile #2823

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
22 changes: 20 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
.PHONY: venv
venv: ## Create virtual environment and install development dependencies
@echo "Creating virtual environment..."
@python -m venv .venv
@echo "Activating virtual environment..."
ifeq ($(OS), Windows_NT)
.venv\Scripts\activate
else
. .venv/bin/activate
endif
@echo "Installing development dependencies..."
@pip install '.[dev]'

.PHONY: check
check: ## Run code quality tools.
check: ## Run code quality tools
@echo "Linting code via pre-commit"
@pre-commit run -a

Expand All @@ -12,8 +24,14 @@ test: ## Run unit tests
test-cov: ## Run unit tests and generate a coverage report
@pytest --cov-report term --cov-report=html --cov=sentence_transformers

.PHONY: build
build: ## Build the wheel file
@echo "Building the wheel file..."
@pip install build
@python -m build

.PHONY: help
help: ## Show help for the commands.
help: ## Show help for the commands
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'

.DEFAULT_GOAL := help
Loading