-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
Fixed broken URL in help output #1051
Conversation
4e85cd1
to
56d6f4a
Compare
I'm a little surprised that the tests passed...maybe this output is being sent to the pager and therefore isn't captured? |
Yes, I think that's it. One issue I have is that custom Elements will also point to non-existent entries in the elements tutorial. Got any ideas to disable that? |
I agree that is an issue though not a particularly major one. My only suggestion is to suggest the help URL only if the element is one of the ones we offer. Do we have such a list? Maybe the top level |
Could probably just iterate over the |
I suppose so given that seaborn elements aren't in that tutorial anyway. Should I really do the same for Containers or can I just ignore the possibility of custom Containers? I doubt people will want to build new containers often... |
Fine to ignore right now I think. |
@@ -25,6 +25,7 @@ | |||
from .operation import ElementOperation, MapOperation, TreeOperation # noqa (API import) | |||
from .element import * # noqa (API import) | |||
from . import util # noqa (API import) | |||
from .element import __all__ as elements_list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That doesn't seem right, it should at least filter for objects of type Element.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know hv.element.__all__
filters for ViewableElement but I think that includes some other types as well, e.g. Overlays. So maybe just tighten that check to use Element instead of ViewableElement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that __all__
contains strings (which I want) but doing tighter subclass checks requires a list of those classes. I could iterate over locals
but I find that pretty ugly. What would you suggest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd change line 99 of hv.element.__init__
to:
return issubclass(obj, Element)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! I was hesitant in case anything was expecting to find ViewableElements...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appears you were right being hesitant, but it really shouldn't be relying on importing Overlay via hv.element
.
Ok. If the tests pass I think this PR is ready for final review/merge. |
Looks good, merging. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This PR addresses #978. The code change is trivial but it is likely that the test data will need updating.