-
Notifications
You must be signed in to change notification settings - Fork 175
/
Makefile
77 lines (60 loc) · 1.86 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
.PHONY: black
black:
python -m pipenv run python -m black .
.PHONY: black-check
black-check:
python -m pipenv run python -m black . --check
.PHONY: ruff
ruff:
python -m pipenv run python -m ruff check . --fix
.PHONY: ruff-check
ruff-check:
python -m pipenv run python -m ruff check .
.PHONY: mypy
mypy:
python -m pipenv run python -m mypy conftest.py automation tests citools
.PHONY: lint
lint: black-check ruff-check mypy
.PHONY: format
format:
@echo runnning black
$(MAKE) black
@echo running ruff
$(MAKE) ruff
@echo formatting the readme with yarn prettier
$(MAKE) format-readme
.PHONY: test-ci
test-ci:
python -m pipenv run python -m pytest -m "emulated_alpha"
.PHONY: test-protocol-analysis
test-protocol-analysis:
pipenv run python -m pytest -v tests/protocol_analyze_test.py
.PHONY: setup
setup: install-pipenv
python -m pipenv install
.PHONY: teardown
teardown:
python -m pipenv --rm
.PHONY: format-readme
format-readme:
yarn prettier --ignore-path .eslintignore --write app-testing/**/*.md
.PHONY: install-pipenv
install-pipenv:
python -m pip install -U pipenv
.PHONY: snapshot-test
snapshot-test:
python -m pipenv run pytest -k analyses_snapshot_test -vv
.PHONY: snapshot-test-update
snapshot-test-update:
python -m pipenv run pytest -k analyses_snapshot_test --snapshot-update
TARGET ?= edge
CACHEBUST := $(shell date +%s)
.PHONY: build-opentrons-analysis
build-opentrons-analysis:
@echo "Building docker image for $(TARGET)"
@echo "If you want to build a different version, run 'make build-opentrons-analysis TARGET=<version>'"
@echo "Cache is always busted to ensure latest version of the code is used"
docker build --build-arg OPENTRONS_VERSION=$(TARGET) --build-arg CACHEBUST=$(CACHEBUST) -t opentrons-analysis:$(TARGET) citools/.
.PHONY: generate-protocols
generate-protocols:
python -m pipenv run python -m automation.data.protocol_registry