diff --git a/LadybugTools_Engine/Compute/InstallPythonEnv_LBT.cs b/LadybugTools_Engine/Compute/InstallPythonEnv_LBT.cs index 6067712b..55bf7333 100644 --- a/LadybugTools_Engine/Compute/InstallPythonEnv_LBT.cs +++ b/LadybugTools_Engine/Compute/InstallPythonEnv_LBT.cs @@ -55,6 +55,7 @@ public static PythonEnvironment InstallPythonEnv_LBT(bool run = false, bool rein PythonEnvironment env = Python.Compute.VirtualEnvironment(version: pythonVersion, name: Query.ToolkitName(), reload: false); // install local package + env.InstallPackageLocal(Path.Combine(Python.Query.DirectoryCode(), Python.Query.ToolkitName())); env.InstallPackageLocal(Path.Combine(Python.Query.DirectoryCode(), Query.ToolkitName())); // create requirements from referenced executable diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/__init__.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/__init__.py index 2513fa5a..1f8186d4 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/__init__.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/__init__.py @@ -12,4 +12,4 @@ os.environ["HOME"] = (Path("C:/Users/") / getpass.getuser()).as_posix() # set plotting style for modules within this toolkit -plt.style.use(Path(__file__).parent / "bhom" / "bhom.mplstyle") +plt.style.use(Path("C:/ProgramData/BHoM/Extensions/PythonCode/Python_Toolkit/src/python_toolkit/bhom/bhom.mplstyle")) diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/bhom/__init__.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/bhom/__init__.py deleted file mode 100644 index e53d00c6..00000000 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/bhom/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -"""Root for the bhom subpackage.""" - -from pathlib import Path # pylint: disable=E0401 -from os import path - -from win32api import HIWORD, LOWORD, GetFileVersionInfo - -BHOM_ASSEMBLIES_DIRECTORY = Path(path.expandvars("%PROGRAMDATA%/BHoM/Assemblies")) -BHOM_LOG_FOLDER = Path(path.expandvars("%PROGRAMDATA%/BHoM/Logs")) -TOOLKIT_NAME = "LadybugTools_Toolkit" - -if not BHOM_LOG_FOLDER.exists(): - BHOM_LOG_FOLDER = Path(path.expandvars("%TEMP%/BHoMLogs")) - BHOM_LOG_FOLDER.mkdir(exist_ok=True) - -if not BHOM_ASSEMBLIES_DIRECTORY.exists(): - BHOM_VERSION = "" -else: - _file_version_ms = GetFileVersionInfo( - (BHOM_ASSEMBLIES_DIRECTORY / "BHoM.dll").as_posix(), "\\" - )["FileVersionMS"] - - BHOM_VERSION = f"{HIWORD(_file_version_ms)}.{LOWORD(_file_version_ms)}" diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/bhom/analytics.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/bhom/analytics.py deleted file mode 100644 index c8c9be8b..00000000 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/bhom/analytics.py +++ /dev/null @@ -1,95 +0,0 @@ -"""BHoM analytics decorator.""" -# pylint: disable=E0401 -import inspect -import json -import sys -import uuid -from functools import wraps -from typing import Any, Callable - -# pylint: enable=E0401 - -from .logging import ANALYTICS_LOGGER -from .util import csharp_ticks -from . import BHOM_VERSION, TOOLKIT_NAME - - -def bhom_analytics() -> Callable: - """Decorator for capturing usage data. - - Returns - ------- - Callable - The decorated function. - """ - - def decorator(function: Callable): - """A decorator to capture usage data for called methods/functions. - - Arguments - --------- - function : Callable - The function to decorate. - - Returns - ------- - Callable - The decorated function. - """ - - @wraps(function) - def wrapper(*args, **kwargs) -> Any: - """A wrapper around the function that captures usage analytics.""" - - _id = uuid.uuid4() - - # get the data being passed to the function, expected dtype and return type - argspec = inspect.getfullargspec(function)[-1] - argspec.pop("return", None) - - _args = [f'{{"_t": "{argspec[k]}", "Name": "{k}"}}' for k in argspec.keys()] - - exec_metadata = { - "BHoMVersion": BHOM_VERSION, - "BHoM_Guid": _id, - "CallerName": function.__name__, - "ComponentId": _id, - "CustomData": {}, - "Errors": [], - "FileId": "", - "FileName": "", - "Fragments": [], - "Name": "", - # TODO - get project properties from another function/logging - # method (or from BHoM DLL analytics capture ...) - "ProjectID": "", - "SelectedItem": { - "MethodName": function.__name__, - "Parameters": _args, - "TypeName": f"{function.__module__}.{function.__qualname__}", - "_bhomVersion": BHOM_VERSION, - "_t": "Python", - }, - "Time": { - "$date": csharp_ticks(short=True), - }, - "UI": "Python", - "UiVersion": TOOLKIT_NAME, - "_t": "BH.oM.UI.UsageLogEntry", - } - - try: - result = function(*args, **kwargs) - except Exception as exc: # pylint: disable=broad-except - exec_metadata["Errors"].extend(sys.exc_info()) - raise exc - finally: - ANALYTICS_LOGGER.info( - json.dumps(exec_metadata, default=str, indent=None) - ) - - return result - - return wrapper - - return decorator diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/bhom/bhom.mplstyle b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/bhom/bhom.mplstyle deleted file mode 100644 index 0c1d79cf..00000000 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/bhom/bhom.mplstyle +++ /dev/null @@ -1,81 +0,0 @@ -# Default matplotlib settings for this toolkit. - -# Set custom colors. All colors are in web style hex format. -axes.prop_cycle: cycler('color', ['702F8A', 'E63187', '00A9E0', 'FFCF04', '6CC24E', 'EB671C', '00A499', 'D50032', '24135F', '6D104E', '006DA8', 'D06A13', '5D822D', 'F0AC1B', '1C3660', 'BC204B', '8F72B0', 'FCD16D', '8DB9CA', 'EE7837', 'AFC1A2', 'B72B77', 'A0D2C9', 'E6484D']) - -# Face settings -axes.facecolor: white -axes.edgecolor: black - -# Style spines -axes.linewidth: 0.8 -axes.spines.top: False -axes.spines.left: True -axes.spines.right: False -axes.spines.bottom: True - -# Set line styling for line plots -lines.linewidth: 1 -lines.solid_capstyle: round -lines.dash_capstyle: round - -# Grid style -axes.axisbelow: True -axes.grid: true -axes.grid.axis: both -grid.color: 958B82 -grid.linestyle: -- -grid.linewidth: 0.5 - -# Setting font sizes and spacing -axes.labelsize: medium -axes.labelweight: semibold -axes.ymargin: 0.1 -font.family: sans-serif -font.sans-serif: Segoe UI -font.size: 10 -xtick.labelsize: medium -xtick.major.pad: 3.5 -ytick.labelsize: medium -ytick.major.pad: 3.5 - -# date formatter -date.autoformatter.day: %b-%d -date.autoformatter.hour: %b-%d %H -date.autoformatter.microsecond: %M:%S.%f -date.autoformatter.minute: %d %H:%M -date.autoformatter.month: %b -date.autoformatter.second: %H:%M:%S -date.autoformatter.year: %Y - -# Title -axes.titlecolor: black -axes.titlelocation: left -axes.titlepad: 6 -axes.titlesize: large -axes.titleweight: bold - -# Remove major and minor ticks except for on the x-axis. -xtick.major.size: 3 -xtick.minor.size: 2 -ytick.major.size: 3 -ytick.minor.size: 2 - -# Set spacing for figure and also DPI. -figure.subplot.left: 0.08 -figure.subplot.right: 0.95 -figure.subplot.bottom: 0.07 -figure.figsize: 12, 5 -figure.dpi: 150 -figure.facecolor: white - -# Properties for saving the figure. Ensure a high DPI when saving so we have a good resolution. -savefig.dpi: 300 -savefig.facecolor: white -savefig.bbox: tight -savefig.pad_inches: 0.2 - -# Legend Styling -legend.framealpha: 0 -legend.frameon: False -legend.facecolor: inherit \ No newline at end of file diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/bhom/logging/__init__.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/bhom/logging/__init__.py deleted file mode 100644 index 4e9eae56..00000000 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/bhom/logging/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from .file import ANALYTICS_LOGGER -from .console import CONSOLE_LOGGER diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/bhom/logging/console.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/bhom/logging/console.py deleted file mode 100644 index d36178b8..00000000 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/bhom/logging/console.py +++ /dev/null @@ -1,19 +0,0 @@ -"""Logging utilities for BHoM analytics.""" - -# pylint: disable=E0401 -import logging -import sys - -# pylint: enable=E0401 - -from .. import TOOLKIT_NAME - -formatter = logging.Formatter("%(name)s - %(levelname)s - %(message)s") -handler = logging.StreamHandler(sys.stdout) -handler.setLevel(logging.DEBUG) -handler.setFormatter(formatter) - -CONSOLE_LOGGER = logging.getLogger(f"{TOOLKIT_NAME}[console]") -CONSOLE_LOGGER.propagate = False -CONSOLE_LOGGER.setLevel(logging.DEBUG) -CONSOLE_LOGGER.addHandler(handler) diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/bhom/logging/file.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/bhom/logging/file.py deleted file mode 100644 index 9c39acc7..00000000 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/bhom/logging/file.py +++ /dev/null @@ -1,28 +0,0 @@ -"""Logging utilities for BHoM analytics.""" - -# pylint: disable=E0401 -import logging -from datetime import datetime -from logging.handlers import RotatingFileHandler - -# pylint: enable=E0401 - - -from .. import TOOLKIT_NAME, BHOM_LOG_FOLDER - -formatter = logging.Formatter("%(message)s") -handler = RotatingFileHandler( - BHOM_LOG_FOLDER / f"{TOOLKIT_NAME}_{datetime.now().strftime('%Y%m%d')}.log", - mode="a", - maxBytes=25 * 1024 * 1024, # 25mb max before file overwritten - backupCount=1, - encoding="utf-8", - delay=True, # wait until all logs collected before writing -) -handler.setLevel(logging.DEBUG) -handler.setFormatter(formatter) - -ANALYTICS_LOGGER = logging.getLogger(f"{TOOLKIT_NAME}") -ANALYTICS_LOGGER.propagate = False -ANALYTICS_LOGGER.setLevel(logging.DEBUG) -ANALYTICS_LOGGER.addHandler(handler) diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/bhom/util.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/bhom/util.py deleted file mode 100644 index 3200384c..00000000 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/bhom/util.py +++ /dev/null @@ -1,24 +0,0 @@ -"""General utility functions.""" -# pylint: disable=E0401 -from datetime import datetime - -# pylint: enable=E0401 - - -def csharp_ticks(date_time: datetime = datetime.utcnow(), short: bool = False) -> int: - """Python implementation of C# DateTime.UtcNow.Ticks. - - Args: - date_time (datetime, optional): The datetime to convert to ticks. Defaults to datetime.utcnow(). - short (bool, optional): Whether to return the short ticks. Defaults to False. - - Returns: - int: The ticks. - """ - - _ticks = (date_time - datetime(1, 1, 1)).total_seconds() - - if short: - return int(_ticks) - - return int(_ticks * (10**7)) diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/categorical/categorical.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/categorical/categorical.py index 93e8bba5..1c36513f 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/categorical/categorical.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/categorical/categorical.py @@ -22,7 +22,7 @@ from matplotlib.legend import Legend import matplotlib.ticker as mticker -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics from ..helpers import rolling_window, validate_timeseries from ..plot.utilities import contrasting_color from ..plot._heatmap import heatmap diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/_externalcomfortbase.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/_externalcomfortbase.py index 2f25f02f..55341e15 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/_externalcomfortbase.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/_externalcomfortbase.py @@ -13,7 +13,7 @@ from ladybug_comfort.collection.utci import UTCI from matplotlib.figure import Figure -from ..bhom.logging import CONSOLE_LOGGER +from python_toolkit.bhom.logging import CONSOLE_LOGGER from ..bhom.to_bhom import hourlycontinuouscollection_to_bhom from ..categorical.categories import UTCI_DEFAULT_CATEGORIES, Categorical from ..helpers import convert_keys_to_snake_case diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/_shelterbase.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/_shelterbase.py index acf3b607..a7e2e7a6 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/_shelterbase.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/_shelterbase.py @@ -28,7 +28,7 @@ from mpl_toolkits import mplot3d -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics from ..bhom.to_bhom import point3d_to_bhom from ..ladybug_extension.epw import sun_position_list from ..helpers import convert_keys_to_snake_case diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/_simulatebase.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/_simulatebase.py index b032ee80..79dd9f08 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/_simulatebase.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/_simulatebase.py @@ -25,7 +25,7 @@ from ladybug.futil import nukedir from ladybug_comfort.collection.solarcal import OutdoorSolarCal, SolarCalParameter -from ..bhom.logging import CONSOLE_LOGGER +from python_toolkit.bhom.logging import CONSOLE_LOGGER from ..bhom.to_bhom import ( hourlycontinuouscollection_to_bhom, material_to_bhom, diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/_typologybase.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/_typologybase.py index 92d05183..e7539723 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/_typologybase.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/_typologybase.py @@ -10,7 +10,7 @@ import pandas as pd from ladybug.epw import EPW, HourlyContinuousCollection -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics from ..helpers import ( convert_keys_to_snake_case, decay_rate_smoother, diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/externalcomfort.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/externalcomfort.py index 00e6827c..b4e167dc 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/externalcomfort.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/externalcomfort.py @@ -8,7 +8,7 @@ import numpy as np -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics from ._externalcomfortbase import ExternalComfort from ._shelterbase import Shelter from ._typologybase import Typology diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/simulate.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/simulate.py index 2bf50aea..3a6ccee4 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/simulate.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/simulate.py @@ -9,7 +9,7 @@ import pandas as pd from tqdm import tqdm -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics from ..helpers import evaporative_cooling_effect from ..ladybug_extension.epw import AnalysisPeriod, collection_to_series from ._simulatebase import SimulationResult diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/spatial/compare.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/spatial/compare.py index 7dba374f..aa544efc 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/spatial/compare.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/spatial/compare.py @@ -7,7 +7,7 @@ from matplotlib.tri.triangulation import Triangulation from mpl_toolkits.axes_grid1 import make_axes_locatable -from ...bhom.logging import CONSOLE_LOGGER +from python_toolkit.bhom.logging import CONSOLE_LOGGER from ...ladybug_extension.analysisperiod import describe_analysis_period from ...plot.utilities import create_triangulation from .spatial_comfort import SpatialComfort, SpatialMetric diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/spatial/spatial_comfort.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/spatial/spatial_comfort.py index a5f879b8..ad9cbbd0 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/spatial/spatial_comfort.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/spatial/spatial_comfort.py @@ -23,7 +23,7 @@ from matplotlib.ticker import PercentFormatter, StrMethodFormatter from mpl_toolkits.axes_grid1 import make_axes_locatable -from ...bhom.logging import CONSOLE_LOGGER +from python_toolkit.bhom.logging import CONSOLE_LOGGER from ...helpers import sanitise_string, wind_speed_at_height from ...honeybee_extension.results import (load_ill, load_pts, load_res, make_annual) diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/typology.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/typology.py index da9b4e3a..e16af68e 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/typology.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/typology.py @@ -6,7 +6,7 @@ import numpy as np -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics from ._typologybase import Typology from ._shelterbase import Shelter diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/utci.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/utci.py index f724497c..076a3ae7 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/utci.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/external_comfort/utci.py @@ -21,7 +21,7 @@ from scipy.interpolate import interp1d, interp2d from tqdm import tqdm -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics from ..categorical.categories import UTCI_DEFAULT_CATEGORIES, CategoricalComfort from ..helpers import evaporative_cooling_effect, month_hour_binned_series from ..ladybug_extension.datacollection import ( diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/helpers.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/helpers.py index 774942f2..1c58f877 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/helpers.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/helpers.py @@ -34,8 +34,8 @@ from ladybug_geometry.geometry2d import Vector2D from meteostat import Hourly, Point -from .bhom.analytics import bhom_analytics -from .bhom.logging import CONSOLE_LOGGER +from python_toolkit.bhom.analytics import bhom_analytics +from python_toolkit.bhom.logging import CONSOLE_LOGGER from .ladybug_extension.dt import lb_datetime_from_datetime # pylint: enable=E0401 diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/honeybee_extension/results.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/honeybee_extension/results.py index aac11629..bc08f107 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/honeybee_extension/results.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/honeybee_extension/results.py @@ -11,7 +11,7 @@ import numpy as np import pandas as pd from ladybug.sql import SQLiteResult -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics from ..ladybug_extension.datacollection import collection_to_series diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/honeybee_extension/simulation/radiance.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/honeybee_extension/simulation/radiance.py index 895005ca..22bdc318 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/honeybee_extension/simulation/radiance.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/honeybee_extension/simulation/radiance.py @@ -22,7 +22,7 @@ from matplotlib.colors import Normalize from mpl_toolkits.axes_grid1 import make_axes_locatable -from ...bhom.logging import CONSOLE_LOGGER +from python_toolkit.bhom.logging import CONSOLE_LOGGER from ...ladybug_extension.analysisperiod import describe_analysis_period from ..model import HbModelGeometry from ..results import load_ill, load_npy, load_res diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/honeybee_extension/sri.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/honeybee_extension/sri.py index a79c2cc5..c0e87db1 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/honeybee_extension/sri.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/honeybee_extension/sri.py @@ -3,7 +3,7 @@ import numpy as np from honeybee_energy.construction.opaque import OpaqueConstruction from honeybee_energy.material.opaque import EnergyMaterial -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics @bhom_analytics() diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/analysisperiod.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/analysisperiod.py index 1c0b349d..54ba0f4a 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/analysisperiod.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/analysisperiod.py @@ -9,7 +9,7 @@ import numpy as np import pandas as pd from ladybug.analysisperiod import AnalysisPeriod -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics from .dt import lb_datetime_from_datetime diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/datacollection.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/datacollection.py index 7dd513b5..b432de1d 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/datacollection.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/datacollection.py @@ -18,7 +18,7 @@ ) from ladybug.datatype.angle import Angle from ladybug.dt import DateTime -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics from ..helpers import circular_weighted_mean from .analysisperiod import analysis_period_to_datetimes from .analysisperiod import describe_analysis_period diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/dt.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/dt.py index 6687f1c6..04b306c2 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/dt.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/dt.py @@ -3,7 +3,7 @@ from datetime import datetime # pylint: disable=E0401 from ladybug.dt import DateTime -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics @bhom_analytics() diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/epw.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/epw.py index 87eb134d..b19db869 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/epw.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/epw.py @@ -35,7 +35,7 @@ from ladybug.sunpath import Sun, Sunpath from ladybug_comfort.degreetime import cooling_degree_time, heating_degree_time -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics from ..helpers import ( air_pressure_at_height, radiation_at_height, diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/groundtemperature.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/groundtemperature.py index ca9e1e6b..c6076102 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/groundtemperature.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/groundtemperature.py @@ -13,7 +13,7 @@ from ladybug.datacollection import HourlyContinuousCollection, MonthlyCollection from ladybug.epw import EPW -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics from .datacollection import collection_from_series, collection_to_series, to_hourly diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/header.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/header.py index f9923e5e..3f70cdf9 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/header.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/header.py @@ -6,7 +6,7 @@ from ladybug.datatype.generic import GenericType from ladybug.header import Header -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics def header_to_string(header: Header) -> str: diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/koeppen_classification.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/koeppen_classification.py index 933afada..7d736a68 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/koeppen_classification.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/koeppen_classification.py @@ -10,7 +10,7 @@ import pandas as pd from ladybug.epw import EPW, Location from scipy import spatial -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics @dataclass diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/location.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/location.py index 0dd48426..38291184 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/location.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/location.py @@ -2,7 +2,7 @@ import numpy as np from ladybug.location import Location -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics @bhom_analytics() diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/sunpath.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/sunpath.py index 6bb8b025..55e34ff2 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/sunpath.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/ladybug_extension/sunpath.py @@ -1,6 +1,6 @@ from ladybug.sunpath import Sunpath from ladybug.location import Location -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics import pandas as pd from datetime import datetime diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_condensation_potential.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_condensation_potential.py index 00773321..fdfff6ce 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_condensation_potential.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_condensation_potential.py @@ -7,7 +7,7 @@ import numpy as np import pandas as pd -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics from .utilities import create_title diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_degree_days.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_degree_days.py index 08d56359..1b917d5b 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_degree_days.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_degree_days.py @@ -5,7 +5,7 @@ from ladybug.epw import EPW from .utilities import contrasting_color -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics from ..ladybug_extension.epw import EPW, degree_time from ..ladybug_extension.location import location_to_string diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_diurnal.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_diurnal.py index de0e6eed..ce3c3fe3 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_diurnal.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_diurnal.py @@ -14,7 +14,7 @@ import numpy as np import pandas as pd -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics from .utilities import create_title diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_heatmap.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_heatmap.py index bcff46ba..da586dea 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_heatmap.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_heatmap.py @@ -5,7 +5,7 @@ import numpy as np import pandas as pd -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics from ..helpers import validate_timeseries diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_monthly_histogram_proportion.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_monthly_histogram_proportion.py index 6a78fbc9..2eda84b9 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_monthly_histogram_proportion.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_monthly_histogram_proportion.py @@ -5,7 +5,7 @@ import matplotlib.ticker as mticker import pandas as pd -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics from ..helpers import validate_timeseries from .utilities import contrasting_color diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_psychrometric.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_psychrometric.py index 53c810b7..a2732604 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_psychrometric.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_psychrometric.py @@ -19,7 +19,7 @@ from matplotlib.colors import Colormap from matplotlib.patches import Polygon -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics from ..ladybug_extension.analysisperiod import ( analysis_period_to_datetimes, describe_analysis_period, diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_skymatrix.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_skymatrix.py index bbf6837b..240fa24c 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_skymatrix.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_skymatrix.py @@ -16,7 +16,7 @@ from matplotlib.collections import PatchCollection from honeybee_radiance.config import folders as hbr_folders -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics from ..ladybug_extension.analysisperiod import describe_analysis_period from ..ladybug_extension.epw import EPW from ..ladybug_extension.location import location_to_string diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_sunpath.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_sunpath.py index 33efbe2d..9c628057 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_sunpath.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_sunpath.py @@ -9,7 +9,7 @@ from ladybug.sunpath import Sunpath from matplotlib.colors import BoundaryNorm, Colormap -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics from ..ladybug_extension.analysisperiod import ( analysis_period_to_datetimes, describe_analysis_period, diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_timeseries.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_timeseries.py index a99e02cb..a4a6cb68 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_timeseries.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_timeseries.py @@ -6,7 +6,7 @@ import matplotlib.pyplot as plt import pandas as pd -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics from ..helpers import validate_timeseries diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_utci.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_utci.py index 55b1766a..1af88181 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_utci.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_utci.py @@ -19,7 +19,7 @@ from mpl_toolkits.axes_grid1 import make_axes_locatable from scipy.interpolate import make_interp_spline -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics from ..categorical.categories import ( UTCI_DEFAULT_CATEGORIES, CategoricalComfort, diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/fisheye_sky.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/fisheye_sky.py index d0c167ae..5f2919b1 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/fisheye_sky.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/fisheye_sky.py @@ -11,7 +11,7 @@ from lbt_recipes.recipe import Recipe from lbt_recipes.settings import RecipeSettings from PIL import Image, ImageEnhance -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics @bhom_analytics() diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/lb_geometry.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/lb_geometry.py index 29f30087..911e676d 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/lb_geometry.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/lb_geometry.py @@ -15,7 +15,7 @@ Vector2D, ) -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics @bhom_analytics() diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/spatial_heatmap.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/spatial_heatmap.py index e8accd49..ac757ad3 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/spatial_heatmap.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/spatial_heatmap.py @@ -7,7 +7,7 @@ from matplotlib.tri import Triangulation from mpl_toolkits.axes_grid1 import make_axes_locatable -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics @bhom_analytics() diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/utilities.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/utilities.py index 9b520113..34eb6caa 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/utilities.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/utilities.py @@ -27,7 +27,7 @@ from matplotlib.tri import Triangulation from PIL import Image -from ..bhom.analytics import bhom_analytics +from python_toolkit.bhom.analytics import bhom_analytics @bhom_analytics() diff --git a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/solar.py b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/solar.py index 329aa9b6..bafaf705 100644 --- a/LadybugTools_Engine/Python/src/ladybugtools_toolkit/solar.py +++ b/LadybugTools_Engine/Python/src/ladybugtools_toolkit/solar.py @@ -33,8 +33,8 @@ wind_speed_at_height, remove_leap_days, ) -from .bhom.analytics import bhom_analytics -from .bhom.logging import CONSOLE_LOGGER +from python_toolkit.bhom.analytics import bhom_analytics +from python_toolkit.bhom.logging import CONSOLE_LOGGER from .ladybug_extension.analysisperiod import ( analysis_period_to_boolean, analysis_period_to_datetimes,