Skip to content

Commit

Permalink
initial work for Pyside6
Browse files Browse the repository at this point in the history
  • Loading branch information
giumas committed Jan 20, 2024
1 parent 5c53c74 commit 468988b
Show file tree
Hide file tree
Showing 97 changed files with 310 additions and 289 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ssm_on_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
conda config --add channels conda-forge
conda install appdirs bidict cartopy gdal matplotlib-base numpy psutil pyproj
conda install gsw netCDF4 pillow pyserial scipy
pip install PySide2
pip install PySide6
pip install https://github.com/hydroffice/hyo2_abc/archive/master.zip
pip install --no-deps .
- name: Lint with flake8
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ssm_on_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
sudo -H conda config --add channels conda-forge
sudo -H conda install appdirs bidict cartopy gdal matplotlib-base numpy psutil pyproj gsw netCDF4 pillow pyserial scipy
sudo -H pip install --upgrade --force-reinstall pip wheel setuptools
sudo -H pip install PySide2
sudo -H pip install PySide6
sudo -H pip install --no-deps https://github.com/hydroffice/hyo2_abc/archive/master.zip
sudo -H pip install --no-deps .
- name: Lint with flake8
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ssm_on_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
conda config --add channels conda-forge
conda install appdirs bidict cartopy gdal matplotlib-base numpy psutil pyproj
conda install gsw netCDF4 pillow pyserial scipy
pip install PySide2
pip install PySide6
pip install https://github.com/hydroffice/hyo2_abc/archive/master.zip
pip install --no-deps .
- name: Lint with flake8
Expand Down
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ install:
- python --version

- pip install coveralls PyYAML pytest pytest-cov wheel
# for hyo2.abc
# for hyo2.abc2
- conda install appdirs bidict cartopy gdal matplotlib-base numpy psutil pyproj
- pip install PySide2
- pip install PySide6
- pip install https://github.com/hydroffice/hyo2_abc/archive/master.zip
# for hyo2.soundspeed
- conda install gsw netCDF4 pillow pyserial scipy

# --no-deps because of pip not detecting the installed hyo2.abc
# --no-deps because of pip not detecting the installed hyo2.abc2
- pip install --no-deps .
- conda list --show-channel-urls

Expand Down
6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@ install:
- python --version

- pip install coveralls PyYAML pytest pytest-cov wheel
# for hyo2.abc
# for hyo2.abc2
- conda install appdirs bidict cartopy "gdal<3.0.0" matplotlib-base numpy psutil pyproj
- pip install PySide2
- pip install PySide6
# for hyo2.soundspeed
- conda install gsw netCDF4 pillow pyserial scipy
- pip install https://github.com/hydroffice/hyo2_abc/archive/master.zip

build: off
build_script:
# --no-deps because of pip not detecting the installed hyo2.abc
# --no-deps because of pip not detecting the installed hyo2.abc2
- pip install --no-deps .
- conda list --show-channel-urls

Expand Down
2 changes: 1 addition & 1 deletion data/download_data.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging
import os.path
import shutil
from hyo2.abc.lib.ftp import Ftp
from hyo2.abc2.lib.ftp import Ftp

logging.basicConfig(level=logging.DEBUG,
format="%(levelname)-9s %(name)s.%(funcName)s:%(lineno)d > %(message)s")
Expand Down
2 changes: 1 addition & 1 deletion examples/soundspeed/atlas/ex_atlases_auto_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from datetime import datetime as dt, timedelta
import logging
from enum import IntEnum
from PySide2 import QtWidgets
from PySide6 import QtWidgets

from hyo2.abc.app.qt_progress import QtProgress
from hyo2.abc.lib.logging import set_logging
Expand Down
2 changes: 1 addition & 1 deletion examples/soundspeed/atlas/ex_atlases_interactive.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging

from PySide2 import QtWidgets
from PySide6 import QtWidgets

from hyo2.abc.app.qt_progress import QtProgress
from hyo2.soundspeedmanager import app_info
Expand Down
2 changes: 1 addition & 1 deletion examples/soundspeed/atlas/ex_atlases_offline.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging
import os

from PySide2 import QtWidgets
from PySide6 import QtWidgets

