mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
Make all targets phony. (#249)
This commit is contained in:
@@ -10,12 +10,10 @@ CONDA_ENV ?= ./env
|
|||||||
env := $(CONDA_ENV)
|
env := $(CONDA_ENV)
|
||||||
conda_run := conda run -p $(env)
|
conda_run := conda run -p $(env)
|
||||||
|
|
||||||
.PHONY: setup
|
|
||||||
setup:
|
setup:
|
||||||
@if [ -z "$${CONDA_SHLVL:+x}" ]; then echo "Conda is not installed." && exit 1; fi
|
@if [ -z "$${CONDA_SHLVL:+x}" ]; then echo "Conda is not installed." && exit 1; fi
|
||||||
$(CONDA_EXE) env $(shell [ -d $(env) ] && echo update || echo create) -p $(env) --file environment.yml
|
$(CONDA_EXE) env $(shell [ -d $(env) ] && echo update || echo create) -p $(env) --file environment.yml
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
clean:
|
clean:
|
||||||
find . -name \*.py[cod] -delete
|
find . -name \*.py[cod] -delete
|
||||||
rm -rf .pytest_cache .coverage coverage.xml
|
rm -rf .pytest_cache .coverage coverage.xml
|
||||||
@@ -23,63 +21,51 @@ clean:
|
|||||||
clean-all: clean
|
clean-all: clean
|
||||||
rm -rf $(env) *.egg-info
|
rm -rf $(env) *.egg-info
|
||||||
|
|
||||||
.PHONY: shell
|
|
||||||
shell:
|
shell:
|
||||||
@export CONDA_ENV_PROMPT='<{name}>'
|
@export CONDA_ENV_PROMPT='<{name}>'
|
||||||
@echo 'conda activate $(env)'
|
@echo 'conda activate $(env)'
|
||||||
|
|
||||||
.PHONY: dev
|
|
||||||
dev:
|
dev:
|
||||||
npm run dev
|
npm run dev
|
||||||
|
|
||||||
.PHONY: build
|
|
||||||
build:
|
build:
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
.PHONY: test
|
|
||||||
test:
|
test:
|
||||||
@echo "Tests are coming :( this is a placeholder and it's meant to fail!"
|
@echo "Tests are coming :( this is a placeholder and it's meant to fail!"
|
||||||
$(conda_run) pytest -vv $(ARGS) tests/ --log-cli-level=warning
|
$(conda_run) pytest -vv $(ARGS) tests/ --log-cli-level=warning
|
||||||
|
|
||||||
.PHONY: test-py
|
|
||||||
test-py:
|
test-py:
|
||||||
@echo "Tests are coming :( this is a placeholder and it's meant to fail!"
|
@echo "Tests are coming :( this is a placeholder and it's meant to fail!"
|
||||||
$(conda_run) pytest -vv $(ARGS) tests/ --log-cli-level=warning
|
$(conda_run) pytest -vv $(ARGS) tests/ --log-cli-level=warning
|
||||||
|
|
||||||
.PHONY: test-ts
|
|
||||||
test-ts:
|
test-ts:
|
||||||
@echo "Tests are coming :( this is a placeholder and it's meant to fail!"
|
@echo "Tests are coming :( this is a placeholder and it's meant to fail!"
|
||||||
npm run tests
|
npm run tests
|
||||||
|
|
||||||
.PHONY: fmt
|
|
||||||
fmt: fmt-py fmt-ts
|
fmt: fmt-py fmt-ts
|
||||||
@echo "Format completed"
|
@echo "Format completed"
|
||||||
|
|
||||||
.PHONY: fmt-check
|
|
||||||
fmt-check: fmt-ts-check fmt-py-check
|
fmt-check: fmt-ts-check fmt-py-check
|
||||||
@echo "Format check completed"
|
@echo "Format check completed"
|
||||||
|
|
||||||
.PHONY: fmt-ts
|
|
||||||
fmt-ts:
|
fmt-ts:
|
||||||
npm run format
|
npm run format
|
||||||
|
|
||||||
.PHONY: fmt-ts-check
|
|
||||||
fmt-ts-check:
|
fmt-ts-check:
|
||||||
npm run format:check
|
npm run format:check
|
||||||
|
|
||||||
.PHONY: fmt-py
|
|
||||||
fmt-py:
|
fmt-py:
|
||||||
$(conda_run) black --skip-string-normalization .
|
$(conda_run) black --skip-string-normalization .
|
||||||
$(conda_run) isort --profile black .
|
$(conda_run) isort --profile black .
|
||||||
|
|
||||||
.PHONY: fmt-py-check
|
|
||||||
fmt-py-check:
|
fmt-py-check:
|
||||||
$(conda_run) black -l 88 --check .
|
$(conda_run) black -l 88 --check .
|
||||||
|
|
||||||
.PHONY: lint
|
|
||||||
lint: lint-ts
|
lint: lint-ts
|
||||||
@echo "Format check completed"
|
@echo "Format check completed"
|
||||||
|
|
||||||
.PHONY: lint-ts
|
|
||||||
lint-ts:
|
lint-ts:
|
||||||
$(conda_run) npm run lint
|
$(conda_run) npm run lint
|
||||||
|
|
||||||
|
.PHONY: $(MAKECMDGOALS)
|
||||||
|
|||||||
Reference in New Issue
Block a user