-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathjustfile
More file actions
107 lines (88 loc) · 2.65 KB
/
justfile
File metadata and controls
107 lines (88 loc) · 2.65 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# List all possible commands
help:
just --list
# List all possible commands
list:
just --list
# Install all required and development dependancies
install:
pip install -e ".[dev]"
pre-commit install
pre-commit install --hook-type commit-msg
# Run formatters and linters to fix up code
fix:
ruff format --exit-zero src tests
ruff --silent --exit-zero --no-cache --fix src tests
# Run pre-commit to check all files
check:
pre-commit run --all-files
# Run mypy over the source code to find typing errors
check-types:
mypy src
# Launch the docs, executing code blocks and examples
docs-full:
python -m webbrowser -t "http://127.0.0.1:8000/"
AMLTK_DOC_RENDER_EXAMPLES=all \
AMLTK_DOCS_OFFLINE=true \
AMLTK_EXEC_DOCS=true \
mkdocs serve --watch-theme
# Launch the docs and execute code blocks
docs-code:
python -m webbrowser -t "http://127.0.0.1:8000/"
AMLTK_DOCS_OFFLINE=true \
AMLTK_EXEC_DOCS=true \
AMLTK_DOC_RENDER_EXAMPLES=false \
mkdocs serve --watch-theme
# Launch the docs but dont run code examples
docs:
python -m webbrowser -t "http://127.0.0.1:8000/"
AMLTK_DOCS_OFFLINE=true \
AMLTK_EXEC_DOCS=false \
AMLTK_DOC_RENDER_EXAMPLES=false \
mkdocs serve --watch-theme
# https://github.com/pawamoy/markdown-exec/issues/19
action:
gh workflow run
# Create a `feat` PR with <name>
pr-feat name:
git pull origin main
git checkout -b feat-{{name}} main
git push --set-upstream origin feat-{{name}}
# Create a `doc` PR with <name>
pr-doc name:
git pull origin main
git checkout -b doc-{{name}} main
git push --set-upstream origin doc-{{name}}
# Create a `fix` PR with <name>
pr-fix name:
git pull origin main
git checkout -b fix-{{name}} main
git push --set-upstream origin fix-{{name}}
# Create a `chore` PR with <name>
pr-chore name:
git pull origin main
git checkout -b chore-{{name}} main
git push --set-upstream origin chore-{{name}}
# Create a `refactor` PR with <name>
pr-refactor name:
git pull origin main
git checkout -b refactor-{{name}} main
git push --set-upstream origin refactor-{{name}}
# Create a `ci` PR with <name>
pr-ci name:
git pull origin main
git checkout -b ci-{{name}} main
git push --set-upstream origin ci-{{name}}
# Create an `other` PR with <name>
pr-other name:
git pull origin main
git checkout -b other-{{name}} main
git push --set-upstream origin other-{{name}}
# Run all tests but stop on the first failure
test:
pytest -x -m "not example"
# Run all tests, stopping on the first failure and continuing from the last failure and skipping examples
test-iter:
pytest -x --lf -m "not example"
test-examples:
pytest "tests/test_examples.py" -x --lf