From 04d6a31a8a925f14ca13e64153513f8583a18226 Mon Sep 17 00:00:00 2001 From: giumas Date: Thu, 25 Jan 2024 07:28:00 +0100 Subject: [PATCH] more restructuring --- .coveragerc | 2 +- .travis.yml | 6 +- HISTORY.rst | 8 ++ README.rst | 2 +- appveyor.yml | 10 +- docs/license.rst | 2 +- .../soundspeed/atlas/ex_atlases_auto_query.py | 14 ++- .../atlas/ex_atlases_interactive.py | 14 ++- .../soundspeed/atlas/ex_atlases_offline.py | 17 ++-- .../base/callbacks/ex_test_callbacks.py | 5 +- examples/soundspeed/ex_init.py | 8 +- examples/soundspeed/ex_new_project.py | 6 +- .../soundspeed/ex_plot_export_metadata.py | 12 +-- examples/soundspeed/ex_read_and_store.py | 14 ++- examples/soundspeed/ex_read_and_write.py | 15 ++- .../soundspeed/ex_read_and_write_abs_files.py | 15 ++- examples/soundspeed/formats/ex_formats.py | 7 +- .../soundspeed/listener/ex_seacat_capture.py | 7 +- .../soundspeed/listener/ex_seacat_respond.py | 7 +- .../soundspeed/profile/ex_oc_dyn_height.py | 7 +- examples/soundspeed/profile/ex_oc_others.py | 7 +- examples/soundspeed/profile/ex_oc_p_d.py | 7 +- examples/soundspeed/profile/ex_oc_vs_s.py | 7 +- .../profile/ex_plot_bias_tracedprofile.py | 18 ++-- .../profile/ex_plot_compare_tracedprofiles.py | 16 ++-- examples/soundspeed/profile/ex_profile_ops.py | 8 +- .../soundspeed/profile/ex_profile_stats.py | 7 +- .../soundspeed/profile/ex_tracedprofile.py | 20 ++-- examples/soundspeed/server/ex_server.py | 12 +-- .../dialogs/ex_flaggable_input_dialog.py | 4 +- .../dialogs/ex_formatted_input_dialog.py | 4 +- .../ex_multi_selection_dialog.py | 4 +- .../soundspeedmanager/ex_run_qt_callbacks.py | 4 +- .../ex_text_editor_dialog.py | 6 +- examples/workground/ex_ofs_online.py | 2 +- examples/workground/ex_plot_rtofs.py | 4 +- freeze/SSM_SIS.py | 2 +- freeze/SoundSpeedManager.py | 2 +- freeze/SoundSpeedManager.spec | 14 +-- freeze/SoundSpeedSettings.py | 2 +- hyo2/ssm2/__init__.py | 4 +- .../app/gui/soundspeedmanager/__main__.py | 2 +- .../dialogs/automate_dialog.py | 2 +- .../dialogs/buttons_dialog.py | 2 +- .../dialogs/common_metadata_dialog.py | 4 +- .../constant_gradient_profile_dialog.py | 4 +- .../gui/soundspeedmanager/dialogs/dialog.py | 2 +- .../dialogs/export_multi_profile_dialog.py | 6 +- .../dialogs/export_profile_metadata_dialog.py | 6 +- .../dialogs/export_single_profile_dialog.py | 6 +- .../dialogs/import_data_dialog.py | 2 +- .../dialogs/import_multi_profile_dialog.py | 4 +- .../dialogs/import_single_profile_dialog.py | 6 +- .../dialogs/metadata_dialog.py | 4 +- .../dialogs/output_folders_dialog.py | 2 +- .../dialogs/plot_multi_profile_dialog.py | 2 +- .../dialogs/plot_profiles_dialog.py | 2 +- .../dialogs/proc_data_model.py | 2 +- .../dialogs/project_new_dialog.py | 2 +- .../dialogs/project_rename_dialog.py | 2 +- .../dialogs/project_switch_dialog.py | 2 +- .../dialogs/raw_data_model.py | 2 +- .../dialogs/reference_dialog.py | 2 +- .../gui/soundspeedmanager/dialogs/seacat.py | 2 +- .../dialogs/seacat_dialog.py | 4 +- .../dialogs/sis_data_model.py | 2 +- .../dialogs/spreadsheet_dialog.py | 8 +- .../dialogs/text_editor_dialog.py | 6 +- hyo2/ssm2/app/gui/soundspeedmanager/gui.py | 13 +-- .../ssm2/app/gui/soundspeedmanager/mainwin.py | 46 ++++++---- .../app/gui/soundspeedmanager/media/LICENSE | 2 +- .../app/gui/soundspeedmanager/qt_callbacks.py | 6 +- .../gui/soundspeedmanager/widgets/database.py | 30 +++--- .../soundspeedmanager/widgets/dataplots.py | 4 +- .../gui/soundspeedmanager/widgets/editor.py | 24 ++--- .../soundspeedmanager/widgets/navtoolbar.py | 2 +- .../soundspeedmanager/widgets/refraction.py | 2 +- .../gui/soundspeedmanager/widgets/server.py | 4 +- .../gui/soundspeedmanager/widgets/settings.py | 4 +- .../gui/soundspeedmanager/widgets/widget.py | 2 +- .../app/gui/soundspeedsettings/__main__.py | 2 +- hyo2/ssm2/app/gui/soundspeedsettings/gui.py | 12 ++- .../app/gui/soundspeedsettings/mainwin.py | 18 ++-- .../gui/soundspeedsettings/widgets/general.py | 4 +- .../gui/soundspeedsettings/widgets/input.py | 4 +- .../soundspeedsettings/widgets/listeners.py | 4 +- .../gui/soundspeedsettings/widgets/main.py | 4 +- .../gui/soundspeedsettings/widgets/output.py | 4 +- .../gui/soundspeedsettings/widgets/widget.py | 2 +- hyo2/ssm2/app/gui/ssm_sis/__main__.py | 2 +- hyo2/ssm2/app/gui/ssm_sis/controlpanel.py | 6 +- hyo2/ssm2/app/gui/ssm_sis/gui.py | 9 +- hyo2/ssm2/app/gui/ssm_sis/mainwin.py | 8 +- hyo2/ssm2/lib/atlas/abstract.py | 6 +- hyo2/ssm2/lib/atlas/atlases.py | 12 +-- hyo2/ssm2/lib/atlas/regofsoffline.py | 10 +- hyo2/ssm2/lib/atlas/regofsonline.py | 12 +-- hyo2/ssm2/lib/atlas/rtofs.py | 12 +-- hyo2/ssm2/lib/atlas/woa09.py | 10 +- hyo2/ssm2/lib/atlas/woa13.py | 10 +- hyo2/ssm2/lib/atlas/woa18.py | 10 +- .../lib/base/callbacks/abstract_callbacks.py | 4 +- hyo2/ssm2/lib/base/callbacks/cli_callbacks.py | 2 +- .../ssm2/lib/base/callbacks/fake_callbacks.py | 2 +- hyo2/ssm2/lib/base/setup.py | 6 +- hyo2/ssm2/lib/base/setup_db.py | 4 +- hyo2/ssm2/lib/base/testing.py | 2 +- hyo2/ssm2/lib/client/client.py | 8 +- hyo2/ssm2/lib/client/clientlist.py | 4 +- hyo2/ssm2/lib/db/db.py | 25 ++--- hyo2/ssm2/lib/db/export.py | 2 +- hyo2/ssm2/lib/formats/abstract.py | 6 +- hyo2/ssm2/lib/formats/km.py | 2 +- .../lib/formats/nmea_0183/nmea_0183_gga.py | 2 +- .../lib/formats/nmea_0183/nmea_0183_gll.py | 2 +- hyo2/ssm2/lib/formats/readers/abstract.py | 8 +- hyo2/ssm2/lib/formats/readers/aml.py | 10 +- hyo2/ssm2/lib/formats/readers/aoml.py | 6 +- hyo2/ssm2/lib/formats/readers/asvp.py | 6 +- hyo2/ssm2/lib/formats/readers/caris.py | 6 +- hyo2/ssm2/lib/formats/readers/castaway.py | 6 +- hyo2/ssm2/lib/formats/readers/csiro_dtc.py | 6 +- hyo2/ssm2/lib/formats/readers/digibarpro.py | 6 +- hyo2/ssm2/lib/formats/readers/digibars.py | 6 +- hyo2/ssm2/lib/formats/readers/elac.py | 6 +- hyo2/ssm2/lib/formats/readers/hypack.py | 6 +- hyo2/ssm2/lib/formats/readers/idronaut.py | 6 +- hyo2/ssm2/lib/formats/readers/iss.py | 6 +- hyo2/ssm2/lib/formats/readers/mvp.py | 6 +- hyo2/ssm2/lib/formats/readers/oceanscience.py | 10 +- hyo2/ssm2/lib/formats/readers/rbr.py | 6 +- hyo2/ssm2/lib/formats/readers/saiv.py | 6 +- hyo2/ssm2/lib/formats/readers/sea_and_sun.py | 6 +- hyo2/ssm2/lib/formats/readers/seabird.py | 10 +- hyo2/ssm2/lib/formats/readers/simrad.py | 10 +- hyo2/ssm2/lib/formats/readers/sippican.py | 6 +- hyo2/ssm2/lib/formats/readers/sonardyne.py | 6 +- hyo2/ssm2/lib/formats/readers/turo.py | 8 +- hyo2/ssm2/lib/formats/readers/unb.py | 6 +- hyo2/ssm2/lib/formats/readers/valeport.py | 9 +- hyo2/ssm2/lib/formats/writers/abstract.py | 4 +- hyo2/ssm2/lib/formats/writers/asvp.py | 11 ++- hyo2/ssm2/lib/formats/writers/calc.py | 2 +- hyo2/ssm2/lib/formats/writers/caris.py | 2 +- hyo2/ssm2/lib/formats/writers/csv.py | 2 +- hyo2/ssm2/lib/formats/writers/elac.py | 4 +- hyo2/ssm2/lib/formats/writers/hipap.py | 2 +- hyo2/ssm2/lib/formats/writers/hypack.py | 2 +- hyo2/ssm2/lib/formats/writers/ixblue.py | 2 +- hyo2/ssm2/lib/formats/writers/ncei.py | 8 +- hyo2/ssm2/lib/formats/writers/qps.py | 4 +- hyo2/ssm2/lib/formats/writers/sonardyne.py | 8 +- hyo2/ssm2/lib/formats/writers/unb.py | 6 +- hyo2/ssm2/lib/listener/listeners.py | 10 +- hyo2/ssm2/lib/listener/mvp/mvp.py | 4 +- hyo2/ssm2/lib/listener/nmea/nmea.py | 6 +- .../lib/listener/seacat/sbe_serialcomms.py | 4 +- .../lib/listener/seacat/seacat_emulator.py | 2 +- hyo2/ssm2/lib/listener/sippican/sippican.py | 4 +- hyo2/ssm2/lib/listener/sis/sis.py | 10 +- hyo2/ssm2/lib/profile/metadata.py | 2 +- hyo2/ssm2/lib/profile/profile.py | 32 ++++--- hyo2/ssm2/lib/profile/profilelist.py | 4 +- .../ray_tracing/plot_tracedprofiles.py | 2 +- hyo2/ssm2/lib/server/server.py | 2 +- hyo2/ssm2/lib/soundspeed.py | 92 ++++++------------- hyo2/ssm2/lib/temp/coordinates.py | 2 +- hyo2/ssm2/lib/temp/regex_helpers.py | 10 +- scripts/reduce_netcdf_woa09.py | 2 +- scripts/reduce_netcdf_woa13.py | 2 +- scripts/reduce_netcdf_woa18.py | 2 +- setup.py | 18 ++-- tests/soundspeed/atlas/test_atlases.py | 6 +- tests/soundspeed/atlas/test_regofsoffline.py | 6 +- tests/soundspeed/atlas/test_regofsonline.py | 6 +- tests/soundspeed/atlas/test_rtofs.py | 6 +- .../base/callbacks/test_test_callbacks.py | 2 +- tests/soundspeed/base/test_basedb.py | 2 +- tests/soundspeed/base/test_files.py | 4 +- tests/soundspeed/base/test_geodesy.py | 2 +- tests/soundspeed/base/test_setup.py | 2 +- tests/soundspeed/base/test_setup_db.py | 4 +- tests/soundspeed/base/test_testing.py | 2 +- tests/soundspeed/db/test_db.py | 4 +- tests/soundspeed/formats/test_formats.py | 8 +- tests/soundspeed/profile/test_oceanography.py | 2 +- tests/soundspeed/test_init.py | 6 +- tests/soundspeed/test_new_project.py | 4 +- tests/soundspeedmanager/test_init.py | 6 +- tests/soundspeedsettings/test_init.py | 6 +- 190 files changed, 627 insertions(+), 684 deletions(-) diff --git a/.coveragerc b/.coveragerc index cb04ab89..df5418a9 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,7 +1,7 @@ # .coveragerc to control coverage.py [run] branch = True -source = hyo2.soundspeed +source = hyo2.ssm2 [report] # Regexes for lines to exclude from consideration diff --git a/.travis.yml b/.travis.yml index c0944e67..738551f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,14 +6,14 @@ os: env: - PYTHON_VERSION=3.8 - - PYTHON_VERSION=3.6 - - PYTHON_VERSION=3.7 + - PYTHON_VERSION=3.9 + - PYTHON_VERSION=3.10 matrix: fast_finish: true allow_failures: - os: osx - - env: PYTHON_VERSION=3.7 + - env: PYTHON_VERSION=3.10 install: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then MINICONDA_OS=Linux; else MINICONDA_OS=MacOSX; fi diff --git a/HISTORY.rst b/HISTORY.rst index 753df332..95d22e8f 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,14 @@ History ------- +2024.0.0 +~~~~~~~~ + +2024-01-26 + +- Started migration from PySide2 to PySide6 + + 2020.0.0 ~~~~~~~~ diff --git a/README.rst b/README.rst index dbe13aa5..5ddd6199 100644 --- a/README.rst +++ b/README.rst @@ -2,7 +2,7 @@ HydrOffice Sound Speed ====================== .. - .. image:: https://img.shields.io/pypi/v/hyo2.soundspeed.svg + .. image:: https://img.shields.io/pypi/v/hyo2.ssm2.lib.svg :target: https://pypi.python.org/pypi/hyo2.soundspeed :alt: PyPi version diff --git a/appveyor.yml b/appveyor.yml index 9de6202e..14a60a8d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 2022.{build}-{branch} +version: 2024.{build}-{branch} image: Visual Studio 2015 @@ -10,11 +10,11 @@ environment: PYTHON_ARCH: x64 MINICONDA: C:\Miniconda37-x64 - - PYTHON_VERSION: 3.6 + - PYTHON_VERSION: 3.9 PYTHON_ARCH: x64 MINICONDA: C:\Miniconda37-x64 - - PYTHON_VERSION: 3.7 + - PYTHON_VERSION: 3.10 PYTHON_ARCH: x64 MINICONDA: C:\Miniconda37-x64 @@ -22,11 +22,11 @@ matrix: allow_failures: - - PYTHON_VERSION: 3.6 + - PYTHON_VERSION: 3.9 PYTHON_ARCH: x64 MINICONDA: C:\Miniconda37-x64 - - PYTHON_VERSION: 3.7 + - PYTHON_VERSION: 3.10 PYTHON_ARCH: x64 MINICONDA: C:\Miniconda37-x64 diff --git a/docs/license.rst b/docs/license.rst index 84eb8f71..bcdc2c86 100644 --- a/docs/license.rst +++ b/docs/license.rst @@ -2,7 +2,7 @@ License ******* -Copyright Notice and License Terms for: hyo2.soundspeed - Sound Speed package for HydrOffice +Copyright Notice and License Terms for: hyo2.ssm2.lib - Sound Speed package for HydrOffice Copyright (c) 2019, University of New Hampshire, Center for Coastal and Ocean Mapping. All rights reserved. Portions of this project were developed under a cooperative agreement with NOAA Coast Survey Development Laboratory, and contain NOAA-developed code in the public domain. diff --git a/examples/soundspeed/atlas/ex_atlases_auto_query.py b/examples/soundspeed/atlas/ex_atlases_auto_query.py index 4e8e97f5..c630af6e 100644 --- a/examples/soundspeed/atlas/ex_atlases_auto_query.py +++ b/examples/soundspeed/atlas/ex_atlases_auto_query.py @@ -1,18 +1,16 @@ import time -from datetime import datetime as dt, timedelta +from datetime import datetime as dt import logging from enum import IntEnum from PySide6 import QtWidgets -from hyo2.abc.app.qt_progress import QtProgress -from hyo2.abc.lib.logging import set_logging -from hyo2.soundspeedmanager import app_info -from hyo2.soundspeed.soundspeed import SoundSpeedLibrary -from hyo2.soundspeedmanager.qt_callbacks import QtCallbacks +from hyo2.abc2.app.qt_progress import QtProgress +from hyo2.abc2.lib.logging import set_logging +from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary +from hyo2.ssm2.app.gui.soundspeedmanager.qt_callbacks import QtCallbacks -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] -set_logging(ns_list=ns_list) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2"]) logger = logging.getLogger(__name__) diff --git a/examples/soundspeed/atlas/ex_atlases_interactive.py b/examples/soundspeed/atlas/ex_atlases_interactive.py index 1705b952..adf69ee1 100644 --- a/examples/soundspeed/atlas/ex_atlases_interactive.py +++ b/examples/soundspeed/atlas/ex_atlases_interactive.py @@ -2,14 +2,12 @@ from PySide6 import QtWidgets -from hyo2.abc.app.qt_progress import QtProgress -from hyo2.soundspeedmanager import app_info -from hyo2.soundspeed.soundspeed import SoundSpeedLibrary -from hyo2.soundspeedmanager.qt_callbacks import QtCallbacks -from hyo2.abc.lib.logging import set_logging +from hyo2.abc2.app.qt_progress import QtProgress +from hyo2.abc2.lib.logging import set_logging +from hyo2.ssm2.app.gui.soundspeedmanager.qt_callbacks import QtCallbacks +from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] -set_logging(ns_list=ns_list) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2"]) logger = logging.getLogger(__name__) @@ -94,4 +92,4 @@ else: raise RuntimeError("invalid switch value: %s" % switch) -app.exec_() +app.exec() diff --git a/examples/soundspeed/atlas/ex_atlases_offline.py b/examples/soundspeed/atlas/ex_atlases_offline.py index 1453284e..e20052f7 100644 --- a/examples/soundspeed/atlas/ex_atlases_offline.py +++ b/examples/soundspeed/atlas/ex_atlases_offline.py @@ -3,16 +3,13 @@ from PySide6 import QtWidgets -from hyo2.abc.lib.testing import Testing -from hyo2.abc.lib.logging import set_logging -from hyo2.abc.app.qt_progress import QtProgress -from hyo2.soundspeedmanager import app_info -from hyo2.soundspeed.soundspeed import SoundSpeedLibrary -from hyo2.soundspeedmanager.qt_callbacks import QtCallbacks +from hyo2.abc2.app.qt_progress import QtProgress +from hyo2.abc2.lib.logging import set_logging +from hyo2.abc2.lib.testing import Testing +from hyo2.ssm2.app.gui.soundspeedmanager.qt_callbacks import QtCallbacks +from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary - -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] -set_logging(ns_list=ns_list) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2"]) logger = logging.getLogger(__name__) @@ -46,7 +43,7 @@ # (43.753190, -76.826818), # Lake Ontario # (47.457546, -89.347715), # Lake Superior # (46.161403, -124.107396), # Offshore of Colombia River - (37.689510, -122.298514) # San Francisco Bay + (37.689510, -122.298514) # San Francisco Bay ] test = tests[0] diff --git a/examples/soundspeed/base/callbacks/ex_test_callbacks.py b/examples/soundspeed/base/callbacks/ex_test_callbacks.py index 25fe9521..669cff24 100644 --- a/examples/soundspeed/base/callbacks/ex_test_callbacks.py +++ b/examples/soundspeed/base/callbacks/ex_test_callbacks.py @@ -1,10 +1,9 @@ import logging -from hyo2.soundspeed.base.callbacks.fake_callbacks import FakeCallbacks +from hyo2.ssm2.lib.base.callbacks.fake_callbacks import FakeCallbacks from hyo2.abc2.lib.logging import set_logging -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] -set_logging(ns_list=ns_list) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2"]) logger = logging.getLogger(__name__) diff --git a/examples/soundspeed/ex_init.py b/examples/soundspeed/ex_init.py index aa5252df..4b946807 100644 --- a/examples/soundspeed/ex_init.py +++ b/examples/soundspeed/ex_init.py @@ -1,15 +1,13 @@ import logging -from hyo2.soundspeedmanager import app_info -from hyo2.soundspeed.soundspeed import SoundSpeedLibrary +# from hyo2.ssm2.app.gui.soundspeedmanager import app_info +from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary from hyo2.abc2.lib.logging import set_logging -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] -set_logging(ns_list=ns_list) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2"]) logger = logging.getLogger(__name__) - # initialize the library lib = SoundSpeedLibrary() diff --git a/examples/soundspeed/ex_new_project.py b/examples/soundspeed/ex_new_project.py index 28e60cdb..0b067617 100644 --- a/examples/soundspeed/ex_new_project.py +++ b/examples/soundspeed/ex_new_project.py @@ -1,11 +1,9 @@ import logging -from hyo2.soundspeedmanager import app_info -from hyo2.soundspeed.soundspeed import SoundSpeedLibrary from hyo2.abc2.lib.logging import set_logging +from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] -set_logging(ns_list=ns_list) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2"]) logger = logging.getLogger(__name__) diff --git a/examples/soundspeed/ex_plot_export_metadata.py b/examples/soundspeed/ex_plot_export_metadata.py index e0e93427..37bc774c 100644 --- a/examples/soundspeed/ex_plot_export_metadata.py +++ b/examples/soundspeed/ex_plot_export_metadata.py @@ -1,13 +1,11 @@ import logging import os -from hyo2.abc.lib.gdal_aux import GdalAux -from hyo2.abc.lib.logging import set_logging -# noinspection PyUnresolvedReferences -from hyo2.soundspeedmanager import app_info -from hyo2.soundspeed.soundspeed import SoundSpeedLibrary +from hyo2.abc2.lib.gdal_aux import GdalAux +from hyo2.abc2.lib.logging import set_logging +from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary -set_logging(ns_list=["hyo2.abc", "hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"]) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2"]) logger = logging.getLogger(__name__) # create a project @@ -23,7 +21,7 @@ logger.info("Profiles: %s" % len(lst)) # plots/maps/exports -# - mapt +# - map lib.map_db_profiles(show_plot=True) lib.save_map_db_profiles() diff --git a/examples/soundspeed/ex_read_and_store.py b/examples/soundspeed/ex_read_and_store.py index 4569a522..8adc4fe0 100644 --- a/examples/soundspeed/ex_read_and_store.py +++ b/examples/soundspeed/ex_read_and_store.py @@ -1,16 +1,14 @@ -import os import logging -from PySide6 import QtWidgets +import os + 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.abc2.lib.logging import set_logging +from hyo2.ssm2.lib.base.callbacks.fake_callbacks import FakeCallbacks +from hyo2.ssm2.lib.base.testing import SoundSpeedTesting +from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] -set_logging(ns_list=ns_list) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2"]) logger = logging.getLogger(__name__) diff --git a/examples/soundspeed/ex_read_and_write.py b/examples/soundspeed/ex_read_and_write.py index 3afb64ac..bfe1b2c7 100644 --- a/examples/soundspeed/ex_read_and_write.py +++ b/examples/soundspeed/ex_read_and_write.py @@ -1,14 +1,12 @@ -import os import logging +import os -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 +from hyo2.ssm2.lib.base.callbacks.fake_callbacks import FakeCallbacks +from hyo2.ssm2.lib.base.testing import SoundSpeedTesting +from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] -set_logging(ns_list=ns_list) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2"]) logger = logging.getLogger(__name__) @@ -39,7 +37,6 @@ # import each identified file for idx, testfile in enumerate(tests.keys()): - logger.info("test: * New profile: #%03d *" % idx) # import diff --git a/examples/soundspeed/ex_read_and_write_abs_files.py b/examples/soundspeed/ex_read_and_write_abs_files.py index ad8afcfa..da8c3e4c 100644 --- a/examples/soundspeed/ex_read_and_write_abs_files.py +++ b/examples/soundspeed/ex_read_and_write_abs_files.py @@ -1,14 +1,12 @@ -import os import logging +import os -from hyo2.soundspeedmanager import AppInfo -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 +from hyo2.ssm2.lib.base.callbacks.fake_callbacks import FakeCallbacks +from hyo2.ssm2.lib.base.testing import SoundSpeedTesting +from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] -set_logging(ns_list=ns_list) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2"]) logger = logging.getLogger(__name__) @@ -38,7 +36,6 @@ # import each identified file for idx, testfile in enumerate(tests.keys()): - # # just 1 file # if idx != 1: # continue diff --git a/examples/soundspeed/formats/ex_formats.py b/examples/soundspeed/formats/ex_formats.py index 2a61cc19..43b9f4e2 100644 --- a/examples/soundspeed/formats/ex_formats.py +++ b/examples/soundspeed/formats/ex_formats.py @@ -1,10 +1,9 @@ import logging -from hyo2.soundspeed.formats import readers, writers -from hyo2.abc.lib.logging import set_logging +from hyo2.ssm2.lib.formats import readers, writers +from hyo2.abc2.lib.logging import set_logging -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] -set_logging(ns_list=ns_list) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2"]) logger = logging.getLogger(__name__) diff --git a/examples/soundspeed/listener/ex_seacat_capture.py b/examples/soundspeed/listener/ex_seacat_capture.py index 2fd380eb..b1032bae 100644 --- a/examples/soundspeed/listener/ex_seacat_capture.py +++ b/examples/soundspeed/listener/ex_seacat_capture.py @@ -1,10 +1,9 @@ import logging -from hyo2.soundspeed.listener.seacat.seacat_emulator import respond -from hyo2.abc.lib.logging import set_logging +from hyo2.ssm2.lib.listener.seacat.seacat_emulator import respond +from hyo2.abc2.lib.logging import set_logging -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] -set_logging(ns_list=ns_list) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2"]) logger = logging.getLogger(__name__) diff --git a/examples/soundspeed/listener/ex_seacat_respond.py b/examples/soundspeed/listener/ex_seacat_respond.py index e828f621..e25bbefd 100644 --- a/examples/soundspeed/listener/ex_seacat_respond.py +++ b/examples/soundspeed/listener/ex_seacat_respond.py @@ -1,11 +1,10 @@ import os import logging -from hyo2.soundspeed.listener.seacat.seacat_emulator import raw_capture -from hyo2.abc.lib.logging import set_logging +from hyo2.ssm2.lib.listener.seacat.seacat_emulator import raw_capture +from hyo2.abc2.lib.logging import set_logging -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] -set_logging(ns_list=ns_list) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2"]) logger = logging.getLogger(__name__) diff --git a/examples/soundspeed/profile/ex_oc_dyn_height.py b/examples/soundspeed/profile/ex_oc_dyn_height.py index 22643d1f..be91a6c8 100644 --- a/examples/soundspeed/profile/ex_oc_dyn_height.py +++ b/examples/soundspeed/profile/ex_oc_dyn_height.py @@ -2,11 +2,10 @@ import numpy as np -from hyo2.soundspeed.profile.oceanography import Oceanography as Oc -from hyo2.abc.lib.logging import set_logging +from hyo2.ssm2.lib.profile.oceanography import Oceanography as Oc +from hyo2.abc2.lib.logging import set_logging -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] -set_logging(ns_list=ns_list) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2"]) logger = logging.getLogger(__name__) diff --git a/examples/soundspeed/profile/ex_oc_others.py b/examples/soundspeed/profile/ex_oc_others.py index 0ce7c9e3..cc10ca63 100644 --- a/examples/soundspeed/profile/ex_oc_others.py +++ b/examples/soundspeed/profile/ex_oc_others.py @@ -1,10 +1,9 @@ import logging -from hyo2.soundspeed.profile.oceanography import Oceanography as Oc -from hyo2.abc.lib.logging import set_logging +from hyo2.ssm2.lib.profile.oceanography import Oceanography as Oc +from hyo2.abc2.lib.logging import set_logging -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] -set_logging(ns_list=ns_list) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2"]) logger = logging.getLogger(__name__) diff --git a/examples/soundspeed/profile/ex_oc_p_d.py b/examples/soundspeed/profile/ex_oc_p_d.py index 170f5b1d..c680a432 100644 --- a/examples/soundspeed/profile/ex_oc_p_d.py +++ b/examples/soundspeed/profile/ex_oc_p_d.py @@ -1,10 +1,9 @@ import logging -from hyo2.soundspeed.profile.oceanography import Oceanography as Oc -from hyo2.abc.lib.logging import set_logging +from hyo2.ssm2.lib.profile.oceanography import Oceanography as Oc +from hyo2.abc2.lib.logging import set_logging -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] -set_logging(ns_list=ns_list) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2"]) logger = logging.getLogger(__name__) diff --git a/examples/soundspeed/profile/ex_oc_vs_s.py b/examples/soundspeed/profile/ex_oc_vs_s.py index 485554eb..e59ca127 100644 --- a/examples/soundspeed/profile/ex_oc_vs_s.py +++ b/examples/soundspeed/profile/ex_oc_vs_s.py @@ -1,10 +1,9 @@ import logging -from hyo2.soundspeed.profile.oceanography import Oceanography as Oc -from hyo2.abc.lib.logging import set_logging +from hyo2.ssm2.lib.profile.oceanography import Oceanography as Oc +from hyo2.abc2.lib.logging import set_logging -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] -set_logging(ns_list=ns_list) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2"]) logger = logging.getLogger(__name__) diff --git a/examples/soundspeed/profile/ex_plot_bias_tracedprofile.py b/examples/soundspeed/profile/ex_plot_bias_tracedprofile.py index 2b734fbc..1e9ce454 100644 --- a/examples/soundspeed/profile/ex_plot_bias_tracedprofile.py +++ b/examples/soundspeed/profile/ex_plot_bias_tracedprofile.py @@ -1,24 +1,22 @@ -from datetime import datetime import logging +from datetime import datetime import numpy as np -from hyo2.soundspeed.profile.profile import Profile -from hyo2.soundspeed.profile.profilelist import ProfileList -from hyo2.soundspeed.profile.ray_tracing.tracedprofile import TracedProfile -from hyo2.soundspeed.profile.ray_tracing.diff_tracedprofiles import DiffTracedProfiles -from hyo2.soundspeed.profile.ray_tracing.plot_tracedprofiles import PlotTracedProfiles -from hyo2.abc.lib.logging import set_logging +from hyo2.abc2.lib.logging import set_logging +from hyo2.ssm2.lib.profile.profile import Profile +from hyo2.ssm2.lib.profile.profilelist import ProfileList +from hyo2.ssm2.lib.profile.ray_tracing.diff_tracedprofiles import DiffTracedProfiles +from hyo2.ssm2.lib.profile.ray_tracing.plot_tracedprofiles import PlotTracedProfiles +from hyo2.ssm2.lib.profile.ray_tracing.tracedprofile import TracedProfile -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] -set_logging(ns_list=ns_list) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2"]) logger = logging.getLogger(__name__) # create an example profile for testing def make_fake_ssp(bias=0.0): - ssp = Profile() d = np.arange(0.0, 1000.0, 5.0) vs = np.arange(1480.0 + bias, 1520.0 + bias, 0.2) diff --git a/examples/soundspeed/profile/ex_plot_compare_tracedprofiles.py b/examples/soundspeed/profile/ex_plot_compare_tracedprofiles.py index c219d447..dcd65a17 100644 --- a/examples/soundspeed/profile/ex_plot_compare_tracedprofiles.py +++ b/examples/soundspeed/profile/ex_plot_compare_tracedprofiles.py @@ -3,22 +3,20 @@ import numpy as np -from hyo2.soundspeed.profile.profile import Profile -from hyo2.soundspeed.profile.profilelist import ProfileList -from hyo2.soundspeed.profile.ray_tracing.tracedprofile import TracedProfile -from hyo2.soundspeed.profile.ray_tracing.diff_tracedprofiles import DiffTracedProfiles -from hyo2.soundspeed.profile.ray_tracing.plot_tracedprofiles import PlotTracedProfiles -from hyo2.abc.lib.logging import set_logging +from hyo2.abc2.lib.logging import set_logging +from hyo2.ssm2.lib.profile.profile import Profile +from hyo2.ssm2.lib.profile.profilelist import ProfileList +from hyo2.ssm2.lib.profile.ray_tracing.diff_tracedprofiles import DiffTracedProfiles +from hyo2.ssm2.lib.profile.ray_tracing.plot_tracedprofiles import PlotTracedProfiles +from hyo2.ssm2.lib.profile.ray_tracing.tracedprofile import TracedProfile -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] -set_logging(ns_list=ns_list) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2"]) logger = logging.getLogger(__name__) # create an example profile for testing def make_fake_ssp(ss_bias=0.0, d_bias=0.0, fixed=False): - ssp = Profile() d = np.arange(10.0 + d_bias, 1010.0 + d_bias, 5.0) if fixed: diff --git a/examples/soundspeed/profile/ex_profile_ops.py b/examples/soundspeed/profile/ex_profile_ops.py index daecbf66..c3950b0e 100644 --- a/examples/soundspeed/profile/ex_profile_ops.py +++ b/examples/soundspeed/profile/ex_profile_ops.py @@ -1,14 +1,12 @@ import logging import numpy as np -from PySide6 import QtWidgets from matplotlib import pyplot as plt -from hyo2.soundspeed.profile.profile import Profile -from hyo2.abc.lib.logging import set_logging +from hyo2.abc2.lib.logging import set_logging +from hyo2.ssm2.lib.profile.profile import Profile -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] -set_logging(ns_list=ns_list) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2"]) logger = logging.getLogger(__name__) diff --git a/examples/soundspeed/profile/ex_profile_stats.py b/examples/soundspeed/profile/ex_profile_stats.py index 52773fd5..a062311b 100644 --- a/examples/soundspeed/profile/ex_profile_stats.py +++ b/examples/soundspeed/profile/ex_profile_stats.py @@ -4,11 +4,10 @@ import numpy as np -from hyo2.soundspeed.profile.profile import Profile -from hyo2.abc.lib.logging import set_logging +from hyo2.ssm2.lib.profile.profile import Profile +from hyo2.abc2.lib.logging import set_logging -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] -set_logging(ns_list=ns_list) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2"]) logger = logging.getLogger(__name__) diff --git a/examples/soundspeed/profile/ex_tracedprofile.py b/examples/soundspeed/profile/ex_tracedprofile.py index b7c093c0..757c879f 100644 --- a/examples/soundspeed/profile/ex_tracedprofile.py +++ b/examples/soundspeed/profile/ex_tracedprofile.py @@ -1,22 +1,16 @@ -import pyximport -pyximport.install() -import Cython.Compiler.Options -Cython.Compiler.Options.annotate = True - import logging - from datetime import datetime + import numpy as np from matplotlib import pyplot as plt -from hyo2.soundspeed.profile.profile import Profile -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.profile.profilelist import ProfileList -from hyo2.soundspeed.profile.ray_tracing.tracedprofile import TracedProfile -from hyo2.abc.lib.logging import set_logging +from hyo2.abc2.lib.logging import set_logging +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.profile.profile import Profile +from hyo2.ssm2.lib.profile.profilelist import ProfileList +from hyo2.ssm2.lib.profile.ray_tracing.tracedprofile import TracedProfile -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] -set_logging(ns_list=ns_list) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2"]) logger = logging.getLogger(__name__) diff --git a/examples/soundspeed/server/ex_server.py b/examples/soundspeed/server/ex_server.py index be932882..4c4feb41 100644 --- a/examples/soundspeed/server/ex_server.py +++ b/examples/soundspeed/server/ex_server.py @@ -1,13 +1,11 @@ -import time import logging +import time -from hyo2.soundspeedmanager import app_info -from hyo2.soundspeed.soundspeed import SoundSpeedLibrary -from hyo2.soundspeed.server.server import Server -from hyo2.abc.lib.logging import set_logging +from hyo2.abc2.lib.logging import set_logging +from hyo2.ssm2.lib.server.server import Server +from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] -set_logging(ns_list=ns_list) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2"]) logger = logging.getLogger(__name__) diff --git a/examples/soundspeedmanager/dialogs/ex_flaggable_input_dialog.py b/examples/soundspeedmanager/dialogs/ex_flaggable_input_dialog.py index e68e3bc0..dd0df34a 100644 --- a/examples/soundspeedmanager/dialogs/ex_flaggable_input_dialog.py +++ b/examples/soundspeedmanager/dialogs/ex_flaggable_input_dialog.py @@ -1,10 +1,10 @@ import logging from PySide6 import QtWidgets -from hyo2.soundspeedmanager.dialogs.flaggable_input_dialog import FlaggableInputDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.flaggable_input_dialog import FlaggableInputDialog from hyo2.abc.lib.logging import set_logging -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] +ns_list = ["hyo2.soundspeed", "hyo2.ssm2.app.gui.soundspeedmanager", "hyo2.soundspeedsettings"] set_logging(ns_list=ns_list) logger = logging.getLogger(__name__) diff --git a/examples/soundspeedmanager/dialogs/ex_formatted_input_dialog.py b/examples/soundspeedmanager/dialogs/ex_formatted_input_dialog.py index a8a23935..b45a55a8 100644 --- a/examples/soundspeedmanager/dialogs/ex_formatted_input_dialog.py +++ b/examples/soundspeedmanager/dialogs/ex_formatted_input_dialog.py @@ -2,10 +2,10 @@ import logging -from hyo2.soundspeedmanager.dialogs.formatted_input_dialog import FormattedInputDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.formatted_input_dialog import FormattedInputDialog from hyo2.abc.lib.logging import set_logging -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] +ns_list = ["hyo2.soundspeed", "hyo2.ssm2.app.gui.soundspeedmanager", "hyo2.soundspeedsettings"] set_logging(ns_list=ns_list) logger = logging.getLogger(__name__) diff --git a/examples/soundspeedmanager/ex_multi_selection_dialog.py b/examples/soundspeedmanager/ex_multi_selection_dialog.py index 7f1f7ca9..3a70944d 100644 --- a/examples/soundspeedmanager/ex_multi_selection_dialog.py +++ b/examples/soundspeedmanager/ex_multi_selection_dialog.py @@ -2,10 +2,10 @@ from PySide6 import QtWidgets -from hyo2.soundspeedmanager.dialogs.multi_selection_dialog import MultiSelectionDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.multi_selection_dialog import MultiSelectionDialog from hyo2.abc.lib.logging import set_logging -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] +ns_list = ["hyo2.soundspeed", "hyo2.ssm2.app.gui.soundspeedmanager", "hyo2.soundspeedsettings"] set_logging(ns_list=ns_list) logger = logging.getLogger(__name__) diff --git a/examples/soundspeedmanager/ex_run_qt_callbacks.py b/examples/soundspeedmanager/ex_run_qt_callbacks.py index ad1f1eec..d560e957 100644 --- a/examples/soundspeedmanager/ex_run_qt_callbacks.py +++ b/examples/soundspeedmanager/ex_run_qt_callbacks.py @@ -2,10 +2,10 @@ import logging -from hyo2.soundspeedmanager.mainwin import MainWin +from hyo2.ssm2.app.gui.soundspeedmanager.mainwin import MainWin from hyo2.abc.lib.logging import set_logging -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] +ns_list = ["hyo2.soundspeed", "hyo2.ssm2.app.gui.soundspeedmanager", "hyo2.soundspeedsettings"] set_logging(ns_list=ns_list) logger = logging.getLogger(__name__) diff --git a/examples/soundspeedmanager/ex_text_editor_dialog.py b/examples/soundspeedmanager/ex_text_editor_dialog.py index 2a72f4e7..d4984b4a 100644 --- a/examples/soundspeedmanager/ex_text_editor_dialog.py +++ b/examples/soundspeedmanager/ex_text_editor_dialog.py @@ -2,11 +2,11 @@ import logging -from hyo2.soundspeedmanager.dialogs.text_editor_dialog import TextEditorDialog -from hyo2.soundspeed.soundspeed import SoundSpeedLibrary +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.text_editor_dialog import TextEditorDialog +from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary from hyo2.abc.lib.logging import set_logging -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] +ns_list = ["hyo2.soundspeed", "hyo2.ssm2.app.gui.soundspeedmanager", "hyo2.soundspeedsettings"] set_logging(ns_list=ns_list) logger = logging.getLogger(__name__) diff --git a/examples/workground/ex_ofs_online.py b/examples/workground/ex_ofs_online.py index d3cddbd8..0a0e2b93 100644 --- a/examples/workground/ex_ofs_online.py +++ b/examples/workground/ex_ofs_online.py @@ -6,7 +6,7 @@ from hyo2.abc.lib.logging import set_logging -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] +ns_list = ["hyo2.soundspeed", "hyo2.ssm2.app.gui.soundspeedmanager", "hyo2.soundspeedsettings"] set_logging(ns_list=ns_list) logger = logging.getLogger(__name__) diff --git a/examples/workground/ex_plot_rtofs.py b/examples/workground/ex_plot_rtofs.py index 33f84142..bb9e1d5b 100644 --- a/examples/workground/ex_plot_rtofs.py +++ b/examples/workground/ex_plot_rtofs.py @@ -1,6 +1,6 @@ import os import logging -from hyo2.soundspeedmanager import AppInfo +from hyo2.ssm2.app.gui.soundspeedmanager import AppInfo from PySide6 import QtWidgets from mpl_toolkits.basemap import Basemap import numpy as np @@ -10,7 +10,7 @@ from hyo2.abc.lib.testing import Testing from hyo2.abc.lib.logging import set_logging -ns_list = ["hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"] +ns_list = ["hyo2.soundspeed", "hyo2.ssm2.app.gui.soundspeedmanager", "hyo2.soundspeedsettings"] set_logging(ns_list=ns_list) logger = logging.getLogger(__name__) diff --git a/freeze/SSM_SIS.py b/freeze/SSM_SIS.py index e9d6846c..f3f11605 100644 --- a/freeze/SSM_SIS.py +++ b/freeze/SSM_SIS.py @@ -1,3 +1,3 @@ -from hyo2.ssm_sis import gui +from hyo2.ssm2.app.gui.ssm_sis import gui gui.gui() diff --git a/freeze/SoundSpeedManager.py b/freeze/SoundSpeedManager.py index 5e8461b6..41ba1244 100644 --- a/freeze/SoundSpeedManager.py +++ b/freeze/SoundSpeedManager.py @@ -1,3 +1,3 @@ -from hyo2.soundspeedmanager import gui +from hyo2.ssm2.app.gui.soundspeedmanager import gui gui.gui() diff --git a/freeze/SoundSpeedManager.spec b/freeze/SoundSpeedManager.spec index a303413e..50aa6bbf 100644 --- a/freeze/SoundSpeedManager.spec +++ b/freeze/SoundSpeedManager.spec @@ -19,12 +19,12 @@ import os from PyInstaller.building.build_main import Analysis, PYZ, EXE, COLLECT, TOC from PyInstaller.compat import is_darwin, is_win -from hyo2.soundspeed import __version__ as ssm_version +from hyo2.ssm2 import __version__ as ssm_version sys.setrecursionlimit(20000) -is_alpha = True -is_beta = False +is_alpha = False +is_beta = True if is_alpha: alphabeta = ".a%s" % datetime.now().strftime("%Y%m%d%H%M%S") elif is_beta: @@ -110,9 +110,7 @@ cartopy_data = collect_folder_data(input_data_folder=share_folder, relative_outp recursively=True) 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') +ssm2_data = collect_pkg_data('hyo2.ssm2') try: sdm_data = collect_pkg_data('hyo2.surveydatamonitor') except Exception as e: @@ -149,9 +147,7 @@ coll = COLLECT(exe, pyproj_data, cartopy_data, abc_data, - ss_data, - ssm_data, - sss_data, + ssm2_data, strip=None, upx=True, name='SoundSpeedManager.%s%s' % (ssm_version, alphabeta)) diff --git a/freeze/SoundSpeedSettings.py b/freeze/SoundSpeedSettings.py index 5a562382..1a0416c7 100644 --- a/freeze/SoundSpeedSettings.py +++ b/freeze/SoundSpeedSettings.py @@ -1,3 +1,3 @@ -from hyo2.soundspeedsettings import gui +from hyo2.ssm2.app.gui.soundspeedsettings import gui gui.gui() diff --git a/hyo2/ssm2/__init__.py b/hyo2/ssm2/__init__.py index 82d2c9cd..f8477e20 100644 --- a/hyo2/ssm2/__init__.py +++ b/hyo2/ssm2/__init__.py @@ -1,6 +1,6 @@ """ Hydro-Package -Sound Speed Manager 2 +Sound Speed 2 """ import os @@ -11,7 +11,7 @@ logger = logging.getLogger(__name__) logger.addHandler(logging.NullHandler()) -name = "Sound Speed Manager" +name = "Sound Speed" __version__ = '2024.0.0' __copyright__ = 'Copyright 2024 University of New Hampshire, Center for Coastal and Ocean Mapping' diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/__main__.py b/hyo2/ssm2/app/gui/soundspeedmanager/__main__.py index 5e8461b6..41ba1244 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/__main__.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/__main__.py @@ -1,3 +1,3 @@ -from hyo2.soundspeedmanager import gui +from hyo2.ssm2.app.gui.soundspeedmanager import gui gui.gui() diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/automate_dialog.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/automate_dialog.py index 44dfe7dc..41d9a513 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/automate_dialog.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/automate_dialog.py @@ -4,7 +4,7 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeedmanager.dialogs.dialog import AbstractDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.dialog import AbstractDialog class AutomateDialog(AbstractDialog): diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/buttons_dialog.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/buttons_dialog.py index 62b526e9..c42df676 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/buttons_dialog.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/buttons_dialog.py @@ -2,7 +2,7 @@ import logging -from hyo2.soundspeedmanager.dialogs.dialog import AbstractDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.dialog import AbstractDialog logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/common_metadata_dialog.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/common_metadata_dialog.py index 6597defe..95bdefd8 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/common_metadata_dialog.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/common_metadata_dialog.py @@ -2,8 +2,8 @@ from PySide6 import QtWidgets -from hyo2.soundspeedmanager.dialogs.dialog import AbstractDialog -from hyo2.soundspeed.base.setup_sql import vessel_list, institution_list +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.dialog import AbstractDialog +from hyo2.ssm2.lib.base.setup_sql import vessel_list, institution_list logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/constant_gradient_profile_dialog.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/constant_gradient_profile_dialog.py index d4fb8abb..3f0d4c09 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/constant_gradient_profile_dialog.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/constant_gradient_profile_dialog.py @@ -3,8 +3,8 @@ import traceback import logging -from hyo2.soundspeed.profile.oceanography import Oceanography -from hyo2.soundspeedmanager.dialogs.dialog import AbstractDialog +from hyo2.ssm2.lib.profile.oceanography import Oceanography +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.dialog import AbstractDialog logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/dialog.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/dialog.py index a3aeb645..ff2f9d2c 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/dialog.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/dialog.py @@ -4,7 +4,7 @@ from PySide6 import QtCore, QtWidgets from hyo2.abc2.app.qt_progress import QtProgress -from hyo2.soundspeed.soundspeed import SoundSpeedLibrary +from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/export_multi_profile_dialog.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/export_multi_profile_dialog.py index d13fb04d..dd373dbf 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/export_multi_profile_dialog.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/export_multi_profile_dialog.py @@ -4,9 +4,9 @@ from PySide6 import QtCore, QtWidgets from hyo2.abc2.lib.helper import Helper -from hyo2.soundspeedmanager.dialogs.dialog import AbstractDialog -from hyo2.soundspeedmanager.dialogs.output_folders_dialog import OutputFoldersDialog -from hyo2.soundspeed.profile.dicts import Dicts +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.dialog import AbstractDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.output_folders_dialog import OutputFoldersDialog +from hyo2.ssm2.lib.profile.dicts import Dicts logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/export_profile_metadata_dialog.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/export_profile_metadata_dialog.py index db91f721..76411cdc 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/export_profile_metadata_dialog.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/export_profile_metadata_dialog.py @@ -3,9 +3,9 @@ from PySide6 import QtCore, QtWidgets from hyo2.abc2.lib.gdal_aux import GdalAux -from hyo2.soundspeedmanager.dialogs.dialog import AbstractDialog -from hyo2.soundspeedmanager.dialogs.export_profile_metadata_fields_dialog import ExportProfileMetadataFieldsDialog -from hyo2.soundspeed.db.export import ExportDbFields +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.dialog import AbstractDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.export_profile_metadata_fields_dialog import ExportProfileMetadataFieldsDialog +from hyo2.ssm2.lib.db.export import ExportDbFields logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/export_single_profile_dialog.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/export_single_profile_dialog.py index ce1a9294..1a74a2df 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/export_single_profile_dialog.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/export_single_profile_dialog.py @@ -3,9 +3,9 @@ import logging from hyo2.abc2.lib.helper import Helper -from hyo2.soundspeedmanager.dialogs.dialog import AbstractDialog -from hyo2.soundspeedmanager.dialogs.output_folders_dialog import OutputFoldersDialog -from hyo2.soundspeed.profile.dicts import Dicts +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.dialog import AbstractDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.output_folders_dialog import OutputFoldersDialog +from hyo2.ssm2.lib.profile.dicts import Dicts logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/import_data_dialog.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/import_data_dialog.py index 5155b598..17de8c01 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/import_data_dialog.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/import_data_dialog.py @@ -2,7 +2,7 @@ from PySide6 import QtWidgets -from hyo2.soundspeedmanager.dialogs.dialog import AbstractDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.dialog import AbstractDialog logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/import_multi_profile_dialog.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/import_multi_profile_dialog.py index c530784d..409b11e9 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/import_multi_profile_dialog.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/import_multi_profile_dialog.py @@ -4,8 +4,8 @@ from PySide6 import QtCore, QtWidgets from hyo2.abc2.lib.helper import Helper -from hyo2.soundspeed import lib_info -from hyo2.soundspeedmanager.dialogs.dialog import AbstractDialog +from hyo2.ssm2 import lib_info +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.dialog import AbstractDialog logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/import_single_profile_dialog.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/import_single_profile_dialog.py index 8afee28e..edc0b471 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/import_single_profile_dialog.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/import_single_profile_dialog.py @@ -5,9 +5,9 @@ from PySide6 import QtCore, QtWidgets from hyo2.abc2.lib.helper import Helper -from hyo2.soundspeed import lib_info -from hyo2.soundspeedmanager.dialogs.dialog import AbstractDialog -from hyo2.soundspeedmanager.dialogs.seacat_dialog import SeacatDialog +from hyo2.ssm2 import lib_info +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.dialog import AbstractDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.seacat_dialog import SeacatDialog logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/metadata_dialog.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/metadata_dialog.py index dfee8bfb..0c9cdb47 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/metadata_dialog.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/metadata_dialog.py @@ -2,8 +2,8 @@ import os from datetime import datetime import logging -from hyo2.soundspeedmanager.dialogs.dialog import AbstractDialog -from hyo2.soundspeed.base.setup_sql import vessel_list +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.dialog import AbstractDialog +from hyo2.ssm2.lib.base.setup_sql import vessel_list logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/output_folders_dialog.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/output_folders_dialog.py index c3b46c09..442e4e42 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/output_folders_dialog.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/output_folders_dialog.py @@ -3,7 +3,7 @@ from PySide6 import QtCore, QtWidgets -from hyo2.soundspeedmanager.dialogs.dialog import AbstractDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.dialog import AbstractDialog logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/plot_multi_profile_dialog.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/plot_multi_profile_dialog.py index 10a0cecb..dcf8879e 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/plot_multi_profile_dialog.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/plot_multi_profile_dialog.py @@ -4,7 +4,7 @@ from matplotlib import rc_context from matplotlib import pyplot as plt -from hyo2.soundspeedmanager.dialogs.dialog import AbstractDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.dialog import AbstractDialog logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/plot_profiles_dialog.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/plot_profiles_dialog.py index 3c6e7d0b..db21fb45 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/plot_profiles_dialog.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/plot_profiles_dialog.py @@ -2,7 +2,7 @@ from PySide6 import QtCore, QtWidgets -from hyo2.soundspeedmanager.dialogs.dialog import AbstractDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.dialog import AbstractDialog logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/proc_data_model.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/proc_data_model.py index fca84ba8..efecb64d 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/proc_data_model.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/proc_data_model.py @@ -1,7 +1,7 @@ from PySide6 import QtCore, QtWidgets from collections import OrderedDict -from hyo2.soundspeed.profile.dicts import Dicts +from hyo2.ssm2.lib.profile.dicts import Dicts QVariant = lambda value=None: value diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/project_new_dialog.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/project_new_dialog.py index 577c1ca8..7a7fd443 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/project_new_dialog.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/project_new_dialog.py @@ -2,7 +2,7 @@ from PySide6 import QtCore, QtGui, QtWidgets -from hyo2.soundspeedmanager.dialogs.dialog import AbstractDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.dialog import AbstractDialog logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/project_rename_dialog.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/project_rename_dialog.py index c18d8aa7..4534899c 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/project_rename_dialog.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/project_rename_dialog.py @@ -2,7 +2,7 @@ from PySide6 import QtCore, QtGui, QtWidgets -from hyo2.soundspeedmanager.dialogs.dialog import AbstractDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.dialog import AbstractDialog logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/project_switch_dialog.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/project_switch_dialog.py index bbb96ba6..ca69a351 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/project_switch_dialog.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/project_switch_dialog.py @@ -2,7 +2,7 @@ from PySide6 import QtWidgets -from hyo2.soundspeedmanager.dialogs.dialog import AbstractDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.dialog import AbstractDialog logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/raw_data_model.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/raw_data_model.py index 797a7d63..2bad6a3f 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/raw_data_model.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/raw_data_model.py @@ -2,7 +2,7 @@ from collections import OrderedDict -from hyo2.soundspeed.profile.dicts import Dicts +from hyo2.ssm2.lib.profile.dicts import Dicts QVariant = lambda value=None: value diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/reference_dialog.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/reference_dialog.py index 35be6d90..6117c6bd 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/reference_dialog.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/reference_dialog.py @@ -2,7 +2,7 @@ import logging from PySide6 import QtWidgets -from hyo2.soundspeedmanager.dialogs.dialog import AbstractDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.dialog import AbstractDialog logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/seacat.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/seacat.py index 5e4a49c4..558efa25 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/seacat.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/seacat.py @@ -1,7 +1,7 @@ import logging from PySide6 import QtCore, QtWidgets -from hyo2.soundspeed.listener.seacat import sbe_serialcomms +from hyo2.ssm2.lib.listener.seacat import sbe_serialcomms logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/seacat_dialog.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/seacat_dialog.py index 4092b78b..f72cb16b 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/seacat_dialog.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/seacat_dialog.py @@ -12,8 +12,8 @@ from PySide6 import QtGui, QtWidgets -from hyo2.soundspeedmanager.dialogs.dialog import AbstractDialog -from hyo2.soundspeedmanager.dialogs.seacat import add_btn, get_last_comport, AutoSeacat, SelectCastsDlg, \ +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.dialog import AbstractDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.seacat import add_btn, get_last_comport, AutoSeacat, SelectCastsDlg, \ save_last_comport, sbe_serialcomms, get_setting_string logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/sis_data_model.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/sis_data_model.py index 1ee6a52e..6136b5df 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/sis_data_model.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/sis_data_model.py @@ -1,7 +1,7 @@ from PySide6 import QtCore from collections import OrderedDict -from hyo2.soundspeed.profile.dicts import Dicts +from hyo2.ssm2.lib.profile.dicts import Dicts QVariant = lambda value=None: value diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/spreadsheet_dialog.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/spreadsheet_dialog.py index ef7d78ca..6e5b84e6 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/spreadsheet_dialog.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/spreadsheet_dialog.py @@ -3,10 +3,10 @@ import os import logging -from hyo2.soundspeedmanager.dialogs.dialog import AbstractDialog -from hyo2.soundspeedmanager.dialogs.raw_data_model import RawDataModel -from hyo2.soundspeedmanager.dialogs.proc_data_model import ProcDataModel -from hyo2.soundspeedmanager.dialogs.sis_data_model import SisDataModel +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.dialog import AbstractDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.raw_data_model import RawDataModel +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.proc_data_model import ProcDataModel +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.sis_data_model import SisDataModel logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/text_editor_dialog.py b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/text_editor_dialog.py index a9af42d8..138c1f54 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/text_editor_dialog.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/dialogs/text_editor_dialog.py @@ -3,9 +3,9 @@ from PySide6 import QtCore, QtGui, QtWidgets -from hyo2.soundspeedmanager import app_info -from hyo2.soundspeedmanager.dialogs.dialog import AbstractDialog -from hyo2.soundspeedmanager.dialogs.text_editor import TextEditor +from hyo2.ssm2.app.gui.soundspeedmanager import app_info +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.dialog import AbstractDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.text_editor import TextEditor logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/gui.py b/hyo2/ssm2/app/gui/soundspeedmanager/gui.py index c994ef22..10b8a9b0 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/gui.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/gui.py @@ -3,13 +3,13 @@ import traceback from PySide6 import QtCore, QtWidgets, QtGui + from hyo2.abc2.app.app_style import AppStyle from hyo2.abc2.lib.helper import Helper from hyo2.abc2.lib.logging import set_logging -from hyo2.soundspeedmanager import app_info +from hyo2.ssm2.app.gui.soundspeedmanager import app_info -set_logging(ns_list=["hyo2.abc2", "hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings", - "hyo2.surveydatamonitor"]) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2", "hyo2.sdm2"]) logger = logging.getLogger(__name__) @@ -28,9 +28,10 @@ def qt_custom_handler(error_type: QtCore.QtMsgType, error_context: QtCore.QMessa QtCore.qInstallMessageHandler(qt_custom_handler) -def gui(): +def gui(beta: bool = True): """Create the application and show the Sound Speed Manager gui""" - from hyo2.soundspeedmanager.mainwin import MainWin + from hyo2.ssm2.app.gui.soundspeedmanager.mainwin import MainWin + logger.debug("Init app ...") app = QtWidgets.QApplication(sys.argv) AppStyle.apply(app=app) @@ -49,7 +50,7 @@ def gui(): sys.exit(app.exit()) logger.debug("Init main win ...") - main_win = MainWin() + main_win = MainWin(beta=beta) sys.excepthook = main_win.exception_hook # install the exception hook main_win.show() main_win.do() diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/mainwin.py b/hyo2/ssm2/app/gui/soundspeedmanager/mainwin.py index e8023aef..10d7a19a 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/mainwin.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/mainwin.py @@ -7,33 +7,36 @@ from urllib.request import urlopen from PySide6 import QtCore, QtGui, QtWidgets + from hyo2.abc2.app.dialogs.exception.exception_dialog import ExceptionDialog from hyo2.abc2.app.qt_progress import QtProgress from hyo2.abc2.app.tabs.info.info_tab import InfoTab from hyo2.abc2.lib.helper import Helper -from hyo2.soundspeed import lib_info -from hyo2.soundspeed.soundspeed import SoundSpeedLibrary -from hyo2.soundspeedmanager import app_info -from hyo2.soundspeedmanager.qt_callbacks import QtCallbacks -from hyo2.soundspeedmanager.widgets.database import Database -from hyo2.soundspeedmanager.widgets.editor import Editor -from hyo2.soundspeedmanager.widgets.server import Server -# from hyo2.soundspeedmanager.widgets.refraction import Refraction -from hyo2.soundspeedmanager.widgets.settings import Settings +from hyo2.ssm2 import lib_info +from hyo2.ssm2.app.gui.soundspeedmanager import app_info +from hyo2.ssm2.app.gui.soundspeedmanager.qt_callbacks import QtCallbacks +from hyo2.ssm2.app.gui.soundspeedmanager.widgets.database import Database +from hyo2.ssm2.app.gui.soundspeedmanager.widgets.editor import Editor +from hyo2.ssm2.app.gui.soundspeedmanager.widgets.server import Server +from hyo2.ssm2.app.gui.soundspeedmanager.widgets.settings import Settings +from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary logger = logging.getLogger(__name__) class MainWin(QtWidgets.QMainWindow): - def __init__(self): + def __init__(self, beta: bool = False): QtWidgets.QMainWindow.__init__(self) logger.info("* > APP: initializing ...") # set the application name and the version self.name = app_info.app_name - self.version = app_info.app_version + '.1 ALPHA' + self.version = app_info.app_version + self.beta = beta + if self.beta: + self.version += ' BETA' self.setWindowTitle('%s v.%s' % (self.name, self.version)) # noinspection PyArgumentList _app = QtCore.QCoreApplication.instance() @@ -70,19 +73,22 @@ def __init__(self): self.check_woa09() self.check_woa13() self.check_woa18() - # self.check_rtofs() # no need to wait for the download at the beginning self.check_sis() self.check_sippican() - self.check_nmea() + self.check_nmea() self.check_mvp() # init default settings settings = QtCore.QSettings() export_folder = settings.value("export_folder") - if (export_folder is None) or (not os.path.exists(export_folder)): + if export_folder is None: + settings.setValue("export_folder", self.lib.data_folder) + elif not os.path.exists(str(export_folder)): settings.setValue("export_folder", self.lib.data_folder) import_folder = settings.value("import_folder") - if (import_folder is None) or (not os.path.exists(import_folder)): + if import_folder is None: + settings.setValue("import_folder", self.lib.data_folder) + elif not os.path.exists(str(import_folder)): settings.setValue("import_folder", self.lib.data_folder) # menu @@ -191,7 +197,7 @@ def __init__(self): self.release_checked = False self.old_sis_xyz_data = False self.old_sis_nav_data = False - self.old_nmea_nav_data = False + self.old_nmea_nav_data = False timer = QtCore.QTimer(self) # noinspection PyUnresolvedReferences timer.timeout.connect(self.update_gui) @@ -470,7 +476,7 @@ def check_nmea(self): msg = 'Unable to stop listening Nmea.' # noinspection PyCallByClass,PyArgumentList QtWidgets.QMessageBox.warning(self, "Sound Speed Manager - NMEA 0183", msg, - QtWidgets.QMessageBox.Ok) + QtWidgets.QMessageBox.Ok) def check_mvp(self): if self.lib.use_mvp(): @@ -694,7 +700,7 @@ def _update_gui_from_nmea_nav(self, msg: str) -> str: if self.old_nmea_nav_data: logger.warning("%s: navigation message is too old (%d seconds)" % (datetime.utcnow(), diff_time.total_seconds())) - + # position msg += " - pos:" if self.old_nmea_nav_data: @@ -718,11 +724,11 @@ def _update_gui_from_nmea_nav(self, msg: str) -> str: letter = "E" lon_min = float(60 * math.fabs(longitude - int(longitude))) lon_str = "%03d\N{DEGREE SIGN}%7.3f'%s" % (int(math.fabs(longitude)), lon_min, letter) - + msg += "(%s, %s)" % (lat_str, lon_str) return msg - + def update_gui(self): self.timer_execs += 1 diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/media/LICENSE b/hyo2/ssm2/app/gui/soundspeedmanager/media/LICENSE index a0a80360..d0cf2eee 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/media/LICENSE +++ b/hyo2/ssm2/app/gui/soundspeedmanager/media/LICENSE @@ -1,4 +1,4 @@ -Copyright Notice and License Terms for: hyo2.soundspeed - Sound Speed package for HydrOffice +Copyright Notice and License Terms for: hyo2.ssm2.lib - Sound Speed package for HydrOffice Copyright (c) 2019, University of New Hampshire, Center for Coastal and Ocean Mapping. All rights reserved. Portions of this project were developed under a cooperative agreement with NOAA Coast Survey Development Laboratory, and contain NOAA-developed code in the public domain. diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/qt_callbacks.py b/hyo2/ssm2/app/gui/soundspeedmanager/qt_callbacks.py index 0744d1d7..f1df5237 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/qt_callbacks.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/qt_callbacks.py @@ -5,9 +5,9 @@ from typing import Optional from PySide6 import QtCore, QtWidgets -from hyo2.soundspeed.base.callbacks.abstract_callbacks import AbstractCallbacks -from hyo2.soundspeedmanager.dialogs.formatted_input_dialog import FormattedInputDialog -from hyo2.soundspeedmanager.dialogs.flaggable_input_dialog import FlaggableInputDialog +from hyo2.ssm2.lib.base.callbacks.abstract_callbacks import AbstractCallbacks +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.formatted_input_dialog import FormattedInputDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.flaggable_input_dialog import FlaggableInputDialog logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/widgets/database.py b/hyo2/ssm2/app/gui/soundspeedmanager/widgets/database.py index e048b6ac..d2ee10c5 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/widgets/database.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/widgets/database.py @@ -3,21 +3,21 @@ from PySide6 import QtCore, QtGui, QtWidgets -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeedmanager.widgets.widget import AbstractWidget -from hyo2.soundspeedmanager.dialogs.plot_profiles_dialog import PlotProfilesDialog -from hyo2.soundspeedmanager.dialogs.project_new_dialog import ProjectNewDialog -from hyo2.soundspeedmanager.dialogs.project_rename_dialog import ProjectRenameDialog -from hyo2.soundspeedmanager.dialogs.project_switch_dialog import ProjectSwitchDialog -from hyo2.soundspeedmanager.dialogs.import_data_dialog import ImportDataDialog -from hyo2.soundspeedmanager.dialogs.export_single_profile_dialog import ExportSingleProfileDialog -from hyo2.soundspeedmanager.dialogs.export_multi_profile_dialog import ExportMultiProfileDialog -from hyo2.soundspeedmanager.dialogs.import_multi_profile_dialog import ImportMultiProfileDialog -from hyo2.soundspeedmanager.dialogs.plot_multi_profile_dialog import PlotMultiProfileDialog -from hyo2.soundspeedmanager.dialogs.export_profile_metadata_dialog import ExportProfileMetadataDialog -from hyo2.soundspeedmanager.dialogs.text_editor_dialog import TextEditorDialog -from hyo2.soundspeedmanager.dialogs.metadata_dialog import MetadataDialog -from hyo2.soundspeedmanager.dialogs.common_metadata_dialog import CommonMetadataDialog +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.app.gui.soundspeedmanager.widgets.widget import AbstractWidget +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.plot_profiles_dialog import PlotProfilesDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.project_new_dialog import ProjectNewDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.project_rename_dialog import ProjectRenameDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.project_switch_dialog import ProjectSwitchDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.import_data_dialog import ImportDataDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.export_single_profile_dialog import ExportSingleProfileDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.export_multi_profile_dialog import ExportMultiProfileDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.import_multi_profile_dialog import ImportMultiProfileDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.plot_multi_profile_dialog import PlotMultiProfileDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.export_profile_metadata_dialog import ExportProfileMetadataDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.text_editor_dialog import TextEditorDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.metadata_dialog import MetadataDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.common_metadata_dialog import CommonMetadataDialog logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/widgets/dataplots.py b/hyo2/ssm2/app/gui/soundspeedmanager/widgets/dataplots.py index 6b914da7..300702f9 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/widgets/dataplots.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/widgets/dataplots.py @@ -8,8 +8,8 @@ from matplotlib.figure import Figure from matplotlib import rc_context -from hyo2.soundspeedmanager.widgets.widget import AbstractWidget -from hyo2.soundspeedmanager.widgets.navtoolbar import NavToolbar +from hyo2.ssm2.app.gui.soundspeedmanager.widgets.widget import AbstractWidget +from hyo2.ssm2.app.gui.soundspeedmanager.widgets.navtoolbar import NavToolbar logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/widgets/editor.py b/hyo2/ssm2/app/gui/soundspeedmanager/widgets/editor.py index d3ed640e..08d87544 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/widgets/editor.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/widgets/editor.py @@ -3,18 +3,18 @@ import numpy as np from PySide6 import QtCore, QtGui, QtWidgets -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeedmanager.dialogs.automate_dialog import AutomateDialog -from hyo2.soundspeedmanager.dialogs.buttons_dialog import ButtonsDialog -from hyo2.soundspeedmanager.dialogs.constant_gradient_profile_dialog import ConstantGradientProfileDialog -from hyo2.soundspeedmanager.dialogs.export_single_profile_dialog import ExportSingleProfileDialog -from hyo2.soundspeedmanager.dialogs.import_single_profile_dialog import ImportSingleProfileDialog -from hyo2.soundspeedmanager.dialogs.metadata_dialog import MetadataDialog -from hyo2.soundspeedmanager.dialogs.reference_dialog import ReferenceDialog -from hyo2.soundspeedmanager.dialogs.seacat_dialog import SeacatDialog -from hyo2.soundspeedmanager.dialogs.spreadsheet_dialog import SpreadSheetDialog -from hyo2.soundspeedmanager.widgets.dataplots import DataPlots -from hyo2.soundspeedmanager.widgets.widget import AbstractWidget +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.automate_dialog import AutomateDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.buttons_dialog import ButtonsDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.constant_gradient_profile_dialog import ConstantGradientProfileDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.export_single_profile_dialog import ExportSingleProfileDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.import_single_profile_dialog import ImportSingleProfileDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.metadata_dialog import MetadataDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.reference_dialog import ReferenceDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.seacat_dialog import SeacatDialog +from hyo2.ssm2.app.gui.soundspeedmanager.dialogs.spreadsheet_dialog import SpreadSheetDialog +from hyo2.ssm2.app.gui.soundspeedmanager.widgets.dataplots import DataPlots +from hyo2.ssm2.app.gui.soundspeedmanager.widgets.widget import AbstractWidget logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/widgets/navtoolbar.py b/hyo2/ssm2/app/gui/soundspeedmanager/widgets/navtoolbar.py index 3de63b9a..ec768b3b 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/widgets/navtoolbar.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/widgets/navtoolbar.py @@ -12,7 +12,7 @@ from matplotlib.backends.qt_compat import _devicePixelRatioF, _setDevicePixelRatio from matplotlib.backend_bases import cursors -from hyo2.soundspeed.profile.dicts import Dicts +from hyo2.ssm2.lib.profile.dicts import Dicts logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/widgets/refraction.py b/hyo2/ssm2/app/gui/soundspeedmanager/widgets/refraction.py index ed04d584..23e9c556 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/widgets/refraction.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/widgets/refraction.py @@ -3,7 +3,7 @@ from PySide6 import QtGui, QtWidgets -from hyo2.soundspeedmanager.widgets.widget import AbstractWidget +from hyo2.ssm2.app.gui.soundspeedmanager.widgets.widget import AbstractWidget logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/widgets/server.py b/hyo2/ssm2/app/gui/soundspeedmanager/widgets/server.py index 4812520b..3dfb3331 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/widgets/server.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/widgets/server.py @@ -3,8 +3,8 @@ from PySide6 import QtCore, QtGui, QtWidgets -from hyo2.soundspeedmanager.widgets.widget import AbstractWidget -from hyo2.soundspeedmanager.widgets.dataplots import DataPlots +from hyo2.ssm2.app.gui.soundspeedmanager.widgets.widget import AbstractWidget +from hyo2.ssm2.app.gui.soundspeedmanager.widgets.dataplots import DataPlots logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/widgets/settings.py b/hyo2/ssm2/app/gui/soundspeedmanager/widgets/settings.py index 715dbf69..77fb7f17 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/widgets/settings.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/widgets/settings.py @@ -5,8 +5,8 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeedmanager.widgets.widget import AbstractWidget -from hyo2.soundspeedsettings.mainwin import MainWin +from hyo2.ssm2.app.gui.soundspeedmanager.widgets.widget import AbstractWidget +from hyo2.ssm2.app.gui.soundspeedsettings.mainwin import MainWin class Settings(AbstractWidget): diff --git a/hyo2/ssm2/app/gui/soundspeedmanager/widgets/widget.py b/hyo2/ssm2/app/gui/soundspeedmanager/widgets/widget.py index 22484730..e4c6856d 100644 --- a/hyo2/ssm2/app/gui/soundspeedmanager/widgets/widget.py +++ b/hyo2/ssm2/app/gui/soundspeedmanager/widgets/widget.py @@ -8,7 +8,7 @@ from hyo2.abc2.app.qt_progress import QtProgress -from hyo2.soundspeed.soundspeed import SoundSpeedLibrary +from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary class AbstractWidget(QtWidgets.QMainWindow): diff --git a/hyo2/ssm2/app/gui/soundspeedsettings/__main__.py b/hyo2/ssm2/app/gui/soundspeedsettings/__main__.py index 5a562382..1a0416c7 100644 --- a/hyo2/ssm2/app/gui/soundspeedsettings/__main__.py +++ b/hyo2/ssm2/app/gui/soundspeedsettings/__main__.py @@ -1,3 +1,3 @@ -from hyo2.soundspeedsettings import gui +from hyo2.ssm2.app.gui.soundspeedsettings import gui gui.gui() diff --git a/hyo2/ssm2/app/gui/soundspeedsettings/gui.py b/hyo2/ssm2/app/gui/soundspeedsettings/gui.py index 40c9f0df..7f3a45b1 100644 --- a/hyo2/ssm2/app/gui/soundspeedsettings/gui.py +++ b/hyo2/ssm2/app/gui/soundspeedsettings/gui.py @@ -4,10 +4,10 @@ from PySide6 import QtCore, QtWidgets -from hyo2.abc2.lib.logging import set_logging from hyo2.abc2.app.app_style import AppStyle +from hyo2.abc2.lib.logging import set_logging -set_logging(ns_list=["hyo2.abc2", "hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings"]) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2", "hyo2.sdm2"]) logger = logging.getLogger(__name__) @@ -28,12 +28,14 @@ def qt_custom_handler(error_type: QtCore.QtMsgType, error_context: QtCore.QMessa def gui(): """Run the Sound Speed Settings gui""" - from hyo2.soundspeedsettings.mainwin import MainWin - from hyo2.soundspeed.soundspeed import SoundSpeedLibrary + from hyo2.ssm2.app.gui.soundspeedsettings.mainwin import MainWin + from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary + logger.debug("Init app ...") app = QtWidgets.QApplication(sys.argv) - app.setStyleSheet(AppStyle.load_stylesheet()) + AppStyle.apply(app=app) + logger.debug("Init main win ...") lib = SoundSpeedLibrary() main = MainWin(lib=lib) main.show() diff --git a/hyo2/ssm2/app/gui/soundspeedsettings/mainwin.py b/hyo2/ssm2/app/gui/soundspeedsettings/mainwin.py index 50ca6b61..c168ab9b 100644 --- a/hyo2/ssm2/app/gui/soundspeedsettings/mainwin.py +++ b/hyo2/ssm2/app/gui/soundspeedsettings/mainwin.py @@ -6,15 +6,15 @@ from hyo2.abc2.app.dialogs.exception.exception_dialog import ExceptionDialog -from hyo2.soundspeed import lib_info -from hyo2.soundspeedsettings import app_info -from hyo2.soundspeedsettings.widgets.main import Main -from hyo2.soundspeedsettings.widgets.general import General -from hyo2.soundspeedsettings.widgets.input import Input -from hyo2.soundspeedsettings.widgets.output import Output -from hyo2.soundspeedsettings.widgets.listeners import Listeners - -from hyo2.soundspeed.soundspeed import SoundSpeedLibrary +from hyo2.ssm2 import lib_info +from hyo2.ssm2.app.gui.soundspeedsettings import app_info +from hyo2.ssm2.app.gui.soundspeedsettings.widgets.main import Main +from hyo2.ssm2.app.gui.soundspeedsettings.widgets.general import General +from hyo2.ssm2.app.gui.soundspeedsettings.widgets.input import Input +from hyo2.ssm2.app.gui.soundspeedsettings.widgets.output import Output +from hyo2.ssm2.app.gui.soundspeedsettings.widgets.listeners import Listeners + +from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedsettings/widgets/general.py b/hyo2/ssm2/app/gui/soundspeedsettings/widgets/general.py index 4ddb62f2..ab26da71 100644 --- a/hyo2/ssm2/app/gui/soundspeedsettings/widgets/general.py +++ b/hyo2/ssm2/app/gui/soundspeedsettings/widgets/general.py @@ -3,8 +3,8 @@ from PySide6 import QtCore, QtGui, QtWidgets -from hyo2.soundspeedsettings.widgets.widget import AbstractWidget -from hyo2.soundspeed.base.setup_sql import vessel_list, institution_list +from hyo2.ssm2.app.gui.soundspeedsettings.widgets.widget import AbstractWidget +from hyo2.ssm2.lib.base.setup_sql import vessel_list, institution_list logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedsettings/widgets/input.py b/hyo2/ssm2/app/gui/soundspeedsettings/widgets/input.py index c255d253..a489d844 100644 --- a/hyo2/ssm2/app/gui/soundspeedsettings/widgets/input.py +++ b/hyo2/ssm2/app/gui/soundspeedsettings/widgets/input.py @@ -2,8 +2,8 @@ from PySide6 import QtGui, QtWidgets -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeedsettings.widgets.widget import AbstractWidget +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.app.gui.soundspeedsettings.widgets.widget import AbstractWidget logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedsettings/widgets/listeners.py b/hyo2/ssm2/app/gui/soundspeedsettings/widgets/listeners.py index 72c1cfc0..abd99d30 100644 --- a/hyo2/ssm2/app/gui/soundspeedsettings/widgets/listeners.py +++ b/hyo2/ssm2/app/gui/soundspeedsettings/widgets/listeners.py @@ -2,8 +2,8 @@ from PySide6 import QtCore, QtGui, QtWidgets -from hyo2.soundspeedsettings.widgets.widget import AbstractWidget -from hyo2.soundspeed.profile.dicts import Dicts +from hyo2.ssm2.app.gui.soundspeedsettings.widgets.widget import AbstractWidget +from hyo2.ssm2.lib.profile.dicts import Dicts logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedsettings/widgets/main.py b/hyo2/ssm2/app/gui/soundspeedsettings/widgets/main.py index 5598318d..0b9f3795 100644 --- a/hyo2/ssm2/app/gui/soundspeedsettings/widgets/main.py +++ b/hyo2/ssm2/app/gui/soundspeedsettings/widgets/main.py @@ -4,8 +4,8 @@ from PySide6 import QtCore, QtGui, QtWidgets -from hyo2.soundspeedsettings.widgets.widget import AbstractWidget -from hyo2.soundspeed.base.setup import Setup +from hyo2.ssm2.app.gui.soundspeedsettings.widgets.widget import AbstractWidget +from hyo2.ssm2.lib.base.setup import Setup logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedsettings/widgets/output.py b/hyo2/ssm2/app/gui/soundspeedsettings/widgets/output.py index cb05f35d..fa586e90 100644 --- a/hyo2/ssm2/app/gui/soundspeedsettings/widgets/output.py +++ b/hyo2/ssm2/app/gui/soundspeedsettings/widgets/output.py @@ -2,8 +2,8 @@ from PySide6 import QtCore, QtGui, QtWidgets -from hyo2.soundspeedsettings.widgets.widget import AbstractWidget -from hyo2.soundspeed.profile.dicts import Dicts +from hyo2.ssm2.app.gui.soundspeedsettings.widgets.widget import AbstractWidget +from hyo2.ssm2.lib.profile.dicts import Dicts logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/soundspeedsettings/widgets/widget.py b/hyo2/ssm2/app/gui/soundspeedsettings/widgets/widget.py index 21892c10..49fcf0da 100644 --- a/hyo2/ssm2/app/gui/soundspeedsettings/widgets/widget.py +++ b/hyo2/ssm2/app/gui/soundspeedsettings/widgets/widget.py @@ -3,7 +3,7 @@ from PySide6 import QtWidgets from hyo2.abc2.app.qt_progress import QtProgress -from hyo2.soundspeed.base.setup_db import SetupDb +from hyo2.ssm2.lib.base.setup_db import SetupDb logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/ssm_sis/__main__.py b/hyo2/ssm2/app/gui/ssm_sis/__main__.py index e9d6846c..f3f11605 100644 --- a/hyo2/ssm2/app/gui/ssm_sis/__main__.py +++ b/hyo2/ssm2/app/gui/ssm_sis/__main__.py @@ -1,3 +1,3 @@ -from hyo2.ssm_sis import gui +from hyo2.ssm2.app.gui.ssm_sis import gui gui.gui() diff --git a/hyo2/ssm2/app/gui/ssm_sis/controlpanel.py b/hyo2/ssm2/app/gui/ssm_sis/controlpanel.py index 1197dbfe..129fa0cd 100644 --- a/hyo2/ssm2/app/gui/ssm_sis/controlpanel.py +++ b/hyo2/ssm2/app/gui/ssm_sis/controlpanel.py @@ -4,9 +4,9 @@ from PySide6 import QtCore, QtGui, QtWidgets from hyo2.abc2.lib.helper import Helper -from hyo2.ssm_sis import app_info -from hyo2.soundspeed.listener.sis.sis import Sis -from hyo2.soundspeed.profile.profilelist import ProfileList +from hyo2.ssm2.app.gui.ssm_sis import app_info +from hyo2.ssm2.lib.listener.sis.sis import Sis +from hyo2.ssm2.lib.profile.profilelist import ProfileList logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/app/gui/ssm_sis/gui.py b/hyo2/ssm2/app/gui/ssm_sis/gui.py index 359d82b0..96a8a6d9 100644 --- a/hyo2/ssm2/app/gui/ssm_sis/gui.py +++ b/hyo2/ssm2/app/gui/ssm_sis/gui.py @@ -7,8 +7,7 @@ from hyo2.abc2.lib.logging import set_logging from hyo2.abc2.app.app_style import AppStyle -set_logging(ns_list=["hyo2.abc2", "hyo2.soundspeed", "hyo2.soundspeedmanager", "hyo2.soundspeedsettings", - "hyo2.surveydatamonitor", "hyo2.ssm_sis",]) +set_logging(ns_list=["hyo2.abc2", "hyo2.ssm2", "hyo2.sdm2"]) logger = logging.getLogger(__name__) @@ -29,11 +28,13 @@ def qt_custom_handler(error_type: QtCore.QtMsgType, error_context: QtCore.QMessa def gui(): """Create the application and show the SSM-SIS gui""" - from hyo2.ssm_sis.mainwin import MainWin + from hyo2.ssm2.app.gui.ssm_sis.mainwin import MainWin - app = QtWidgets.QApplication() + logger.debug("Init app ...") + app = QtWidgets.QApplication(sys.argv) AppStyle.apply(app=app) + logger.debug("Init main win ...") main_win = MainWin() main_win.show() diff --git a/hyo2/ssm2/app/gui/ssm_sis/mainwin.py b/hyo2/ssm2/app/gui/ssm_sis/mainwin.py index c1f72ead..ff7108f2 100644 --- a/hyo2/ssm2/app/gui/ssm_sis/mainwin.py +++ b/hyo2/ssm2/app/gui/ssm_sis/mainwin.py @@ -5,8 +5,8 @@ from hyo2.abc2.lib.helper import Helper from hyo2.abc2.app.web_renderer import WebRenderer -from hyo2.ssm_sis import app_info, lib_info -from hyo2.ssm_sis.controlpanel import ControlPanel +from hyo2.ssm2.app.gui.ssm_sis import app_info, lib_info +from hyo2.ssm2.app.gui.ssm_sis.controlpanel import ControlPanel logger = logging.getLogger(__name__) @@ -49,10 +49,10 @@ def _check_web_page(self, token: str = ""): else: url = "%s" % Helper(lib_info=lib_info).web_url() self._web.open(url=url) - logger.debug('check %s' % url) + # logger.debug('check %s' % url) except Exception as e: - logger.warning(e) + logger.warning(e, exc_info=True) @classmethod def _check_latest_release(cls): diff --git a/hyo2/ssm2/lib/atlas/abstract.py b/hyo2/ssm2/lib/atlas/abstract.py index 882fb999..29ca0312 100644 --- a/hyo2/ssm2/lib/atlas/abstract.py +++ b/hyo2/ssm2/lib/atlas/abstract.py @@ -3,10 +3,10 @@ import logging from typing import Optional, Union, TYPE_CHECKING -from hyo2.soundspeed.base.geodesy import Geodesy -from hyo2.soundspeed.profile.profilelist import ProfileList +from hyo2.ssm2.lib.base.geodesy import Geodesy +from hyo2.ssm2.lib.profile.profilelist import ProfileList if TYPE_CHECKING: - from hyo2.soundspeed.soundspeed import SoundSpeedLibrary + from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/atlas/atlases.py b/hyo2/ssm2/lib/atlas/atlases.py index 4ba71556..ba5fe27c 100644 --- a/hyo2/ssm2/lib/atlas/atlases.py +++ b/hyo2/ssm2/lib/atlas/atlases.py @@ -1,12 +1,12 @@ import os import logging -from hyo2.soundspeed.atlas.woa09 import Woa09 -from hyo2.soundspeed.atlas.woa13 import Woa13 -from hyo2.soundspeed.atlas.woa18 import Woa18 -from hyo2.soundspeed.atlas.rtofs import Rtofs -from hyo2.soundspeed.atlas.regofsonline import RegOfsOnline -from hyo2.soundspeed.atlas.regofsoffline import RegOfsOffline +from hyo2.ssm2.lib.atlas.woa09 import Woa09 +from hyo2.ssm2.lib.atlas.woa13 import Woa13 +from hyo2.ssm2.lib.atlas.woa18 import Woa18 +from hyo2.ssm2.lib.atlas.rtofs import Rtofs +from hyo2.ssm2.lib.atlas.regofsonline import RegOfsOnline +from hyo2.ssm2.lib.atlas.regofsoffline import RegOfsOffline logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/atlas/regofsoffline.py b/hyo2/ssm2/lib/atlas/regofsoffline.py index 98f3330a..23e02146 100644 --- a/hyo2/ssm2/lib/atlas/regofsoffline.py +++ b/hyo2/ssm2/lib/atlas/regofsoffline.py @@ -5,13 +5,13 @@ from typing import Optional, TYPE_CHECKING from netCDF4 import Dataset, num2date -from hyo2.soundspeed.base.geodesy import Geodesy -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.profile.profile import Profile -from hyo2.soundspeed.profile.profilelist import ProfileList +from hyo2.ssm2.lib.base.geodesy import Geodesy +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.profile.profile import Profile +from hyo2.ssm2.lib.profile.profilelist import ProfileList from hyo2.abc2.lib.progress.cli_progress import CliProgress if TYPE_CHECKING: - from hyo2.soundspeed.soundspeed import SoundSpeedLibrary + from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/atlas/regofsonline.py b/hyo2/ssm2/lib/atlas/regofsonline.py index 435fe46e..300aa808 100644 --- a/hyo2/ssm2/lib/atlas/regofsonline.py +++ b/hyo2/ssm2/lib/atlas/regofsonline.py @@ -11,13 +11,13 @@ from hyo2.abc2.lib.progress.cli_progress import CliProgress -from hyo2.soundspeed.atlas.abstract import AbstractAtlas -from hyo2.soundspeed.profile.profile import Profile -from hyo2.soundspeed.profile.profilelist import ProfileList -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.profile.oceanography import Oceanography as Oc +from hyo2.ssm2.lib.atlas.abstract import AbstractAtlas +from hyo2.ssm2.lib.profile.profile import Profile +from hyo2.ssm2.lib.profile.profilelist import ProfileList +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.profile.oceanography import Oceanography as Oc if TYPE_CHECKING: - from hyo2.soundspeed.soundspeed import SoundSpeedLibrary + from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/atlas/rtofs.py b/hyo2/ssm2/lib/atlas/rtofs.py index fc0534f3..b4649b15 100644 --- a/hyo2/ssm2/lib/atlas/rtofs.py +++ b/hyo2/ssm2/lib/atlas/rtofs.py @@ -8,13 +8,13 @@ from hyo2.abc2.lib.progress.cli_progress import CliProgress -from hyo2.soundspeed.atlas.abstract import AbstractAtlas -from hyo2.soundspeed.profile.profile import Profile -from hyo2.soundspeed.profile.profilelist import ProfileList -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.profile.oceanography import Oceanography as Oc +from hyo2.ssm2.lib.atlas.abstract import AbstractAtlas +from hyo2.ssm2.lib.profile.profile import Profile +from hyo2.ssm2.lib.profile.profilelist import ProfileList +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.profile.oceanography import Oceanography as Oc if TYPE_CHECKING: - from hyo2.soundspeed.soundspeed import SoundSpeedLibrary + from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/atlas/woa09.py b/hyo2/ssm2/lib/atlas/woa09.py index 3cc9b5aa..d12533d3 100644 --- a/hyo2/ssm2/lib/atlas/woa09.py +++ b/hyo2/ssm2/lib/atlas/woa09.py @@ -8,12 +8,12 @@ from hyo2.abc2.lib.onedrive import OneDrive -from hyo2.soundspeed.atlas.abstract import AbstractAtlas -from hyo2.soundspeed.profile.profile import Profile -from hyo2.soundspeed.profile.profilelist import ProfileList -from hyo2.soundspeed.profile.dicts import Dicts +from hyo2.ssm2.lib.atlas.abstract import AbstractAtlas +from hyo2.ssm2.lib.profile.profile import Profile +from hyo2.ssm2.lib.profile.profilelist import ProfileList +from hyo2.ssm2.lib.profile.dicts import Dicts if TYPE_CHECKING: - from hyo2.soundspeed.soundspeed import SoundSpeedLibrary + from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/atlas/woa13.py b/hyo2/ssm2/lib/atlas/woa13.py index 59627a90..6d7a9ffd 100644 --- a/hyo2/ssm2/lib/atlas/woa13.py +++ b/hyo2/ssm2/lib/atlas/woa13.py @@ -8,12 +8,12 @@ from hyo2.abc2.lib.onedrive import OneDrive -from hyo2.soundspeed.atlas.abstract import AbstractAtlas -from hyo2.soundspeed.profile.profile import Profile -from hyo2.soundspeed.profile.profilelist import ProfileList -from hyo2.soundspeed.profile.dicts import Dicts +from hyo2.ssm2.lib.atlas.abstract import AbstractAtlas +from hyo2.ssm2.lib.profile.profile import Profile +from hyo2.ssm2.lib.profile.profilelist import ProfileList +from hyo2.ssm2.lib.profile.dicts import Dicts if TYPE_CHECKING: - from hyo2.soundspeed.soundspeed import SoundSpeedLibrary + from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/atlas/woa18.py b/hyo2/ssm2/lib/atlas/woa18.py index c1f6e5c2..76e3ad61 100644 --- a/hyo2/ssm2/lib/atlas/woa18.py +++ b/hyo2/ssm2/lib/atlas/woa18.py @@ -8,12 +8,12 @@ from hyo2.abc2.lib.onedrive import OneDrive -from hyo2.soundspeed.atlas.abstract import AbstractAtlas -from hyo2.soundspeed.profile.profile import Profile -from hyo2.soundspeed.profile.profilelist import ProfileList -from hyo2.soundspeed.profile.dicts import Dicts +from hyo2.ssm2.lib.atlas.abstract import AbstractAtlas +from hyo2.ssm2.lib.profile.profile import Profile +from hyo2.ssm2.lib.profile.profilelist import ProfileList +from hyo2.ssm2.lib.profile.dicts import Dicts if TYPE_CHECKING: - from hyo2.soundspeed.soundspeed import SoundSpeedLibrary + from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/base/callbacks/abstract_callbacks.py b/hyo2/ssm2/lib/base/callbacks/abstract_callbacks.py index 6e237fd8..60b19e0a 100644 --- a/hyo2/ssm2/lib/base/callbacks/abstract_callbacks.py +++ b/hyo2/ssm2/lib/base/callbacks/abstract_callbacks.py @@ -4,8 +4,8 @@ from typing import Optional, TYPE_CHECKING if TYPE_CHECKING: - from hyo2.soundspeed.listener.sis.sis import Sis - from hyo2.soundspeed.listener.nmea.nmea import Nmea + from hyo2.ssm2.lib.listener.sis.sis import Sis + from hyo2.ssm2.lib.listener.nmea.nmea import Nmea logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/base/callbacks/cli_callbacks.py b/hyo2/ssm2/lib/base/callbacks/cli_callbacks.py index a2435def..3d49e6d3 100644 --- a/hyo2/ssm2/lib/base/callbacks/cli_callbacks.py +++ b/hyo2/ssm2/lib/base/callbacks/cli_callbacks.py @@ -3,7 +3,7 @@ import logging from typing import Optional -from hyo2.soundspeed.base.callbacks.abstract_callbacks import AbstractCallbacks +from hyo2.ssm2.lib.base.callbacks.abstract_callbacks import AbstractCallbacks logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/base/callbacks/fake_callbacks.py b/hyo2/ssm2/lib/base/callbacks/fake_callbacks.py index 25169359..7905b731 100644 --- a/hyo2/ssm2/lib/base/callbacks/fake_callbacks.py +++ b/hyo2/ssm2/lib/base/callbacks/fake_callbacks.py @@ -4,7 +4,7 @@ import logging from typing import Optional -from hyo2.soundspeed.base.callbacks.abstract_callbacks import AbstractCallbacks +from hyo2.ssm2.lib.base.callbacks.abstract_callbacks import AbstractCallbacks logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/base/setup.py b/hyo2/ssm2/lib/base/setup.py index b77c0c68..28eb0aad 100644 --- a/hyo2/ssm2/lib/base/setup.py +++ b/hyo2/ssm2/lib/base/setup.py @@ -3,9 +3,9 @@ from typing import Optional 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 +from hyo2.ssm2.lib.base.setup_db import SetupDb +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.client.clientlist import ClientList logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/base/setup_db.py b/hyo2/ssm2/lib/base/setup_db.py index 18aa37b1..a3dc70b1 100644 --- a/hyo2/ssm2/lib/base/setup_db.py +++ b/hyo2/ssm2/lib/base/setup_db.py @@ -4,8 +4,8 @@ import traceback from hyo2.abc2.lib.helper import Helper -from hyo2.soundspeed.base.basedb import BaseDb -from hyo2.soundspeed.base.setup_sql import CREATE_SETTINGS, CREATE_SETTINGS_VIEW, CREATE_CLIENT_LIST, \ +from hyo2.ssm2.lib.base.basedb import BaseDb +from hyo2.ssm2.lib.base.setup_sql import CREATE_SETTINGS, CREATE_SETTINGS_VIEW, CREATE_CLIENT_LIST, \ RENAME_SETTINGS, RENAME_CLIENT_LIST, DROP_OLD_SETTINGS, DROP_OLD_CLIENT_LIST, DROP_SETTINGS_VIEW, \ V1_V5_COPY_SETTINGS, V1_V5_COPY_CLIENT_LIST diff --git a/hyo2/ssm2/lib/base/testing.py b/hyo2/ssm2/lib/base/testing.py index aef8d341..db454119 100644 --- a/hyo2/ssm2/lib/base/testing.py +++ b/hyo2/ssm2/lib/base/testing.py @@ -3,7 +3,7 @@ from typing import Optional from hyo2.abc2.lib.testing import Testing -from hyo2.soundspeed import formats +from hyo2.ssm2.lib import formats logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/client/client.py b/hyo2/ssm2/lib/client/client.py index 39ff6dc4..75dbe404 100644 --- a/hyo2/ssm2/lib/client/client.py +++ b/hyo2/ssm2/lib/client/client.py @@ -4,11 +4,11 @@ import logging from typing import TYPE_CHECKING, Union -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.formats.writers.asvp import Asvp -from hyo2.soundspeed.formats.writers.calc import Calc +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.formats.writers.asvp import Asvp +from hyo2.ssm2.lib.formats.writers.calc import Calc if TYPE_CHECKING: - from hyo2.soundspeed.soundspeed import SoundSpeedLibrary + from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/client/clientlist.py b/hyo2/ssm2/lib/client/clientlist.py index 4a32935c..f0d3bbae 100644 --- a/hyo2/ssm2/lib/client/clientlist.py +++ b/hyo2/ssm2/lib/client/clientlist.py @@ -3,9 +3,9 @@ import logging from typing import TYPE_CHECKING -from hyo2.soundspeed.client.client import Client +from hyo2.ssm2.lib.client.client import Client if TYPE_CHECKING: - from hyo2.soundspeed.soundspeed import SoundSpeedLibrary + from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/db/db.py b/hyo2/ssm2/lib/db/db.py index 614db393..6b785aa0 100644 --- a/hyo2/ssm2/lib/db/db.py +++ b/hyo2/ssm2/lib/db/db.py @@ -1,16 +1,17 @@ -import sqlite3 -import os import datetime -# import traceback -import numpy as np import logging +import os +import sqlite3 +from typing import Optional + +import numpy as np -from hyo2.soundspeed import lib_info -from hyo2.soundspeed.db.point import Point, convert_point, adapt_point -from hyo2.soundspeed.db.plot import PlotDb -from hyo2.soundspeed.db.export import ExportDb -from hyo2.soundspeed.profile.profilelist import ProfileList -from hyo2.soundspeed.profile.dicts import Dicts +from hyo2.ssm2 import lib_info +from hyo2.ssm2.lib.db.export import ExportDb +from hyo2.ssm2.lib.db.plot import PlotDb +from hyo2.ssm2.lib.db.point import Point, convert_point, adapt_point +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.profile.profilelist import ProfileList logger = logging.getLogger(__name__) @@ -18,7 +19,7 @@ class ProjectDb: """Class that provides an interface to a SQLite db with Sound Speed data""" - def __init__(self, projects_folder=None, project_name=None): + def __init__(self, projects_folder: Optional[str] = None, project_name: Optional[str] = None) -> None: # in case that no data folder is passed if projects_folder is None: @@ -624,7 +625,7 @@ def list_profiles(self): "WHERE flag=? AND source!=? AND source!=? AND source!=? " "AND source!=? AND source!=? AND source!=? GROUP BY ssp_pk", (Dicts.flags['valid'], Dicts.sources['woa09_ext'], Dicts.sources['woa13_ext'], - Dicts.sources['woa18_ext'], Dicts.sources['rtofs_ext'], + Dicts.sources['woa18_ext'], Dicts.sources['rtofs_ext'], Dicts.sources['gomofs_ext'], Dicts.sources['ref_ext'],)).fetchall() try: diff --git a/hyo2/ssm2/lib/db/export.py b/hyo2/ssm2/lib/db/export.py index 7b4ef6e4..dbc3d32f 100644 --- a/hyo2/ssm2/lib/db/export.py +++ b/hyo2/ssm2/lib/db/export.py @@ -4,7 +4,7 @@ from typing import Optional from hyo2.abc2.lib.gdal_aux import GdalAux -from hyo2.soundspeed.profile.dicts import Dicts +from hyo2.ssm2.lib.profile.dicts import Dicts logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/formats/abstract.py b/hyo2/ssm2/lib/formats/abstract.py index 7b161cca..a771f7dc 100644 --- a/hyo2/ssm2/lib/formats/abstract.py +++ b/hyo2/ssm2/lib/formats/abstract.py @@ -2,11 +2,11 @@ from abc import ABCMeta from typing import Optional, Set, TYPE_CHECKING -from hyo2.soundspeed.profile.profilelist import ProfileList +from hyo2.ssm2.lib.profile.profilelist import ProfileList if TYPE_CHECKING: - from hyo2.soundspeed.base.callbacks.abstract_callbacks import AbstractCallbacks - from hyo2.soundspeed.base.setup import Setup + from hyo2.ssm2.lib.base.callbacks.abstract_callbacks import AbstractCallbacks + from hyo2.ssm2.lib.base.setup import Setup logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/formats/km.py b/hyo2/ssm2/lib/formats/km.py index 93f75cfd..d292e36c 100644 --- a/hyo2/ssm2/lib/formats/km.py +++ b/hyo2/ssm2/lib/formats/km.py @@ -4,7 +4,7 @@ import numpy as np -from hyo2.soundspeed.profile.dicts import Dicts +from hyo2.ssm2.lib.profile.dicts import Dicts logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/formats/nmea_0183/nmea_0183_gga.py b/hyo2/ssm2/lib/formats/nmea_0183/nmea_0183_gga.py index 37e8031f..6680a786 100644 --- a/hyo2/ssm2/lib/formats/nmea_0183/nmea_0183_gga.py +++ b/hyo2/ssm2/lib/formats/nmea_0183/nmea_0183_gga.py @@ -1,5 +1,5 @@ import logging -from hyo2.soundspeed.formats.nmea_0183.nmea_0183_nav_abstract import Nmea0183NavAbstract +from hyo2.ssm2.lib.formats.nmea_0183.nmea_0183_nav_abstract import Nmea0183NavAbstract logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/formats/nmea_0183/nmea_0183_gll.py b/hyo2/ssm2/lib/formats/nmea_0183/nmea_0183_gll.py index fe51f5c0..cb2e4a9e 100644 --- a/hyo2/ssm2/lib/formats/nmea_0183/nmea_0183_gll.py +++ b/hyo2/ssm2/lib/formats/nmea_0183/nmea_0183_gll.py @@ -1,6 +1,6 @@ import logging from typing import Optional -from hyo2.soundspeed.formats.nmea_0183.nmea_0183_nav_abstract import Nmea0183NavAbstract +from hyo2.ssm2.lib.formats.nmea_0183.nmea_0183_nav_abstract import Nmea0183NavAbstract logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/formats/readers/abstract.py b/hyo2/ssm2/lib/formats/readers/abstract.py index 5a09c810..7c89110a 100644 --- a/hyo2/ssm2/lib/formats/readers/abstract.py +++ b/hyo2/ssm2/lib/formats/readers/abstract.py @@ -2,10 +2,10 @@ import numpy as np import logging -from hyo2.soundspeed.base.files import FileManager -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks -from hyo2.soundspeed.formats.abstract import AbstractFormat -from hyo2.soundspeed.profile.dicts import Dicts +from hyo2.ssm2.lib.base.files import FileManager +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.formats.abstract import AbstractFormat +from hyo2.ssm2.lib.profile.dicts import Dicts logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/formats/readers/aml.py b/hyo2/ssm2/lib/formats/readers/aml.py index f8f23313..a469d0d3 100644 --- a/hyo2/ssm2/lib/formats/readers/aml.py +++ b/hyo2/ssm2/lib/formats/readers/aml.py @@ -5,14 +5,14 @@ import os from typing import Optional, TYPE_CHECKING -from hyo2.soundspeed.formats.readers.abstract import AbstractTextReader -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.formats.readers.abstract import AbstractTextReader +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks if TYPE_CHECKING: from hyo2.abc2.lib.progress.abstract_progress import AbstractProgress - from hyo2.soundspeed.base.callbacks.abstract_callbacks import AbstractCallbacks - from hyo2.soundspeed.base.setup import Setup + from hyo2.ssm2.lib.base.callbacks.abstract_callbacks import AbstractCallbacks + from hyo2.ssm2.lib.base.setup import Setup logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/formats/readers/aoml.py b/hyo2/ssm2/lib/formats/readers/aoml.py index 6936a34d..9fafe163 100644 --- a/hyo2/ssm2/lib/formats/readers/aoml.py +++ b/hyo2/ssm2/lib/formats/readers/aoml.py @@ -4,9 +4,9 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.formats.readers.abstract import AbstractTextReader -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.formats.readers.abstract import AbstractTextReader +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks class Aoml(AbstractTextReader): diff --git a/hyo2/ssm2/lib/formats/readers/asvp.py b/hyo2/ssm2/lib/formats/readers/asvp.py index ce6c2957..4a314119 100644 --- a/hyo2/ssm2/lib/formats/readers/asvp.py +++ b/hyo2/ssm2/lib/formats/readers/asvp.py @@ -3,9 +3,9 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.formats.readers.abstract import AbstractTextReader -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.formats.readers.abstract import AbstractTextReader +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks class Asvp(AbstractTextReader): diff --git a/hyo2/ssm2/lib/formats/readers/caris.py b/hyo2/ssm2/lib/formats/readers/caris.py index 7909f6b0..baac543b 100644 --- a/hyo2/ssm2/lib/formats/readers/caris.py +++ b/hyo2/ssm2/lib/formats/readers/caris.py @@ -3,9 +3,9 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.formats.readers.abstract import AbstractTextReader -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.formats.readers.abstract import AbstractTextReader +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks class Caris(AbstractTextReader): diff --git a/hyo2/ssm2/lib/formats/readers/castaway.py b/hyo2/ssm2/lib/formats/readers/castaway.py index c52d81fd..e1d2acac 100644 --- a/hyo2/ssm2/lib/formats/readers/castaway.py +++ b/hyo2/ssm2/lib/formats/readers/castaway.py @@ -3,9 +3,9 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.formats.readers.abstract import AbstractTextReader -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.formats.readers.abstract import AbstractTextReader +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks class Castaway(AbstractTextReader): diff --git a/hyo2/ssm2/lib/formats/readers/csiro_dtc.py b/hyo2/ssm2/lib/formats/readers/csiro_dtc.py index a188bef8..c565194c 100644 --- a/hyo2/ssm2/lib/formats/readers/csiro_dtc.py +++ b/hyo2/ssm2/lib/formats/readers/csiro_dtc.py @@ -4,9 +4,9 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.formats.readers.abstract import AbstractTextReader -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.formats.readers.abstract import AbstractTextReader +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks class CSIRO_DTC(AbstractTextReader): diff --git a/hyo2/ssm2/lib/formats/readers/digibarpro.py b/hyo2/ssm2/lib/formats/readers/digibarpro.py index b211b420..29c5a6e0 100644 --- a/hyo2/ssm2/lib/formats/readers/digibarpro.py +++ b/hyo2/ssm2/lib/formats/readers/digibarpro.py @@ -3,9 +3,9 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.formats.readers.abstract import AbstractTextReader -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.formats.readers.abstract import AbstractTextReader +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks class DigibarPro(AbstractTextReader): diff --git a/hyo2/ssm2/lib/formats/readers/digibars.py b/hyo2/ssm2/lib/formats/readers/digibars.py index 91e34dfa..950a32b6 100644 --- a/hyo2/ssm2/lib/formats/readers/digibars.py +++ b/hyo2/ssm2/lib/formats/readers/digibars.py @@ -3,9 +3,9 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.formats.readers.abstract import AbstractTextReader -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.formats.readers.abstract import AbstractTextReader +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks class DigibarS(AbstractTextReader): diff --git a/hyo2/ssm2/lib/formats/readers/elac.py b/hyo2/ssm2/lib/formats/readers/elac.py index 7a55b5f0..041cb402 100644 --- a/hyo2/ssm2/lib/formats/readers/elac.py +++ b/hyo2/ssm2/lib/formats/readers/elac.py @@ -2,9 +2,9 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.formats.readers.abstract import AbstractTextReader -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.formats.readers.abstract import AbstractTextReader +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks class Elac(AbstractTextReader): diff --git a/hyo2/ssm2/lib/formats/readers/hypack.py b/hyo2/ssm2/lib/formats/readers/hypack.py index dd841c41..42fc43f2 100644 --- a/hyo2/ssm2/lib/formats/readers/hypack.py +++ b/hyo2/ssm2/lib/formats/readers/hypack.py @@ -3,9 +3,9 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.formats.readers.abstract import AbstractTextReader -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.formats.readers.abstract import AbstractTextReader +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks class Hypack(AbstractTextReader): diff --git a/hyo2/ssm2/lib/formats/readers/idronaut.py b/hyo2/ssm2/lib/formats/readers/idronaut.py index 41646a08..fba30b67 100644 --- a/hyo2/ssm2/lib/formats/readers/idronaut.py +++ b/hyo2/ssm2/lib/formats/readers/idronaut.py @@ -3,9 +3,9 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.formats.readers.abstract import AbstractTextReader -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.formats.readers.abstract import AbstractTextReader +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks class Idronaut(AbstractTextReader): diff --git a/hyo2/ssm2/lib/formats/readers/iss.py b/hyo2/ssm2/lib/formats/readers/iss.py index f38132b2..a54d5667 100644 --- a/hyo2/ssm2/lib/formats/readers/iss.py +++ b/hyo2/ssm2/lib/formats/readers/iss.py @@ -3,9 +3,9 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.formats.readers.abstract import AbstractTextReader -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.formats.readers.abstract import AbstractTextReader +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks class Iss(AbstractTextReader): diff --git a/hyo2/ssm2/lib/formats/readers/mvp.py b/hyo2/ssm2/lib/formats/readers/mvp.py index 702812aa..f548d080 100644 --- a/hyo2/ssm2/lib/formats/readers/mvp.py +++ b/hyo2/ssm2/lib/formats/readers/mvp.py @@ -3,9 +3,9 @@ import os import logging -from hyo2.soundspeed.formats.readers.abstract import AbstractTextReader -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.formats.readers.abstract import AbstractTextReader +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/formats/readers/oceanscience.py b/hyo2/ssm2/lib/formats/readers/oceanscience.py index 1cb2b159..0b23dd9f 100644 --- a/hyo2/ssm2/lib/formats/readers/oceanscience.py +++ b/hyo2/ssm2/lib/formats/readers/oceanscience.py @@ -6,12 +6,12 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.formats.readers.abstract import AbstractTextReader -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks -from hyo2.soundspeed.temp import coordinates +from hyo2.ssm2.lib.formats.readers.abstract import AbstractTextReader +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.temp import coordinates -from hyo2.soundspeed.temp.regex_helpers import Profile, parseNumbers, getMetaFromTimeRE, getMetaFromCoord +from hyo2.ssm2.lib.temp.regex_helpers import Profile, parseNumbers, getMetaFromTimeRE, getMetaFromCoord class OceanScience(AbstractTextReader): diff --git a/hyo2/ssm2/lib/formats/readers/rbr.py b/hyo2/ssm2/lib/formats/readers/rbr.py index b5a08853..cfef1553 100644 --- a/hyo2/ssm2/lib/formats/readers/rbr.py +++ b/hyo2/ssm2/lib/formats/readers/rbr.py @@ -3,9 +3,9 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.formats.readers.abstract import AbstractTextReader -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.formats.readers.abstract import AbstractTextReader +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks class RBR(AbstractTextReader): diff --git a/hyo2/ssm2/lib/formats/readers/saiv.py b/hyo2/ssm2/lib/formats/readers/saiv.py index 4ec1292d..a0d183d7 100644 --- a/hyo2/ssm2/lib/formats/readers/saiv.py +++ b/hyo2/ssm2/lib/formats/readers/saiv.py @@ -3,9 +3,9 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.formats.readers.abstract import AbstractTextReader -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.formats.readers.abstract import AbstractTextReader +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks class Saiv(AbstractTextReader): diff --git a/hyo2/ssm2/lib/formats/readers/sea_and_sun.py b/hyo2/ssm2/lib/formats/readers/sea_and_sun.py index b604422f..304dff94 100644 --- a/hyo2/ssm2/lib/formats/readers/sea_and_sun.py +++ b/hyo2/ssm2/lib/formats/readers/sea_and_sun.py @@ -2,9 +2,9 @@ import locale import logging -from hyo2.soundspeed.formats.readers.abstract import AbstractTextReader -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.formats.readers.abstract import AbstractTextReader +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/formats/readers/seabird.py b/hyo2/ssm2/lib/formats/readers/seabird.py index 753fafca..3018fb14 100644 --- a/hyo2/ssm2/lib/formats/readers/seabird.py +++ b/hyo2/ssm2/lib/formats/readers/seabird.py @@ -8,13 +8,13 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.formats.readers.abstract import AbstractTextReader -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.formats.readers.abstract import AbstractTextReader +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks -from hyo2.soundspeed.temp.regex_helpers import Profile, getMetaFromCoord, robust_re_number, \ +from hyo2.ssm2.lib.temp.regex_helpers import Profile, getMetaFromCoord, robust_re_number, \ parseNumbers -from hyo2.soundspeed.temp import coordinates +from hyo2.ssm2.lib.temp import coordinates # Note that Hex header is copied into the CNV header verbatim so these can be used in either. SEACAT_SBE19_HEX_YEAR = r'SEACAT\sPROFILER.*?(?P\d+)/(?P\d+)/(?P\d+)' diff --git a/hyo2/ssm2/lib/formats/readers/simrad.py b/hyo2/ssm2/lib/formats/readers/simrad.py index bdd3533a..94b83291 100644 --- a/hyo2/ssm2/lib/formats/readers/simrad.py +++ b/hyo2/ssm2/lib/formats/readers/simrad.py @@ -5,12 +5,12 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.formats.readers.abstract import AbstractTextReader -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks -from hyo2.soundspeed.temp import coordinates +from hyo2.ssm2.lib.formats.readers.abstract import AbstractTextReader +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.temp import coordinates -from hyo2.soundspeed.temp.regex_helpers import Profile, parseNumbers, getMetaFromTimeRE +from hyo2.ssm2.lib.temp.regex_helpers import Profile, parseNumbers, getMetaFromTimeRE # Identifier Input data Data to be used Comment ssp_fmts_doc = ''' diff --git a/hyo2/ssm2/lib/formats/readers/sippican.py b/hyo2/ssm2/lib/formats/readers/sippican.py index 933fa179..451c183c 100644 --- a/hyo2/ssm2/lib/formats/readers/sippican.py +++ b/hyo2/ssm2/lib/formats/readers/sippican.py @@ -3,9 +3,9 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.formats.readers.abstract import AbstractTextReader -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.formats.readers.abstract import AbstractTextReader +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks class Sippican(AbstractTextReader): diff --git a/hyo2/ssm2/lib/formats/readers/sonardyne.py b/hyo2/ssm2/lib/formats/readers/sonardyne.py index 61dae724..89ac5a27 100644 --- a/hyo2/ssm2/lib/formats/readers/sonardyne.py +++ b/hyo2/ssm2/lib/formats/readers/sonardyne.py @@ -3,9 +3,9 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.formats.readers.abstract import AbstractTextReader -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.formats.readers.abstract import AbstractTextReader +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks class Sonardyne(AbstractTextReader): diff --git a/hyo2/ssm2/lib/formats/readers/turo.py b/hyo2/ssm2/lib/formats/readers/turo.py index f27ea205..051a9c17 100644 --- a/hyo2/ssm2/lib/formats/readers/turo.py +++ b/hyo2/ssm2/lib/formats/readers/turo.py @@ -5,10 +5,10 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.formats.readers.abstract import AbstractBinaryReader -from hyo2.soundspeed.base.files import FileInfo -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.formats.readers.abstract import AbstractBinaryReader +from hyo2.ssm2.lib.base.files import FileInfo +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks class Turo(AbstractBinaryReader): diff --git a/hyo2/ssm2/lib/formats/readers/unb.py b/hyo2/ssm2/lib/formats/readers/unb.py index 238e3d11..8594ff32 100644 --- a/hyo2/ssm2/lib/formats/readers/unb.py +++ b/hyo2/ssm2/lib/formats/readers/unb.py @@ -3,9 +3,9 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.formats.readers.abstract import AbstractTextReader -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.formats.readers.abstract import AbstractTextReader +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks class Unb(AbstractTextReader): diff --git a/hyo2/ssm2/lib/formats/readers/valeport.py b/hyo2/ssm2/lib/formats/readers/valeport.py index 255ff7fb..158cc6d8 100644 --- a/hyo2/ssm2/lib/formats/readers/valeport.py +++ b/hyo2/ssm2/lib/formats/readers/valeport.py @@ -2,9 +2,9 @@ import logging import os -from hyo2.soundspeed.formats.readers.abstract import AbstractTextReader -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.formats.readers.abstract import AbstractTextReader +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks logger = logging.getLogger(__name__) @@ -500,7 +500,8 @@ def _mini_body(self): self.ssp.cur.data.temp[count] = temp self.ssp.cur.data.sal[count] = sal - elif self.ssp.cur.meta.probe_type == Dicts.probe_types['MiniSVP']: + elif ((self.ssp.cur.meta.probe_type == Dicts.probe_types['MiniSVP']) or + (self.ssp.cur.meta.probe_type == Dicts.probe_types['RapidSVT'])): if len(data) != 3: logger.warning("unexpected number of fields: %d" % len(data)) continue diff --git a/hyo2/ssm2/lib/formats/writers/abstract.py b/hyo2/ssm2/lib/formats/writers/abstract.py index 704a44a9..0e0705b2 100644 --- a/hyo2/ssm2/lib/formats/writers/abstract.py +++ b/hyo2/ssm2/lib/formats/writers/abstract.py @@ -4,8 +4,8 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.base.files import FileManager -from hyo2.soundspeed.formats.abstract import AbstractFormat +from hyo2.ssm2.lib.base.files import FileManager +from hyo2.ssm2.lib.formats.abstract import AbstractFormat class AbstractWriter(AbstractFormat, metaclass=ABCMeta): diff --git a/hyo2/ssm2/lib/formats/writers/asvp.py b/hyo2/ssm2/lib/formats/writers/asvp.py index 844fb512..888963f1 100644 --- a/hyo2/ssm2/lib/formats/writers/asvp.py +++ b/hyo2/ssm2/lib/formats/writers/asvp.py @@ -1,13 +1,14 @@ import functools +import logging import math import operator -import logging + import numpy as np -from hyo2.soundspeed import __version__ -from hyo2.soundspeed.formats.writers.abstract import AbstractTextWriter -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.profile.oceanography import Oceanography as Oc +from hyo2.ssm2 import __version__ +from hyo2.ssm2.lib.formats.writers.abstract import AbstractTextWriter +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.profile.oceanography import Oceanography as Oc logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/formats/writers/calc.py b/hyo2/ssm2/lib/formats/writers/calc.py index b1deebbf..bb41cacd 100644 --- a/hyo2/ssm2/lib/formats/writers/calc.py +++ b/hyo2/ssm2/lib/formats/writers/calc.py @@ -1,7 +1,7 @@ import logging import numpy as np -from hyo2.soundspeed.formats.writers.abstract import AbstractTextWriter +from hyo2.ssm2.lib.formats.writers.abstract import AbstractTextWriter logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/formats/writers/caris.py b/hyo2/ssm2/lib/formats/writers/caris.py index abb665be..14cad6b1 100644 --- a/hyo2/ssm2/lib/formats/writers/caris.py +++ b/hyo2/ssm2/lib/formats/writers/caris.py @@ -4,7 +4,7 @@ import numpy as np -from hyo2.soundspeed.formats.writers.abstract import AbstractTextWriter +from hyo2.ssm2.lib.formats.writers.abstract import AbstractTextWriter logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/formats/writers/csv.py b/hyo2/ssm2/lib/formats/writers/csv.py index 3705bc9f..ddff267e 100644 --- a/hyo2/ssm2/lib/formats/writers/csv.py +++ b/hyo2/ssm2/lib/formats/writers/csv.py @@ -1,7 +1,7 @@ import numpy as np import logging -from hyo2.soundspeed.formats.writers.abstract import AbstractTextWriter +from hyo2.ssm2.lib.formats.writers.abstract import AbstractTextWriter logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/formats/writers/elac.py b/hyo2/ssm2/lib/formats/writers/elac.py index 3fcfc266..b61d9de7 100644 --- a/hyo2/ssm2/lib/formats/writers/elac.py +++ b/hyo2/ssm2/lib/formats/writers/elac.py @@ -1,8 +1,8 @@ import numpy as np import logging -from hyo2.soundspeed.formats.writers.abstract import AbstractTextWriter -from hyo2.soundspeed.profile.oceanography import Oceanography as Oc +from hyo2.ssm2.lib.formats.writers.abstract import AbstractTextWriter +from hyo2.ssm2.lib.profile.oceanography import Oceanography as Oc logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/formats/writers/hipap.py b/hyo2/ssm2/lib/formats/writers/hipap.py index 63b32322..1f2a1edc 100644 --- a/hyo2/ssm2/lib/formats/writers/hipap.py +++ b/hyo2/ssm2/lib/formats/writers/hipap.py @@ -1,7 +1,7 @@ import numpy as np import logging -from hyo2.soundspeed.formats.writers.abstract import AbstractTextWriter +from hyo2.ssm2.lib.formats.writers.abstract import AbstractTextWriter logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/formats/writers/hypack.py b/hyo2/ssm2/lib/formats/writers/hypack.py index 920a14da..a8796c4a 100644 --- a/hyo2/ssm2/lib/formats/writers/hypack.py +++ b/hyo2/ssm2/lib/formats/writers/hypack.py @@ -1,7 +1,7 @@ import numpy as np import logging -from hyo2.soundspeed.formats.writers.abstract import AbstractTextWriter +from hyo2.ssm2.lib.formats.writers.abstract import AbstractTextWriter logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/formats/writers/ixblue.py b/hyo2/ssm2/lib/formats/writers/ixblue.py index bb02c876..023f9c80 100644 --- a/hyo2/ssm2/lib/formats/writers/ixblue.py +++ b/hyo2/ssm2/lib/formats/writers/ixblue.py @@ -1,7 +1,7 @@ import numpy as np import logging -from hyo2.soundspeed.formats.writers.abstract import AbstractTextWriter +from hyo2.ssm2.lib.formats.writers.abstract import AbstractTextWriter logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/formats/writers/ncei.py b/hyo2/ssm2/lib/formats/writers/ncei.py index 53ef1234..459a3ccf 100644 --- a/hyo2/ssm2/lib/formats/writers/ncei.py +++ b/hyo2/ssm2/lib/formats/writers/ncei.py @@ -8,10 +8,10 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed import __version__ as ssp_version -from hyo2.soundspeed import __doc__ as ssp_name -from hyo2.soundspeed.formats.writers.abstract import AbstractWriter -from hyo2.soundspeed.profile.dicts import Dicts +from hyo2.ssm2 import __version__ as ssp_version +from hyo2.ssm2.lib import __doc__ as ssp_name +from hyo2.ssm2.lib.formats.writers.abstract import AbstractWriter +from hyo2.ssm2.lib.profile.dicts import Dicts class Ncei(AbstractWriter): diff --git a/hyo2/ssm2/lib/formats/writers/qps.py b/hyo2/ssm2/lib/formats/writers/qps.py index 6b8c2a69..3b92fba1 100644 --- a/hyo2/ssm2/lib/formats/writers/qps.py +++ b/hyo2/ssm2/lib/formats/writers/qps.py @@ -5,8 +5,8 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.formats.writers.abstract import AbstractTextWriter -from hyo2.soundspeed.profile.dicts import Dicts +from hyo2.ssm2.lib.formats.writers.abstract import AbstractTextWriter +from hyo2.ssm2.lib.profile.dicts import Dicts class Qps(AbstractTextWriter): diff --git a/hyo2/ssm2/lib/formats/writers/sonardyne.py b/hyo2/ssm2/lib/formats/writers/sonardyne.py index 2160a61c..0459d763 100644 --- a/hyo2/ssm2/lib/formats/writers/sonardyne.py +++ b/hyo2/ssm2/lib/formats/writers/sonardyne.py @@ -3,10 +3,10 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed import __version__ as ssp_version -from hyo2.soundspeed import __doc__ as ssp_name -from hyo2.soundspeed.formats.writers.abstract import AbstractTextWriter -from hyo2.soundspeed.profile.dicts import Dicts +from hyo2.ssm2 import __version__ as ssp_version +from hyo2.ssm2.lib import __doc__ as ssp_name +from hyo2.ssm2.lib.formats.writers.abstract import AbstractTextWriter +from hyo2.ssm2.lib.profile.dicts import Dicts class Sonardyne(AbstractTextWriter): diff --git a/hyo2/ssm2/lib/formats/writers/unb.py b/hyo2/ssm2/lib/formats/writers/unb.py index 02e1e77f..02e1a504 100644 --- a/hyo2/ssm2/lib/formats/writers/unb.py +++ b/hyo2/ssm2/lib/formats/writers/unb.py @@ -1,9 +1,9 @@ import numpy as np import logging -from hyo2.soundspeed import __version__ as ssp_version -from hyo2.soundspeed import __doc__ as ssp_name -from hyo2.soundspeed.formats.writers.abstract import AbstractTextWriter +from hyo2.ssm2 import __version__ as ssp_version +from hyo2.ssm2.lib import __doc__ as ssp_name +from hyo2.ssm2.lib.formats.writers.abstract import AbstractTextWriter logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/listener/listeners.py b/hyo2/ssm2/lib/listener/listeners.py index fe3af6a8..cd96be4e 100644 --- a/hyo2/ssm2/lib/listener/listeners.py +++ b/hyo2/ssm2/lib/listener/listeners.py @@ -2,12 +2,12 @@ import logging from typing import TYPE_CHECKING -from hyo2.soundspeed.listener.sis.sis import Sis -from hyo2.soundspeed.listener.sippican.sippican import Sippican -from hyo2.soundspeed.listener.nmea.nmea import Nmea -from hyo2.soundspeed.listener.mvp.mvp import Mvp +from hyo2.ssm2.lib.listener.sis.sis import Sis +from hyo2.ssm2.lib.listener.sippican.sippican import Sippican +from hyo2.ssm2.lib.listener.nmea.nmea import Nmea +from hyo2.ssm2.lib.listener.mvp.mvp import Mvp if TYPE_CHECKING: - from hyo2.soundspeed.soundspeed import SoundSpeedLibrary + from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/listener/mvp/mvp.py b/hyo2/ssm2/lib/listener/mvp/mvp.py index 0af64640..c4b27cea 100644 --- a/hyo2/ssm2/lib/listener/mvp/mvp.py +++ b/hyo2/ssm2/lib/listener/mvp/mvp.py @@ -3,8 +3,8 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.listener.abstract import AbstractListener -from hyo2.soundspeed.formats.readers import mvp +from hyo2.ssm2.lib.listener.abstract import AbstractListener +from hyo2.ssm2.lib.formats.readers import mvp class Mvp(AbstractListener): diff --git a/hyo2/ssm2/lib/listener/nmea/nmea.py b/hyo2/ssm2/lib/listener/nmea/nmea.py index c6d56cc2..fe1c9471 100644 --- a/hyo2/ssm2/lib/listener/nmea/nmea.py +++ b/hyo2/ssm2/lib/listener/nmea/nmea.py @@ -2,9 +2,9 @@ from datetime import datetime from typing import Optional, Union -from hyo2.soundspeed.formats.nmea_0183.nmea_0183_gga import Nmea0183GGA -from hyo2.soundspeed.formats.nmea_0183.nmea_0183_gll import Nmea0183GLL -from hyo2.soundspeed.listener.abstract import AbstractListener +from hyo2.ssm2.lib.formats.nmea_0183.nmea_0183_gga import Nmea0183GGA +from hyo2.ssm2.lib.formats.nmea_0183.nmea_0183_gll import Nmea0183GLL +from hyo2.ssm2.lib.listener.abstract import AbstractListener logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/listener/seacat/sbe_serialcomms.py b/hyo2/ssm2/lib/listener/seacat/sbe_serialcomms.py index 8e61f608..b526267e 100644 --- a/hyo2/ssm2/lib/listener/seacat/sbe_serialcomms.py +++ b/hyo2/ssm2/lib/listener/seacat/sbe_serialcomms.py @@ -13,8 +13,8 @@ import serial # for serial/usb port communication with SBE instruments -from hyo2.soundspeed.formats.readers import seabird as sbe_constants -from hyo2.soundspeedmanager import __version__ as ssm_version +from hyo2.ssm2.lib.formats.readers import seabird as sbe_constants +from hyo2.ssm2.app.gui.soundspeedmanager import __version__ as ssm_version import logging diff --git a/hyo2/ssm2/lib/listener/seacat/seacat_emulator.py b/hyo2/ssm2/lib/listener/seacat/seacat_emulator.py index 70ac3c1d..20118b36 100644 --- a/hyo2/ssm2/lib/listener/seacat/seacat_emulator.py +++ b/hyo2/ssm2/lib/listener/seacat/seacat_emulator.py @@ -3,7 +3,7 @@ import traceback try: - from hyo2.soundspeed.listener.seacat.sbe_serialcomms import SeacatComms, UTF8Serial + from hyo2.ssm2.lib.listener.seacat.sbe_serialcomms import SeacatComms, UTF8Serial except Exception: print("Seacat serial communications module not found or failed to load") diff --git a/hyo2/ssm2/lib/listener/sippican/sippican.py b/hyo2/ssm2/lib/listener/sippican/sippican.py index 8ea400e2..55c92c97 100644 --- a/hyo2/ssm2/lib/listener/sippican/sippican.py +++ b/hyo2/ssm2/lib/listener/sippican/sippican.py @@ -3,10 +3,10 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.listener.abstract import AbstractListener +from hyo2.ssm2.lib.listener.abstract import AbstractListener -# from hyo2.soundspeed.formats.readers import sippican +# from hyo2.ssm2.lib.formats.readers import sippican class Sippican(AbstractListener): diff --git a/hyo2/ssm2/lib/listener/sis/sis.py b/hyo2/ssm2/lib/listener/sis/sis.py index 0a4863fc..b488a9a0 100644 --- a/hyo2/ssm2/lib/listener/sis/sis.py +++ b/hyo2/ssm2/lib/listener/sis/sis.py @@ -8,11 +8,11 @@ from datetime import datetime from typing import Optional, Union -from hyo2.soundspeed.listener.abstract import AbstractListener -from hyo2.soundspeed.formats import km, kmall -from hyo2.soundspeed.profile.profilelist import ProfileList -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.formats.writers.asvp import Asvp +from hyo2.ssm2.lib.listener.abstract import AbstractListener +from hyo2.ssm2.lib.formats import km, kmall +from hyo2.ssm2.lib.profile.profilelist import ProfileList +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.formats.writers.asvp import Asvp logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/profile/metadata.py b/hyo2/ssm2/lib/profile/metadata.py index 924883b1..960382fe 100644 --- a/hyo2/ssm2/lib/profile/metadata.py +++ b/hyo2/ssm2/lib/profile/metadata.py @@ -4,7 +4,7 @@ logger = logging.getLogger(__name__) -from hyo2.soundspeed.profile.dicts import Dicts +from hyo2.ssm2.lib.profile.dicts import Dicts class Metadata: diff --git a/hyo2/ssm2/lib/profile/profile.py b/hyo2/ssm2/lib/profile/profile.py index 4cf4fc28..f7feb09f 100644 --- a/hyo2/ssm2/lib/profile/profile.py +++ b/hyo2/ssm2/lib/profile/profile.py @@ -1,18 +1,19 @@ +import logging +import math import os import time -import math + import numpy as np -import logging -from hyo2.soundspeed import __version__ as soundspeed_version -from hyo2.soundspeed.profile.metadata import Metadata -from hyo2.soundspeed.profile.samples import Samples -from hyo2.soundspeed.profile.more import More -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.profile.oceanography import Oceanography as Oc -from hyo2.soundspeed.profile.ray_tracing.ray_tracing import RayTracing -from hyo2.soundspeed.profile.ray_tracing.ray_path import RayPath -from hyo2.soundspeed.profile.ray_tracing.tracedprofile import TracedProfile +from hyo2.ssm2 import __version__ as soundspeed_version +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.profile.metadata import Metadata +from hyo2.ssm2.lib.profile.more import More +from hyo2.ssm2.lib.profile.oceanography import Oceanography as Oc +from hyo2.ssm2.lib.profile.ray_tracing.ray_path import RayPath +from hyo2.ssm2.lib.profile.ray_tracing.ray_tracing import RayTracing +from hyo2.ssm2.lib.profile.ray_tracing.tracedprofile import TracedProfile +from hyo2.ssm2.lib.profile.samples import Samples logger = logging.getLogger(__name__) @@ -406,7 +407,7 @@ def cosine_smooth(self): valid_and_smoothed = self.proc.source[self.proc_valid] == Dicts.sources['smoothing'] # noinspection PyUnresolvedReferences - if (valid_and_smoothed == True).all(): + if (valid_and_smoothed is True).all(): return # logger.debug(valid_and_smoothed) @@ -1371,11 +1372,12 @@ def compare_profile(self, profile, angle): else: tt_inc = 0.01 - draft1 = 0.0 # TODO - draft2 = 0.0 # TODO + # TODO: Retrieve drafts + draft1 = 0.0 + draft2 = 0.0 draft = max(draft1, draft2) - # Generate the travel time table for the two profiles. + # Generate the travel timetable for the two profiles. ray1 = self.compute_ray_paths(draft, [angle], res=tt_inc)[0] ray2 = profile.compute_ray_paths(draft, [angle], res=tt_inc)[0] diff --git a/hyo2/ssm2/lib/profile/profilelist.py b/hyo2/ssm2/lib/profile/profilelist.py index 269e5db7..46268b20 100644 --- a/hyo2/ssm2/lib/profile/profilelist.py +++ b/hyo2/ssm2/lib/profile/profilelist.py @@ -1,8 +1,8 @@ import logging from datetime import datetime -from hyo2.soundspeed.profile.profile import Profile -from hyo2.soundspeed.profile.dicts import Dicts +from hyo2.ssm2.lib.profile.profile import Profile +from hyo2.ssm2.lib.profile.dicts import Dicts logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/profile/ray_tracing/plot_tracedprofiles.py b/hyo2/ssm2/lib/profile/ray_tracing/plot_tracedprofiles.py index 86a4cfc1..fe5ab623 100644 --- a/hyo2/ssm2/lib/profile/ray_tracing/plot_tracedprofiles.py +++ b/hyo2/ssm2/lib/profile/ray_tracing/plot_tracedprofiles.py @@ -9,7 +9,7 @@ from matplotlib import pyplot as plt import logging -from hyo2.soundspeed.profile.ray_tracing.diff_tracedprofiles import DiffTracedProfiles +from hyo2.ssm2.lib.profile.ray_tracing.diff_tracedprofiles import DiffTracedProfiles # matplotlib.use('qt5agg') logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/server/server.py b/hyo2/ssm2/lib/server/server.py index 1049e076..a92e3bc9 100644 --- a/hyo2/ssm2/lib/server/server.py +++ b/hyo2/ssm2/lib/server/server.py @@ -5,7 +5,7 @@ from threading import Thread, Event from typing import List, Optional, TYPE_CHECKING if TYPE_CHECKING: - from hyo2.soundspeed.soundspeed import SoundSpeedLibrary + from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary logger = logging.getLogger(__name__) diff --git a/hyo2/ssm2/lib/soundspeed.py b/hyo2/ssm2/lib/soundspeed.py index a8240836..7f0bdadd 100644 --- a/hyo2/ssm2/lib/soundspeed.py +++ b/hyo2/ssm2/lib/soundspeed.py @@ -1,38 +1,37 @@ -import time +import copy +import logging import os import re -import copy import shutil +import time import traceback -import logging from typing import Optional, TYPE_CHECKING + from appdirs import user_data_dir -from hyo2.abc2.lib.progress.abstract_progress import AbstractProgress -from hyo2.abc2.lib.progress.cli_progress import CliProgress from hyo2.abc2.lib.gdal_aux import GdalAux from hyo2.abc2.lib.helper import Helper - -from hyo2.soundspeed import lib_info -from hyo2.soundspeed import formats -from hyo2.soundspeed.atlas.atlases import Atlases -from hyo2.soundspeed.base.callbacks.abstract_callbacks import AbstractCallbacks -from hyo2.soundspeed.base.callbacks.cli_callbacks import CliCallbacks -from hyo2.soundspeed.base.setup import Setup -from hyo2.soundspeed.db.db import ProjectDb -from hyo2.soundspeed.listener.listeners import Listeners -from hyo2.soundspeed.profile.profilelist import ProfileList -from hyo2.soundspeed.profile.dicts import Dicts -from hyo2.soundspeed.server.server import Server -from hyo2.soundspeed.profile.ray_tracing.tracedprofile import TracedProfile -from hyo2.soundspeed.profile.ray_tracing.diff_tracedprofiles import DiffTracedProfiles -from hyo2.soundspeed.profile.ray_tracing.plot_tracedprofiles import PlotTracedProfiles +from hyo2.abc2.lib.progress.abstract_progress import AbstractProgress +from hyo2.abc2.lib.progress.cli_progress import CliProgress +from hyo2.ssm2 import lib_info +from hyo2.ssm2.lib import formats +from hyo2.ssm2.lib.atlas.atlases import Atlases +from hyo2.ssm2.lib.base.callbacks.abstract_callbacks import AbstractCallbacks +from hyo2.ssm2.lib.base.callbacks.cli_callbacks import CliCallbacks +from hyo2.ssm2.lib.base.setup import Setup +from hyo2.ssm2.lib.db.db import ProjectDb +from hyo2.ssm2.lib.listener.listeners import Listeners +from hyo2.ssm2.lib.profile.dicts import Dicts +from hyo2.ssm2.lib.profile.profilelist import ProfileList +from hyo2.ssm2.lib.profile.ray_tracing.diff_tracedprofiles import DiffTracedProfiles +from hyo2.ssm2.lib.profile.ray_tracing.plot_tracedprofiles import PlotTracedProfiles +from hyo2.ssm2.lib.profile.ray_tracing.tracedprofile import TracedProfile +from hyo2.ssm2.lib.server.server import Server if TYPE_CHECKING: from datetime import datetime - from hyo2.soundspeed.profile.profile import Profile - from hyo2.soundspeed.db.export import ExportDbFields - + from hyo2.ssm2.lib.profile.profile import Profile + from hyo2.ssm2.lib.db.export import ExportDbFields logger = logging.getLogger(__name__) @@ -406,7 +405,7 @@ def has_mvp_to_process(self) -> bool: return False return self.listeners.mvp_to_process - + # --- import data def import_data(self, data_path: str, data_format: str, skip_atlas: bool = False) -> None: @@ -954,34 +953,6 @@ def retrieve_sis(self) -> None: self.ssp = ssp_list self.progress.end() - def retrieve_nmea(self) -> None: - """Retrieve data from NMEA""" - if not self.use_nmea_0183(): - raise RuntimeError("use NMEA 0183 option is disabled") - - self.progress.start(text="Retrieve from NMEA 0183") - - if not self.listen_nmea(): - raise RuntimeError("unable to listen NMEA") - - # try to retrieve the location from NMEA - lat = None - lon = None - if self.listeners.nmea.nav: - from_nmea = self.cb.ask_location_from_nmea() - if from_nmea: - lat, lon = self.listeners.nmea.nav_latitude, self.listeners.nmea.nav_longitude - # if we don't have a location, ask user - if (lat is None) or (lon is None): - lat, lon = self.cb.ask_location() - if (lat is None) or (lon is None): - self.progress.end() - raise RuntimeError("missing geographic location required for database lookup") - - ssp.meta.latitude = lat - ssp.meta.longitude = lon - self.progress.end() - # --- export data def export_data(self, data_formats: list, data_paths: Optional[dict], @@ -1124,7 +1095,7 @@ def list_projects(self) -> list: prj_list.append(os.path.splitext(os.path.basename(f))[0]) break prj_list.sort() - + return prj_list def remove_data(self) -> bool: @@ -1226,9 +1197,10 @@ def db_import_data_from_db(self, input_db_path: str) -> tuple: logger.debug('current profiles: %s' % len(cur_lst)) # create list of current pks - cur_pks = list() + cur_pks = list() # type: list[str] for cur_ssp in cur_lst: - cur_pks.append("%s;%s" % (cur_ssp[1], cur_ssp[2])) + cur_key = "%s;%s" % (cur_ssp[1], cur_ssp[2]) + cur_pks.append(cur_key) # print(cur_pks) # copy after having checked that the profile is not already there @@ -1856,12 +1828,6 @@ def prepare_sis(self, apply_thin: Optional[bool] = True, apply_12k: Optional[boo self.cur.insert_sis_speed(depth=12000.0, speed=1675.8, src=Dicts.sources['sis'], cond=30.9, temp=2.46, sal=34.70) - # si = self.cur.sis_thinned - # logger.debug('last sample: d: %s, temp: %s, sal: %s, speed: %s [%s|%s]' - # % (self.cur.sis.depth[si][-1], self.cur.sis.temp[si][-1], - # self.cur.sis.sal[si][-1], self.cur.sis.speed[si][-1], - # self.cur.sis.source[si][-1], self.cur.sis.flag[si][-1])) - return True # --- clear data @@ -2123,7 +2089,7 @@ def listen_sippican(self) -> bool: return self.listeners.listen_sippican() def listen_nmea(self) -> bool: - return self.listeners.listen_nmea() + return self.listeners.listen_nmea() def listen_mvp(self) -> bool: return self.listeners.listen_mvp() @@ -2135,7 +2101,7 @@ def stop_listen_sippican(self) -> bool: return self.listeners.stop_listen_sippican() def stop_listen_nmea(self) -> bool: - return self.listeners.stop_listen_nmea() + return self.listeners.stop_listen_nmea() def stop_listen_mvp(self) -> bool: return self.listeners.stop_listen_mvp() diff --git a/hyo2/ssm2/lib/temp/coordinates.py b/hyo2/ssm2/lib/temp/coordinates.py index c47338a3..003ce2c7 100644 --- a/hyo2/ssm2/lib/temp/coordinates.py +++ b/hyo2/ssm2/lib/temp/coordinates.py @@ -1,4 +1,4 @@ -# TODO: Velocipy legacy: to be cleaned, then moved under hyo2.soundspeed.base +# TODO: Velocipy legacy: to be cleaned, then moved under hyo2.ssm2.lib.base """ coordinates.py James Hiebert diff --git a/hyo2/ssm2/lib/temp/regex_helpers.py b/hyo2/ssm2/lib/temp/regex_helpers.py index 0d47b49e..7831e76c 100644 --- a/hyo2/ssm2/lib/temp/regex_helpers.py +++ b/hyo2/ssm2/lib/temp/regex_helpers.py @@ -1,4 +1,4 @@ -# TODO: Velocipy legacy: to be cleaned, then moved under hyo2.soundspeed.base +# TODO: Velocipy legacy: to be cleaned, then moved under hyo2.ssm2.lib.base # builtins import datetime @@ -6,12 +6,12 @@ from copy import deepcopy, copy from warnings import warn -import hyo2.soundspeed.profile +import hyo2.ssm2.lib.profile # 3rd party libs import numpy -from hyo2.soundspeed.profile import dicts +from hyo2.ssm2.lib.profile import dicts # our custom package -from hyo2.soundspeed.temp import coordinates +from hyo2.ssm2.lib.temp import coordinates """ This module is using a lot of Regular Expressions and numpy.fromregex to read file formats. @@ -311,7 +311,7 @@ def AddProfile(self, p2, names=[]): return p3 def ConvertToSoundSpeedProfile(self): - p = hyo2.soundspeed.profile.profile.Profile() + p = hyo2.ssm2.lib.profile.profile.Profile() # translate metadata p.meta.sensor_type = dicts.Dicts.sensor_types.get(self.metadata.get('ImportFormat', ''), dicts.Dicts.sensor_types['Unknown']) diff --git a/scripts/reduce_netcdf_woa09.py b/scripts/reduce_netcdf_woa09.py index a803f5cd..43c75eb3 100644 --- a/scripts/reduce_netcdf_woa09.py +++ b/scripts/reduce_netcdf_woa09.py @@ -3,7 +3,7 @@ from netCDF4 import Dataset -from hyo2.soundspeedmanager import AppInfo +from hyo2.ssm2.app.gui.soundspeedmanager import AppInfo logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger(__name__) diff --git a/scripts/reduce_netcdf_woa13.py b/scripts/reduce_netcdf_woa13.py index f117d95c..cd8612f9 100644 --- a/scripts/reduce_netcdf_woa13.py +++ b/scripts/reduce_netcdf_woa13.py @@ -3,7 +3,7 @@ from netCDF4 import Dataset -from hyo2.soundspeedmanager import AppInfo +from hyo2.ssm2.app.gui.soundspeedmanager import AppInfo logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger(__name__) diff --git a/scripts/reduce_netcdf_woa18.py b/scripts/reduce_netcdf_woa18.py index b9384112..e64ddcf3 100644 --- a/scripts/reduce_netcdf_woa18.py +++ b/scripts/reduce_netcdf_woa18.py @@ -3,7 +3,7 @@ from netCDF4 import Dataset -from hyo2.soundspeedmanager import AppInfo +from hyo2.ssm2.app.gui.soundspeedmanager import AppInfo logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger(__name__) diff --git a/setup.py b/setup.py index 5b29ec63..1aea3ed6 100644 --- a/setup.py +++ b/setup.py @@ -42,10 +42,11 @@ def find_version(*file_paths): ]), package_data={ "": [ - 'soundspeed/listener/seacat/CONFIG/*.*', - 'soundspeedmanager/media/*.*', - 'soundspeedmanager/media/LICENSE', - 'soundspeedsettings/media/*.*', + 'hyo2/lib/listener/seacat/CONFIG/*.*', + 'hyo2/app/gui/soundspeedmanager/media/*.*', + 'hyo2/app/gui/soundspeedmanager/media/LICENSE', + 'hyo2/app/gui/soundspeedsettings/media/*.*', + 'hyo2/app/gui/ssm_sis/media/*.*' ], }, zip_safe=False, @@ -57,7 +58,7 @@ def find_version(*file_paths): install_requires=[ "appdirs", "gsw", - "hyo2.abc2>=2.2.1", + "hyo2.abc2>=2.2.2", "matplotlib", "netCDF4", "numpy", @@ -67,11 +68,12 @@ def find_version(*file_paths): "scipy" # "PySide6" ], - python_requires='>=3.5', + python_requires='>=3.8', entry_points={ "gui_scripts": [ - 'sound_speed_manager = hyo2.soundspeedmanager.gui:gui', - 'sound_speed_settings = hyo2.soundspeedsettings.gui:gui', + 'sound_speed_manager = hyo2.ssm2.app.gui.soundspeedmanager.gui:gui', + 'sound_speed_settings = hyo2.ssm2.app.gui.soundspeedsettings.gui:gui', + 'ssm_sis = hyo2.ssm2.app.gui.ssm_sis.gui:gui' ], "console_scripts": [ ], diff --git a/tests/soundspeed/atlas/test_atlases.py b/tests/soundspeed/atlas/test_atlases.py index 9bcfdcfe..514a4963 100644 --- a/tests/soundspeed/atlas/test_atlases.py +++ b/tests/soundspeed/atlas/test_atlases.py @@ -2,9 +2,9 @@ import os import shutil -from hyo2.soundspeedmanager import AppInfo -from hyo2.soundspeed.atlas import atlases -from hyo2.soundspeed.soundspeed import SoundSpeedLibrary +from hyo2.ssm2.app.gui.soundspeedmanager import AppInfo +from hyo2.ssm2.lib.atlas import atlases +from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary class TestSoundSpeedAtlasAtlases(unittest.TestCase): diff --git a/tests/soundspeed/atlas/test_regofsoffline.py b/tests/soundspeed/atlas/test_regofsoffline.py index 18ea2de5..3838302d 100644 --- a/tests/soundspeed/atlas/test_regofsoffline.py +++ b/tests/soundspeed/atlas/test_regofsoffline.py @@ -3,9 +3,9 @@ import shutil import logging -from hyo2.soundspeedmanager import AppInfo -from hyo2.soundspeed.atlas.regofsoffline import RegOfsOffline -from hyo2.soundspeed.soundspeed import SoundSpeedLibrary +from hyo2.ssm2.app.gui.soundspeedmanager import AppInfo +from hyo2.ssm2.lib.atlas.regofsoffline import RegOfsOffline +from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary logger = logging.getLogger() diff --git a/tests/soundspeed/atlas/test_regofsonline.py b/tests/soundspeed/atlas/test_regofsonline.py index f08cafec..643e6fe8 100644 --- a/tests/soundspeed/atlas/test_regofsonline.py +++ b/tests/soundspeed/atlas/test_regofsonline.py @@ -3,9 +3,9 @@ import shutil import logging -from hyo2.soundspeedmanager import AppInfo -from hyo2.soundspeed.atlas.regofsonline import RegOfsOnline -from hyo2.soundspeed.soundspeed import SoundSpeedLibrary +from hyo2.ssm2.app.gui.soundspeedmanager import AppInfo +from hyo2.ssm2.lib.atlas.regofsonline import RegOfsOnline +from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary logger = logging.getLogger() diff --git a/tests/soundspeed/atlas/test_rtofs.py b/tests/soundspeed/atlas/test_rtofs.py index 53d13768..f3da8b78 100644 --- a/tests/soundspeed/atlas/test_rtofs.py +++ b/tests/soundspeed/atlas/test_rtofs.py @@ -3,9 +3,9 @@ import shutil import logging -from hyo2.soundspeedmanager import AppInfo -from hyo2.soundspeed.atlas.rtofs import Rtofs -from hyo2.soundspeed.soundspeed import SoundSpeedLibrary +from hyo2.ssm2.app.gui.soundspeedmanager import AppInfo +from hyo2.ssm2.lib.atlas.rtofs import Rtofs +from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary logger = logging.getLogger() diff --git a/tests/soundspeed/base/callbacks/test_test_callbacks.py b/tests/soundspeed/base/callbacks/test_test_callbacks.py index 53495a04..9bc4eb90 100644 --- a/tests/soundspeed/base/callbacks/test_test_callbacks.py +++ b/tests/soundspeed/base/callbacks/test_test_callbacks.py @@ -1,7 +1,7 @@ import unittest import os -from hyo2.soundspeed.base.callbacks.fake_callbacks import FakeCallbacks +from hyo2.ssm2.lib.base.callbacks.fake_callbacks import FakeCallbacks class TestSoundSpeedTestCallbacks(unittest.TestCase): diff --git a/tests/soundspeed/base/test_basedb.py b/tests/soundspeed/base/test_basedb.py index f0279eda..c37bcd0b 100644 --- a/tests/soundspeed/base/test_basedb.py +++ b/tests/soundspeed/base/test_basedb.py @@ -1,7 +1,7 @@ import unittest import os -from hyo2.soundspeed.base.basedb import BaseDb +from hyo2.ssm2.lib.base.basedb import BaseDb class TestSoundSpeedBaseDbPoint(unittest.TestCase): diff --git a/tests/soundspeed/base/test_files.py b/tests/soundspeed/base/test_files.py index fcae6e79..716b196e 100644 --- a/tests/soundspeed/base/test_files.py +++ b/tests/soundspeed/base/test_files.py @@ -2,8 +2,8 @@ import os from io import IOBase -from hyo2.soundspeedmanager import app_info -from hyo2.soundspeed.base import files +from hyo2.ssm2.app.gui.soundspeedmanager import app_info +from hyo2.ssm2.lib.base import files class TestSoundSpeedBaseFiles(unittest.TestCase): diff --git a/tests/soundspeed/base/test_geodesy.py b/tests/soundspeed/base/test_geodesy.py index 5f8b8b3f..b3fa156b 100644 --- a/tests/soundspeed/base/test_geodesy.py +++ b/tests/soundspeed/base/test_geodesy.py @@ -1,7 +1,7 @@ import unittest import sys -from hyo2.soundspeed.base.geodesy import Geodesy +from hyo2.ssm2.lib.base.geodesy import Geodesy from osgeo import gdal diff --git a/tests/soundspeed/base/test_setup.py b/tests/soundspeed/base/test_setup.py index 79af17d3..2f67764c 100644 --- a/tests/soundspeed/base/test_setup.py +++ b/tests/soundspeed/base/test_setup.py @@ -1,7 +1,7 @@ import unittest import os -from hyo2.soundspeed.base.setup import Setup +from hyo2.ssm2.lib.base.setup import Setup class TestSoundSpeedSetup(unittest.TestCase): diff --git a/tests/soundspeed/base/test_setup_db.py b/tests/soundspeed/base/test_setup_db.py index faf2829c..fa8e447a 100644 --- a/tests/soundspeed/base/test_setup_db.py +++ b/tests/soundspeed/base/test_setup_db.py @@ -1,7 +1,7 @@ import unittest import os -from hyo2.soundspeed.base.setup_db import SetupDb +from hyo2.ssm2.lib.base.setup_db import SetupDb class TestSoundSpeedSetupDb(unittest.TestCase): @@ -84,7 +84,7 @@ def test_add_and_remove_client_from_client_list(self): def test_compare_setup_version(self): db = SetupDb(data_folder=self.data_folder, db_file=self.db_name) - self.assertLessEqual(db.setup_version, 5) + self.assertLessEqual(db.setup_version, 6) db.close() def test_checked_use_woa09(self): diff --git a/tests/soundspeed/base/test_testing.py b/tests/soundspeed/base/test_testing.py index 867eb0ef..9b23bf97 100644 --- a/tests/soundspeed/base/test_testing.py +++ b/tests/soundspeed/base/test_testing.py @@ -1,7 +1,7 @@ import unittest import os -from hyo2.soundspeed.base.testing import SoundSpeedTesting +from hyo2.ssm2.lib.base.testing import SoundSpeedTesting class TestSoundSpeedTesting(unittest.TestCase): diff --git a/tests/soundspeed/db/test_db.py b/tests/soundspeed/db/test_db.py index 4a405b71..78373f4c 100644 --- a/tests/soundspeed/db/test_db.py +++ b/tests/soundspeed/db/test_db.py @@ -3,8 +3,8 @@ from datetime import datetime import numpy as np -from hyo2.soundspeed.soundspeed import SoundSpeedLibrary -from hyo2.soundspeed.profile.profilelist import ProfileList +from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary +from hyo2.ssm2.lib.profile.profilelist import ProfileList class TestSoundSpeedDb(unittest.TestCase): diff --git a/tests/soundspeed/formats/test_formats.py b/tests/soundspeed/formats/test_formats.py index d29656be..3efa9d7c 100644 --- a/tests/soundspeed/formats/test_formats.py +++ b/tests/soundspeed/formats/test_formats.py @@ -2,10 +2,10 @@ import os import logging -from hyo2.soundspeedmanager import AppInfo -from hyo2.soundspeed.soundspeed import SoundSpeedLibrary -from hyo2.soundspeed.base.callbacks.fake_callbacks import FakeCallbacks -from hyo2.soundspeed.base.testing import SoundSpeedTesting +from hyo2.ssm2.app.gui.soundspeedmanager import AppInfo +from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary +from hyo2.ssm2.lib.base.callbacks.fake_callbacks import FakeCallbacks +from hyo2.ssm2.lib.base.testing import SoundSpeedTesting logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger(__name__) diff --git a/tests/soundspeed/profile/test_oceanography.py b/tests/soundspeed/profile/test_oceanography.py index 47a26971..752b10f5 100644 --- a/tests/soundspeed/profile/test_oceanography.py +++ b/tests/soundspeed/profile/test_oceanography.py @@ -1,7 +1,7 @@ import unittest import numpy as np -from hyo2.soundspeed.profile.oceanography import Oceanography as Oc +from hyo2.ssm2.lib.profile.oceanography import Oceanography as Oc class TestSoundSpeedOceanography(unittest.TestCase): diff --git a/tests/soundspeed/test_init.py b/tests/soundspeed/test_init.py index e2084141..d23a08fd 100644 --- a/tests/soundspeed/test_init.py +++ b/tests/soundspeed/test_init.py @@ -1,6 +1,6 @@ import unittest -from hyo2.soundspeed import lib_info +from hyo2.ssm2 import lib_info class TestSoundSpeedInit(unittest.TestCase): @@ -31,11 +31,11 @@ def test_has_lgpl_in_license(self): self.assertTrue("lgpl" in lib_info.lib_license.lower()) def test_has_copyright(self): - from hyo2.soundspeed import __copyright__ + from hyo2.ssm2 import __copyright__ self.assertIsNot(len(__copyright__), 0) def test_has_current_year_in_copyright(self): - from hyo2.soundspeed import __copyright__ + from hyo2.ssm2 import __copyright__ from datetime import datetime self.assertTrue((("%s" % (datetime.now().year - 1)) in __copyright__) or (("%s" % datetime.now().year) in __copyright__) or diff --git a/tests/soundspeed/test_new_project.py b/tests/soundspeed/test_new_project.py index 35af9c1e..071618ea 100644 --- a/tests/soundspeed/test_new_project.py +++ b/tests/soundspeed/test_new_project.py @@ -1,7 +1,7 @@ import unittest -from hyo2.soundspeedmanager import app_info -from hyo2.soundspeed.soundspeed import SoundSpeedLibrary +from hyo2.ssm2.app.gui.soundspeedmanager import app_info +from hyo2.ssm2.lib.soundspeed import SoundSpeedLibrary class TestSoundSpeedNewProject(unittest.TestCase): diff --git a/tests/soundspeedmanager/test_init.py b/tests/soundspeedmanager/test_init.py index 34c1267e..44a6170c 100644 --- a/tests/soundspeedmanager/test_init.py +++ b/tests/soundspeedmanager/test_init.py @@ -1,5 +1,5 @@ import unittest -from hyo2.soundspeedmanager import app_info +from hyo2.ssm2.app.gui.soundspeedmanager import app_info class TestSoundSpeedManagerInit(unittest.TestCase): @@ -30,11 +30,11 @@ def test_has_lgpl_in_license(self): self.assertTrue("lgpl" in app_info.app_license.lower()) def test_has_copyright(self): - from hyo2.soundspeed import __copyright__ + from hyo2.ssm2 import __copyright__ self.assertIsNot(len(__copyright__), 0) def test_has_current_year_in_copyright(self): - from hyo2.soundspeed import __copyright__ + from hyo2.ssm2 import __copyright__ from datetime import datetime self.assertTrue((("%s" % (datetime.now().year - 1)) in __copyright__) or (("%s" % datetime.now().year) in __copyright__) or diff --git a/tests/soundspeedsettings/test_init.py b/tests/soundspeedsettings/test_init.py index 2c226574..a4fe6787 100644 --- a/tests/soundspeedsettings/test_init.py +++ b/tests/soundspeedsettings/test_init.py @@ -1,5 +1,5 @@ import unittest -from hyo2.soundspeedsettings import app_info +from hyo2.ssm2.app.gui.soundspeedsettings import app_info class TestSoundSpeedSettingsInit(unittest.TestCase): @@ -30,11 +30,11 @@ def test_has_lgpl_in_license(self): self.assertTrue("lgpl" in app_info.app_license.lower()) def test_has_copyright(self): - from hyo2.soundspeed import __copyright__ + from hyo2.ssm2 import __copyright__ self.assertIsNot(len(__copyright__), 0) def test_has_current_year_in_copyright(self): - from hyo2.soundspeed import __copyright__ + from hyo2.ssm2 import __copyright__ from datetime import datetime self.assertTrue((("%s" % (datetime.now().year - 1)) in __copyright__) or (("%s" % datetime.now().year) in __copyright__) or