DOC: Validate versions.json before building docs #61573#61578
Conversation
0aa4645 to
f1d80fc
Compare
datapythonista
left a comment
There was a problem hiding this comment.
Thanks for the contribution @iabhi4
Can you move this check to main, and just open the file and load it as json, with a comment about what's for.
Also, can you add the comma to versions so we can see how this fails, and if we really need to reraise the exception (which I'm not sure we need).
Thanks!
f1d80fc to
93d9d89
Compare
Thanks for the review @datapythonista, just to confirm: when you say "move this check to main", do you mean the Added the trailing comma to |
|
Better inside the We don't want to warn. What I'm saying is that when you do If the default error message is not great, then I'm happy with your approach. But instead of Btw, when this is done, if you are interested, it'd be nice to open a new PR to use |
93d9d89 to
89b8493
Compare
|
Thanks for such a detailed clarification. Have pushed the updated changes.
happy to follow up with a separate PR for the |
|
Thanks for the update. I think catching the exception as you did was indeed better, the error message here is not helpful enough. But personally, I would just raise a RuntimeError with the good error message from the original one. Feel free to remove the comma, after those changes I think we can get this merged. Thanks! |
89b8493 to
57bbd0f
Compare
|
Raising |
57bbd0f to
6eaa177
Compare
datapythonista
left a comment
There was a problem hiding this comment.
Thanks @iabhi4, very nice!
Adds a JSON validity check for
versions.jsondirectly insidepandas_webduring context generation. This ensures malformed JSON (e.g., trailing commas) is caught early, preventing issues like the broken version dropdown in #61572