Skip to content

Commit

Permalink
updated to PySide6
Browse files Browse the repository at this point in the history
  • Loading branch information
akissinger committed May 1, 2023
1 parent b0ae584 commit 123ca1f
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 28 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ cd chyp
pip install .
```

It can then be run by running `chyp` from the command line or `python3 -m chyp` from inside the source directory.
It can then be run by running `chyp` from the command line or `python3 -m chyp` from inside the source directory. This will automatically install dependencies: [PySide6](https://pypi.org/project/PySide6/) (Qt6 GUI bindings), [cvxpy](https://www.cvxpy.org/) (convex solver for diagram layout), and [lark](https://github.com/lark-parser/lark) (parser library).




Expand Down
7 changes: 0 additions & 7 deletions chyp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,3 @@
# along with Chyp. If not, see <https://www.gnu.org/licenses/>.


from . import app
from .gui.graphview import GraphView
from .graph import Graph
from .rule import Rule
from .state import State
from .matcher import match_graph, match_rule, Match, Matches
from .rewrite import rewrite, dpo
4 changes: 2 additions & 2 deletions chyp/gui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
# limitations under the License.

from __future__ import annotations
from PySide2.QtCore import *
from PySide2.QtWidgets import *
from PySide6.QtCore import *
from PySide6.QtWidgets import *
import sys

from . import editor
Expand Down
6 changes: 3 additions & 3 deletions chyp/gui/codeview.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Optional, Tuple
from PySide2.QtCore import Qt
from PySide2.QtGui import *
from PySide2.QtWidgets import *
from PySide6.QtCore import Qt
from PySide6.QtGui import *
from PySide6.QtWidgets import *
import re

# palette from: https://github.com/catppuccin/catppuccin
Expand Down
6 changes: 3 additions & 3 deletions chyp/gui/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

from __future__ import annotations
from typing import List
from PySide2.QtCore import QDir, QFileInfo, QSettings, QObject
from PySide2.QtGui import *
from PySide2.QtWidgets import *
from PySide6.QtCore import QDir, QFileInfo, QSettings, QObject
from PySide6.QtGui import *
from PySide6.QtWidgets import *

from . import editor

Expand Down
6 changes: 3 additions & 3 deletions chyp/gui/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

from __future__ import annotations
from typing import Dict, Optional, Tuple
from PySide2.QtCore import QByteArray, QFileInfo, QObject, QThread, Qt, QSettings
from PySide2.QtGui import *
from PySide2.QtWidgets import *
from PySide6.QtCore import QByteArray, QFileInfo, QObject, QThread, Qt, QSettings
from PySide6.QtGui import *
from PySide6.QtWidgets import *

from chyp.term import graph_to_term

Expand Down
6 changes: 3 additions & 3 deletions chyp/gui/graphscene.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
# limitations under the License.

from __future__ import annotations
from PySide2.QtCore import Qt, QPointF
from PySide2.QtGui import *
from PySide2.QtWidgets import *
from PySide6.QtCore import Qt, QPointF
from PySide6.QtGui import *
from PySide6.QtWidgets import *
from typing import Optional, List, Tuple

from ..graph import Graph
Expand Down
4 changes: 2 additions & 2 deletions chyp/gui/graphview.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
# limitations under the License.

from __future__ import annotations
from PySide2.QtWidgets import *
from PySide2.QtGui import *
from PySide6.QtWidgets import *
from PySide6.QtGui import *

from ..graph import Graph
from .graphscene import GraphScene
Expand Down
6 changes: 3 additions & 3 deletions chyp/gui/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
# limitations under the License.

from __future__ import annotations
from PySide2.QtCore import QByteArray, Qt, QPointF, QRectF, QSettings
from PySide2.QtGui import *
from PySide2.QtWidgets import *
from PySide6.QtCore import QByteArray, Qt, QPointF, QRectF, QSettings
from PySide6.QtGui import *
from PySide6.QtWidgets import *

from .graphview import GraphView

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
packages=["chyp"],
package_data={'': ['*.svg']},
data_files=data_files,
install_requires=["PySide2>=5.14", "lark>=1.1.5", "cvxpy>=1.3.1"],
install_requires=["PySide6>=6.5", "lark>=1.1.5", "cvxpy>=1.3.1"],
python_requires=">=3.7",
entry_points={'console_scripts': 'chyp=chyp.app:main'},
)

0 comments on commit 123ca1f

Please sign in to comment.