Skip to content
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

creating source feedback #74

Closed
alustig3 opened this issue Apr 19, 2024 · 1 comment
Closed

creating source feedback #74

alustig3 opened this issue Apr 19, 2024 · 1 comment

Comments

@alustig3
Copy link
Contributor

I am going through the process of adding a source and have a couple of suggestions that may help the user.

When I first went to add a video, the program crashed.
CleanShot 2024-04-19 at 14 13 02

The cause was that I was missing opencv. It would be nice if you could prevent an ignorant user like myself from crashing the program by adding a try except clause such as:

try: 
    import cv2
except:
    # show a dialog explaining that the user needs to install opencv using pip install pybehave[video] or link to the documentation

The docs do mention how to install the extra dependencies here. I suggest reiterating this information of how to add the dependency here where at the moment it only describes that opencv-python is required, not how to add it.

Another suggestion is to add labels/descriptions of the attributes or a link to documentation directly in this dialog (and other SourceParametersDialogs).

CleanShot 2024-04-19 at 14 31 17

A link to included sources docs in this dialog may be useful as well:
CleanShot 2024-04-19 at 15 02 18

@theonlydvr
Copy link
Contributor

This is a great suggestion and something I've been interested in adding for a little while now. Your suggestion to catch it at the import point made this really straightforward and clean to implement. Now, if you try to use a feature that requires an extra, a dialog like the below will pop up:
image
I've also made it so the '?' buttons in the two dialogs you sent link out to the corresponding documentation pages. I'll also work on adding the same feature for Widgets and EventLoggers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants