forked from pola-rs/polars-book
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (57 loc) · 2.43 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
57
58
59
60
61
62
63
64
65
66
SHELL=/bin/bash
PYTHON=.venv/bin/python
DATA_SRC=https://github.com/ritchie46/static/releases/download/0.0.1
DATA_SRC_STATIC=https://raw.githubusercontent.com/pola-rs/polars-static/master/data
DATA_DIR=data
.venv:
@python -m venv .venv
@.venv/bin/pip install -U pip
@.venv/bin/pip install --no-cache-dir -r requirements.txt
data: .venv
@mkdir -p $(DATA_DIR)
$(PYTHON) generate_data.py
wget -q --no-check-certificate --content-disposition ${DATA_SRC_STATIC}/appleStock.csv -O $(DATA_DIR)/appleStock.csv
wget -q $(DATA_SRC)/reddit100k.tar.gz -O - | tar -xzf - -O > $(DATA_DIR)/reddit.csv
wget -q $(DATA_SRC)/runescape100k.tar.gz -O - | tar -xzf - -O > $(DATA_DIR)/runescape.csv
run: data
./tasks.sh process_nbook introduction_polars-py
./tasks.sh process_nbook introduction_polars-rs
$(PYTHON) -m user_guide.src.examples.testing
$(PYTHON) -m user_guide.src.examples.multiple_files
$(PYTHON) -m user_guide.src.examples.combining_data
$(PYTHON) -m user_guide.src.examples.missing_data
$(PYTHON) -m user_guide.src.examples.selecting_data
$(PYTHON) -m user_guide.src.examples.time_series
$(PYTHON) -m user_guide.src.examples.expressions
$(PYTHON) -m user_guide.src.examples.aggregate
$(PYTHON) -m user_guide.src.examples.column_row_selection
$(PYTHON) -m user_guide.src.examples.conditionally_apply
$(PYTHON) -m user_guide.src.examples.df_manipulations
$(PYTHON) -m user_guide.src.examples.filter
$(PYTHON) -m user_guide.src.examples.groupby
$(PYTHON) -m user_guide.src.examples.groupby_dsl
$(PYTHON) -m user_guide.src.examples.head
$(PYTHON) -m user_guide.src.examples.join
$(PYTHON) -m user_guide.src.examples.melt
$(PYTHON) -m user_guide.src.examples.pivot
$(PYTHON) -m user_guide.src.examples.predicate_pushdown
$(PYTHON) -m user_guide.src.examples.projection_pushdown
$(PYTHON) -m user_guide.src.examples.sorting
$(PYTHON) -m user_guide.src.examples.strings
$(PYTHON) -m user_guide.src.examples.strings_performance
$(PYTHON) -m user_guide.src.examples.timestamps
$(PYTHON) -m user_guide.src.examples.udfs
$(PYTHON) -m user_guide.src.examples.window_functions
serve_user_guide: run
cd ./user_guide; mdbook serve --hostname 0.0.0.0 --port 8000
serve: serve_user_guide
clean:
-@rm -fr .venv
-@rm -fr data
-@rm -fr user_guide/src/outputs
-@rm -fr `find . -name __pycache__`
-@cd user_guide; mdbook clean &>/dev/null
fmt: format
format: .venv
@.venv/bin/black .
$(PYTHON) -m mdformat `find user_guide/src -name "*.md" | grep -v SUMMARY.md`