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

Visualea in qt5 #7

Merged
merged 31 commits into from
Feb 16, 2023
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
20dcbc1
2to3 done
Jul 27, 2021
fbd8f3f
Resolved .qrc bug and partial QT5/Pyside2 changes. Corrected import p…
Jul 28, 2021
57982ac
End of stage commit
Aug 13, 2021
f994e30
End of stage commit n.2
Aug 13, 2021
ff712e9
Update setup
pradal Jan 17, 2023
72b6b30
Merge branch 'thib' into visualea
pradal Jan 17, 2023
2a8c1e6
WIP: changes to get from openalea.oalab.shell working in visualea, bu…
Jan 18, 2023
fe693e0
Update setup.py
pradal Feb 2, 2023
36379fe
Update version and add CI
pradal Feb 2, 2023
d1e8145
Update resources and add configobj as conda deps
pradal Feb 3, 2023
09aa01c
Port to PyQt5
pradal Feb 3, 2023
3a1053b
WIP local commit before pull
Feb 3, 2023
ee6908b
WIP local commit before pull
Feb 3, 2023
a17d031
vpltk to qtpy, still several vpltk call see my comment on github
Feb 3, 2023
1a9b8f0
Continue the port to PyQt5
pradal Feb 4, 2023
f8a609b
del vpltk, fixed tests, disabled pyqode editor in oalab.paradigm.pyth…
Feb 7, 2023
8412362
Update parse.py
baugetfa Feb 8, 2023
2f85ef0
Move from float to integer div (Port Py3
pradal Feb 8, 2023
3c7a068
Update test_parse_model.py
baugetfa Feb 8, 2023
34a444b
Update test_parse_model.py
baugetfa Feb 8, 2023
c60fa94
Update test_parse_model.py
baugetfa Feb 8, 2023
c4df3e3
Update conda packaging
pradal Feb 9, 2023
cf63a85
now QFileDialog.getSaveFileName gives 2 outputs
Feb 9, 2023
e402032
Merge branch 'visualea' of https://github.com/openalea/oalab into vis…
Feb 9, 2023
72e644a
made the application oalab open
Feb 10, 2023
e2b7451
some correction to pass tests and to avoid warning
Feb 15, 2023
8703aef
deleted old lines used for debug
Feb 15, 2023
8fc3b26
CI
Feb 16, 2023
ed41f78
Update conda-package-build.yml
pradal Feb 16, 2023
3af8caf
Limit to Python <3.11
pradal Feb 16, 2023
dd72015
Update README
pradal Feb 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/conda-package-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: build_publish_anaconda

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build-and-publish:
name: ${{ matrix.os }}, Python 3.${{ matrix.python-minor-version }} for conda deployment
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 3
matrix:
os: [ ubuntu-latest]
python-minor-version: [9]
isMaster:
- ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/dev') }}
exclude:
- isMaster: false
os: ubuntu-latest
python-minor-version: 7
- isMaster: false
os: ubuntu-latest
python-minor-version: 8
- isMaster: false
os: macos-latest
python-minor-version: 7
- isMaster: false
os: macos-latest
python-minor-version: 8
- isMaster: false
os: macos-latest
python-minor-version: 9
- isMaster: false
os: windows-latest
python-minor-version: 7
- isMaster: false
os: windows-latest
python-minor-version: 8
- isMaster: false
os: windows-latest
python-minor-version: 9

steps:
- name: Chekout
uses: actions/checkout@v3
- name: Determine publish
uses: haya14busa/action-cond@v1
id: publish
with:
cond: ${{ contains(github.ref, 'master') || startsWith(github.ref, 'refs/heads/v') }}
if_true: 'true'
if_false: 'false'
- name: Build and Publish
uses: openalea/action-build-publish-anaconda@v0.1.4
with:
conda: conda
mamba: true
python: ${{ matrix.python-minor-version }}
numpy: '20.0'
channels: openalea3, conda-forge
token: ${{ secrets.ANACONDA_TOKEN }}
publish: ${{ steps.publish.outputs.value }}
label: main
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ doc/_dvlpt/


# user custom filters

.DS_Store
1 change: 0 additions & 1 deletion .travis.yml

This file was deleted.

53 changes: 0 additions & 53 deletions appveyor.yml

This file was deleted.

27 changes: 17 additions & 10 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,40 +1,47 @@
{% set version = "2.0.1" %}
{% set data = load_setup_py_data() %}

package:
name: openalea.oalab
version: {{ version }}
version: {{ data.get('version') }}

source:
path: ..

build:
noarch: python
preserve_egg_dir: True
number: 2
script: python setup.py install --prefix=$PREFIX
number: 0
script: {{PYTHON}} setup.py install

requirements:
build:
- python {{PY_VER}}
- setuptools
- openalea.deploy
- six
run:
- openalea.deploy
- openalea.core
- openalea.vpltk
- ipython <5
- ipython
- qtconsole
- configobj

test:
imports:
- openalea.oalab
requires:
- nose
- pytest
source_files:
- test/
- test/*.py

commands:
- nosetests -v
- cd test
- pytest -v test_*.py


about:
home: http://github.com/openalea/oalab
home: {{ data.get('url') }}
license: Cecill-c License
summary: OALab package for OpenAlea.
summary: {{ data.get('description') }}

64 changes: 32 additions & 32 deletions example/control_sizes.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
# WARNING! All changes made in this file will be lost!

from PyQt4 import QtCore, QtGui
from qtpy import QtCore, QtGui, QtWidgets

try:
_fromUtf8 = QtCore.QString.fromUtf8
Expand All @@ -16,12 +16,12 @@ def _fromUtf8(s):
return s

try:
_encoding = QtGui.QApplication.UnicodeUTF8
_encoding = QtWidgets.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
return QtWidgets.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
return QtWidgets.QApplication.translate(context, text, disambig)

class Ui_Form(object):
def setupUi(self, Form):
Expand All @@ -30,7 +30,7 @@ def setupUi(self, Form):
self.gridLayout = QtGui.QGridLayout(Form)
self.gridLayout.setMargin(5)
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.label_6 = QtGui.QLabel(Form)
self.label_6 = QtWidgets.QLabel(Form)
self.label_6.setObjectName(_fromUtf8("label_6"))
self.gridLayout.addWidget(self.label_6, 7, 2, 1, 1)
self.line_5 = QtGui.QFrame(Form)
Expand All @@ -39,7 +39,7 @@ def setupUi(self, Form):
self.line_5.setFrameShadow(QtGui.QFrame.Sunken)
self.line_5.setObjectName(_fromUtf8("line_5"))
self.gridLayout.addWidget(self.line_5, 3, 0, 1, 3)
self.widget = QtGui.QWidget(Form)
self.widget = QtWidgets.QWidget(Form)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Maximum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
Expand All @@ -50,13 +50,13 @@ def setupUi(self, Form):
self.gridLayout_2.setSpacing(5)
self.gridLayout_2.setMargin(0)
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
self.large = QtGui.QWidget(self.widget)
self.large = QtWidgets.QWidget(self.widget)
self.large.setMinimumSize(QtCore.QSize(200, 200))
self.large.setObjectName(_fromUtf8("large"))
self.l_large_box = QtGui.QGridLayout(self.large)
self.l_large_box.setMargin(0)
self.l_large_box.setObjectName(_fromUtf8("l_large_box"))
self.label_7 = QtGui.QLabel(self.large)
self.label_7 = QtWidgets.QLabel(self.large)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Maximum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
Expand All @@ -73,36 +73,36 @@ def setupUi(self, Form):
self.large_2.setMinimumSize(QtCore.QSize(300, 300))
self.large_2.setFrameShape(QtGui.QFrame.Box)
self.large_2.setObjectName(_fromUtf8("large_2"))
self.l_large = QtGui.QVBoxLayout(self.large_2)
self.l_large = QtWidgets.QVBoxLayout(self.large_2)
self.l_large.setObjectName(_fromUtf8("l_large"))
self.l_large_box.addWidget(self.large_2, 1, 0, 1, 1)
self.gridLayout_2.addWidget(self.large, 5, 0, 1, 1)
self.gridLayout.addWidget(self.widget, 7, 0, 4, 2)
self.small = QtGui.QWidget(Form)
self.small = QtWidgets.QWidget(Form)
self.small.setMinimumSize(QtCore.QSize(50, 50))
self.small.setMaximumSize(QtCore.QSize(50, 50))
self.small.setStyleSheet(_fromUtf8("background-color: rgb(170, 160, 255);"))
self.small.setObjectName(_fromUtf8("small"))
self.l_small = QtGui.QHBoxLayout(self.small)
self.l_small = QtWidgets.QHBoxLayout(self.small)
self.l_small.setMargin(0)
self.l_small.setObjectName(_fromUtf8("l_small"))
self.gridLayout.addWidget(self.small, 8, 2, 1, 1)
self.responsive = QtGui.QWidget(Form)
self.responsive = QtWidgets.QWidget(Form)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.responsive.sizePolicy().hasHeightForWidth())
self.responsive.setSizePolicy(sizePolicy)
self.responsive.setStyleSheet(_fromUtf8("background-color: rgb(255, 255, 255);"))
self.responsive.setObjectName(_fromUtf8("responsive"))
self.l_responsive = QtGui.QHBoxLayout(self.responsive)
self.l_responsive = QtWidgets.QHBoxLayout(self.responsive)
self.l_responsive.setMargin(0)
self.l_responsive.setObjectName(_fromUtf8("l_responsive"))
self.gridLayout.addWidget(self.responsive, 12, 4, 1, 1)
self.label_4 = QtGui.QLabel(Form)
self.label_4 = QtWidgets.QLabel(Form)
self.label_4.setObjectName(_fromUtf8("label_4"))
self.gridLayout.addWidget(self.label_4, 4, 0, 1, 1)
self.l_title = QtGui.QLabel(Form)
self.l_title = QtWidgets.QLabel(Form)
self.l_title.setObjectName(_fromUtf8("l_title"))
self.gridLayout.addWidget(self.l_title, 2, 0, 1, 1)
self.line_6 = QtGui.QFrame(Form)
Expand All @@ -111,50 +111,50 @@ def setupUi(self, Form):
self.line_6.setFrameShadow(QtGui.QFrame.Sunken)
self.line_6.setObjectName(_fromUtf8("line_6"))
self.gridLayout.addWidget(self.line_6, 6, 0, 1, 3)
self.hline = QtGui.QWidget(Form)
self.hline = QtWidgets.QWidget(Form)
self.hline.setMinimumSize(QtCore.QSize(200, 30))
self.hline.setMaximumSize(QtCore.QSize(16777215, 30))
self.hline.setStyleSheet(_fromUtf8("background-color: rgb(170, 255, 184);"))
self.hline.setObjectName(_fromUtf8("hline"))
self.l_hline = QtGui.QHBoxLayout(self.hline)
self.l_hline = QtWidgets.QHBoxLayout(self.hline)
self.l_hline.setMargin(0)
self.l_hline.setObjectName(_fromUtf8("l_hline"))
self.gridLayout.addWidget(self.hline, 5, 0, 1, 3)
self.label = QtGui.QLabel(Form)
self.label = QtWidgets.QLabel(Form)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Maximum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
self.label.setSizePolicy(sizePolicy)
self.label.setObjectName(_fromUtf8("label"))
self.gridLayout.addWidget(self.label, 1, 0, 1, 2)
self.vline = QtGui.QWidget(Form)
self.vline = QtWidgets.QWidget(Form)
self.vline.setMinimumSize(QtCore.QSize(30, 200))
self.vline.setMaximumSize(QtCore.QSize(30, 16777215))
self.vline.setStyleSheet(_fromUtf8("background-color: rgb(255, 226, 212);"))
self.vline.setObjectName(_fromUtf8("vline"))
self.l_vline = QtGui.QHBoxLayout(self.vline)
self.l_vline = QtWidgets.QHBoxLayout(self.vline)
self.l_vline.setMargin(0)
self.l_vline.setObjectName(_fromUtf8("l_vline"))
self.gridLayout.addWidget(self.vline, 9, 2, 3, 1)
self.groupBox_2 = QtGui.QGroupBox(Form)
self.groupBox_2.setTitle(_fromUtf8(""))
self.groupBox_2.setObjectName(_fromUtf8("groupBox_2"))
self.horizontalLayout = QtGui.QHBoxLayout(self.groupBox_2)
self.horizontalLayout = QtWidgets.QHBoxLayout(self.groupBox_2)
self.horizontalLayout.setMargin(0)
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.widget_3 = QtGui.QWidget(self.groupBox_2)
self.widget_3 = QtWidgets.QWidget(self.groupBox_2)
self.widget_3.setObjectName(_fromUtf8("widget_3"))
self.verticalLayout_2 = QtGui.QVBoxLayout(self.widget_3)
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.widget_3)
self.verticalLayout_2.setMargin(0)
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
self.label_8 = QtGui.QLabel(self.widget_3)
self.label_8 = QtWidgets.QLabel(self.widget_3)
self.label_8.setObjectName(_fromUtf8("label_8"))
self.verticalLayout_2.addWidget(self.label_8)
self.label_2 = QtGui.QLabel(self.widget_3)
self.label_2 = QtWidgets.QLabel(self.widget_3)
self.label_2.setObjectName(_fromUtf8("label_2"))
self.verticalLayout_2.addWidget(self.label_2)
self.cb_read = QtGui.QCheckBox(self.widget_3)
self.cb_read = QtWidgets.QCheckBox(self.widget_3)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
Expand All @@ -163,7 +163,7 @@ def setupUi(self, Form):
self.cb_read.setChecked(True)
self.cb_read.setObjectName(_fromUtf8("cb_read"))
self.verticalLayout_2.addWidget(self.cb_read)
self.cb_apply = QtGui.QCheckBox(self.widget_3)
self.cb_apply = QtWidgets.QCheckBox(self.widget_3)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
Expand All @@ -184,10 +184,10 @@ def setupUi(self, Form):
self.frame.setMinimumSize(QtCore.QSize(150, 150))
self.frame.setFrameShape(QtGui.QFrame.Box)
self.frame.setObjectName(_fromUtf8("frame"))
self.layout_sample = QtGui.QVBoxLayout(self.frame)
self.layout_sample = QtWidgets.QVBoxLayout(self.frame)
self.layout_sample.setMargin(5)
self.layout_sample.setObjectName(_fromUtf8("layout_sample"))
self.label_3 = QtGui.QLabel(self.frame)
self.label_3 = QtWidgets.QLabel(self.frame)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Maximum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
Expand All @@ -197,7 +197,7 @@ def setupUi(self, Form):
self.layout_sample.addWidget(self.label_3)
self.horizontalLayout.addWidget(self.frame)
self.gridLayout.addWidget(self.groupBox_2, 11, 0, 1, 2)
self.label_5 = QtGui.QLabel(Form)
self.label_5 = QtWidgets.QLabel(Form)
self.label_5.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_5.setObjectName(_fromUtf8("label_5"))
self.gridLayout.addWidget(self.label_5, 12, 0, 1, 3)
Expand Down Expand Up @@ -225,8 +225,8 @@ def retranslateUi(self, Form):

if __name__ == "__main__":
import sys
app = QtGui.QApplication(sys.argv)
Form = QtGui.QWidget()
app = QtWidgets.QApplication(sys.argv)
Form = QtWidgets.QWidget()
ui = Ui_Form()
ui.setupUi(Form)
Form.show()
Expand Down
Loading