from hyo2.abc.lib.testing import Testing
from hyo2.abc.lib.logging import set_logging
Expand Down
2 changes: 1 addition & 1 deletion examples/soundspeed/base/callbacks/ex_test_callbacks.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging

from hyo2.soundspeed.base.callbacks.fake_callbacks import FakeCallbacks
from hyo2.abc.lib.logging import set_logging
from hyo2.abc2.lib.logging import set_logging

ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"]
set_logging(ns_list=ns_list)
Expand Down
2 changes: 1 addition & 1 deletion examples/soundspeed/ex_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from hyo2.soundspeedmanager import app_info
from hyo2.soundspeed.soundspeed import SoundSpeedLibrary
from hyo2.abc.lib.logging import set_logging
from hyo2.abc2.lib.logging import set_logging

ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"]
set_logging(ns_list=ns_list)
Expand Down
2 changes: 1 addition & 1 deletion examples/soundspeed/ex_new_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from hyo2.soundspeedmanager import app_info
from hyo2.soundspeed.soundspeed import SoundSpeedLibrary
from hyo2.abc.lib.logging import set_logging
from hyo2.abc2.lib.logging import set_logging

ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"]
set_logging(ns_list=ns_list)
Expand Down
4 changes: 2 additions & 2 deletions examples/soundspeed/ex_read_and_store.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import os
import logging
from PySide2 import QtWidgets
from PySide6 import QtWidgets
from matplotlib import pyplot as plt

from hyo2.soundspeedmanager import app_info
from hyo2.soundspeed.soundspeed import SoundSpeedLibrary
from hyo2.soundspeed.base.testing import SoundSpeedTesting
from hyo2.soundspeed.base.callbacks.fake_callbacks import FakeCallbacks
from hyo2.abc.lib.logging import set_logging
from hyo2.abc2.lib.logging import set_logging

ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"]
set_logging(ns_list=ns_list)
Expand Down
2 changes: 1 addition & 1 deletion examples/soundspeed/profile/ex_profile_ops.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging

import numpy as np
from PySide2 import QtWidgets
from PySide6 import QtWidgets
from matplotlib import pyplot as plt

from hyo2.soundspeed.profile.profile import Profile
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging
from PySide2 import QtWidgets
from PySide6 import QtWidgets

from hyo2.soundspeedmanager.dialogs.flaggable_input_dialog import FlaggableInputDialog
from hyo2.abc.lib.logging import set_logging
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from PySide2 import QtWidgets
from PySide6 import QtWidgets

import logging

Expand Down
2 changes: 1 addition & 1 deletion examples/soundspeedmanager/ex_multi_selection_dialog.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging

from PySide2 import QtWidgets
from PySide6 import QtWidgets

from hyo2.soundspeedmanager.dialogs.multi_selection_dialog import MultiSelectionDialog
from hyo2.abc.lib.logging import set_logging
Expand Down
2 changes: 1 addition & 1 deletion examples/soundspeedmanager/ex_run_qt_callbacks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from PySide2 import QtWidgets
from PySide6 import QtWidgets

import logging

Expand Down
2 changes: 1 addition & 1 deletion examples/soundspeedmanager/ex_run_qt_progress.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging
import time

from PySide2 import QtWidgets
from PySide6 import QtWidgets

from hyo2.abc.app.qt_progress import QtProgress

Expand Down
2 changes: 1 addition & 1 deletion examples/soundspeedmanager/ex_text_editor_dialog.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from PySide2 import QtWidgets
from PySide6 import QtWidgets

import logging

Expand Down
2 changes: 1 addition & 1 deletion examples/workground/ex_plot_rtofs.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import logging
from hyo2.soundspeedmanager import AppInfo
from PySide2 import QtWidgets
from PySide6 import QtWidgets
from mpl_toolkits.basemap import Basemap
import numpy as np
from matplotlib import pyplot as plt
Expand Down
30 changes: 15 additions & 15 deletions freeze/SSM_SIS.spec
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ output_folder = os.path.join("cartopy", "data", "shapefiles", "natural_earth", "
cartopy_data = collect_folder_data(input_data_folder=share_folder, relative_output_folder=output_folder,
recursively=True)

abc_data = collect_pkg_data('hyo2.abc')
abc_data = collect_pkg_data('hyo2.abc2')
ss_data = collect_pkg_data('hyo2.soundspeed')
ssm_sis_data = collect_pkg_data('hyo2.ssm_sis')
pyside2_data = collect_pkg_data('PySide2')
pyside6_data = collect_pkg_data('PySide6')

icon_file = os.path.normpath(os.path.join(os.getcwd(), 'freeze', 'SSM_SIS.ico'))
if is_darwin:
Expand All @@ -116,7 +116,7 @@ if is_darwin:
a = Analysis(['SSM_SIS.py'],
binaries=[],
pathex=[],
hiddenimports=["PIL", "scipy._lib.messagestream", "cftime._cftime", "PySide2.QtPrintSupport",
hiddenimports=["PIL", "scipy._lib.messagestream", "cftime._cftime", "PySide6.QtPrintSupport",
"pyproj.datadir", "pkg_resources.py2_warn"],
excludes=["IPython", "PyQt4", "PyQt5", "pandas", "sphinx", "sphinx_rtd_theme", "OpenGL_accelerate",
"FixTk", "tcl", "tk", "_tkinter", "tkinter", "Tkinter", "wx",
Expand All @@ -135,15 +135,15 @@ exe = EXE(pyz,
console=True,
icon=icon_file)
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
pyproj_data,
cartopy_data,
abc_data,
ss_data,
ssm_sis_data,
pyside2_data,
strip=None,
upx=True,
name='SSM_SIS.%s%s' % (ssm_version, beta))
a.binaries,
a.zipfiles,
a.datas,
pyproj_data,
cartopy_data,
abc_data,
ss_data,
ssm_sis_data,
pyside6_data,
strip=None,
upx=True,
name='SSM_SIS.%s%s' % (ssm_version, beta))
10 changes: 5 additions & 5 deletions freeze/SoundSpeedManager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ output_folder = os.path.join("cartopy", "data", "shapefiles", "natural_earth", "
cartopy_data = collect_folder_data(input_data_folder=share_folder, relative_output_folder=output_folder,
recursively=True)

abc_data = collect_pkg_data('hyo2.abc')
abc_data = collect_pkg_data('hyo2.abc2')
ss_data = collect_pkg_data('hyo2.soundspeed')
ssm_data = collect_pkg_data('hyo2.soundspeedmanager')
sss_data = collect_pkg_data('hyo2.soundspeedsettings')
pyside2_data = collect_pkg_data('PySide2')
pyside6_data = collect_pkg_data('PySide6')
try:
sdm_data = collect_pkg_data('hyo2.surveydatamonitor')
except ImportError:
Expand All @@ -123,9 +123,9 @@ if is_darwin:

a = Analysis(['SoundSpeedManager.py'],
pathex=[],
hiddenimports=["PIL", "scipy._lib.messagestream", "cftime._cftime", "PySide2.QtPrintSupport",
hiddenimports=["PIL", "scipy._lib.messagestream", "cftime._cftime", "PySide6.QtPrintSupport",
"pyproj.datadir", "pkg_resources.py2_warn"],
excludes=["IPython", "PyQt4", "PyQt5", "PyQt6", "PySide6", "qgis",
excludes=["IPython", "PyQt4", "PyQt5", "PyQt6", "PySide2", "qgis",
"pandas", "sphinx", "sphinx_rtd_theme", "OpenGL_accelerate",
"FixTk", "tcl", "tk", "_tkinter", "tkinter", "Tkinter", "wx",
"cartopy_offlinedata", "cartopy_userconfig"],
Expand Down Expand Up @@ -153,7 +153,7 @@ coll = COLLECT(exe,
ss_data,
ssm_data,
sss_data,
pyside2_data,
pyside6_data,
strip=None,
upx=True,
name='SoundSpeedManager.%s%s' % (ssm_version, beta))
2 changes: 1 addition & 1 deletion freeze/to_be_added/qt.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[Paths]
Prefix = PySide2
Prefix = PySide6
10 changes: 5 additions & 5 deletions hyo2/soundspeed/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

import os
import logging
from hyo2.abc.lib.lib_info import LibInfo
from hyo2.abc2.lib.lib_info import LibInfo


logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())

name = "Sound Speed"
__version__ = '2023.0.10'
__copyright__ = 'Copyright 2023 University of New Hampshire, Center for Coastal and Ocean Mapping'
__version__ = '2024.0.0'
__copyright__ = 'Copyright 2024 University of New Hampshire, Center for Coastal and Ocean Mapping'

lib_info = LibInfo()

Expand All @@ -35,7 +35,7 @@
lib_info.lib_latest_url = "https://www.hydroffice.org/latest/soundspeed.txt"

lib_info.lib_dep_dict = {
"hyo2.abc": "hyo2.abc",
"hyo2.abc22": "hyo2.abc2",
"hyo2.soundspeed": "hyo2.soundspeed",
"hyo2.surveydatamonitor": "hyo2.surveydatamonitor",
"gsw": "gsw",
Expand All @@ -45,5 +45,5 @@
"pyproj": "pyproj",
"matplotlib": "matplotlib",
"cartopy": "cartopy",
"PySide2": "PySide2"
"PySide6": "PySide6"
}
2 changes: 1 addition & 1 deletion hyo2/soundspeed/atlas/regofsoffline.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from hyo2.soundspeed.profile.dicts import Dicts
from hyo2.soundspeed.profile.profile import Profile
from hyo2.soundspeed.profile.profilelist import ProfileList
from hyo2.abc.lib.progress.cli_progress import CliProgress
from hyo2.abc2.lib.progress.cli_progress import CliProgress
if TYPE_CHECKING:
from hyo2.soundspeed.soundspeed import SoundSpeedLibrary

Expand Down
2 changes: 1 addition & 1 deletion hyo2/soundspeed/atlas/regofsonline.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from netCDF4 import Dataset, num2date
import numpy as np

from hyo2.abc.lib.progress.cli_progress import CliProgress
from hyo2.abc2.lib.progress.cli_progress import CliProgress

from hyo2.soundspeed.atlas.abstract import AbstractAtlas
from hyo2.soundspeed.profile.profile import Profile
Expand Down
2 changes: 1 addition & 1 deletion hyo2/soundspeed/atlas/rtofs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import numpy as np
import requests

from hyo2.abc.lib.progress.cli_progress import CliProgress
from hyo2.abc2.lib.progress.cli_progress import CliProgress

from hyo2.soundspeed.atlas.abstract import AbstractAtlas
from hyo2.soundspeed.profile.profile import Profile
Expand Down
2 changes: 1 addition & 1 deletion hyo2/soundspeed/atlas/woa09.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from datetime import datetime as dt
from typing import Union, TYPE_CHECKING

from hyo2.abc.lib.onedrive import OneDrive
from hyo2.abc2.lib.onedrive import OneDrive

from hyo2.soundspeed.atlas.abstract import AbstractAtlas
from hyo2.soundspeed.profile.profile import Profile
Expand Down
2 changes: 1 addition & 1 deletion hyo2/soundspeed/atlas/woa13.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from datetime import datetime as dt
from typing import Union, TYPE_CHECKING

from hyo2.abc.lib.onedrive import OneDrive
from hyo2.abc2.lib.onedrive import OneDrive

from hyo2.soundspeed.atlas.abstract import AbstractAtlas
from hyo2.soundspeed.profile.profile import Profile
Expand Down
2 changes: 1 addition & 1 deletion hyo2/soundspeed/atlas/woa18.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from datetime import datetime as dt
from typing import Union, TYPE_CHECKING

from hyo2.abc.lib.onedrive import OneDrive
from hyo2.abc2.lib.onedrive import OneDrive

from hyo2.soundspeed.atlas.abstract import AbstractAtlas
from hyo2.soundspeed.profile.profile import Profile
Expand Down
2 changes: 1 addition & 1 deletion hyo2/soundspeed/base/geodesy.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from osgeo import osr
from pyproj import Geod

from hyo2.abc.lib.gdal_aux import GdalAux
from hyo2.abc2.lib.gdal_aux import GdalAux

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion hyo2/soundspeed/base/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
from typing import Optional

from hyo2.abc.lib.helper import Helper
from hyo2.abc2.lib.helper import Helper
from hyo2.soundspeed.base.setup_db import SetupDb
from hyo2.soundspeed.profile.dicts import Dicts
from hyo2.soundspeed.client.clientlist import ClientList
Expand Down
Loading

0 comments on commit 468988b

Please sign in to comment.