From f40105c6657b5dcf793c081faedd631e97bd3442 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 5 Mar 2024 20:28:16 -0800 Subject: [PATCH] move constants to core --- felt/core/__init__.py | 7 +++++++ felt/core/api_client.py | 2 +- felt/core/auth.py | 2 +- felt/{ => core}/constants.py | 0 felt/gui/authorize_dialog.py | 2 +- felt/gui/create_map_dialog.py | 9 ++++----- 6 files changed, 14 insertions(+), 8 deletions(-) rename felt/{ => core}/constants.py (100%) diff --git a/felt/core/__init__.py b/felt/core/__init__.py index d5c5ca5..748eb2c 100644 --- a/felt/core/__init__.py +++ b/felt/core/__init__.py @@ -22,6 +22,13 @@ LayerExporter, ZippedExportResult ) +from .constants import ( # noqa + FELT_API_BASE, + FELT_API_URL, + PRIVACY_POLICY_URL, + TOS_URL, + SIGNUP_URL +) from .multi_step_feedback import MultiStepFeedback # noqa from .meta import PLUGIN_METADATA_PARSER # noqa from .exceptions import LayerPackagingException # noqa diff --git a/felt/core/api_client.py b/felt/core/api_client.py index 2eb88ab..6d96813 100644 --- a/felt/core/api_client.py +++ b/felt/core/api_client.py @@ -41,7 +41,7 @@ from .meta import PLUGIN_METADATA_PARSER from .s3_upload_parameters import S3UploadParameters from .enums import UsageType -from ..constants import ( +from .constants import ( FELT_API_URL ) diff --git a/felt/core/auth.py b/felt/core/auth.py index 36fe8a7..7be378e 100644 --- a/felt/core/auth.py +++ b/felt/core/auth.py @@ -31,7 +31,7 @@ ) from .pkce import generate_pkce_pair -from ..constants import ( +from .constants import ( FELT_API_BASE ) diff --git a/felt/constants.py b/felt/core/constants.py similarity index 100% rename from felt/constants.py rename to felt/core/constants.py diff --git a/felt/gui/authorize_dialog.py b/felt/gui/authorize_dialog.py index c189c9f..58af026 100644 --- a/felt/gui/authorize_dialog.py +++ b/felt/gui/authorize_dialog.py @@ -30,7 +30,7 @@ ) from qgis.gui import QgsGui -from ..constants import ( +from ..core import ( PRIVACY_POLICY_URL, TOS_URL, SIGNUP_URL diff --git a/felt/gui/create_map_dialog.py b/felt/gui/create_map_dialog.py index 8a0a1d8..20ff9c1 100644 --- a/felt/gui/create_map_dialog.py +++ b/felt/gui/create_map_dialog.py @@ -50,10 +50,7 @@ from .authorization_manager import AUTHORIZATION_MANAGER from .colored_progress_bar import ColorBar -from ..constants import ( - PRIVACY_POLICY_URL, - TOS_URL -) + from .felt_dialog_header import FeltDialogHeader from .gui_utils import ( GuiUtils, @@ -64,7 +61,9 @@ LayerExporter, LayerSupport, MapUploaderTask, - Map + Map, + PRIVACY_POLICY_URL, + TOS_URL ) WIDGET, _ = uic.loadUiType(GuiUtils.get_ui_file_path('create_map.ui'))