8000 Make all targets phony. by jezdez · Pull Request #249 · pyscript/pyscript · GitHub
[go: up one dir, main page]

Skip to content

Make all targets phony. #249

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

Merged
merged 1 commit into from
May 6, 2022
Merged
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
Make all targets phony.
  • Loading branch information
jezdez committed May 6, 2022
commit 9c7257f269e088f182b27c3140338a5585d4fbe0
18 changes: 2 additions & 16 deletions pyscriptjs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,76 +10,62 @@ CONDA_ENV ?= ./env
env := $(CONDA_ENV)
conda_run := conda run -p $(env)

.PHONY: setup
setup:
@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

.PHONY: clean
clean:
find . -name \*.py[cod] -delete
rm -rf .pytest_cache .coverage coverage.xml

clean-all: clean
rm -rf $(env) *.egg-info

.PHONY: shell
shell:
@export CONDA_ENV_PROMPT='<{name}>'
@echo 'conda activate $(env)'

.PHONY: dev
dev:
npm run dev

.PHONY: build
build:
npm run build

.PHONY: test
test:
@echo "Tests are coming :( this is a placeholder and it's meant to fail!"
$(conda_run) pytest -vv $(ARGS) tests/ --log-cli-level=warning

.PHONY: test-py
test-py:
@echo "Tests are coming :( this is a placeholder and it's meant to fail!"
$(conda_run) pytest -vv $(ARGS) tests/ --log-cli-level=warning

.PHONY: test-ts
test-ts:
@echo "Tests are coming :( this is a placeholder and it's meant to fail!"
npm run tests

.PHONY: fmt
fmt: fmt-py fmt-ts
@echo "Format completed"

.PHONY: fmt-check
fmt-check: fmt-ts-check fmt-py-check
@echo "Format check completed"

.PHONY: fmt-ts
fmt-ts:
npm run format

.PHONY: fmt-ts-check
fmt-ts-check:
npm run format:check

.PHONY: fmt-py
fmt-py:
$(conda_run) black --skip-string-normalization .
$(conda_run) isort --profile black .

.PHONY: fmt-py-check
fmt-py-check:
$(conda_run) black -l 88 --check .

.PHONY: lint
lint: lint-ts
@echo "Format check completed"

.PHONY: lint-ts
lint-ts:
$(conda_run) npm run lint

.PHONY: $(MAKECMDGOALS)
0