-
Notifications
You must be signed in to change notification settings - Fork 18
/
pixi.toml
175 lines (154 loc) · 5.05 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
[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"]
[system-requirements]
macos = "12.0"
[tasks]
fmt-rs = "cargo fmt --all"
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 = { cmd = [
"maturin",
"develop",
"-m",
"vegafusion-python/Cargo.toml",
"--release",
] }
# Build Python packages
build-py = { cmd = "rm -rf target/wheels && maturin build -m vegafusion-python/Cargo.toml --profile release-opt --strip --sdist $0" }
fmt-py = { cmd = "ruff format" }
lint-fix-py = { cmd = "ruff format && ruff check --fix" }
lint-check-py = { cmd = "ruff format --check && ruff check" }
type-check-py = { cmd = "mypy", cwd="vegafusion-python" }
# test python
install-chromedriver-auto = """
pip cache remove chromedriver-binary-auto &&
pip install -U chromedriver-binary-auto --force-reinstall
"""
test-py = { cmd = "pytest $0", cwd="vegafusion-python", depends_on = ["dev-py"] }
test-py-headless = { cmd = "VEGAFUSION_TEST_HEADLESS=1 pytest $0", cwd="vegafusion-python", depends_on = [
"dev-py",
"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 --exclude vegafusion-wasm $0", depends_on = [
"build-vegajs-runtime",
] }
run-rs-server = "cargo run --release -p vegafusion-server "
# 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 = """
python automation/set_default_release_profile.py small &&
cd vegafusion-wasm &&
rm -rf pkg/ &&
wasm-pack build --release &&
node scripts/update-pkg.js &&
cd pkg/ && npm install &&
python ../../automation/set_default_release_profile.py dev
""", 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-server = { cmd = "cargo build -p vegafusion-server --profile release-opt $0" }
# minio
start-minio = "python automation/start_minio.py"
# Docs
docs-build = { cmd = "sphinx-build -b html docs/source docs/build/html" }
docs-clean = { cmd = "rm -rf docs/build" }
docs-rebuild = { depends_on = ["docs-clean", "docs-build"] }
docs-serve = { cmd = "python -m http.server --directory docs/build/html 8000" }
docs-publish = { cmd = "./sync_docs.sh", depends_on = ["docs-rebuild"], cwd = "docs" }
[tasks.publish-rs]
cmd = """
cargo publish -p vegafusion-common &&
cargo publish -p vegafusion-core &&
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.*"
toml = "0.10.2.*"
pytest = ">=4.6"
click = "8.1.6.*"
python-duckdb = ">=1.1.3,<2"
pip = "23.2.1.*"
voila = "0.5.0.*"
tenacity = "8.2.3.*"
pytest-cov = "4.1.0.*"
vega_datasets = "0.9.0.*"
jupytext = "1.15.0.*"
openjdk = "20.0.0.*"
minio-server = "2023.9.23.3.47.50.*"
minio = "7.1.17.*"
rust = "1.80.*"
taplo = ">=0.9.3,<0.10"
ruff = ">=0.6.9,<0.7"
mypy = ">=1.11.2,<2"
pixi-pycharm = ">=0.0.8,<0.0.9"
scipy = "1.14.1.*"
flaky = ">=3.8.1,<4"
# Docs dependencies
sphinx = ">=7,<8"
sphinx-copybutton = ">=0.5.0,<1"
myst-parser = ">=4.0.0,<5"
sphinx-design = ">=0.6.0,<1"
ablog = ">=0.11.0,<0.12"
pydata-sphinx-theme = ">=0.16.0,<0.17"
# Dependencies are those required at runtime by the Python packages
[dependencies]
psutil = "5.9.5.*"
altair = "5.4.*"
ipywidgets = "8.1.0.*"
vl-convert-python = "1.7.*"
anywidget = ">=0.9.6,<0.10"
polars = "1.8.*"
grpcio = ">=1.56.2,<2"
pyarrow = "16.*"
[pypi-dependencies]
# Works around pixi solve conflict with arrow >13
scikit-image = ">=0.24"
[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.*"