-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Vega-Lite to 5.21, remove 5.13, add Python functions to retrie…
…ve library versions (#194) * Add vega-lite 5.21, remove 5.13 * update tests * Add Python methods to retrieve the bundled library versions * py-fmt * fmt-rs * clipy fix * fmt * fix cli tests * run cli tests with pixi
- Loading branch information
Showing
39 changed files
with
183 additions
and
3,986 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,10 @@ pub const VEGA_EMBED_PATH: &str = | |
"/pin/[email protected]/mode=imports,min/optimized/vega-embed.js"; | ||
pub const DEBOUNCE_PATH: &str = "/pin/[email protected]/mode=imports,min/optimized/lodash.debounce.js"; | ||
|
||
pub const VEGA_VERSION: &str = "5.30.0"; | ||
pub const VEGA_THEMES_VERSION: &str = "2.15.0"; | ||
pub const VEGA_EMBED_VERSION: &str = "6.26.0"; | ||
|
||
pub fn url_for_path(path: &str) -> String { | ||
format!("{}{}", SKYPACK_URL, path) | ||
} | ||
|
@@ -31,29 +35,29 @@ pub fn vega_themes_url() -> String { | |
#[allow(non_camel_case_types)] | ||
pub enum VlVersion { | ||
v5_8, | ||
v5_13, | ||
v5_14, | ||
v5_15, | ||
v5_16, | ||
v5_17, | ||
v5_18, | ||
v5_19, | ||
v5_20, | ||
v5_21, | ||
} | ||
|
||
impl VlVersion { | ||
pub fn to_path(self) -> String { | ||
use VlVersion::*; | ||
let path = match self { | ||
v5_8 => "/pin/[email protected]/mode=imports,min/optimized/vega-lite.js", | ||
v5_13 => "/pin/[email protected]/mode=imports,min/optimized/vega-lite.js", | ||
v5_14 => "/pin/[email protected]/mode=imports,min/optimized/vega-lite.js", | ||
v5_15 => "/pin/[email protected]/mode=imports,min/optimized/vega-lite.js", | ||
v5_16 => "/pin/[email protected]/mode=imports,min/optimized/vega-lite.js", | ||
v5_17 => "/pin/[email protected]/mode=imports,min/optimized/vega-lite.js", | ||
v5_18 => "/pin/[email protected]/mode=imports,min/optimized/vega-lite.js", | ||
v5_19 => "/pin/[email protected]/mode=imports,min/optimized/vega-lite.js", | ||
v5_20 => "/pin/[email protected]/mode=imports,min/optimized/vega-lite.js" | ||
v5_20 => "/pin/[email protected]/mode=imports,min/optimized/vega-lite.js", | ||
v5_21 => "/pin/[email protected]/mode=imports,min/optimized/vega-lite.js" | ||
}; | ||
path.to_string() | ||
} | ||
|
@@ -66,21 +70,21 @@ impl VlVersion { | |
use VlVersion::*; | ||
match self { | ||
v5_8 => "5.8", | ||
v5_13 => "5.13", | ||
v5_14 => "5.14", | ||
v5_15 => "5.15", | ||
v5_16 => "5.16", | ||
v5_17 => "5.17", | ||
v5_18 => "5.18", | ||
v5_19 => "5.19", | ||
v5_20 => "5.20", | ||
v5_21 => "5.21", | ||
} | ||
} | ||
} | ||
|
||
impl Default for VlVersion { | ||
fn default() -> Self { | ||
VlVersion::from_str("5.20").unwrap() | ||
VlVersion::from_str("5.21").unwrap() | ||
} | ||
} | ||
|
||
|
@@ -90,29 +94,29 @@ impl FromStr for VlVersion { | |
fn from_str(s: &str) -> Result<Self, Self::Err> { | ||
Ok(match s { | ||
"5.8" | "v5.8" | "5_8" | "v5_8" => Self::v5_8, | ||
"5.13" | "v5.13" | "5_13" | "v5_13" => Self::v5_13, | ||
"5.14" | "v5.14" | "5_14" | "v5_14" => Self::v5_14, | ||
"5.15" | "v5.15" | "5_15" | "v5_15" => Self::v5_15, | ||
"5.16" | "v5.16" | "5_16" | "v5_16" => Self::v5_16, | ||
"5.17" | "v5.17" | "5_17" | "v5_17" => Self::v5_17, | ||
"5.18" | "v5.18" | "5_18" | "v5_18" => Self::v5_18, | ||
"5.19" | "v5.19" | "5_19" | "v5_19" => Self::v5_19, | ||
"5.20" | "v5.20" | "5_20" | "v5_20" => Self::v5_20, | ||
"5.21" | "v5.21" | "5_21" | "v5_21" => Self::v5_21, | ||
_ => bail!("Unsupported Vega-Lite version string {}", s), | ||
}) | ||
} | ||
} | ||
|
||
pub const VL_VERSIONS: &[VlVersion] = &[ | ||
VlVersion::v5_8, | ||
VlVersion::v5_13, | ||
VlVersion::v5_14, | ||
VlVersion::v5_15, | ||
VlVersion::v5_16, | ||
VlVersion::v5_17, | ||
VlVersion::v5_18, | ||
VlVersion::v5_19, | ||
VlVersion::v5_20, | ||
VlVersion::v5_21, | ||
]; | ||
|
||
pub fn build_import_map() -> HashMap<String, String> { | ||
|
@@ -160,14 +164,14 @@ pub fn build_import_map() -> HashMap<String, String> { | |
m.insert("/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-hierarchy.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-hierarchy.js").to_string()); | ||
m.insert("/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-interpreter.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-interpreter.js").to_string()); | ||
m.insert("/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-label.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-label.js").to_string()); | ||
m.insert("/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-lite.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-lite.js").to_string()); | ||
m.insert("/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-lite.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-lite.js").to_string()); | ||
m.insert("/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-lite.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-lite.js").to_string()); | ||
m.insert("/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-lite.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-lite.js").to_string()); | ||
m.insert("/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-lite.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-lite.js").to_string()); | ||
m.insert("/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-lite.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-lite.js").to_string()); | ||
m.insert("/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-lite.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-lite.js").to_string()); | ||
m.insert("/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-lite.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-lite.js").to_string()); | ||
m.insert("/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-lite.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-lite.js").to_string()); | ||
m.insert("/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-lite.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-lite.js").to_string()); | ||
m.insert("/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-loader.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-loader.js").to_string()); | ||
m.insert("/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-parser.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega-parser.js").to_string()); | ||
|
@@ -191,14 +195,14 @@ pub fn build_import_map() -> HashMap<String, String> { | |
m.insert("/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/-/[email protected]/dist=es2020,mode=imports,min/optimized/vega.js").to_string()); | ||
m.insert("/pin/[email protected]/mode=imports,min/optimized/lodash.debounce.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/pin/[email protected]/mode=imports,min/optimized/lodash.debounce.js").to_string()); | ||
m.insert("/pin/[email protected]/mode=imports,min/optimized/vega-embed.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/pin/[email protected]/mode=imports,min/optimized/vega-embed.js").to_string()); | ||
m.insert("/pin/[email protected]/mode=imports,min/optimized/vega-lite.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/pin/[email protected]/mode=imports,min/optimized/vega-lite.js").to_string()); | ||
m.insert("/pin/[email protected]/mode=imports,min/optimized/vega-lite.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/pin/[email protected]/mode=imports,min/optimized/vega-lite.js").to_string()); | ||
m.insert("/pin/[email protected]/mode=imports,min/optimized/vega-lite.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/pin/[email protected]/mode=imports,min/optimized/vega-lite.js").to_string()); | ||
m.insert("/pin/[email protected]/mode=imports,min/optimized/vega-lite.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/pin/[email protected]/mode=imports,min/optimized/vega-lite.js").to_string()); | ||
m.insert("/pin/[email protected]/mode=imports,min/optimized/vega-lite.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/pin/[email protected]/mode=imports,min/optimized/vega-lite.js").to_string()); | ||
m.insert("/pin/[email protected]/mode=imports,min/optimized/vega-lite.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/pin/[email protected]/mode=imports,min/optimized/vega-lite.js").to_string()); | ||
m.insert("/pin/[email protected]/mode=imports,min/optimized/vega-lite.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/pin/[email protected]/mode=imports,min/optimized/vega-lite.js").to_string()); | ||
m.insert("/pin/[email protected]/mode=imports,min/optimized/vega-lite.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/pin/[email protected]/mode=imports,min/optimized/vega-lite.js").to_string()); | ||
m.insert("/pin/[email protected]/mode=imports,min/optimized/vega-lite.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/pin/[email protected]/mode=imports,min/optimized/vega-lite.js").to_string()); | ||
m.insert("/pin/[email protected]/mode=imports,min/optimized/vega-lite.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/pin/[email protected]/mode=imports,min/optimized/vega-lite.js").to_string()); | ||
m.insert("/pin/[email protected]/mode=imports,min/optimized/vega-themes.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/pin/[email protected]/mode=imports,min/optimized/vega-themes.js").to_string()); | ||
m.insert("/pin/[email protected]/mode=imports,min/optimized/vega.js".to_string(), include_str!("../../vendor/cdn.skypack.dev/pin/[email protected]/mode=imports,min/optimized/vega.js").to_string()); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.