diff --git a/user_tools/pyproject.toml b/user_tools/pyproject.toml index 6e50e3a75..0ea4a163c 100644 --- a/user_tools/pyproject.toml +++ b/user_tools/pyproject.toml @@ -45,7 +45,7 @@ dynamic=["entry-points", "version"] [project.scripts] spark_rapids_user_tools = "spark_rapids_pytools.wrapper:main" -ascli = "pyrapids.cmdli.pyrapids_cli:main" +ascli = "spark_rapids_tools.cmdli.tools_cli:main" [tool.setuptools] package-dir = {"" = "src"} diff --git a/user_tools/src/spark_rapids_pytools/cloud_api/databricks_aws.py b/user_tools/src/spark_rapids_pytools/cloud_api/databricks_aws.py index aed603d3f..d0fc047e5 100644 --- a/user_tools/src/spark_rapids_pytools/cloud_api/databricks_aws.py +++ b/user_tools/src/spark_rapids_pytools/cloud_api/databricks_aws.py @@ -18,7 +18,7 @@ from dataclasses import dataclass, field from typing import Any, List -from pyrapids import CspEnv +from spark_rapids_tools import CspEnv from spark_rapids_pytools.cloud_api.databricks_aws_job import DBAWSLocalRapidsJob from spark_rapids_pytools.cloud_api.emr import EMRNode, EMRPlatform from spark_rapids_pytools.cloud_api.s3storage import S3StorageDriver diff --git a/user_tools/src/spark_rapids_pytools/cloud_api/databricks_azure.py b/user_tools/src/spark_rapids_pytools/cloud_api/databricks_azure.py index c958f23f4..b92b70954 100644 --- a/user_tools/src/spark_rapids_pytools/cloud_api/databricks_azure.py +++ b/user_tools/src/spark_rapids_pytools/cloud_api/databricks_azure.py @@ -20,7 +20,7 @@ from dataclasses import dataclass, field from typing import Any, List -from pyrapids import CspEnv +from spark_rapids_tools import CspEnv from spark_rapids_pytools.cloud_api.azurestorage import AzureStorageDriver from spark_rapids_pytools.cloud_api.databricks_azure_job import DBAzureLocalRapidsJob from spark_rapids_pytools.cloud_api.sp_types import CMDDriverBase, ClusterBase, ClusterNode, \ diff --git a/user_tools/src/spark_rapids_pytools/cloud_api/dataproc.py b/user_tools/src/spark_rapids_pytools/cloud_api/dataproc.py index e737441ec..afd81ae7a 100644 --- a/user_tools/src/spark_rapids_pytools/cloud_api/dataproc.py +++ b/user_tools/src/spark_rapids_pytools/cloud_api/dataproc.py @@ -19,7 +19,7 @@ from dataclasses import dataclass, field from typing import Any, List -from pyrapids import CspEnv +from spark_rapids_tools import CspEnv from spark_rapids_pytools.cloud_api.dataproc_job import DataprocLocalRapidsJob from spark_rapids_pytools.cloud_api.gstorage import GStorageDriver from spark_rapids_pytools.cloud_api.sp_types import PlatformBase, CMDDriverBase, \ diff --git a/user_tools/src/spark_rapids_pytools/cloud_api/emr.py b/user_tools/src/spark_rapids_pytools/cloud_api/emr.py index ce885ce37..ed67b1bd9 100644 --- a/user_tools/src/spark_rapids_pytools/cloud_api/emr.py +++ b/user_tools/src/spark_rapids_pytools/cloud_api/emr.py @@ -19,7 +19,7 @@ from dataclasses import field, dataclass from typing import Any, List -from pyrapids import CspEnv +from spark_rapids_tools import CspEnv from spark_rapids_pytools.cloud_api.emr_job import EmrLocalRapidsJob from spark_rapids_pytools.cloud_api.s3storage import S3StorageDriver from spark_rapids_pytools.cloud_api.sp_types import PlatformBase, ClusterBase, CMDDriverBase, \ diff --git a/user_tools/src/spark_rapids_pytools/cloud_api/onprem.py b/user_tools/src/spark_rapids_pytools/cloud_api/onprem.py index b6656c171..ef96c6420 100644 --- a/user_tools/src/spark_rapids_pytools/cloud_api/onprem.py +++ b/user_tools/src/spark_rapids_pytools/cloud_api/onprem.py @@ -18,7 +18,7 @@ from dataclasses import dataclass from typing import Any, List -from pyrapids import CspEnv +from spark_rapids_tools import CspEnv from spark_rapids_pytools.rapids.rapids_job import RapidsLocalJob from spark_rapids_pytools.cloud_api.sp_types import PlatformBase, ClusterBase, ClusterNode, \ CMDDriverBase, ClusterGetAccessor, GpuDevice, \ diff --git a/user_tools/src/spark_rapids_pytools/cloud_api/sp_types.py b/user_tools/src/spark_rapids_pytools/cloud_api/sp_types.py index 9dc6331d7..65fb960cc 100644 --- a/user_tools/src/spark_rapids_pytools/cloud_api/sp_types.py +++ b/user_tools/src/spark_rapids_pytools/cloud_api/sp_types.py @@ -22,7 +22,7 @@ from logging import Logger from typing import Type, Any, List, Callable -from pyrapids import EnumeratedType, CspEnv +from spark_rapids_tools import EnumeratedType, CspEnv from spark_rapids_pytools.common.prop_manager import AbstractPropertiesContainer, JSONPropertiesContainer, \ get_elem_non_safe from spark_rapids_pytools.common.sys_storage import StorageDriver, FSUtil diff --git a/user_tools/src/spark_rapids_pytools/common/prop_manager.py b/user_tools/src/spark_rapids_pytools/common/prop_manager.py index 35864c0fe..fdafcc71f 100644 --- a/user_tools/src/spark_rapids_pytools/common/prop_manager.py +++ b/user_tools/src/spark_rapids_pytools/common/prop_manager.py @@ -22,7 +22,7 @@ import yaml -from pyrapids import get_elem_from_dict, get_elem_non_safe +from spark_rapids_tools import get_elem_from_dict, get_elem_non_safe def convert_dict_to_camel_case(dic: dict): diff --git a/user_tools/src/spark_rapids_pytools/pricing/emr_pricing.py b/user_tools/src/spark_rapids_pytools/pricing/emr_pricing.py index 73a52844c..6670e6698 100644 --- a/user_tools/src/spark_rapids_pytools/pricing/emr_pricing.py +++ b/user_tools/src/spark_rapids_pytools/pricing/emr_pricing.py @@ -16,7 +16,7 @@ from dataclasses import dataclass, field -from pyrapids import get_elem_from_dict, get_elem_non_safe +from spark_rapids_tools import get_elem_from_dict, get_elem_non_safe from spark_rapids_pytools.common.prop_manager import JSONPropertiesContainer from spark_rapids_pytools.common.sys_storage import FSUtil from spark_rapids_pytools.pricing.price_provider import PriceProvider diff --git a/user_tools/src/spark_rapids_pytools/rapids/qualification.py b/user_tools/src/spark_rapids_pytools/rapids/qualification.py index b10b06c13..a8861c6a1 100644 --- a/user_tools/src/spark_rapids_pytools/rapids/qualification.py +++ b/user_tools/src/spark_rapids_pytools/rapids/qualification.py @@ -22,7 +22,7 @@ import pandas as pd from tabulate import tabulate -from pyrapids.enums import QualFilterApp, QualGpuClusterReshapeType +from spark_rapids_tools.enums import QualFilterApp, QualGpuClusterReshapeType from spark_rapids_pytools.cloud_api.sp_types import ClusterReshape, NodeHWInfo from spark_rapids_pytools.common.sys_storage import FSUtil from spark_rapids_pytools.common.utilities import Utils, TemplateGenerator diff --git a/user_tools/src/spark_rapids_pytools/rapids/rapids_tool.py b/user_tools/src/spark_rapids_pytools/rapids/rapids_tool.py index c88867376..4b116c0d7 100644 --- a/user_tools/src/spark_rapids_pytools/rapids/rapids_tool.py +++ b/user_tools/src/spark_rapids_pytools/rapids/rapids_tool.py @@ -26,7 +26,7 @@ from logging import Logger from typing import Any, Callable, Dict, List -from pyrapids import CspEnv +from spark_rapids_tools import CspEnv from spark_rapids_pytools.cloud_api.sp_types import get_platform, \ ClusterBase, DeployMode, NodeHWInfo from spark_rapids_pytools.common.prop_manager import YAMLPropertiesContainer diff --git a/user_tools/src/spark_rapids_pytools/rapids/tool_ctxt.py b/user_tools/src/spark_rapids_pytools/rapids/tool_ctxt.py index c4851a0b1..503547450 100644 --- a/user_tools/src/spark_rapids_pytools/rapids/tool_ctxt.py +++ b/user_tools/src/spark_rapids_pytools/rapids/tool_ctxt.py @@ -21,7 +21,7 @@ from logging import Logger from typing import Type, Any, ClassVar, List -from pyrapids import CspEnv +from spark_rapids_tools import CspEnv from spark_rapids_pytools.cloud_api.sp_types import PlatformBase from spark_rapids_pytools.common.prop_manager import YAMLPropertiesContainer from spark_rapids_pytools.common.sys_storage import FSUtil diff --git a/user_tools/src/spark_rapids_pytools/resources/dev/prepackage_mgr.py b/user_tools/src/spark_rapids_pytools/resources/dev/prepackage_mgr.py index 6a8a90057..6d3108ff3 100644 --- a/user_tools/src/spark_rapids_pytools/resources/dev/prepackage_mgr.py +++ b/user_tools/src/spark_rapids_pytools/resources/dev/prepackage_mgr.py @@ -25,7 +25,7 @@ import fire -from pyrapids import CspEnv +from spark_rapids_tools import CspEnv from spark_rapids_pytools.common.prop_manager import JSONPropertiesContainer from spark_rapids_pytools.common.sys_storage import FSUtil from spark_rapids_pytools.common.utilities import Utils diff --git a/user_tools/src/spark_rapids_pytools/wrappers/databricks_aws_wrapper.py b/user_tools/src/spark_rapids_pytools/wrappers/databricks_aws_wrapper.py index 7a91a7b6b..083d5d56f 100644 --- a/user_tools/src/spark_rapids_pytools/wrappers/databricks_aws_wrapper.py +++ b/user_tools/src/spark_rapids_pytools/wrappers/databricks_aws_wrapper.py @@ -14,7 +14,7 @@ """Wrapper class to run tools associated with RAPIDS Accelerator for Apache Spark plugin on DATABRICKS_AWS.""" -from pyrapids import CspEnv +from spark_rapids_tools import CspEnv from spark_rapids_pytools.cloud_api.sp_types import DeployMode from spark_rapids_pytools.common.utilities import ToolLogging from spark_rapids_pytools.rapids.profiling import ProfilingAsLocal diff --git a/user_tools/src/spark_rapids_pytools/wrappers/databricks_azure_wrapper.py b/user_tools/src/spark_rapids_pytools/wrappers/databricks_azure_wrapper.py index 2eb1cf8a7..87a9b2891 100644 --- a/user_tools/src/spark_rapids_pytools/wrappers/databricks_azure_wrapper.py +++ b/user_tools/src/spark_rapids_pytools/wrappers/databricks_azure_wrapper.py @@ -14,7 +14,7 @@ """Wrapper class to run tools associated with RAPIDS Accelerator for Apache Spark plugin on DATABRICKS_AZURE.""" -from pyrapids import CspEnv +from spark_rapids_tools import CspEnv from spark_rapids_pytools.cloud_api.sp_types import DeployMode from spark_rapids_pytools.common.utilities import ToolLogging from spark_rapids_pytools.rapids.profiling import ProfilingAsLocal diff --git a/user_tools/src/spark_rapids_pytools/wrappers/dataproc_wrapper.py b/user_tools/src/spark_rapids_pytools/wrappers/dataproc_wrapper.py index 4fd0ca4fb..05ae9eb60 100644 --- a/user_tools/src/spark_rapids_pytools/wrappers/dataproc_wrapper.py +++ b/user_tools/src/spark_rapids_pytools/wrappers/dataproc_wrapper.py @@ -14,7 +14,7 @@ """Wrapper class to run tools associated with RAPIDS Accelerator for Apache Spark plugin on Dataproc.""" -from pyrapids import CspEnv +from spark_rapids_tools import CspEnv from spark_rapids_pytools.cloud_api.sp_types import DeployMode from spark_rapids_pytools.common.utilities import ToolLogging from spark_rapids_pytools.rapids.bootstrap import Bootstrap diff --git a/user_tools/src/spark_rapids_pytools/wrappers/emr_wrapper.py b/user_tools/src/spark_rapids_pytools/wrappers/emr_wrapper.py index 63069291d..65de11341 100644 --- a/user_tools/src/spark_rapids_pytools/wrappers/emr_wrapper.py +++ b/user_tools/src/spark_rapids_pytools/wrappers/emr_wrapper.py @@ -14,7 +14,7 @@ """Wrapper class to run tools associated with RAPIDS Accelerator for Apache Spark plugin on AWS-EMR.""" -from pyrapids import CspEnv +from spark_rapids_tools import CspEnv from spark_rapids_pytools.cloud_api.sp_types import DeployMode from spark_rapids_pytools.common.utilities import ToolLogging from spark_rapids_pytools.rapids.bootstrap import Bootstrap diff --git a/user_tools/src/spark_rapids_pytools/wrappers/onprem_wrapper.py b/user_tools/src/spark_rapids_pytools/wrappers/onprem_wrapper.py index ba4971399..1e4ea0c56 100644 --- a/user_tools/src/spark_rapids_pytools/wrappers/onprem_wrapper.py +++ b/user_tools/src/spark_rapids_pytools/wrappers/onprem_wrapper.py @@ -14,7 +14,7 @@ """Wrapper class to run tools associated with RAPIDS Accelerator for Apache Spark plugin on On-Prem cluster.""" -from pyrapids import CspEnv +from spark_rapids_tools import CspEnv from spark_rapids_pytools.cloud_api.sp_types import DeployMode from spark_rapids_pytools.common.utilities import ToolLogging from spark_rapids_pytools.rapids.profiling import ProfilingAsLocal diff --git a/user_tools/src/pyrapids/__init__.py b/user_tools/src/spark_rapids_tools/__init__.py similarity index 100% rename from user_tools/src/pyrapids/__init__.py rename to user_tools/src/spark_rapids_tools/__init__.py diff --git a/user_tools/src/pyrapids/cloud/__init__.py b/user_tools/src/spark_rapids_tools/cloud/__init__.py similarity index 100% rename from user_tools/src/pyrapids/cloud/__init__.py rename to user_tools/src/spark_rapids_tools/cloud/__init__.py diff --git a/user_tools/src/pyrapids/cloud/cluster.py b/user_tools/src/spark_rapids_tools/cloud/cluster.py similarity index 100% rename from user_tools/src/pyrapids/cloud/cluster.py rename to user_tools/src/spark_rapids_tools/cloud/cluster.py diff --git a/user_tools/src/pyrapids/cloud/databricks/__init__.py b/user_tools/src/spark_rapids_tools/cloud/databricks/__init__.py similarity index 100% rename from user_tools/src/pyrapids/cloud/databricks/__init__.py rename to user_tools/src/spark_rapids_tools/cloud/databricks/__init__.py diff --git a/user_tools/src/pyrapids/cloud/databricks/dbcluster.py b/user_tools/src/spark_rapids_tools/cloud/databricks/dbcluster.py similarity index 89% rename from user_tools/src/pyrapids/cloud/databricks/dbcluster.py rename to user_tools/src/spark_rapids_tools/cloud/databricks/dbcluster.py index 58c950889..4b1c0ffc2 100644 --- a/user_tools/src/pyrapids/cloud/databricks/dbcluster.py +++ b/user_tools/src/spark_rapids_tools/cloud/databricks/dbcluster.py @@ -18,8 +18,8 @@ from typing import ClassVar, Type, Optional -from pyrapids.cloud.cluster import register_client_cluster, register_cluster_prop_mgr, ClusterPropMgr, ClientCluster -from pyrapids.utils.propmanager import PropValidatorSchema +from spark_rapids_tools.cloud.cluster import register_client_cluster, register_cluster_prop_mgr, ClusterPropMgr, ClientCluster +from spark_rapids_tools.utils.propmanager import PropValidatorSchema class DBAwsClusterSchema(PropValidatorSchema): diff --git a/user_tools/src/pyrapids/cloud/dataproc/__init__.py b/user_tools/src/spark_rapids_tools/cloud/dataproc/__init__.py similarity index 100% rename from user_tools/src/pyrapids/cloud/dataproc/__init__.py rename to user_tools/src/spark_rapids_tools/cloud/dataproc/__init__.py diff --git a/user_tools/src/pyrapids/cloud/dataproc/dataproccluster.py b/user_tools/src/spark_rapids_tools/cloud/dataproc/dataproccluster.py similarity index 83% rename from user_tools/src/pyrapids/cloud/dataproc/dataproccluster.py rename to user_tools/src/spark_rapids_tools/cloud/dataproc/dataproccluster.py index 482d18e50..20ebf526a 100644 --- a/user_tools/src/pyrapids/cloud/dataproc/dataproccluster.py +++ b/user_tools/src/spark_rapids_tools/cloud/dataproc/dataproccluster.py @@ -18,8 +18,8 @@ from typing import ClassVar, Type -from pyrapids.cloud.cluster import ClientCluster, register_client_cluster, ClusterPropMgr, register_cluster_prop_mgr -from pyrapids.utils.propmanager import PropValidatorSchemaCamel, PropValidatorSchema +from spark_rapids_tools.cloud.cluster import ClientCluster, register_client_cluster, ClusterPropMgr, register_cluster_prop_mgr +from spark_rapids_tools.utils.propmanager import PropValidatorSchemaCamel, PropValidatorSchema class DataprocClusterSchema(PropValidatorSchemaCamel): diff --git a/user_tools/src/pyrapids/cloud/emr/__init__.py b/user_tools/src/spark_rapids_tools/cloud/emr/__init__.py similarity index 100% rename from user_tools/src/pyrapids/cloud/emr/__init__.py rename to user_tools/src/spark_rapids_tools/cloud/emr/__init__.py diff --git a/user_tools/src/pyrapids/cloud/emr/emrcluster.py b/user_tools/src/spark_rapids_tools/cloud/emr/emrcluster.py similarity index 82% rename from user_tools/src/pyrapids/cloud/emr/emrcluster.py rename to user_tools/src/spark_rapids_tools/cloud/emr/emrcluster.py index 7c676d074..d94830ca6 100644 --- a/user_tools/src/pyrapids/cloud/emr/emrcluster.py +++ b/user_tools/src/spark_rapids_tools/cloud/emr/emrcluster.py @@ -18,8 +18,8 @@ from typing import ClassVar, Type -from pyrapids.cloud.cluster import register_cluster_prop_mgr, register_client_cluster, ClusterPropMgr, ClientCluster -from pyrapids.utils.propmanager import PropValidatorSchemaUpper, PropValidatorSchema +from spark_rapids_tools.cloud.cluster import register_cluster_prop_mgr, register_client_cluster, ClusterPropMgr, ClientCluster +from spark_rapids_tools.utils.propmanager import PropValidatorSchemaUpper, PropValidatorSchema class EmrClusterSchema(PropValidatorSchemaUpper): diff --git a/user_tools/src/pyrapids/cloud/onprem/__init__.py b/user_tools/src/spark_rapids_tools/cloud/onprem/__init__.py similarity index 100% rename from user_tools/src/pyrapids/cloud/onprem/__init__.py rename to user_tools/src/spark_rapids_tools/cloud/onprem/__init__.py diff --git a/user_tools/src/pyrapids/cloud/onprem/onpremcluster.py b/user_tools/src/spark_rapids_tools/cloud/onprem/onpremcluster.py similarity index 85% rename from user_tools/src/pyrapids/cloud/onprem/onpremcluster.py rename to user_tools/src/spark_rapids_tools/cloud/onprem/onpremcluster.py index 8c6a87214..85e8972d5 100644 --- a/user_tools/src/pyrapids/cloud/onprem/onpremcluster.py +++ b/user_tools/src/spark_rapids_tools/cloud/onprem/onpremcluster.py @@ -19,9 +19,9 @@ from typing import ClassVar, Type from typing_extensions import TypedDict from pydantic import ConfigDict -from pyrapids.cloud.cluster import ClientCluster, ClusterPropMgr, register_cluster_prop_mgr, register_client_cluster -from pyrapids.utils.propmanager import PropValidatorSchema -from pyrapids.utils.util import to_camel_case +from spark_rapids_tools.cloud.cluster import ClientCluster, ClusterPropMgr, register_cluster_prop_mgr, register_client_cluster +from spark_rapids_tools.utils.propmanager import PropValidatorSchema +from spark_rapids_tools.utils.util import to_camel_case class OnPremDriverConfigSchema(TypedDict): diff --git a/user_tools/src/pyrapids/cmdli/__init__.py b/user_tools/src/spark_rapids_tools/cmdli/__init__.py similarity index 92% rename from user_tools/src/pyrapids/cmdli/__init__.py rename to user_tools/src/spark_rapids_tools/cmdli/__init__.py index ed252dbfc..1344d5a37 100644 --- a/user_tools/src/pyrapids/cmdli/__init__.py +++ b/user_tools/src/spark_rapids_tools/cmdli/__init__.py @@ -14,8 +14,8 @@ """init file of the user CLI used to run the tools""" -from .pyrapids_cli import PyRapids +from .tools_cli import ToolsCLI __all__ = [ - 'PyRapids' + 'ToolsCLI' ] diff --git a/user_tools/src/pyrapids/cmdli/argprocessor.py b/user_tools/src/spark_rapids_tools/cmdli/argprocessor.py similarity index 98% rename from user_tools/src/pyrapids/cmdli/argprocessor.py rename to user_tools/src/spark_rapids_tools/cmdli/argprocessor.py index 7a332461a..1803f7602 100644 --- a/user_tools/src/pyrapids/cmdli/argprocessor.py +++ b/user_tools/src/spark_rapids_tools/cmdli/argprocessor.py @@ -25,9 +25,9 @@ from pydantic.dataclasses import dataclass from pydantic_core import PydanticCustomError -from pyrapids.cloud import ClientCluster -from pyrapids.exceptions import IllegalArgumentError -from pyrapids.utils import AbstractPropContainer, is_http_file +from spark_rapids_tools.cloud import ClientCluster +from spark_rapids_tools.exceptions import IllegalArgumentError +from spark_rapids_tools.utils import AbstractPropContainer, is_http_file from spark_rapids_pytools.cloud_api.sp_types import DeployMode from spark_rapids_pytools.common.utilities import ToolLogging from spark_rapids_pytools.rapids.qualification import QualGpuClusterReshapeType @@ -105,7 +105,7 @@ class AbsToolUserArgModel: 'meta': {}, 'toolArgs': {} }) - logger: ClassVar[Logger] = ToolLogging.get_and_setup_logger('pyrapids.argparser') + logger: ClassVar[Logger] = ToolLogging.get_and_setup_logger('spark_rapids_tools.argparser') tool_name: ClassVar[str] = None @classmethod diff --git a/user_tools/src/pyrapids/cmdli/pyrapids_cli.py b/user_tools/src/spark_rapids_tools/cmdli/tools_cli.py similarity index 97% rename from user_tools/src/pyrapids/cmdli/pyrapids_cli.py rename to user_tools/src/spark_rapids_tools/cmdli/tools_cli.py index 45d6ff799..001472e36 100644 --- a/user_tools/src/pyrapids/cmdli/pyrapids_cli.py +++ b/user_tools/src/spark_rapids_tools/cmdli/tools_cli.py @@ -17,15 +17,15 @@ import fire -from pyrapids.enums import QualGpuClusterReshapeType -from pyrapids.utils.util import gen_app_banner +from spark_rapids_tools.enums import QualGpuClusterReshapeType +from spark_rapids_tools.utils.util import gen_app_banner from spark_rapids_pytools.rapids.bootstrap import Bootstrap from spark_rapids_pytools.rapids.profiling import ProfilingAsLocal from spark_rapids_pytools.rapids.qualification import QualificationAsLocal from .argprocessor import AbsToolUserArgModel -class PyRapids(object): # pylint: disable=too-few-public-methods +class ToolsCLI(object): # pylint: disable=too-few-public-methods """CLI that provides a runtime environment that simplifies running cost and performance analysis using the RAPIDS Accelerator for Apache Spark. @@ -167,7 +167,7 @@ def main(): # Make Python Fire not use a pager when it prints a help text fire.core.Display = lambda lines, out: out.write('\n'.join(lines) + '\n') print(gen_app_banner()) - fire.Fire(PyRapids()) + fire.Fire(ToolsCLI()) if __name__ == '__main__': diff --git a/user_tools/src/pyrapids/enums.py b/user_tools/src/spark_rapids_tools/enums.py similarity index 100% rename from user_tools/src/pyrapids/enums.py rename to user_tools/src/spark_rapids_tools/enums.py diff --git a/user_tools/src/pyrapids/exceptions.py b/user_tools/src/spark_rapids_tools/exceptions.py similarity index 100% rename from user_tools/src/pyrapids/exceptions.py rename to user_tools/src/spark_rapids_tools/exceptions.py diff --git a/user_tools/src/pyrapids/storagelib/__init__.py b/user_tools/src/spark_rapids_tools/storagelib/__init__.py similarity index 100% rename from user_tools/src/pyrapids/storagelib/__init__.py rename to user_tools/src/spark_rapids_tools/storagelib/__init__.py diff --git a/user_tools/src/pyrapids/storagelib/adls/__init__.py b/user_tools/src/spark_rapids_tools/storagelib/adls/__init__.py similarity index 100% rename from user_tools/src/pyrapids/storagelib/adls/__init__.py rename to user_tools/src/spark_rapids_tools/storagelib/adls/__init__.py diff --git a/user_tools/src/pyrapids/storagelib/adls/adlsfs.py b/user_tools/src/spark_rapids_tools/storagelib/adls/adlsfs.py similarity index 100% rename from user_tools/src/pyrapids/storagelib/adls/adlsfs.py rename to user_tools/src/spark_rapids_tools/storagelib/adls/adlsfs.py diff --git a/user_tools/src/pyrapids/storagelib/adls/adlspath.py b/user_tools/src/spark_rapids_tools/storagelib/adls/adlspath.py similarity index 100% rename from user_tools/src/pyrapids/storagelib/adls/adlspath.py rename to user_tools/src/spark_rapids_tools/storagelib/adls/adlspath.py diff --git a/user_tools/src/pyrapids/storagelib/cspfs.py b/user_tools/src/spark_rapids_tools/storagelib/cspfs.py similarity index 100% rename from user_tools/src/pyrapids/storagelib/cspfs.py rename to user_tools/src/spark_rapids_tools/storagelib/cspfs.py diff --git a/user_tools/src/pyrapids/storagelib/csppath.py b/user_tools/src/spark_rapids_tools/storagelib/csppath.py similarity index 97% rename from user_tools/src/pyrapids/storagelib/csppath.py rename to user_tools/src/spark_rapids_tools/storagelib/csppath.py index 923899b0c..50d1b8c2d 100644 --- a/user_tools/src/pyrapids/storagelib/csppath.py +++ b/user_tools/src/spark_rapids_tools/storagelib/csppath.py @@ -190,18 +190,18 @@ class CspPath(metaclass=CspPathMeta): Create a new path subclass from a gcs URI: >>> gs_path = CspPath('gs://bucket-name/folder_00/subfolder_01') - + or from S3 URI: >>> s3_path = CspPath('s3://bucket-name/folder_00/subfolder_01') - + or from local file URI: >>> local_path1, local_path2 = (CspPath('~/my_folder'), CspPath('file:///my_folder')) - + Print the data from the file with `open_input_file()`: diff --git a/user_tools/src/pyrapids/storagelib/gcs/__init__.py b/user_tools/src/spark_rapids_tools/storagelib/gcs/__init__.py similarity index 100% rename from user_tools/src/pyrapids/storagelib/gcs/__init__.py rename to user_tools/src/spark_rapids_tools/storagelib/gcs/__init__.py diff --git a/user_tools/src/pyrapids/storagelib/gcs/gcsfs.py b/user_tools/src/spark_rapids_tools/storagelib/gcs/gcsfs.py similarity index 100% rename from user_tools/src/pyrapids/storagelib/gcs/gcsfs.py rename to user_tools/src/spark_rapids_tools/storagelib/gcs/gcsfs.py diff --git a/user_tools/src/pyrapids/storagelib/gcs/gcspath.py b/user_tools/src/spark_rapids_tools/storagelib/gcs/gcspath.py similarity index 100% rename from user_tools/src/pyrapids/storagelib/gcs/gcspath.py rename to user_tools/src/spark_rapids_tools/storagelib/gcs/gcspath.py diff --git a/user_tools/src/pyrapids/storagelib/hdfs/__init__.py b/user_tools/src/spark_rapids_tools/storagelib/hdfs/__init__.py similarity index 100% rename from user_tools/src/pyrapids/storagelib/hdfs/__init__.py rename to user_tools/src/spark_rapids_tools/storagelib/hdfs/__init__.py diff --git a/user_tools/src/pyrapids/storagelib/hdfs/hdfsfs.py b/user_tools/src/spark_rapids_tools/storagelib/hdfs/hdfsfs.py similarity index 100% rename from user_tools/src/pyrapids/storagelib/hdfs/hdfsfs.py rename to user_tools/src/spark_rapids_tools/storagelib/hdfs/hdfsfs.py diff --git a/user_tools/src/pyrapids/storagelib/hdfs/hdfspath.py b/user_tools/src/spark_rapids_tools/storagelib/hdfs/hdfspath.py similarity index 100% rename from user_tools/src/pyrapids/storagelib/hdfs/hdfspath.py rename to user_tools/src/spark_rapids_tools/storagelib/hdfs/hdfspath.py diff --git a/user_tools/src/pyrapids/storagelib/local/__init__.py b/user_tools/src/spark_rapids_tools/storagelib/local/__init__.py similarity index 100% rename from user_tools/src/pyrapids/storagelib/local/__init__.py rename to user_tools/src/spark_rapids_tools/storagelib/local/__init__.py diff --git a/user_tools/src/pyrapids/storagelib/local/localfs.py b/user_tools/src/spark_rapids_tools/storagelib/local/localfs.py similarity index 100% rename from user_tools/src/pyrapids/storagelib/local/localfs.py rename to user_tools/src/spark_rapids_tools/storagelib/local/localfs.py diff --git a/user_tools/src/pyrapids/storagelib/local/localpath.py b/user_tools/src/spark_rapids_tools/storagelib/local/localpath.py similarity index 100% rename from user_tools/src/pyrapids/storagelib/local/localpath.py rename to user_tools/src/spark_rapids_tools/storagelib/local/localpath.py diff --git a/user_tools/src/pyrapids/storagelib/s3/__init__.py b/user_tools/src/spark_rapids_tools/storagelib/s3/__init__.py similarity index 100% rename from user_tools/src/pyrapids/storagelib/s3/__init__.py rename to user_tools/src/spark_rapids_tools/storagelib/s3/__init__.py diff --git a/user_tools/src/pyrapids/storagelib/s3/s3fs.py b/user_tools/src/spark_rapids_tools/storagelib/s3/s3fs.py similarity index 95% rename from user_tools/src/pyrapids/storagelib/s3/s3fs.py rename to user_tools/src/spark_rapids_tools/storagelib/s3/s3fs.py index e64922acc..b4054cf0a 100644 --- a/user_tools/src/pyrapids/storagelib/s3/s3fs.py +++ b/user_tools/src/spark_rapids_tools/storagelib/s3/s3fs.py @@ -15,7 +15,7 @@ """Wrapper for the S3 File system""" -from pyrapids.storagelib.cspfs import register_fs_class, CspFs +from spark_rapids_tools.storagelib.cspfs import register_fs_class, CspFs @register_fs_class('s3', 'S3FileSystem') diff --git a/user_tools/src/pyrapids/storagelib/s3/s3path.py b/user_tools/src/spark_rapids_tools/storagelib/s3/s3path.py similarity index 100% rename from user_tools/src/pyrapids/storagelib/s3/s3path.py rename to user_tools/src/spark_rapids_tools/storagelib/s3/s3path.py diff --git a/user_tools/src/pyrapids/tools/__init__.py b/user_tools/src/spark_rapids_tools/tools/__init__.py similarity index 100% rename from user_tools/src/pyrapids/tools/__init__.py rename to user_tools/src/spark_rapids_tools/tools/__init__.py diff --git a/user_tools/src/pyrapids/tools/autotuner.py b/user_tools/src/spark_rapids_tools/tools/autotuner.py similarity index 89% rename from user_tools/src/pyrapids/tools/autotuner.py rename to user_tools/src/spark_rapids_tools/tools/autotuner.py index b65ff094a..a390fefad 100644 --- a/user_tools/src/pyrapids/tools/autotuner.py +++ b/user_tools/src/spark_rapids_tools/tools/autotuner.py @@ -16,7 +16,7 @@ from typing import Optional, ClassVar, Type -from pyrapids.utils.propmanager import PropValidatorSchemaCamel, PropValidatorSchema, AbstractPropContainer +from spark_rapids_tools.utils.propmanager import PropValidatorSchemaCamel, PropValidatorSchema, AbstractPropContainer class AutoTunerInputSchema(PropValidatorSchemaCamel): diff --git a/user_tools/src/pyrapids/utils/__init__.py b/user_tools/src/spark_rapids_tools/utils/__init__.py similarity index 100% rename from user_tools/src/pyrapids/utils/__init__.py rename to user_tools/src/spark_rapids_tools/utils/__init__.py diff --git a/user_tools/src/pyrapids/utils/propmanager.py b/user_tools/src/spark_rapids_tools/utils/propmanager.py similarity index 94% rename from user_tools/src/pyrapids/utils/propmanager.py rename to user_tools/src/spark_rapids_tools/utils/propmanager.py index fbe55d0b5..c7dd6d822 100644 --- a/user_tools/src/pyrapids/utils/propmanager.py +++ b/user_tools/src/spark_rapids_tools/utils/propmanager.py @@ -23,9 +23,9 @@ import yaml from pydantic import BaseModel, ConfigDict, model_validator, ValidationError -from pyrapids.exceptions import JsonLoadException, YamlLoadException, InvalidPropertiesSchema -from pyrapids.storagelib.csppath import CspPath, CspPathT -from pyrapids.utils.util import to_camel_case, to_camel_capital_case, get_elem_from_dict, get_elem_non_safe +from spark_rapids_tools.exceptions import JsonLoadException, YamlLoadException, InvalidPropertiesSchema +from spark_rapids_tools.storagelib.csppath import CspPath, CspPathT +from spark_rapids_tools.utils.util import to_camel_case, to_camel_capital_case, get_elem_from_dict, get_elem_non_safe def load_json(file_path: Union[str, CspPathT]) -> Any: diff --git a/user_tools/src/pyrapids/utils/util.py b/user_tools/src/spark_rapids_tools/utils/util.py similarity index 95% rename from user_tools/src/pyrapids/utils/util.py rename to user_tools/src/spark_rapids_tools/utils/util.py index 07bf2439b..8d1676979 100644 --- a/user_tools/src/pyrapids/utils/util.py +++ b/user_tools/src/spark_rapids_tools/utils/util.py @@ -26,7 +26,7 @@ from pydantic import ValidationError, AnyHttpUrl, TypeAdapter import spark_rapids_pytools -from pyrapids.exceptions import CspPathAttributeError +from spark_rapids_tools.exceptions import CspPathAttributeError def get_elem_from_dict(data, keys): @@ -87,8 +87,8 @@ def to_snake_case(word: str) -> str: def dump_tool_usage(tool_name: Optional[str], raise_sys_exit: Optional[bool] = True): - imported_module = __import__('pyrapids.cmdli', globals(), locals(), ['PyRapids']) - wrapper_clzz = getattr(imported_module, 'PyRapids') + imported_module = __import__('spark_rapids_tools.cmdli', globals(), locals(), ['ToolsCLI']) + wrapper_clzz = getattr(imported_module, 'ToolsCLI') help_name = 'ascli' usage_cmd = f'{tool_name} --help' try: diff --git a/user_tools/tests/pyrapids_unit/__init__.py b/user_tools/tests/spark_rapids_tools_ut/__init__.py similarity index 100% rename from user_tools/tests/pyrapids_unit/__init__.py rename to user_tools/tests/spark_rapids_tools_ut/__init__.py diff --git a/user_tools/tests/pyrapids_unit/conftest.py b/user_tools/tests/spark_rapids_tools_ut/conftest.py similarity index 92% rename from user_tools/tests/pyrapids_unit/conftest.py rename to user_tools/tests/spark_rapids_tools_ut/conftest.py index 0b886a042..dbb5fb383 100644 --- a/user_tools/tests/pyrapids_unit/conftest.py +++ b/user_tools/tests/spark_rapids_tools_ut/conftest.py @@ -25,7 +25,7 @@ def get_test_resources_path(): import importlib_resources else: import importlib.resources as importlib_resources - pkg = importlib_resources.files('tests.pyrapids_unit') + pkg = importlib_resources.files('tests.spark_rapids_tools_ut') return pkg / 'resources' @@ -47,7 +47,7 @@ def gen_cpu_cluster_props(): all_csps = csps + ['onprem'] -class PyrapidsUnitTest: # pylint: disable=too-few-public-methods +class SparkRapidsToolsUT: # pylint: disable=too-few-public-methods @pytest.fixture(autouse=True) def get_ut_data_dir(self): diff --git a/user_tools/tests/pyrapids_unit/resources/cluster/databricks/aws-cpu-00.json b/user_tools/tests/spark_rapids_tools_ut/resources/cluster/databricks/aws-cpu-00.json similarity index 100% rename from user_tools/tests/pyrapids_unit/resources/cluster/databricks/aws-cpu-00.json rename to user_tools/tests/spark_rapids_tools_ut/resources/cluster/databricks/aws-cpu-00.json diff --git a/user_tools/tests/pyrapids_unit/resources/cluster/databricks/azure-cpu-00.json b/user_tools/tests/spark_rapids_tools_ut/resources/cluster/databricks/azure-cpu-00.json similarity index 100% rename from user_tools/tests/pyrapids_unit/resources/cluster/databricks/azure-cpu-00.json rename to user_tools/tests/spark_rapids_tools_ut/resources/cluster/databricks/azure-cpu-00.json diff --git a/user_tools/tests/pyrapids_unit/resources/cluster/dataproc/cpu-00.yaml b/user_tools/tests/spark_rapids_tools_ut/resources/cluster/dataproc/cpu-00.yaml similarity index 100% rename from user_tools/tests/pyrapids_unit/resources/cluster/dataproc/cpu-00.yaml rename to user_tools/tests/spark_rapids_tools_ut/resources/cluster/dataproc/cpu-00.yaml diff --git a/user_tools/tests/pyrapids_unit/resources/cluster/emr/cpu-00.json b/user_tools/tests/spark_rapids_tools_ut/resources/cluster/emr/cpu-00.json similarity index 100% rename from user_tools/tests/pyrapids_unit/resources/cluster/emr/cpu-00.json rename to user_tools/tests/spark_rapids_tools_ut/resources/cluster/emr/cpu-00.json diff --git a/user_tools/tests/pyrapids_unit/resources/cluster/onprem/cpu-00.yaml b/user_tools/tests/spark_rapids_tools_ut/resources/cluster/onprem/cpu-00.yaml similarity index 100% rename from user_tools/tests/pyrapids_unit/resources/cluster/onprem/cpu-00.yaml rename to user_tools/tests/spark_rapids_tools_ut/resources/cluster/onprem/cpu-00.yaml diff --git a/user_tools/tests/pyrapids_unit/resources/eventlogs/.gitkeep b/user_tools/tests/spark_rapids_tools_ut/resources/eventlogs/.gitkeep similarity index 100% rename from user_tools/tests/pyrapids_unit/resources/eventlogs/.gitkeep rename to user_tools/tests/spark_rapids_tools_ut/resources/eventlogs/.gitkeep diff --git a/user_tools/tests/pyrapids_unit/test_cluster.py b/user_tools/tests/spark_rapids_tools_ut/test_cluster.py similarity index 81% rename from user_tools/tests/pyrapids_unit/test_cluster.py rename to user_tools/tests/spark_rapids_tools_ut/test_cluster.py index c6e6cbf03..3524c64da 100644 --- a/user_tools/tests/pyrapids_unit/test_cluster.py +++ b/user_tools/tests/spark_rapids_tools_ut/test_cluster.py @@ -16,13 +16,13 @@ import pytest # pylint: disable=import-error -from pyrapids import CspPath -from pyrapids.cloud import ClientCluster -from pyrapids.exceptions import InvalidPropertiesSchema -from .conftest import PyrapidsUnitTest, all_cpu_cluster_props +from spark_rapids_tools import CspPath +from spark_rapids_tools.cloud import ClientCluster +from spark_rapids_tools.exceptions import InvalidPropertiesSchema +from .conftest import SparkRapidsToolsUT, all_cpu_cluster_props -class TestClusterCSP(PyrapidsUnitTest): # pylint: disable=too-few-public-methods +class TestClusterCSP(SparkRapidsToolsUT): # pylint: disable=too-few-public-methods """ Class testing identifying the cluster type by comparing the properties to the defined Schema diff --git a/user_tools/tests/pyrapids_unit/test_tool_argprocessor.py b/user_tools/tests/spark_rapids_tools_ut/test_tool_argprocessor.py similarity index 96% rename from user_tools/tests/pyrapids_unit/test_tool_argprocessor.py rename to user_tools/tests/spark_rapids_tools_ut/test_tool_argprocessor.py index 1dca5ba9f..04ce37aa3 100644 --- a/user_tools/tests/pyrapids_unit/test_tool_argprocessor.py +++ b/user_tools/tests/spark_rapids_tools_ut/test_tool_argprocessor.py @@ -21,10 +21,10 @@ import fire import pytest # pylint: disable=import-error -from pyrapids import CspEnv -from pyrapids.cmdli.argprocessor import AbsToolUserArgModel, ArgValueCase -from pyrapids.enums import QualFilterApp -from .conftest import PyrapidsUnitTest, all_cpu_cluster_props, csp_cpu_cluster_props, csps +from spark_rapids_tools import CspEnv +from spark_rapids_tools.cmdli.argprocessor import AbsToolUserArgModel, ArgValueCase +from spark_rapids_tools.enums import QualFilterApp +from .conftest import SparkRapidsToolsUT, all_cpu_cluster_props, csp_cpu_cluster_props, csps @dataclasses.dataclass @@ -55,7 +55,7 @@ def decorator(func_cb: Callable): return decorator -class TestToolArgProcessor(PyrapidsUnitTest): # pylint: disable=too-few-public-methods +class TestToolArgProcessor(SparkRapidsToolsUT): # pylint: disable=too-few-public-methods """ Class testing toolArgProcessor functionalities """