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

Dynamic inheritance in OptionTrees #796

Merged
merged 9 commits into from Jul 26, 2016

Conversation

Projects
None yet
2 participants
@jlstevens
Member

jlstevens commented Jul 25, 2016

This PR is primarily to find out whether disabling merge_keywords has an effect on the test. If the tests continue to pass, then I propose keeping it disabled.

Edit: This PR turned into a fix for dynamic inheritance.

@jlstevens

This comment has been minimized.

Member

jlstevens commented Jul 25, 2016

Thanks for that last fix! Hope the tests pass this time...

@jlstevens

This comment has been minimized.

Member

jlstevens commented Jul 26, 2016

The existing tests passed and I am currently adding more unit tests. I should also mention that there is no need to change merge_keywordsand that this PR addresses issue #646.

@jlstevens jlstevens changed the title from Disabled merge_keywords on Options to Dynamic option inheritance Jul 26, 2016

@jlstevens

This comment has been minimized.

Member

jlstevens commented Jul 26, 2016

I looked into the possibility of defining a utility to replace this code for generating a string specification:

components = (obj.__class__.__name__,
                        group_sanitizer(obj.group),
                        label_sanitizer(obj.label))
 '.'.join([c for c in components if c])

But decided this pattern doesn't appear often enough in the codebase to bother with after grepping for '.'.join(. For tuple specifications, there is already get_spec(obj) which seems sufficient as tuple specs are recommended anyway.

Having added unit tests to ensure the new dynamic inheritance keeps working, I think this PR is now ready for a review/merge.

@jlstevens

This comment has been minimized.

Member

jlstevens commented Jul 26, 2016

I added one more unit test to simulate the %%opts magic. Ready to review/merge.

@jlstevens jlstevens changed the title from Dynamic option inheritance to Dynamic inheritance in OptionTrees Jul 26, 2016

@jlstevens

This comment has been minimized.

Member

jlstevens commented Jul 26, 2016

I just updated the title of the PR as I confused myself thinking it is about options on DynamicMapinstead of dynamic inheritance!

@philippjfr

This comment has been minimized.

Member

philippjfr commented Jul 26, 2016

Thanks for adding the tests. Very happy we finally fixed this.

@philippjfr philippjfr merged commit 25c6c7f into master Jul 26, 2016

3 of 4 checks passed

s3-reference-data-cache Test data not cached, see details to rebuild.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.03%) to 69.393%
Details

@philippjfr philippjfr removed the in progress label Jul 26, 2016

@philippjfr philippjfr deleted the disable_merge_keywords branch Sep 2, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment