-
Notifications
You must be signed in to change notification settings - Fork 1
/
.justfile
65 lines (54 loc) · 1.85 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
61
62
63
64
65
default: install
alias f := format
alias fmt := format
format:
venv/bin/ruff format .
just --fmt --unstable
init:
[ -d venv ] || python -m venv venv
venv/bin/python -m pip install --requirement requirements.txt
init-dev: && sync
[ -d venv ] || python -m venv venv
venv/bin/python -m pip install --requirement requirements-dev.txt
venv/bin/pre-commit install
install-circuitpython version="7.2.5":
curl --location --output-dir /run/media/$(id --name --user)/RPI-RP2 --remote-name https://downloads.circuitpython.org/bin/adafruit_qtpy_rp2040/en_US/adafruit-circuitpython-adafruit_qtpy_rp2040-en_US-{{ version }}.uf2
install:
venv/bin/pipkin --mount /run/media/$(id --name --user)/CIRCUITPY install --compile --requirement requirements-circuitpython.txt
cp code.py font/font5x8.bin /run/media/$(id --name --user)/CIRCUITPY
udisksctl unmount --block-device $(findmnt --noheadings --output SOURCE --target /run/media/$(id --name --user)/CIRCUITPY)
alias l := lint
lint:
venv/bin/yamllint .
venv/bin/ruff check --fix .
sync:
venv/bin/pip-sync requirements-dev.txt requirements.txt
alias u := update
alias up := update
update:
venv/bin/pip-compile \
--allow-unsafe \
--generate-hashes \
--reuse-hashes \
--upgrade \
requirements-dev.in
venv/bin/pip-compile \
--allow-unsafe \
--generate-hashes \
--reuse-hashes \
--upgrade \
requirements.in
venv/bin/pip-compile \
--allow-unsafe \
--generate-hashes \
--no-annotate \
--no-header \
--output-file requirements-circuitpython.txt \
--reuse-hashes \
--upgrade \
requirements.in
awk \
-i inplace \
'/adafruit-circuitpython/{c=2} c&&c--' \
requirements-circuitpython.txt
venv/bin/pre-commit autoupdate