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

Refactor Graph types for extensibility #2240

Merged
merged 5 commits into from
Jan 4, 2018
Merged

Refactor Graph types for extensibility #2240

merged 5 commits into from
Jan 4, 2018

Conversation

philippjfr
Copy link
Member

Some small amount of refactoring for Graph code to make it easier for extension libraries to subclass and extend Graph elements. In particular GeoViews will offer Graph and TriMesh elements and these changes are required to make that work.

@jlstevens
Copy link
Contributor

Looks reasonable at a glance...

@philippjfr
Copy link
Member Author

Ready to review and merge.

@@ -98,6 +119,10 @@ class Graph(Dataset, Element2D):
kdims = param.List(default=[Dimension('start'), Dimension('end')],
bounds=(2, 2))

_node_type = Nodes

_edge_type = EdgePaths
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if this really needs to be private. It might be useful information for users in general though only advanced users should try setting it...

@jlstevens
Copy link
Contributor

Looks like a sensible generalization though I would consider using node_type and edge_type instead of _node_type and _edge_type...

@philippjfr
Copy link
Member Author

No objection, I've pushed the change.

@jlstevens
Copy link
Contributor

Looks good, happy to merge when the tests are green.

@jlstevens
Copy link
Contributor

Merging.

@jlstevens jlstevens merged commit 4a035fb into master Jan 4, 2018
@philippjfr philippjfr deleted the graph_generalize branch January 13, 2018 13:12
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants