diff --git a/pyproject.toml b/pyproject.toml index 9aff969..9a73486 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,14 +77,14 @@ select = [ # "BLE", # flake8-blind-except (checks the except blocks that do not specify exception) # "FBT", # flake8-boolean-trap (ensure that boolean args can be used with kw only) # "E", # pycodestyle errors (PEP 8 style guide violations) - # "W", # pycodestyle warnings (e.g., extra spaces, indentation issues) + "W", # pycodestyle warnings (e.g., extra spaces, indentation issues) # "DOC", # pydoclint issues (e.g., extra or missing return, yield, warnings) # "A", # flake8-buitins (check variable and function names to not shadow builtins) # "N", # Naming convention checks (e.g., PEP 8 variable and function names) - # "F", # Pyflakes errors (e.g., unused imports, undefined variables) + "F", # Pyflakes errors (e.g., unused imports, undefined variables) # "I", # isort (Ensures imports are sorted properly) # "B", # flake8-bugbear (Detects likely bugs and bad practices) - # "TID", # flake8-tidy-imports (Checks for banned or misplaced imports) + "TID", # flake8-tidy-imports (Checks for banned or misplaced imports) "UP", # pyupgrade (Automatically updates old Python syntax) # "YTT", # flake8-2020 (Detects outdated Python 2/3 compatibility issues) # "FLY", # flynt (Converts old-style string formatting to f-strings) diff --git a/src/lasso/diffcrash/diffcrash_run.py b/src/lasso/diffcrash/diffcrash_run.py index 289bccd..aa2b685 100644 --- a/src/lasso/diffcrash/diffcrash_run.py +++ b/src/lasso/diffcrash/diffcrash_run.py @@ -14,7 +14,8 @@ from pathlib import Path import psutil -from ..logging import str_error, str_info, str_running, str_success, str_warn +# from ..logging import str_error, str_info, str_running, str_success, str_warn +from lasso.logging import str_error, str_info, str_running, str_success, str_warn # pylint: disable = too-many-lines diff --git a/src/lasso/diffcrash/run.py b/src/lasso/diffcrash/run.py index 8fd0541..d697760 100644 --- a/src/lasso/diffcrash/run.py +++ b/src/lasso/diffcrash/run.py @@ -13,7 +13,7 @@ parse_diffcrash_args, ) -from ..logging import str_error +from lasso.logging import str_error def _parse_stages(start_stage: str, end_stage: str): diff --git a/src/lasso/dimred/dimred_run.py b/src/lasso/dimred/dimred_run.py index 42631d1..eb4237d 100644 --- a/src/lasso/dimred/dimred_run.py +++ b/src/lasso/dimred/dimred_run.py @@ -18,11 +18,15 @@ from rich.table import Table from rich.text import Text -from ..utils.rich_progress_bars import PlaceHolderBar, WorkingDots -from .svd.clustering_betas import create_cluster_arg_dict, create_detector_arg_dict, group_betas -from .svd.plot_beta_clusters import plot_clusters_js -from .svd.pod_functions import calculate_v_and_betas -from .svd.subsampling_methods import create_reference_subsample, remap_random_subsample +from lasso.utils.rich_progress_bars import PlaceHolderBar, WorkingDots +from lasso.dimred.svd.clustering_betas import ( + create_cluster_arg_dict, + create_detector_arg_dict, + group_betas, +) +from lasso.dimred.svd.plot_beta_clusters import plot_clusters_js +from lasso.dimred.svd.pod_functions import calculate_v_and_betas +from lasso.dimred.svd.subsampling_methods import create_reference_subsample, remap_random_subsample # pylint: disable = too-many-lines diff --git a/src/lasso/dimred/hashing.py b/src/lasso/dimred/hashing.py index 6280ff0..0b1a2ec 100644 --- a/src/lasso/dimred/hashing.py +++ b/src/lasso/dimred/hashing.py @@ -9,8 +9,7 @@ from scipy import integrate from sklearn.neighbors import KDTree - -from ..math.stochastic import jensen_shannon_entropy +from lasso.math.stochastic import jensen_shannon_entropy def _match_modes( diff --git a/src/lasso/dimred/svd/subsampling_methods.py b/src/lasso/dimred/svd/subsampling_methods.py index eda14ed..539701c 100644 --- a/src/lasso/dimred/svd/subsampling_methods.py +++ b/src/lasso/dimred/svd/subsampling_methods.py @@ -7,7 +7,7 @@ import numpy as np from sklearn.neighbors import NearestNeighbors -from ...dyna import ArrayType, D3plot +from lasso.dyna import ArrayType, D3plot def _mark_dead_eles(node_indexes: np.ndarray, alive_shells: np.ndarray) -> np.ndarray: diff --git a/src/lasso/dyna/d3plot.py b/src/lasso/dyna/d3plot.py index 4eb67d2..314b3f1 100644 --- a/src/lasso/dyna/d3plot.py +++ b/src/lasso/dyna/d3plot.py @@ -15,15 +15,15 @@ import numpy as np -from ..femzip.femzip_api import FemzipAPI, FemzipBufferInfo, FemzipVariableCategory -from ..io.binary_buffer import BinaryBuffer -from ..io.files import open_file_or_filepath -from ..logging import get_logger -from ..plotting import plot_shell_mesh -from .array_type import ArrayType -from .d3plot_header import D3plotFiletype, D3plotHeader -from .femzip_mapper import FemzipMapper, filter_femzip_variables -from .filter_type import FilterType +from lasso.femzip.femzip_api import FemzipAPI, FemzipBufferInfo, FemzipVariableCategory +from lasso.io.binary_buffer import BinaryBuffer +from lasso.io.files import open_file_or_filepath +from lasso.logging import get_logger +from lasso.plotting import plot_shell_mesh +from lasso.dyna.array_type import ArrayType +from lasso.dyna.d3plot_header import D3plotFiletype, D3plotHeader +from lasso.dyna.femzip_mapper import FemzipMapper, filter_femzip_variables +from lasso.dyna.filter_type import FilterType # pylint: disable = too-many-lines diff --git a/src/lasso/dyna/d3plot_header.py b/src/lasso/dyna/d3plot_header.py index b7334bc..edf9378 100644 --- a/src/lasso/dyna/d3plot_header.py +++ b/src/lasso/dyna/d3plot_header.py @@ -4,8 +4,8 @@ import numpy as np import rich -from ..io.binary_buffer import BinaryBuffer -from ..logging import get_logger +from lasso.io.binary_buffer import BinaryBuffer +from lasso.logging import get_logger # We have a lot of docstrings here but even if not so, we want to contain the # code here.