-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjustfile
52 lines (40 loc) · 1.35 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
# Lists available recipes
@menu:
just --list --unsorted
# Creates a folder for a given day's problem
@setup day:
python3 problem_setup.py {{day}}
echo day {{day}} setup. Good luck!
# Removes a given day's folder
@remove day:
rm -rf day_$(printf %02d {{day}})
echo "Day {{day}} removed."
# Removes and re-creates a given day's folder
@reset day: (remove day) (setup day)
# Runs the specified part of the specified problem using sample input, with log level set to DEBUG
@debug day part:
python3 problem_runner.py {{day}} check {{part}} --log-level DEBUG
# Runs the specified part of the specified problem using sample input
@check day part:
python3 problem_runner.py {{day}} check {{part}}
# Runs the specified part of the specified problem using full input
@solve day part:
python3 problem_runner.py {{day}} solve {{part}}
# Shows what changes Black would make
@black-check:
python3 -m black --diff .
# Runs Black on all files in this folder and subfolders
@black:
python3 -m black .
# Runs Pytest on the specified problem
@test day:
pytest day_$(printf %02d {{day}})
# Runs all tests
@test-all:
pytest --ignore templates
# Runs a timed execution of all regestered complete problems
@benchmark:
python3 problem_runner.py
# Creates config-secret.toml
@init-secret-config:
echo '[auth]\ncookie = ""' > config_secret.toml