forked from vega/vegafusion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpixi.toml
151 lines (133 loc) · 5.65 KB
/
pixi.toml
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
[project]
name = "vegafusion"
version = "0.1.0"
description = "Add a short description here"
authors = ["Jon Mease <[email protected]>"]
channels = ["conda-forge"]
platforms = ["osx-arm64", "osx-64", "linux-64", "win-64"]
[tasks]
check-rs-fmt = "cargo fmt --all -- --check"
check-rs-warnings = "export RUSTFLAGS=\"-D warnings\" && cargo check --tests"
check-rs-clippy = "cargo clippy -- -A clippy::borrow_deref_ref"
# Bump version
bump-version = "python automation/bump_version.py $1"
# setup python dev packages
dev-py-embed = { cmd = ["maturin", "develop", "-m", "vegafusion-python-embed/Cargo.toml", "--release"]}
dev-py-vegafusion = { cmd = "cd python/vegafusion && pip install -e . --no-deps", depends_on = ["dev-py-embed"] }
dev-py-jupyter = { cmd = "cd python/vegafusion-jupyter && npm install && npm run build:dev", depends_on = ["dev-py-vegafusion", "dev-py-embed", "build-js-embed"] }
# Build Python packages
build-py-embed = {cmd = "maturin build -m vegafusion-python-embed/Cargo.toml --release --strip --sdist $0"}
build-py-vegafusion = {cmd = "cd python/vegafusion && python -m build $0"}
build-py-jupyter = {cmd = "cd python/vegafusion-jupyter && npm install && python -m build $0", depends_on = ["build-js-embed"]}
# test python
test-py-vegafusion = { cmd = "cd python/vegafusion && pytest $0", depends_on = ["dev-py-vegafusion"]}
install-chromedriver-auto = "pip install -U chromedriver-binary-auto"
test-py-jupyter = { cmd = "cd python/vegafusion-jupyter && pytest $0", depends_on = ["dev-py-jupyter", "install-chromedriver-auto"]}
test-py-jupyter-headless = { cmd = "export VEGAFUSION_TEST_HEADLESS=1 && cd python/vegafusion-jupyter && pytest $0", depends_on = ["dev-py-jupyter", "install-chromedriver-auto"]}
# Test rust
build-vegajs-runtime = { cmd = "cd vegafusion-runtime/tests/util/vegajs_runtime && npm install" }
test-rs-core = "cargo test -p vegafusion-core $0"
test-rs-runtime = { cmd="cargo test -p vegafusion-runtime $0", depends_on = ["build-vegajs-runtime"] }
test-rs-runtime-s3 = { cmd="VEGAFUSION_S3_TESTS=1 cargo test -p vegafusion-runtime $0", depends_on = ["build-vegajs-runtime"] }
test-rs-server = "cargo test -p vegafusion-server $0"
test-rs-sql = "cargo test -p vegafusion-sql $0"
test-rs = { cmd = "cargo test --workspace --exclude vegafusion-python-embed --exclude vegafusion-wasm $0", depends_on = ["build-vegajs-runtime"] }
# Build Wasm
install-wasm-toolchain = "python automation/download_rust_target.py wasm32-unknown-unknown"
install-wasm-pack = "export CARGO_HOME=$PIXI_PROJECT_ROOT/.pixi/envs/default && cargo install wasm-pack"
build-wasm = { cmd = "cd vegafusion-wasm && npm install && wasm-pack build --release && cp package.json pkg/", depends_on = ["install-wasm-toolchain", "install-wasm-pack"] }
pack-wasm = { cmd = "cd vegafusion-wasm && wasm-pack pack", depends_on=["build-wasm"] }
# Install Javascript
build-js-embed = { cmd = "cd javascript/vegafusion-embed && npm install && npm run build", depends_on = ["build-wasm"] }
# VegaFusion Server
build-rs-vegafusion-server = { cmd = "cargo build -p vegafusion-server --release $0" }
# minio
start-minio = "python automation/start_minio.py"
# Java
build-jni = "cargo build -p vegafusion-jni --release $0"
build-jar = "cd java && ./gradlew jar"
build-jar-win = "cd java && ./gradlew.bat jar"
[tasks.test-java]
cmd = """
export VEGAFUSION_JNI_LIBRARY=$(python automation/find_file.py $PIXI_PACKAGE_ROOT/target/release/ \"libvegafusion_jni\\.(so|dylib)$\") &&
cd java &&
./gradlew test $0
"""
depends_on = ["build-jni"]
[tasks.test-java-win]
cmd = """
export VEGAFUSION_JNI_LIBRARY=$PIXI_PACKAGE_ROOT/target/release/vegafusion_jni.dll &&
cd java &&
./gradlew.bat test $0
"""
depends_on = ["build-jni"]
[tasks.publish-java]
cmd = """
cd java/ &&
./gradlew publish
"""
# Note: the `--no-verify` flag below for `vegafusion-core` is due to this cargo publish error:
#
# Source directory was modified by build.rs during cargo publish. Build scripts should not modify anything outside of OUT_DIR.
#
# We currently write the prost files to src (mostly to make it easier for IDEs to locate them). This should be safe in our case
# as these aren't modified unless the .proto files change, but we should revisit where these files are written in the future.
[tasks.publish-rs]
cmd = """
cargo publish -p vegafusion-common &&
cargo publish -p vegafusion-core --no-verify &&
cargo publish -p vegafusion-dataframe &&
cargo publish -p vegafusion-datafusion-udfs &&
cargo publish -p vegafusion-sql &&
cargo publish -p vegafusion-runtime &&
cargo publish -p vegafusion-server
"""
# Build dependencies are those required to build and test all packages
[build-dependencies]
python = "3.10.*"
nodejs = "20.5.1.*"
maturin = "1.2.3.*"
yarn = "3.6.1.*"
jupyterlab = "4.0.5.*"
nbval = "0.9.6.*"
selenium = "4.11.2.*"
scikit-image = "0.21.0.*"
toml = "0.10.2.*"
pytest = ">=4.6"
click = "8.1.6.*"
python-duckdb = "0.8.1.*"
jupyter-packaging = "0.12.3.*"
pip = "23.2.1.*"
voila = "0.5.0.*"
polars = "0.18.15.*"
tenacity = "8.2.3.*"
pytest-cov = "4.1.0.*"
flaky = "3.7.0.*"
vega_datasets = "0.9.0.*"
jupytext = "1.15.0.*"
openjdk = "20.0.0.*"
build = "0.7.0.*"
minio-server = "2023.9.23.3.47.50.*"
minio = "7.1.17.*"
# Dependencies are those required at runtime by the Python packages
[dependencies]
psutil = "5.9.5.*"
pyarrow = "12.0.1.*"
pandas = "2.0.3.*"
altair = "5.3.*"
protobuf = "4.23.3.*"
ipywidgets = "8.1.0.*"
rust = "1.75.*"
vl-convert-python = "1.3.*"
anywidget = ">=0.9.6,<0.10"
[target.osx-arm64.build-dependencies]
# These dependencies are for building node canvas from source on apple silicon
pkg-config = "0.29.2.*"
cairo = "1.16.0.*"
pango = "1.50.14.*"
libpng = "1.6.39.*"
librsvg = "2.56.3.*"
jpeg = "9e.*"
giflib = "5.2.1.*"
libglib = "2.76.4.*"
glib = "2.76.4.*"