Switch Plottable to a Protocol#667
Conversation
| ): | ||
| return Plotter().from_igraph(ig, node_attributes, edge_attributes, load_nodes, load_edges) | ||
| from_igraph.__doc__ = Plotter.from_igraph.__doc__ | ||
| from_igraph.__doc__ = Plotter.from_igraph.__doc__ # type: ignore |
There was a problem hiding this comment.
This doesn't seem to work, when I inspect in a notebook and it didn't work before my changes
I also notice that the docs don't show the PyGraphistry functions anyway, so it doesn't look like adding docs here is meaningful
eeb568d to
26353b9
Compare
exrhizo
left a comment
There was a problem hiding this comment.
Okay put back in spanner and kusto, fixed issues and responded to comments
26353b9 to
71fec5e
Compare
| logger.info('-Reusing Existing Node Featurization') | ||
| return res._node_features, res._node_target, res | ||
| # NOTE: Wasn't sure if " res._node_target is not None" ought to have been a condition for this code path | ||
| node_target = res._node_target if res._node_target is not None else pd.DataFrame() |
There was a problem hiding this comment.
i missed it on the first pass of these, but i wonder if for these df.empty y stubs, we need len(y.index) == len(X.index), even if no columns... i can imagine downstream code being confused on shape mismatch
There was a problem hiding this comment.
as long as CI passes, don't need here, but more of a note for future PRs to think about
| load_nodes = True, load_edges = True | ||
| ): | ||
| return Plotter().from_igraph(ig, node_attributes, edge_attributes, load_nodes, load_edges) | ||
| from_igraph.__doc__ = Plotter.from_igraph.__doc__ |
There was a problem hiding this comment.
don't we want to copy the doc str in cases like these? like we inherit (maybe) when it is x = x, but not when def x(): x()
There was a problem hiding this comment.
I thought I replied somewhere, that this didn't work before and it isn't working now, I don't know why not
is in, from_igraph.__doc__ maybe because it is static doesn't get set
actually the module level exports got have doc pages afaik
There was a problem hiding this comment.
maybe it works for help(x) but sphinx doesn't see it
There was a problem hiding this comment.
I'll look at this more
There was a problem hiding this comment.
approved - see comments, a few things worth noting:
- seems worth trying on rtd.org , see slack for getting you a maintainer acct
- we still likely need to copy docstr when doing
def x(): return x(), as that's a new method, vs a pointer - i saw some type ignores on
transformunsure if more CHANGELOG.md
would you like to try publishing, or should i?
Hide the inherttited members for mixins
fix lint fix lint
0bfa7ac to
2bfc6bf
Compare
TODO
Typecheck
Getting close to types passing, still have these mysterious cases, should fallback on the PlottableBase afiac