-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (36 loc) · 1.14 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
ENV_NAME = rlbook
RUN = micromamba run -n $(ENV_NAME)
_NOTEBOOKS = $(addprefix book/, bandits control exploration fitted_dp imitation_learning mdps pg planning supervised_learning)
_META = \
background \
index
NOTEBOOKS = $(addsuffix .md, $(_NOTEBOOKS))
IPYNBS = $(addsuffix .ipynb, $(_NOTEBOOKS))
META = $(addsuffix .md, $(addprefix book/, $(_META)))
SOLUTIONS = book/solutions/bandits.py
SOURCE = $(NOTEBOOKS) $(META) $(SOLUTIONS)
CONFIG = book/_config.yml book/_toc.yml
book/_build/html: $(SOURCE) $(CONFIG)
$(RUN) jb build -W -n --keep-going book
open: book/_build/html
open book/_build/html/index.html
book/_build/latex: $(SOURCE) $(CONFIG)
$(RUN) jb build book --builder latex
pdf: book/_build/latex
cd book/_build/latex && make
code book/_build/latex/book.log
clean: book/_build $(IPYNBS)
rm -r book/_build
rm $(IPYNBS)
debug:
$(RUN) jb config sphinx book
sync: $(NOTEBOOKS)
$(RUN) jupytext --sync $(NOTEBOOKS)
lab:
$(RUN) jupyter lab
lint:
$(RUN) ruff check --fix $(IPYNBS)
web:
(cd book && $(RUN) myst build --html --execute)
publish:
$(RUN) ghp-import --cname "rlbook.adzc.ai" --no-jekyll --push --force book/_build/html