EricTRocks / pyflowgraph

Python Module for displaying flowgraphs using Pyside or PyQt.
BSD 3-Clause "New" or "Revised" License
76 stars 29 forks source link

Kraken updates #8

Closed EricTRocks closed 7 years ago

EricTRocks commented 7 years ago

This PR ports changed done locally in Kraken to pyflowgraph to extend the functionality and to allow Kraken to make pyflowgraph a sub-module.

EricTRocks commented 7 years ago

@willjp @drogenlied Could you have a look to see if there is anything that stands out as incompatible with PySide2 / Python3

drogenlied commented 7 years ago

I tested pyqt4 and pyqt5 on Python3 and there are definitely some issues:

EricTRocks commented 7 years ago

@drogenlied Thanks for testing. The problem with keeping the nested pyflowgraph directory is that it can no longer be easily included as a submodule in other git projects where it's cloned location in that master project is within a path that is automatically added to PYTHONPATH. I tested normal installation with pip and it worked. What are you referring to when you are saying a dev installation?

I'll take a look at the rest of the issues and fix them up.

EricTRocks commented 7 years ago

@drogenlied I did a setup.py develop on my end and it created an egg-link file and I could then import pyflowgraph without issue. What is not working for you? regarding thing?

drogenlied commented 7 years ago

@EricTRocks, when I use setup.py develop, it creates the link just fine but I can't import pyflowgraph. This happens on both Python 2.7.13 and 3.5.3. However, I can do import graph_view anywhere, which then fails because it cannot import Node from the relative path .node.

EricTRocks commented 7 years ago

@drogenlied OK thanks for that information. I've got Python 2.7.9 installed I believe. Will upgrade and see if I get the same issues.

EricTRocks commented 7 years ago

@drogenlied I actually did get the error with the develop mode install. Just needed to restart the command prompt to see it. I've fixed all the issues you found previously I believe with the recent commits aside from the connection line artifacts.

I've logged another issue for the artifacts. https://github.com/EricTRocks/pyflowgraph/issues/9

Let me know how the recent changes work for you.

EricTRocks commented 7 years ago

@drogenlied The artifacts for connections is fixed (#9) with the latest commit. This was due to a change that was made where in graph_view.py it was calling node.moveBy() instead of node.translate(). The latter is a custom method which calls prepareConnectionGeometryChange() that is used to alert the system that the connections need to be redrawn.

drogenlied commented 7 years ago

Things look ok now, except for the Python3/pyqt4 segfault on exit, which may not even be reproducible with slightly different versions of Qt or other operating systems.

EricTRocks commented 7 years ago

I'll open a ticket for the segfault. In the mean time I'm merging this in.