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

Set Enums as values for Widget/Viewer, refactor test folder structure #834

Merged
merged 1 commit into from
Dec 7, 2019

Conversation

sc1f
Copy link
Contributor

@sc1f sc1f commented Dec 5, 2019

Previously, Aggregate, Sort, and Plugin enums could be used at __init__ for the viewer and widget, but not be set as attributes as they fail Traitlets type checking. This PR overrides __setattr__ for PerspectiveViewer to proactively call validate on the Enum, thus converting it to a string before setting it on the instance.

Additionally, this PR refactors the test folder structure to match that of the Python source, and adds new tests for the Enums.

@sc1f sc1f requested a review from timkpaine December 5, 2019 22:18
@timkpaine timkpaine added enhancement Feature requests or improvements Python labels Dec 7, 2019
@texodus
Copy link
Member

texodus commented Dec 7, 2019

Thanks for the PR and Review! Looks good!

@texodus texodus merged commit 2b196bd into master Dec 7, 2019
@texodus texodus deleted the widget-ux branch December 7, 2019 18:05
@texodus texodus added internal Internal refactoring and code quality improvement and removed enhancement Feature requests or improvements labels Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Internal refactoring and code quality improvement Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants