Fix device docs - allow imports to continue but log error#614
Fix device docs - allow imports to continue but log error#614kevin-thankyou-lin wants to merge 1 commit intomasterfrom
Conversation
Abhiram824
left a comment
There was a problem hiding this comment.
I see what you are doing here, but outside of fixing the docs, it may not make sense to put pynput import in a try-catch?
Perhaps we should just localize this change to the ci-docs branch? Or maybe it isnt that big of a deal. What do you think?
abhihjoshi
left a comment
There was a problem hiding this comment.
Yeah I agree that putting it in a try block might not be ideal. Not sure how much sense this makes, but maybe what we can do is set an env variable prior to building the docs. Then, in the code, we can add some check that says if BUILD_DOCS=true (or something of that nature), ignore importing pynput (and other packages causing issues with the docs).
Yeah, ideally the program exits, so this was the choice I landed on for telling the user that the import won't work. I think localizing it to
Do you mean something like this? |
Yeah, like that. I think we can add the BUILD_DOCS env var in the workflow. |
yeah I think this makes the most sense |
What this does
Allow imports to continue but log error. Exiting program on error means the docs can't build.