-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Make graph_objs.py compatible with new graph reference! #118
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
Conversation
etpinard
commented
Sep 17, 2014
- created from @theengineear 's factories branch
- adapt graph reference INFO to new graph reference structure
- add doc content (e.g. links to plot.ly examples and parent keys for a given obj)
Conflicts: plotly/graph_objs/graph_objs_tools.py
@theengineear this is not ready to merge yet Requirements:
|
@theengineear because of this statement, Layout, Data and Figure are not generated with I think you did this because Layout, Data and Figure have a few special methods that use didn't want to overwrite. I'm thinking instead of defining those three objects with Thoughts? |
@etpinard : re-Layout, Data, Figure. Yes, I think that makes sense to do it as you mention. In fact, I think it's clearer to do so this way since it is a patch to keep things working. This is best done is a clear, separate place in the code. |
In general, i think we break enough backwards compatibility (e.g, maybe users were using INFO for something) here that we might want to make this a bump to |
Also, nice job! |
@theengineear good call on bumping to v. 1.3.0 ! How should we go about this? I'm thinking that the easiest way would be to make the In the meantime,
|
@theengineear A quick question for you:
Looks like it only overrides the I just want to make sure that you still see |
TL;DR it's easy to test @etpinard , a lot of the logic in the python library depends on inheritance. I like this approach and i think it seems pythonic enough, but I'm open to discussion. We could alternatively just have a property set in all the trace objects to Here's an example of how it's used: |
Oh. Sorry I didn't see that ref to |
Only copy over specific files into on sync.
Conflicts: plotly/graph_objs/__init__.py plotly/graph_objs/graph_objs.py
@theengineear I merged master and I got all the tests to work! Wanna merge this and bump to version 1.3.0 ? |
@etpinard re-merging to master. I'd like to get the calls to things like globals() and locals() out of these files before releasing. That's hella-confusing to debug. I was using them as an easy way to get at defined classes from strings. but we should be more explicit. Here are examples of the usage: I think there are a couple of stability issues I'd like to clean up in 1.2.x and then push a final version to PyPI before this change (which i think it fairly big). Is this holding back 3D right now? |
@theengineear Correct. Ideally, I would love to generate the new 3D graph objects with using the machinery in this PR. That said, I have to fill up |
@theengineear Also can I ask ... is there an easy way to |
|
||
""" | ||
pass | ||
def _factory(name, *args, **kwargs): |
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.
maybe this would be more easily read if:
def get_class_instance_by_name(name, *args, **kwargs):
That might be too long now, but _factory or factory are a maybe a little confusing.
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.
Good call.
@etpinard , Re: tests, yeah, might just be a connection error, i should go back in and make things a bit more robust... i'd like to refactor the test suite to be a little smarter at some point, definitely not priority though. maybe just rebuild after all the changes are made? Are they passing when you run them on your machine? |
@theengineear yeah, running |
@etpinard , yeah i think this is looking great! there might be some merge conflicts at this point, but they shouldn't be a big deal. 👯 once these things are changed and tests pass on circle, feel free to ping me about anything. |
k, yeah, i've seen tests intermittently fail, i'm sure it's no big deal, as long as you can dev/test on your machine OK, we can just figure out circle before we merge this into master. |
Make graph_objs.py compatible with new graph reference!
tldr what just happened? |
@chriddyp , python library got an updated graph reference so 3d works. plus, we refactored how classes are generated so that almost none of the classes are hardcoded. this is in an attempt to make adding things in graph reference and having them show up in the python library more seamless. |
3d graph objs, auto-generated by new framework. |