mirror of
https://github.com/pyscript/pyscript.git
synced 2026-02-13 07:01:00 -05:00
* Added microsoft channel and playwright as dependency * Added test-setup to run * Basic tests for each example in examples/index.html * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update test_webgl_raycaster_index.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update test_folium.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update test_folium.py * Update test_folium.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update test_bokeh.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Whitelisting assertion statements in test files * Updated bare execept statements with ImportError * Flake8 compliance * Updated message * Removed 'make test-setup' * Removed @echo from make test * Uncommented Toga test * Removed __test_all__.py file * Removing unnecessary files * Removed individual test files * conftest.py with all data for running tests * Consolidated test file * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fixed pre-commit flake8 issues * flake8 issue * add playwright installation to setup * Testing parameterization and webserver to serve examples locally * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Flake8 compliance * More flake8 Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Michael Verhulst <michael@terminallabs.com> Co-authored-by: Fabio Pliger <fabio.pliger@gmail.com>
72 lines
1.5 KiB
Makefile
72 lines
1.5 KiB
Makefile
tag := latest
|
|
git_hash ?= $(shell git log -1 --pretty=format:%h)
|
|
|
|
base_dir ?= $(shell git rev-parse --show-toplevel)
|
|
src_dir ?= $(base_dir)/src
|
|
examples ?= $(base_dir)/examples
|
|
app_dir ?= $(shell git rev-parse --show-prefix)
|
|
|
|
CONDA_ENV ?= ./env
|
|
env := $(CONDA_ENV)
|
|
conda_run := conda run -p $(env)
|
|
|
|
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
|
|
$(conda_run) playwright install
|
|
|
|
clean:
|
|
find . -name \*.py[cod] -delete
|
|
rm -rf .pytest_cache .coverage coverage.xml
|
|
|
|
clean-all: clean
|
|
rm -rf $(env) *.egg-info
|
|
|
|
shell:
|
|
@export CONDA_ENV_PROMPT='<{name}>'
|
|
@echo 'conda activate $(env)'
|
|
|
|
dev:
|
|
npm run dev
|
|
|
|
build:
|
|
npm run build
|
|
|
|
test:
|
|
$(conda_run) pytest -vv $(ARGS) tests/ --log-cli-level=warning
|
|
|
|
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
|
|
|
|
test-ts:
|
|
@echo "Tests are coming :( this is a placeholder and it's meant to fail!"
|
|
npm run tests
|
|
|
|
fmt: fmt-py fmt-ts
|
|
@echo "Format completed"
|
|
|
|
fmt-check: fmt-ts-check fmt-py-check
|
|
@echo "Format check completed"
|
|
|
|
fmt-ts:
|
|
npm run format
|
|
|
|
fmt-ts-check:
|
|
npm run format:check
|
|
|
|
fmt-py:
|
|
$(conda_run) black --skip-string-normalization .
|
|
$(conda_run) isort --profile black .
|
|
|
|
fmt-py-check:
|
|
$(conda_run) black -l 88 --check .
|
|
|
|
lint: lint-ts
|
|
@echo "Format check completed"
|
|
|
|
lint-ts:
|
|
$(conda_run) npm run lint
|
|
|
|
.PHONY: $(MAKECMDGOALS)
|