Skip to content

Conversation

@franzhaas
Copy link
Contributor

This PR bumpes vega-lite to the 6.1.0 version

@mattijn
Copy link
Contributor

mattijn commented Apr 23, 2025

Thanks! This is great! It seems you deleted some files? Can you double check?

@dangotbanned
Copy link
Member

@franzhaas I don't think we can update to vega-lite>=6 - as there hasn't been a release for vl-convert yet

I couldn't tell from your original issue (#3828) if you need the latest vega-lite or if it was based on @mattijn's suggestion alone (#3829 (comment))

I imagine we might also need to update (https://github.com/vega/sphinxext-altair)?

From (https://github.com/vega/altair/milestone/11), I think the most relevant issue here would be:

I think the plan was that instead of a new v6 directory like in (45237a1) we'd remove that level of nesting.
However, I think all of this is a big ask of a new contributor 😅

@dangotbanned dangotbanned changed the title chore: Bumpvegalight chore: Bump vega-lite>=6 Apr 25, 2025
@dangotbanned dangotbanned added maintenance breaking Requires a **MAJOR** version bump labels Apr 25, 2025
@dangotbanned dangotbanned added this to the 6.0.0 milestone Apr 25, 2025
@mattijn
Copy link
Contributor

mattijn commented Apr 25, 2025

The new added Time encoding channel does appear:
image

Now we should be able to translate this Vega-lite json example (animated gapminder example) into corresponding Altair syntax...:
Open the Chart in the Vega Editor

{
  "$schema": "https://vega.github.io/schema/vega-lite/v6.json",
  "data": {
    "url": "data/gapminder.json"
  },
  "mark": "point",
  "params": [
    {
      "name": "animation_frame",
      "select": {
        "type": "point",
        "fields": [
          "year"
        ],
        "on": "timer"
      }
    }
  ],
  "transform": [
    {
      "filter": {
        "param": "animation_frame"
      }
    }
  ],
  "encoding": {
    "color": {
      "field": "country",
      "legend": null
    },
    "x": {
      "field": "fertility",
      "type": "quantitative"
    },
    "y": {
      "field": "life_expect",
      "type": "quantitative"
    },
    "time": {
      "field": "year",
      "type": "ordinal"
    }
  }
}

Agree with @dangotbanned, that we also need a new version of vl-convert for writing the charts to png files to make all tests pass. It is also referenced here: https://github.com/vega/altair/blob/main/tools/versioning.py#L217 (called here: https://github.com/vega/altair/blob/main/tools/generate_schema_wrapper.py#L1402). But for testing locally within a notebook with rendering to html it is already possible.

Also agree with @dangotbanned, that restructuring the repository by flattening the structure is indeed a very large task! We should do that separately from this PR.

@mattijn
Copy link
Contributor

mattijn commented Apr 25, 2025

this should work, but doesn't yet:

import altair as alt
from vega_datasets import data

source = data.gapminder.url
animation_frame = alt.selection_point(fields=['year'], on='timer')

chart = alt.Chart(source).mark_point().encode(
    x='fertility:Q',
    y='life_expect:Q',
    color=alt.Color('country:N').legend(None),
    time='year:O'
).transform_filter(animation_frame).add_params(animation_frame)

Note: It works in editor when run chart.open_editor(): Open the Chart in the Vega Editor

@mattijn
Copy link
Contributor

mattijn commented Apr 25, 2025

Got it working in a Jupyter notebook🚀:

Screen.Recording.2025-04-25.at.17.34.16.mov

Maybe caching issues in VSCode

@dangotbanned
Copy link
Member

Also agree with @dangotbanned, that restructuring the repository by flattening the structure is indeed a very large task! We should do that separately from this PR.

Great yeah that sounds good @mattijn

Only thing I wanted to add is can we do that before an actual altair release?
I couldn't tell if that was implied, but would reduce the whiplash downstream 😄

  • Current
    • altair.vegalite.v5.*
  • This PR
    • altair.vegalite.v6.*
  • Before release, decide on one of these:
    • altair.vegalite.*
    • altair.*

@dangotbanned
Copy link
Member

I think this PR starting on a commit before (#3829) - which is causing the conflicts 🤔

@mattijn
Copy link
Contributor

mattijn commented Apr 25, 2025

I'm fine on any of the suggested restructuring, it is just a lot of work that someone has to do🫣

@dangotbanned dangotbanned linked an issue Apr 25, 2025 that may be closed by this pull request
mattijn added 2 commits April 27, 2025 20:41
…ing.py` when called in `generate_schema_wrapper.py` on line `VERSIONS.update_all()`
@dangotbanned
Copy link
Member

ok... I do not think that i can be of help here...

I think this PR starting on a commit before (#3829) - which is causing the conflicts 🤔

yes... sorry this was my mistake

No need to apologize @franzhaas! 🙂

If you're looking to get involved, but not sure where to start - try checking out one of these:

@dangotbanned dangotbanned marked this pull request as draft April 28, 2025 10:11
@dangotbanned dangotbanned added the vega: vl-convert Requires upstream/integration action w/ `vl-convert` label Apr 28, 2025
@jonmmease
Copy link
Contributor

as there hasn't been a release for vl-convert yet

Hey all, just wanted to say that I've started looking into updating vl-convert, but have run into a bunch of roadblocks. I'll try to do some more experimenting soon and write up the challenges if I can't work around them.

@jonmmease
Copy link
Contributor

ok! vl-convert 1.8.0 adds supports Vega-Lite 6.1 (I didn't add 6.0), and updates Vega to 6.1 as well. So we should be able to push this forward now. Thanks for working on it @franzhaas!

@jonmmease
Copy link
Contributor

And vl-convert-python 1.8.0 is now on conda-forge as well (that took a bit more work this time around)

@mattijn mattijn marked this pull request as ready for review June 1, 2025 19:41
@mattijn
Copy link
Contributor

mattijn commented Jun 1, 2025

@jonmmease, thanks for updating vl-convert! I had to change one test that I like to raise to you. It is in this commit: 9ed9643

Basically before it was: application/vnd.vega.v5+json and now it is: application/vnd.vega.v6json without the +, also there is no . or something. I think this comes from vl-convert, but I'm not sure about that either.

@mattijn
Copy link
Contributor

mattijn commented Jun 1, 2025

During docbuild:

/home/runner/work/altair/altair/doc/user_guide/generated/channels/altair.Time.rst:32: WARNING: autosummary: failed to import Time.rescale.
Possible hints:
* ModuleNotFoundError: No module named 'altair.Time'
* PycodeError: no source found for module 'builtins'
* KeyError: 'description'
* AttributeError: type object 'Time' has no attribute 'Time'
* ModuleNotFoundError: No module named 'Time'
* KeyError: 'Time'

Maybe will be resolved once this is in: vega/vega-lite#9535?

@jonmmease
Copy link
Contributor

vl-convert! I had to change one test that I like to raise to you

Thanks @mattijn, that does look odd. Which test was failing? (I don' see that in the commit).

@mattijn
Copy link
Contributor

mattijn commented Jun 3, 2025

I think it must have been my mistake somehow. Resolved by last commit.

@mattijn mattijn changed the title chore: Bump vega-lite>=6 feat: Bump vega-lite>=6 Jun 3, 2025
@mattijn mattijn merged commit f919f25 into vega:main Jul 11, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Requires a **MAJOR** version bump maintenance vega: vl-convert Requires upstream/integration action w/ `vl-convert`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support vega-lite>=6

4 participants