-
Notifications
You must be signed in to change notification settings - Fork 968
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
1,568 additions
and
3,817 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.12 |
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,48 @@ | ||
.DEFAULT_GOAL := help | ||
|
||
SHELL=/bin/bash | ||
|
||
UNAME=$(shell uname -s) | ||
|
||
.PHONY: install | ||
install: ## Install a virtual environment with all extras | ||
@curl -LsSf https://astral.sh/uv/install.sh | sh | ||
@uv venv | ||
@uv sync -vv --all-extras | ||
@echo "Virtual environment created with all extras. Activate with:" | ||
@echo "source .venv/bin/activate" | ||
|
||
.PHONY: fmt | ||
fmt: ## Run autoformatting and linting | ||
@uv pip install pre-commit | ||
@uv run pre-commit install | ||
@uv run pre-commit run --all-files | ||
|
||
|
||
.PHONY: test | ||
test: install ## Run tests | ||
@uv run pytest | ||
|
||
|
||
.PHONY: clean | ||
clean: ## Clean up caches and build artifacts | ||
@git clean -X -d -f | ||
|
||
|
||
.PHONY: coverage | ||
coverage: install ## test and coverage | ||
@uv run coverage run --source=cvx/. -m pytest | ||
@uv run coverage report -m | ||
@uv run coverage html | ||
|
||
@if [ ${UNAME} == "Darwin" ]; then \ | ||
open htmlcov/index.html; \ | ||
elif [ ${UNAME} == "linux" ]; then \ | ||
xdg-open htmlcov/index.html 2> /dev/null; \ | ||
fi | ||
|
||
|
||
.PHONY: help | ||
help: ## Display this help screen | ||
@echo -e "\033[1mAvailable commands:\033[0m" | ||
@grep -E '^[a-z.A-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-18s\033[0m %s\n", $$1, $$2}' | sort |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.