-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
DOC: Validate versions.json before building docs #61573 #61578
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
DOC: Validate versions.json before building docs #61573 #61578
Conversation
0aa4645
to
f1d80fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @iabhi4, very nice!
Adds a JSON validity check for
versions.json
directly insidepandas_web
during context generation. This ensures malformed JSON (e.g., trailing commas) is caught early, preventing issues like the broken version dropdown in #61572