Skip to content

Commit f48a621

Browse files
committed
adapt for new vegafusion and altair
1 parent b530a82 commit f48a621

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dependencies = [
3333
"statsmodels>=0.14.0",
3434
"tqdm>=4.66.1",
3535
"cyclopts",
36-
"vegafusion[embed]>=1.6.5",
36+
"vegafusion[embed]>=2.0.0",
3737
"xarray",
3838
# TODO unpin when https://github.com/Unidata/netcdf4-python/issues/1343 is resolved
3939
"netCDF4<=1.7.1",

src/depiction_targeted_preproc/workflow/exp/plot_compare_peak_density.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
from pathlib import Path
2+
3+
import altair as alt
14
import cyclopts
25
import polars as pl
3-
import vegafusion
4-
from pathlib import Path
56

67
from depiction_targeted_preproc.workflow.qc.plot_peak_density import plot_density_combined_full
78

@@ -14,7 +15,7 @@ def exp_plot_compare_peak_density(
1415
table_marker_distance_uncalib: Path,
1516
output_pdf: Path,
1617
) -> None:
17-
vegafusion.enable()
18+
alt.data_transformers.enable("vegafusion")
1819

1920
table = pl.concat(
2021
[

src/depiction_targeted_preproc/workflow/qc/plot_peak_density.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
from pathlib import Path
2+
13
import altair as alt
24
import cyclopts
35
import polars as pl
4-
import vegafusion
56
from KDEpy import FFTKDE
6-
from pathlib import Path
77

88
from depiction_targeted_preproc.workflow.qc.plot_calibration_map import get_mass_groups
99

@@ -91,7 +91,7 @@ def qc_plot_peak_density(
9191
output_pdf: Path,
9292
grouped: bool = False,
9393
) -> None:
94-
vegafusion.enable()
94+
alt.data_transformers.enable("vegafusion")
9595

9696
table_calib = pl.read_parquet(table_marker_distances_calib)
9797
table_baseline = pl.read_parquet(table_marker_distances_baseline)

0 commit comments

Comments
 (0)