forked from mosaicml/streaming
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (26 loc) · 950 Bytes
/
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
# several pytest settings
PYTHON ?= python # Python command
PYTEST ?= pytest # Pytest command
PYRIGHT ?= pyright # Pyright command. Pyright must be installed seperately -- e.g. `node install -g pyright`
EXTRA_ARGS ?= # extra arguments for pytest
dirs := streaming tests docs
# this only checks for style & pyright, makes no code changes
lint:
$(PYTHON) -m isort -l 99 -c --diff $(dirs)
$(PYTHON) -m yapf -dr --style pyproject.toml $(dirs)
$(PYTHON) -m docformatter -r $(dirs)
$(PYRIGHT) $(dirs)
# run this to autoformat your code
style:
$(PYTHON) -m isort -l 99 $(dirs)
$(PYTHON) -m yapf -rip --style pyproject.toml $(dirs)
$(PYTHON) -m docformatter -ri $(dirs)
longlines:
find streaming tests -type f -name "*.py" | xargs grep -x '.\{100,\}'
test:
$(PYTHON) -m $(PYTEST) $(EXTRA_ARGS)
web:
uvicorn scripts.partition.web:app --port 1337 --reload
simulator:
streamlit run simulation/interfaces/sim_ui.py
.PHONY: test lint style