Conversation
|
Thanks @mattijn, I've only skimmed through but this is looking better! 🎉 Note I'll aim to do a proper review soon One thing that stands out to me on a first look:
Apologies for not being clearer, I'm absolutely fine with further changes being made in both
|
| Before | After (vega/vega-datasets#702) |
|---|---|
{"name": "7zip.png", "path": "7zip.png"}
{"name": "annual-precip.json", "path": "annual-precip.json"}
{"name": "flights-200k.arrow", "path": "flights-200k.arrow"}
{"name": "flights-20k.json", "path": "flights-20k.json"} |
{"name": "icon_7zip", "path": "7zip.png"}
{"name": "annual_precip", "path": "annual-precip.json"}
{"name": "flights_200k_arrow", "path": "flights-200k.arrow"}
{"name": "flights_20k", "path": "flights-20k.json"} |
Important
Would you be able to restore (test_pandas_date_parse), with the only change being the names used in the @pytest.mark.parametrize please?
For reference:
- (909e7d0) was the commit that introduced using schema data type information for
pandas, in response to @joelostblom's early experience (feat(RFC): Addsaltair.datasets#3631 (comment)) - (a776e2f) was the last major change to
SchemaCache - Also here's the docstring for
SchemaCachealtair/altair/datasets/_cache.py
Lines 206 to 220 in 78a57f2
Does that help demonstrate why this is a regression?
- I added functionality to solve an issue that came up in the PR
- I added a test to make sure the data types were at least all temporal data types
- But now they aren't, and the issue is only showing up in
pandas- which is where the problem was in the first place 😔
|
Yes, but now ruff and or mypy aren't yet happy. Or you don't think we should make pylance happy too? |
No I mean did you write this yourself? |
|
Not a type expert, let me leave this to you, but the stubs are now derived from the DataPackage and not the other type files. |
|
Thanks for reviewing @dangotbanned! I've included one raise using the This is specifically for the 'stocks' dataset example (date contains values like this: from altair.datasets import data
data.stocks(engine="pyarrow")
|
This PR improves the datasets test suite based on feedback in #3854. Now, the automated tests reflect the implementation, solid work. Namely:
test_all_datasetsto properly match error messages (the test was looking foricon_7zip.pngbut the actual error shows7zip.png).is_urlfunction that validates with vega-datasets 3.2.0 solely precomputed URLs.The test suite now provides better coverage and the tests are reflecting by their names. No changes to the code in altair were required.
Could you have a look if this addresses your concerns @dangotbanned?
Close #3854