From e32112200d3a9871ef6c22859bbe2a2c3af54def Mon Sep 17 00:00:00 2001 From: "Dr.-Ing. Amilcar do Carmo Lucas" Date: Wed, 21 Aug 2024 22:44:33 +0200 Subject: [PATCH] FOR_DEV_ONLY: Use local instead of installed code --- .../ardupilot_methodic_configurator.py | 20 ++++++------- MethodicConfigurator/backend_filesystem.py | 24 ++++++++-------- .../backend_filesystem_configuration_steps.py | 2 +- .../backend_filesystem_vehicle_components.py | 4 +-- .../backend_flightcontroller.py | 8 +++--- MethodicConfigurator/common_arguments.py | 2 +- MethodicConfigurator/frontend_tkinter_base.py | 2 +- .../frontend_tkinter_component_editor.py | 16 +++++------ .../frontend_tkinter_component_editor_base.py | 14 +++++----- .../frontend_tkinter_connection_selection.py | 14 +++++----- .../frontend_tkinter_directory_selection.py | 16 +++++------ .../frontend_tkinter_flightcontroller_info.py | 12 ++++---- .../frontend_tkinter_parameter_editor.py | 28 +++++++++---------- ...frontend_tkinter_parameter_editor_table.py | 22 +++++++-------- .../frontend_tkinter_template_overview.py | 12 ++++---- 15 files changed, 98 insertions(+), 98 deletions(-) diff --git a/MethodicConfigurator/ardupilot_methodic_configurator.py b/MethodicConfigurator/ardupilot_methodic_configurator.py index 2206b9a3..f85997f8 100755 --- a/MethodicConfigurator/ardupilot_methodic_configurator.py +++ b/MethodicConfigurator/ardupilot_methodic_configurator.py @@ -17,24 +17,24 @@ from logging import error as logging_error from sys import exit as sys_exit -from MethodicConfigurator.backend_filesystem import LocalFilesystem -from MethodicConfigurator.backend_flightcontroller import FlightController +from backend_filesystem import LocalFilesystem +from backend_flightcontroller import FlightController -from MethodicConfigurator.frontend_tkinter_base import show_error_message +from frontend_tkinter_base import show_error_message -from MethodicConfigurator.frontend_tkinter_connection_selection import ConnectionSelectionWindow +from frontend_tkinter_connection_selection import ConnectionSelectionWindow -from MethodicConfigurator.frontend_tkinter_flightcontroller_info import FlightControllerInfoWindow +from frontend_tkinter_flightcontroller_info import FlightControllerInfoWindow -from MethodicConfigurator.frontend_tkinter_directory_selection import VehicleDirectorySelectionWindow +from frontend_tkinter_directory_selection import VehicleDirectorySelectionWindow -from MethodicConfigurator.frontend_tkinter_component_editor import ComponentEditorWindow +from frontend_tkinter_component_editor import ComponentEditorWindow -from MethodicConfigurator.frontend_tkinter_parameter_editor import ParameterEditorWindow +from frontend_tkinter_parameter_editor import ParameterEditorWindow -from MethodicConfigurator.common_arguments import add_common_arguments_and_parse +from common_arguments import add_common_arguments_and_parse -from MethodicConfigurator.version import VERSION +from version import VERSION def argument_parser(): diff --git a/MethodicConfigurator/backend_filesystem.py b/MethodicConfigurator/backend_filesystem.py index f6c167e0..260831ee 100644 --- a/MethodicConfigurator/backend_filesystem.py +++ b/MethodicConfigurator/backend_filesystem.py @@ -34,18 +34,18 @@ from requests import get as requests_get -from MethodicConfigurator.annotate_params import PARAM_DEFINITION_XML_FILE, Par -from MethodicConfigurator.annotate_params import get_xml_url -from MethodicConfigurator.annotate_params import get_xml_dir -from MethodicConfigurator.annotate_params import load_default_param_file -from MethodicConfigurator.annotate_params import parse_parameter_metadata -from MethodicConfigurator.annotate_params import format_columns -from MethodicConfigurator.annotate_params import split_into_lines -from MethodicConfigurator.annotate_params import update_parameter_documentation - -from MethodicConfigurator.backend_filesystem_vehicle_components import VehicleComponents -from MethodicConfigurator.backend_filesystem_configuration_steps import ConfigurationSteps -from MethodicConfigurator.backend_filesystem_program_settings import ProgramSettings +from annotate_params import PARAM_DEFINITION_XML_FILE, Par +from annotate_params import get_xml_url +from annotate_params import get_xml_dir +from annotate_params import load_default_param_file +from annotate_params import parse_parameter_metadata +from annotate_params import format_columns +from annotate_params import split_into_lines +from annotate_params import update_parameter_documentation + +from backend_filesystem_vehicle_components import VehicleComponents +from backend_filesystem_configuration_steps import ConfigurationSteps +from backend_filesystem_program_settings import ProgramSettings TOOLTIP_MAX_LENGTH = 105 diff --git a/MethodicConfigurator/backend_filesystem_configuration_steps.py b/MethodicConfigurator/backend_filesystem_configuration_steps.py index b3d7525a..c20f9eaa 100644 --- a/MethodicConfigurator/backend_filesystem_configuration_steps.py +++ b/MethodicConfigurator/backend_filesystem_configuration_steps.py @@ -21,7 +21,7 @@ from typing import Tuple -from MethodicConfigurator.annotate_params import Par +from annotate_params import Par class ConfigurationSteps: diff --git a/MethodicConfigurator/backend_filesystem_vehicle_components.py b/MethodicConfigurator/backend_filesystem_vehicle_components.py index 72740924..756b710b 100644 --- a/MethodicConfigurator/backend_filesystem_vehicle_components.py +++ b/MethodicConfigurator/backend_filesystem_vehicle_components.py @@ -23,9 +23,9 @@ from json import dump as json_dump from json import JSONDecodeError -from MethodicConfigurator.backend_filesystem_program_settings import ProgramSettings +from backend_filesystem_program_settings import ProgramSettings -from MethodicConfigurator.middleware_template_overview import TemplateOverview +from middleware_template_overview import TemplateOverview class VehicleComponents: diff --git a/MethodicConfigurator/backend_flightcontroller.py b/MethodicConfigurator/backend_flightcontroller.py index 6bc96568..514fe84b 100644 --- a/MethodicConfigurator/backend_flightcontroller.py +++ b/MethodicConfigurator/backend_flightcontroller.py @@ -27,12 +27,12 @@ from serial.serialutil import SerialException -from MethodicConfigurator.annotate_params import Par +from annotate_params import Par -from MethodicConfigurator.backend_flightcontroller_info import BackendFlightcontrollerInfo -from MethodicConfigurator.backend_mavftp import MAVFTP +from backend_flightcontroller_info import BackendFlightcontrollerInfo +from backend_mavftp import MAVFTP -from MethodicConfigurator.argparse_check_range import CheckRange +from argparse_check_range import CheckRange # adding all this allows pyinstaller to build a working windows executable diff --git a/MethodicConfigurator/common_arguments.py b/MethodicConfigurator/common_arguments.py index 47b04a9c..4e07bb9d 100644 --- a/MethodicConfigurator/common_arguments.py +++ b/MethodicConfigurator/common_arguments.py @@ -8,7 +8,7 @@ SPDX-License-Identifier: GPL-3.0-or-later ''' -from MethodicConfigurator.version import VERSION +from version import VERSION def add_common_arguments_and_parse(parser): diff --git a/MethodicConfigurator/frontend_tkinter_base.py b/MethodicConfigurator/frontend_tkinter_base.py index 15be1c35..585bffae 100644 --- a/MethodicConfigurator/frontend_tkinter_base.py +++ b/MethodicConfigurator/frontend_tkinter_base.py @@ -25,7 +25,7 @@ from PIL import Image from PIL import ImageTk -from MethodicConfigurator.backend_filesystem import LocalFilesystem +from backend_filesystem import LocalFilesystem def show_error_message(title: str, message: str): diff --git a/MethodicConfigurator/frontend_tkinter_component_editor.py b/MethodicConfigurator/frontend_tkinter_component_editor.py index a8fcadf2..666df607 100644 --- a/MethodicConfigurator/frontend_tkinter_component_editor.py +++ b/MethodicConfigurator/frontend_tkinter_component_editor.py @@ -20,20 +20,20 @@ from tkinter import ttk from math import log2 -from MethodicConfigurator.common_arguments import add_common_arguments_and_parse +from common_arguments import add_common_arguments_and_parse -from MethodicConfigurator.backend_filesystem import LocalFilesystem +from backend_filesystem import LocalFilesystem -from MethodicConfigurator.backend_filesystem_vehicle_components import VehicleComponents +from backend_filesystem_vehicle_components import VehicleComponents -from MethodicConfigurator.battery_cell_voltages import BatteryCell +from battery_cell_voltages import BatteryCell -from MethodicConfigurator.frontend_tkinter_component_editor_base import ComponentEditorWindowBase +from frontend_tkinter_component_editor_base import ComponentEditorWindowBase -#from MethodicConfigurator.frontend_tkinter_base import show_tooltip -from MethodicConfigurator.frontend_tkinter_base import show_error_message +#from frontend_tkinter_base import show_tooltip +from frontend_tkinter_base import show_error_message -from MethodicConfigurator.version import VERSION +from version import VERSION def argument_parser(): diff --git a/MethodicConfigurator/frontend_tkinter_component_editor_base.py b/MethodicConfigurator/frontend_tkinter_component_editor_base.py index 711c905b..b24e5b47 100644 --- a/MethodicConfigurator/frontend_tkinter_component_editor_base.py +++ b/MethodicConfigurator/frontend_tkinter_component_editor_base.py @@ -18,16 +18,16 @@ import tkinter as tk from tkinter import ttk -from MethodicConfigurator.common_arguments import add_common_arguments_and_parse +from common_arguments import add_common_arguments_and_parse -from MethodicConfigurator.backend_filesystem import LocalFilesystem +from backend_filesystem import LocalFilesystem -from MethodicConfigurator.frontend_tkinter_base import show_tooltip -from MethodicConfigurator.frontend_tkinter_base import show_error_message -from MethodicConfigurator.frontend_tkinter_base import ScrollFrame -from MethodicConfigurator.frontend_tkinter_base import BaseWindow +from frontend_tkinter_base import show_tooltip +from frontend_tkinter_base import show_error_message +from frontend_tkinter_base import ScrollFrame +from frontend_tkinter_base import BaseWindow -from MethodicConfigurator.version import VERSION +from version import VERSION def argument_parser(): diff --git a/MethodicConfigurator/frontend_tkinter_connection_selection.py b/MethodicConfigurator/frontend_tkinter_connection_selection.py index ffc774d9..5e211a3d 100644 --- a/MethodicConfigurator/frontend_tkinter_connection_selection.py +++ b/MethodicConfigurator/frontend_tkinter_connection_selection.py @@ -22,15 +22,15 @@ from tkinter import ttk from tkinter import simpledialog -from MethodicConfigurator.common_arguments import add_common_arguments_and_parse +from common_arguments import add_common_arguments_and_parse -from MethodicConfigurator.backend_flightcontroller import FlightController +from backend_flightcontroller import FlightController -from MethodicConfigurator.frontend_tkinter_base import show_no_connection_error -from MethodicConfigurator.frontend_tkinter_base import show_tooltip -from MethodicConfigurator.frontend_tkinter_base import update_combobox_width -from MethodicConfigurator.frontend_tkinter_base import ProgressWindow -from MethodicConfigurator.frontend_tkinter_base import BaseWindow +from frontend_tkinter_base import show_no_connection_error +from frontend_tkinter_base import show_tooltip +from frontend_tkinter_base import update_combobox_width +from frontend_tkinter_base import ProgressWindow +from frontend_tkinter_base import BaseWindow # https://dev.to/geraldew/python-tkinter-an-exercise-in-wrapping-the-combobox-ndb diff --git a/MethodicConfigurator/frontend_tkinter_directory_selection.py b/MethodicConfigurator/frontend_tkinter_directory_selection.py index 4282a873..a88bc400 100644 --- a/MethodicConfigurator/frontend_tkinter_directory_selection.py +++ b/MethodicConfigurator/frontend_tkinter_directory_selection.py @@ -26,18 +26,18 @@ from tkinter import ttk from tkinter import filedialog -from MethodicConfigurator.version import VERSION +from version import VERSION -from MethodicConfigurator.common_arguments import add_common_arguments_and_parse +from common_arguments import add_common_arguments_and_parse -from MethodicConfigurator.backend_filesystem import LocalFilesystem -from MethodicConfigurator.backend_filesystem_program_settings import ProgramSettings +from backend_filesystem import LocalFilesystem +from backend_filesystem_program_settings import ProgramSettings -from MethodicConfigurator.frontend_tkinter_base import show_no_param_files_error -from MethodicConfigurator.frontend_tkinter_base import show_tooltip -from MethodicConfigurator.frontend_tkinter_base import BaseWindow +from frontend_tkinter_base import show_no_param_files_error +from frontend_tkinter_base import show_tooltip +from frontend_tkinter_base import BaseWindow -from MethodicConfigurator.frontend_tkinter_template_overview import TemplateOverviewWindow +from frontend_tkinter_template_overview import TemplateOverviewWindow class DirectorySelectionWidgets(): diff --git a/MethodicConfigurator/frontend_tkinter_flightcontroller_info.py b/MethodicConfigurator/frontend_tkinter_flightcontroller_info.py index b795a9cb..52afedf6 100644 --- a/MethodicConfigurator/frontend_tkinter_flightcontroller_info.py +++ b/MethodicConfigurator/frontend_tkinter_flightcontroller_info.py @@ -14,14 +14,14 @@ import tkinter as tk from tkinter import ttk -from MethodicConfigurator.backend_flightcontroller import FlightController -#from MethodicConfigurator.backend_flightcontroller_info import BackendFlightcontrollerInfo +from backend_flightcontroller import FlightController +#from backend_flightcontroller_info import BackendFlightcontrollerInfo -#from MethodicConfigurator.frontend_tkinter_base import show_tooltip -from MethodicConfigurator.frontend_tkinter_base import ProgressWindow -from MethodicConfigurator.frontend_tkinter_base import BaseWindow +#from frontend_tkinter_base import show_tooltip +from frontend_tkinter_base import ProgressWindow +from frontend_tkinter_base import BaseWindow -from MethodicConfigurator.version import VERSION +from version import VERSION class FlightControllerInfoWindow(BaseWindow): diff --git a/MethodicConfigurator/frontend_tkinter_parameter_editor.py b/MethodicConfigurator/frontend_tkinter_parameter_editor.py index 735387a6..6ef58311 100644 --- a/MethodicConfigurator/frontend_tkinter_parameter_editor.py +++ b/MethodicConfigurator/frontend_tkinter_parameter_editor.py @@ -28,27 +28,27 @@ from webbrowser import open as webbrowser_open # to open the blog post documentation -from MethodicConfigurator.annotate_params import Par +from annotate_params import Par -from MethodicConfigurator.common_arguments import add_common_arguments_and_parse +from common_arguments import add_common_arguments_and_parse -from MethodicConfigurator.backend_filesystem import LocalFilesystem -from MethodicConfigurator.backend_filesystem import is_within_tolerance +from backend_filesystem import LocalFilesystem +from backend_filesystem import is_within_tolerance -from MethodicConfigurator.backend_flightcontroller import FlightController +from backend_flightcontroller import FlightController -from MethodicConfigurator.frontend_tkinter_base import show_tooltip -from MethodicConfigurator.frontend_tkinter_base import AutoResizeCombobox -from MethodicConfigurator.frontend_tkinter_base import ProgressWindow -from MethodicConfigurator.frontend_tkinter_base import BaseWindow -from MethodicConfigurator.frontend_tkinter_base import RichText -from MethodicConfigurator.frontend_tkinter_base import get_widget_font +from frontend_tkinter_base import show_tooltip +from frontend_tkinter_base import AutoResizeCombobox +from frontend_tkinter_base import ProgressWindow +from frontend_tkinter_base import BaseWindow +from frontend_tkinter_base import RichText +from frontend_tkinter_base import get_widget_font -from MethodicConfigurator.frontend_tkinter_directory_selection import VehicleDirectorySelectionWidgets +from frontend_tkinter_directory_selection import VehicleDirectorySelectionWidgets -from MethodicConfigurator.frontend_tkinter_parameter_editor_table import ParameterEditorTable +from frontend_tkinter_parameter_editor_table import ParameterEditorTable -from MethodicConfigurator.tempcal_imu import IMUfit +from tempcal_imu import IMUfit from MethodicConfigurator.version import VERSION diff --git a/MethodicConfigurator/frontend_tkinter_parameter_editor_table.py b/MethodicConfigurator/frontend_tkinter_parameter_editor_table.py index 735e62ab..c4ff04ed 100644 --- a/MethodicConfigurator/frontend_tkinter_parameter_editor_table.py +++ b/MethodicConfigurator/frontend_tkinter_parameter_editor_table.py @@ -22,22 +22,22 @@ from platform import system as platform_system -#from MethodicConfigurator.backend_filesystem import LocalFilesystem -from MethodicConfigurator.backend_filesystem import is_within_tolerance +#from backend_filesystem import LocalFilesystem +from backend_filesystem import is_within_tolerance -#from MethodicConfigurator.backend_flightcontroller import FlightController +#from backend_flightcontroller import FlightController -from MethodicConfigurator.frontend_tkinter_base import show_tooltip -#from MethodicConfigurator.frontend_tkinter_base import AutoResizeCombobox -from MethodicConfigurator.frontend_tkinter_base import ScrollFrame -from MethodicConfigurator.frontend_tkinter_base import get_widget_font -from MethodicConfigurator.frontend_tkinter_base import BaseWindow +from frontend_tkinter_base import show_tooltip +#from frontend_tkinter_base import AutoResizeCombobox +from frontend_tkinter_base import ScrollFrame +from frontend_tkinter_base import get_widget_font +from frontend_tkinter_base import BaseWindow -from MethodicConfigurator.frontend_tkinter_connection_selection import PairTupleCombobox +from frontend_tkinter_connection_selection import PairTupleCombobox -from MethodicConfigurator.frontend_tkinter_entry_dynamic import EntryWithDynamicalyFilteredListbox +from frontend_tkinter_entry_dynamic import EntryWithDynamicalyFilteredListbox -from MethodicConfigurator.annotate_params import Par +from annotate_params import Par class ParameterEditorTable(ScrollFrame): # pylint: disable=too-many-ancestors diff --git a/MethodicConfigurator/frontend_tkinter_template_overview.py b/MethodicConfigurator/frontend_tkinter_template_overview.py index 97ee3b6d..1d69b8aa 100644 --- a/MethodicConfigurator/frontend_tkinter_template_overview.py +++ b/MethodicConfigurator/frontend_tkinter_template_overview.py @@ -15,16 +15,16 @@ import tkinter as tk from tkinter import ttk -from MethodicConfigurator.middleware_template_overview import TemplateOverview +from middleware_template_overview import TemplateOverview -from MethodicConfigurator.backend_filesystem_program_settings import ProgramSettings -from MethodicConfigurator.backend_filesystem_vehicle_components import VehicleComponents +from backend_filesystem_program_settings import ProgramSettings +from backend_filesystem_vehicle_components import VehicleComponents -from MethodicConfigurator.common_arguments import add_common_arguments_and_parse +from common_arguments import add_common_arguments_and_parse -from MethodicConfigurator.frontend_tkinter_base import BaseWindow +from frontend_tkinter_base import BaseWindow -from MethodicConfigurator.version import VERSION +from version import VERSION class TemplateOverviewWindow(BaseWindow): """