/
justfile
60 lines (44 loc) · 1.07 KB
/
justfile
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
set dotenv-load := true
dco := "docker-compose"
run := "{{dco}} run --rm eduzenbot"
os:
#!/usr/bin/env bash
echo $OSTYPE
build:
#!/usr/bin/env bash
{{dco}} build
dco-version:
{{dco}} --version
dockershell:
#!/usr/bin/env bash
{{run}} eduzenbot bash
test:
#!/usr/bin/env bash
{{run}} pytest --cov=eduzenbot --cov-report=term-missing
logs:
{{dco}} logs -f eduzenbot
shell:
{{run}} ipython
start:
{{dco}} up -d
logs
restart:
{{dco}} rm -sf eduzenbot
start
start-debug:
{{dco}} run --rm --service-ports eduzenbot
install:
python -m pip install -r requirements.txt
install-dev:
python -m pip install -r requirements-dev.txt
compile:
pip-compile pyproject.toml -o requirements.txt
compile-dev:
pip-compile --extra=dev pyproject.toml -o requirements-dev.txt
clean:
#!/usr/bin/env python3
import pathlib, shutil
current_path = pathlib.Path('.').parent
[p.unlink() for p in current_path.rglob('*.py[co]')]
[shutil.rmtree(p) for p in current_path.rglob('__pycache__')]
[shutil.rmtree(p) for p in current_path.rglob('.pytest_cache')]