-
Notifications
You must be signed in to change notification settings - Fork 366
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (47 loc) · 2.15 KB
/
Makefile
File metadata and controls
63 lines (47 loc) · 2.15 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
SHELL := /bin/bash
CURR_DIR := $(CURDIR)
START_COMMAND := jupyter-lab --allow-root
JUPYTER_LIST := jupyter-lab list
PIPINSTALLE := pip install -e .
build: # Command to build Docker file [optional]
@docker build -t statsforecast -f dev/Dockerfile .
run: build # Run jupyter notebook using Docker image
@docker run --name statsforecast --rm -d --network host -v $(CURR_DIR):/workdir/ statsforecast $(START_COMMAND)
@docker exec statsforecast $(PIPINSTALLE)
buildless: # Run jupyter notebook using Docker image without building the image
@docker run --name statsforecast --rm -d --network host -v $(CURR_DIR):/workdir/ statsforecast $(START_COMMAND)
@docker exec statsforecast $(PIPINSTALLE)
address: # Show the ipaddress and port of Jupyter Notebook
@docker exec statsforecast $(JUPYTER_LIST)
stop: # Stops statsforecast container
@docker stop statsforecast
remove: # Deletes statsforecast Docker image
@docker image rm statsforecast
load_docs_scripts:
if [ ! -d "docs-scripts" ] ; then \
git clone -b scripts https://github.com/Nixtla/docs.git docs-scripts --single-branch; \
fi
api_docs:
python docs/to_mdx.py docs
examples_docs:
mkdir -p nbs/_extensions
cp -r docs-scripts/mintlify/ nbs/_extensions/mintlify
quarto render nbs/docs --output-dir ../docs/mintlify/
quarto render nbs/src --output-dir ../docs/mintlify/
find docs/mintlify -name "*.mdx" ! -name "*.html.mdx" -exec sh -c 'dir=$$(dirname "$$1"); base=$$(basename "$$1" .mdx | tr "[:upper:]" "[:lower:]"); mv "$$1" "$$dir/$$base.html.mdx"' _ {} \;
format_docs:
# replace _docs with docs
sed -i -e 's/_docs/docs/g' ./docs-scripts/docs-final-formatting.bash
bash ./docs-scripts/docs-final-formatting.bash
find docs/mintlify -name "*.mdx" -exec sed -i.bak '/^:::/d' {} + && find docs/mintlify -name "*.bak" -delete
preview_docs:
cd docs/mintlify && mintlify dev
clean:
rm -f docs/*.md
find docs/mintlify -name "*.mdx" -exec rm -f {} +
all_docs: load_docs_scripts api_docs examples_docs format_docs
licenses:
pip-licenses --format=csv --with-authors --with-urls > third_party_licenses.csv
python scripts/filter_licenses.py
rm -f third_party_licenses.csv
@echo "✓ THIRD_PARTY_LICENSES.md updated"