From 22e6e145c58bac2f2cc2edd045ab35f342036cd3 Mon Sep 17 00:00:00 2001 From: Fabio Pliger Date: Thu, 5 May 2022 13:47:55 -0500 Subject: [PATCH] improve makefile and add python dev enviroment requirements file --- pyscriptjs/Makefile | 24 ++++++++++++------------ pyscriptjs/environment.yml | 11 +++++++++++ 2 files changed, 23 insertions(+), 12 deletions(-) create mode 100644 pyscriptjs/environment.yml diff --git a/pyscriptjs/Makefile b/pyscriptjs/Makefile index a50028ae..66407ca4 100644 --- a/pyscriptjs/Makefile +++ b/pyscriptjs/Makefile @@ -44,7 +44,7 @@ test: .PHONY: test-py test-py: @echo "Tests are coming :( this is a placeholder and it's meant to fail!" - $(env)/bin/pytest -vv $(ARGS) tests/ --log-cli-level=warning + $(conda_run) -vv $(ARGS) tests/ --log-cli-level=warning .PHONY: test-ts test-ts: @@ -52,12 +52,12 @@ test-ts: npm run tests .PHONY: fmt -fmt: - $(env)/bin/black -l 88 . +fmt: fmt-py fmt-ts + @echo "Format completed" .PHONY: fmt-check -fmt-check: - $(env)/bin/black -l 88 --check . +fmt-check: fmt-ts-check fmt-py + @echo "Format check completed" .PHONY: fmt-ts fmt-ts: @@ -69,16 +69,16 @@ fmt-ts-check: .PHONY: fmt-py fmt-py: - $(env)/bin/black -l 88 . + $(conda_run) black -l 88 . .PHONY: fmt-py-check fmt-py-check: - $(env)/bin/black -l 88 --check . + $(conda_run) black -l 88 --check . .PHONY: lint -lint: - npm run lint +lint: lint-ts + @echo "Format check completed" -.PHONY: lint-js -lint-js: - npm run lint \ No newline at end of file +.PHONY: lint-ts +lint-ts: + $(conda_run) npm run lint diff --git a/pyscriptjs/environment.yml b/pyscriptjs/environment.yml new file mode 100644 index 00000000..bfaafbd1 --- /dev/null +++ b/pyscriptjs/environment.yml @@ -0,0 +1,11 @@ +channels: + - defaults + - conda-forge +dependencies: + - python=3.9 + - pip=20.2.2 + - pytest=7 + - nodejs=16 + - black + - isort + - codespell