mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Always poetry run commands that need a venv
It's a `Makefile` so it's handy to not have to think about if you need to be within a poetry venv when running `make`. This commit adds a `poetry run` before any command that needs the venv. This means that people who aren't in a venv can just `make something` and it'll "just work", and the same is true for those who are in a venv.
This commit is contained in:
22
Makefile
22
Makefile
@@ -1,26 +1,28 @@
|
||||
run := poetry run
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
pytest --cov-report term-missing --cov=textual tests/ -vv
|
||||
$(run) pytest --cov-report term-missing --cov=textual tests/ -vv
|
||||
|
||||
.PHONY: unit-test
|
||||
unit-test:
|
||||
pytest --cov-report term-missing --cov=textual tests/ -vv -m "not integration_test"
|
||||
$(run) pytest --cov-report term-missing --cov=textual tests/ -vv -m "not integration_test"
|
||||
|
||||
.PHONY: test-snapshot-update
|
||||
test-snapshot-update:
|
||||
pytest --cov-report term-missing --cov=textual tests/ -vv --snapshot-update
|
||||
$(run) pytest --cov-report term-missing --cov=textual tests/ -vv --snapshot-update
|
||||
|
||||
.PHONY: typecheck
|
||||
typecheck:
|
||||
mypy src/textual
|
||||
$(run) mypy src/textual
|
||||
|
||||
.PHONY: format
|
||||
format:
|
||||
black src
|
||||
$(run) black src
|
||||
|
||||
.PHONY: format-check
|
||||
format-check:
|
||||
black --check src
|
||||
$(run) black --check src
|
||||
|
||||
.PHONY: clean-screenshot-cache
|
||||
clean-screenshot-cache:
|
||||
@@ -28,15 +30,15 @@ clean-screenshot-cache:
|
||||
|
||||
.PHONY: docs-serve
|
||||
docs-serve: clean-screenshot-cache
|
||||
mkdocs serve --config-file mkdocs-online.yml
|
||||
$(run) mkdocs serve --config-file mkdocs-online.yml
|
||||
|
||||
.PHONY: docs-build
|
||||
docs-build:
|
||||
mkdocs build --config-file mkdocs-online.yml
|
||||
$(run) mkdocs build --config-file mkdocs-online.yml
|
||||
|
||||
.PHONY: docs-build-offline
|
||||
docs-build-offline:
|
||||
mkdocs build --config-file mkdocs-offline.yml
|
||||
$(run) mkdocs build --config-file mkdocs-offline.yml
|
||||
|
||||
.PHONY: clean-offline-docs
|
||||
clean-offline-docs:
|
||||
@@ -44,7 +46,7 @@ clean-offline-docs:
|
||||
|
||||
.PHONY: docs-deploy
|
||||
docs-deploy: clean-screenshot-cache
|
||||
mkdocs gh-deploy
|
||||
$(run) mkdocs gh-deploy
|
||||
|
||||
.PHONY: build
|
||||
build: docs-build-offline
|
||||
|
||||
Reference in New Issue
Block a user