-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(python): Create
.venv
in repo root (#10789)
- Loading branch information
Showing
6 changed files
with
57 additions
and
39 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,35 @@ | ||
.DEFAULT_GOAL := help | ||
|
||
PYTHONPATH= | ||
SHELL=/bin/bash | ||
VENV=.venv | ||
|
||
ifeq ($(OS),Windows_NT) | ||
VENV_BIN=$(VENV)/Scripts | ||
else | ||
VENV_BIN=$(VENV)/bin | ||
endif | ||
|
||
.venv: ## Set up Python virtual environment and install requirements | ||
python3 -m venv $(VENV) | ||
$(MAKE) requirements | ||
|
||
.PHONY: requirements | ||
requirements: .venv ## Install/refresh Python project requirements | ||
$(VENV_BIN)/python -m pip install --upgrade pip | ||
$(VENV_BIN)/pip install --upgrade -r py-polars/requirements-dev.txt | ||
$(VENV_BIN)/pip install --upgrade -r py-polars/requirements-lint.txt | ||
$(VENV_BIN)/pip install --upgrade -r py-polars/docs/requirements-docs.txt | ||
|
||
.PHONY: clean | ||
clean: ## Clean up caches and build artifacts | ||
@rm -rf .venv/ | ||
@rm -rf target/ | ||
@rm -f Cargo.lock | ||
@cargo clean | ||
@$(MAKE) -s -C py-polars/ $@ | ||
|
||
.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 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 |
---|---|---|
@@ -1,14 +1,17 @@ | ||
{ | ||
"includes": [ | ||
"**/*.{md,toml}" | ||
], | ||
"excludes": [ | ||
"**/target", | ||
"py-polars/.pytest_cache", | ||
"py-polars/.venv" | ||
], | ||
"plugins": [ | ||
"https://plugins.dprint.dev/markdown-0.15.2.wasm", | ||
"https://plugins.dprint.dev/toml-0.5.4.wasm" | ||
] | ||
"includes": [ | ||
"**/*.{md,toml}" | ||
], | ||
"excludes": [ | ||
".venv/", | ||
"**/target/", | ||
"py-polars/.hypothesis/", | ||
"py-polars/.mypy_cache/", | ||
"py-polars/.pytest_cache/", | ||
"py-polars/.ruff_cache/" | ||
], | ||
"plugins": [ | ||
"https://plugins.dprint.dev/markdown-0.16.0.wasm", | ||
"https://plugins.dprint.dev/toml-0.5.4.wasm" | ||
] | ||
} |
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