You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Offer a way for programs to intercept and make use of micropip.install status and error information.
Motivation
During micropip.install, a lot of useful information is sent to the browser console which might actually be useful to display to users, such as drawing progress bars to indicate "5 of 10 packages are loading", or even "5MB of 50MB have been loaded".
But more crucially, having access to error conditions in a predictable manner instead of tracebacks in the browser console (if even reachable, e.g. on mobile) would help create more predictable experiences
Design Ideas
accept error_callback and message_callback, similar to the typescript side
hand back some dict that includes a message, but ideally also some idea of progress, e.g. stage and total_packages, start_time, duration
these could be well-typed (even TypeDicts) or have a schema
use a more pythonic approach, using a log=logger.getLogger()
potentially more featureful
less type-able
would make it easy to add DEBUG messages, etc. that shouldn't always be displayed without inventing some new system
The text was updated successfully, but these errors were encountered:
Thanks for the proposal! I certainly see the use case for this so +1 from me. Personally, I have no strong preferences between string and structured logging, it's mostly a question for downstream packages.
Someone would need to design the API and implement this though :)
References
Elevator pitch
Offer a way for programs to intercept and make use of
micropip.install
status and error information.Motivation
During
micropip.install
, a lot of useful information is sent to the browser console which might actually be useful to display to users, such as drawing progress bars to indicate "5 of 10 packages are loading", or even "5MB of 50MB have been loaded".But more crucially, having access to error conditions in a predictable manner instead of tracebacks in the browser console (if even reachable, e.g. on mobile) would help create more predictable experiences
Design Ideas
error_callback
andmessage_callback
, similar to the typescript sidemessage
, but ideally also some idea of progress, e.g.stage
andtotal_packages
,start_time
,duration
TypeDict
s) or have a schemalog=logger.getLogger()
The text was updated successfully, but these errors were encountered: