Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from Vega-Lite 5.7.1 to 5.8.0 #3037

Merged
merged 9 commits into from
May 2, 2023
Merged

Update from Vega-Lite 5.7.1 to 5.8.0 #3037

merged 9 commits into from
May 2, 2023

Conversation

mattijn
Copy link
Contributor

@mattijn mattijn commented May 1, 2023

This updates Altair to use Vega-Lite 5.8.0.

One thing I notice in the diff-changes:

old, 5.7.1

    fit : anyOf(List(:class:`GeoJsonFeature`), List(:class:`Fit`), :class:`ExprRef`)

new, 5.8.0

    fit : anyOf(:class:`Fit`, List(:class:`Fit`), :class:`ExprRef`)

where https://altair-viz.github.io/gallery/wind_vector_map.html is using a GeoJsonFeature for fit.

Not sure yet if this a regression.

Also this depends on this PR at the altair_viewer repo altair-viz/altair_viewer#57 which awaits confirmation to be merged.

@mattijn
Copy link
Contributor Author

mattijn commented May 2, 2023

https://altair-viz.github.io/gallery/wind_vector_map.html now gives:

SchemaValidationError: 'Polygon' is an invalid value for `type`.

'Feature' was expected
'FeatureCollection' was expected

When defining a Feature, including a properties member it works:

extent = {
    "type": "Feature",
    "geometry": {
        "type": "Polygon",
        "coordinates": [
            [
                [xmax, ymax],
                [xmax, ymin],
                [xmin, ymin],
                [xmin, ymax],
                [xmax, ymax],
            ]
        ],
    },
    "properties": {},
}

@mattijn
Copy link
Contributor Author

mattijn commented May 2, 2023

I've updated the tests and documentation reflecting the changes in VL5.8. The change introduced was for the fit parameter within projection() and I feel the change is actually an improvement and not a regression.

Are you able to update vl-convert @jonmmease? I've tested locally including altair-viz/altair_viewer#57 and remaining failing tests are due to not being able to save it to file (svg/png).

@jonmmease
Copy link
Contributor

Yes, update is in the works in vega/vl-convert#55. I'll ping you here when everything is published (should be within a few hours if I don't hit any snags).

@mattijn
Copy link
Contributor Author

mattijn commented May 2, 2023

Thanks, that is great🙏👍

@jonmmease
Copy link
Contributor

Ok, vl-convert-python 0.9.0 with Vega-Lite 5.8.0 support is on PyPI

@mattijn
Copy link
Contributor Author

mattijn commented May 2, 2023

Thanks @jonmmease, all tests pass, merging here👍

@mattijn mattijn merged commit 49c9b64 into vega:master May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants