From 77639d564f230f72e82d7c64aa0d89a62d5857b1 Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Sat, 13 Jul 2024 11:49:23 +0200 Subject: [PATCH 1/4] Move hsfs tests --- .../tests/client/test_base_client.py | 0 .../test_external_feature_group_alias.py | 0 .../tests/constructor/test_filter.py | 0 .../tests/constructor/test_fs_query.py | 0 .../constructor/test_hudi_feature_group_alias.py | 0 .../tests/constructor/test_join.py | 0 .../test_prepared_statement_parameter.py | 0 .../tests/constructor/test_query.py | 0 .../constructor/test_serving_prepared_statement.py | 0 {hsfs/python => python}/tests/core/__init__.py | 0 .../tests/core/test_arrow_flight_client.py | 0 .../tests/core/test_code_engine.py | 0 .../python => python}/tests/core/test_execution.py | 0 .../tests/core/test_expectation_engine.py | 0 .../tests/core/test_expectation_suite_engine.py | 0 .../core/test_external_feature_group_engine.py | 0 .../core/test_feature_descriptive_statistics.py | 0 .../tests/core/test_feature_group_api.py | 0 .../tests/core/test_feature_group_base_engine.py | 0 .../tests/core/test_feature_group_engine.py | 0 .../tests/core/test_feature_monitoring_config.py | 0 .../core/test_feature_monitoring_config_engine.py | 0 .../tests/core/test_feature_monitoring_result.py | 0 .../core/test_feature_monitoring_result_engine.py | 0 .../tests/core/test_feature_view_engine.py | 0 .../tests/core/test_great_expectation_engine.py | 0 .../tests/core/test_hudi_engine.py | 0 .../tests/core/test_ingestion_job.py | 0 {hsfs/python => python}/tests/core/test_inode.py | 0 {hsfs/python => python}/tests/core/test_job.py | 0 .../tests/core/test_job_configuration.py | 0 .../tests/core/test_kafka_engine.py | 0 .../tests/core/test_monitoring_window_config.py | 0 .../core/test_monitoring_window_config_engine.py | 0 .../tests/core/test_online_store_rest_client.py | 0 .../tests/core/test_online_store_rest_client_api.py | 0 .../core/test_online_store_rest_client_engine.py | 0 .../python => python}/tests/core/test_opensearch.py | 0 .../tests/core/test_statistics_engine.py | 0 .../tests/core/test_training_dataset_engine.py | 0 .../core/test_transformation_function_engine.py | 0 .../tests/core/test_validation_report_engine.py | 0 .../tests/core/test_validation_result_engine.py | 0 .../tests/core/test_vector_db_client.py | 0 .../tests/data/hadoop/bin/winutils.exe | Bin {hsfs/python => python}/tests/data/test_basic.csv | 0 .../python => python}/tests/data/test_basic.parquet | Bin {hsfs/python => python}/tests/data/test_basic.tsv | 0 {hsfs/python => python}/tests/engine/__init__.py | 0 {hsfs/python => python}/tests/engine/test_python.py | 0 .../tests/engine/test_python_reader.py | 0 .../engine/test_python_spark_convert_dataframe.py | 0 .../test_python_spark_transformation_functions.py | 0 .../tests/engine/test_python_writer.py | 0 {hsfs/python => python}/tests/engine/test_spark.py | 0 .../tests/fixtures/dataframe_fixtures.py | 0 .../tests/fixtures/execution_fixtures.json | 0 .../tests/fixtures/expectation_suite_fixtures.json | 0 .../external_feature_group_alias_fixtures.json | 0 .../fixtures/external_feature_group_fixtures.json | 0 .../feature_descriptive_statistics_fixtures.json | 0 .../tests/fixtures/feature_fixtures.json | 0 .../fixtures/feature_group_commit_fixtures.json | 0 .../tests/fixtures/feature_group_fixtures.json | 0 .../feature_monitoring_config_fixtures.json | 0 .../feature_monitoring_result_fixtures.json | 0 .../tests/fixtures/feature_store_fixtures.json | 0 .../tests/fixtures/feature_view_fixtures.json | 0 .../tests/fixtures/filter_fixtures.json | 0 .../tests/fixtures/fs_query_fixtures.json | 0 .../tests/fixtures/ge_expectation_fixtures.json | 0 .../fixtures/ge_validation_result_fixtures.json | 0 .../tests/fixtures/generate_backend_fixtures.ipynb | 0 .../fixtures/hudi_feature_group_alias_fixtures.json | 0 .../tests/fixtures/ingestion_job_fixtures.json | 0 .../tests/fixtures/inode_fixtures.json | 0 .../tests/fixtures/job_fixtures.json | 0 .../tests/fixtures/join_fixtures.json | 0 .../tests/fixtures/logic_fixtures.json | 0 .../prepared_statement_parameter_fixtures.json | 0 .../tests/fixtures/query_fixtures.json | 0 .../tests/fixtures/rondb_server_fixtures.json | 0 .../tests/fixtures/serving_keys_fixtures.json | 0 .../serving_prepared_statement_fixtures.json | 0 .../tests/fixtures/spine_group_fixtures.json | 0 .../tests/fixtures/split_statistics_fixtures.json | 0 .../tests/fixtures/statistics_config_fixtures.json | 0 .../tests/fixtures/statistics_fixtures.json | 0 .../tests/fixtures/storage_connector_fixtures.json | 0 .../fixtures/training_dataset_feature_fixtures.json | 0 .../tests/fixtures/training_dataset_fixtures.json | 0 .../fixtures/training_dataset_split_fixtures.json | 0 .../transformation_function_attached_fixtures.json | 0 .../fixtures/transformation_function_fixtures.json | 0 .../tests/fixtures/user_fixtures.json | 0 .../tests/fixtures/validation_report_fixtures.json | 0 .../tests/test_expectation_suite.py | 0 {hsfs/python => python}/tests/test_feature.py | 0 {hsfs/python => python}/tests/test_feature_group.py | 0 .../tests/test_feature_group_commit.py | 0 .../tests/test_feature_group_writer.py | 0 {hsfs/python => python}/tests/test_feature_store.py | 0 {hsfs/python => python}/tests/test_feature_view.py | 0 .../python => python}/tests/test_ge_expectation.py | 0 .../tests/test_ge_validation_result.py | 0 .../tests/test_helpers/__init__.py | 0 .../test_helpers/transformation_test_helper.py | 0 {hsfs/python => python}/tests/test_hopswork_udf.py | 0 {hsfs/python => python}/tests/test_serving_keys.py | 0 .../tests/test_split_statistics.py | 0 {hsfs/python => python}/tests/test_statistics.py | 0 .../tests/test_statistics_config.py | 0 .../tests/test_storage_connector.py | 0 .../tests/test_training_dataset.py | 0 .../tests/test_training_dataset_feature.py | 0 .../tests/test_training_dataset_split.py | 0 .../tests/test_transformation_function.py | 0 {hsfs/python => python}/tests/test_user.py | 0 .../tests/test_validation_report.py | 0 {hsfs/python => python}/tests/util.py | 0 120 files changed, 0 insertions(+), 0 deletions(-) rename {hsfs/python => python}/tests/client/test_base_client.py (100%) rename {hsfs/python => python}/tests/constructor/test_external_feature_group_alias.py (100%) rename {hsfs/python => python}/tests/constructor/test_filter.py (100%) rename {hsfs/python => python}/tests/constructor/test_fs_query.py (100%) rename {hsfs/python => python}/tests/constructor/test_hudi_feature_group_alias.py (100%) rename {hsfs/python => python}/tests/constructor/test_join.py (100%) rename {hsfs/python => python}/tests/constructor/test_prepared_statement_parameter.py (100%) rename {hsfs/python => python}/tests/constructor/test_query.py (100%) rename {hsfs/python => python}/tests/constructor/test_serving_prepared_statement.py (100%) rename {hsfs/python => python}/tests/core/__init__.py (100%) rename {hsfs/python => python}/tests/core/test_arrow_flight_client.py (100%) rename {hsfs/python => python}/tests/core/test_code_engine.py (100%) rename {hsfs/python => python}/tests/core/test_execution.py (100%) rename {hsfs/python => python}/tests/core/test_expectation_engine.py (100%) rename {hsfs/python => python}/tests/core/test_expectation_suite_engine.py (100%) rename {hsfs/python => python}/tests/core/test_external_feature_group_engine.py (100%) rename {hsfs/python => python}/tests/core/test_feature_descriptive_statistics.py (100%) rename {hsfs/python => python}/tests/core/test_feature_group_api.py (100%) rename {hsfs/python => python}/tests/core/test_feature_group_base_engine.py (100%) rename {hsfs/python => python}/tests/core/test_feature_group_engine.py (100%) rename {hsfs/python => python}/tests/core/test_feature_monitoring_config.py (100%) rename {hsfs/python => python}/tests/core/test_feature_monitoring_config_engine.py (100%) rename {hsfs/python => python}/tests/core/test_feature_monitoring_result.py (100%) rename {hsfs/python => python}/tests/core/test_feature_monitoring_result_engine.py (100%) rename {hsfs/python => python}/tests/core/test_feature_view_engine.py (100%) rename {hsfs/python => python}/tests/core/test_great_expectation_engine.py (100%) rename {hsfs/python => python}/tests/core/test_hudi_engine.py (100%) rename {hsfs/python => python}/tests/core/test_ingestion_job.py (100%) rename {hsfs/python => python}/tests/core/test_inode.py (100%) rename {hsfs/python => python}/tests/core/test_job.py (100%) rename {hsfs/python => python}/tests/core/test_job_configuration.py (100%) rename {hsfs/python => python}/tests/core/test_kafka_engine.py (100%) rename {hsfs/python => python}/tests/core/test_monitoring_window_config.py (100%) rename {hsfs/python => python}/tests/core/test_monitoring_window_config_engine.py (100%) rename {hsfs/python => python}/tests/core/test_online_store_rest_client.py (100%) rename {hsfs/python => python}/tests/core/test_online_store_rest_client_api.py (100%) rename {hsfs/python => python}/tests/core/test_online_store_rest_client_engine.py (100%) rename {hsfs/python => python}/tests/core/test_opensearch.py (100%) rename {hsfs/python => python}/tests/core/test_statistics_engine.py (100%) rename {hsfs/python => python}/tests/core/test_training_dataset_engine.py (100%) rename {hsfs/python => python}/tests/core/test_transformation_function_engine.py (100%) rename {hsfs/python => python}/tests/core/test_validation_report_engine.py (100%) rename {hsfs/python => python}/tests/core/test_validation_result_engine.py (100%) rename {hsfs/python => python}/tests/core/test_vector_db_client.py (100%) rename {hsfs/python => python}/tests/data/hadoop/bin/winutils.exe (100%) rename {hsfs/python => python}/tests/data/test_basic.csv (100%) rename {hsfs/python => python}/tests/data/test_basic.parquet (100%) rename {hsfs/python => python}/tests/data/test_basic.tsv (100%) rename {hsfs/python => python}/tests/engine/__init__.py (100%) rename {hsfs/python => python}/tests/engine/test_python.py (100%) rename {hsfs/python => python}/tests/engine/test_python_reader.py (100%) rename {hsfs/python => python}/tests/engine/test_python_spark_convert_dataframe.py (100%) rename {hsfs/python => python}/tests/engine/test_python_spark_transformation_functions.py (100%) rename {hsfs/python => python}/tests/engine/test_python_writer.py (100%) rename {hsfs/python => python}/tests/engine/test_spark.py (100%) rename {hsfs/python => python}/tests/fixtures/dataframe_fixtures.py (100%) rename {hsfs/python => python}/tests/fixtures/execution_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/expectation_suite_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/external_feature_group_alias_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/external_feature_group_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/feature_descriptive_statistics_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/feature_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/feature_group_commit_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/feature_group_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/feature_monitoring_config_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/feature_monitoring_result_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/feature_store_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/feature_view_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/filter_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/fs_query_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/ge_expectation_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/ge_validation_result_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/generate_backend_fixtures.ipynb (100%) rename {hsfs/python => python}/tests/fixtures/hudi_feature_group_alias_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/ingestion_job_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/inode_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/job_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/join_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/logic_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/prepared_statement_parameter_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/query_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/rondb_server_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/serving_keys_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/serving_prepared_statement_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/spine_group_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/split_statistics_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/statistics_config_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/statistics_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/storage_connector_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/training_dataset_feature_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/training_dataset_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/training_dataset_split_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/transformation_function_attached_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/transformation_function_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/user_fixtures.json (100%) rename {hsfs/python => python}/tests/fixtures/validation_report_fixtures.json (100%) rename {hsfs/python => python}/tests/test_expectation_suite.py (100%) rename {hsfs/python => python}/tests/test_feature.py (100%) rename {hsfs/python => python}/tests/test_feature_group.py (100%) rename {hsfs/python => python}/tests/test_feature_group_commit.py (100%) rename {hsfs/python => python}/tests/test_feature_group_writer.py (100%) rename {hsfs/python => python}/tests/test_feature_store.py (100%) rename {hsfs/python => python}/tests/test_feature_view.py (100%) rename {hsfs/python => python}/tests/test_ge_expectation.py (100%) rename {hsfs/python => python}/tests/test_ge_validation_result.py (100%) rename {hsfs/python => python}/tests/test_helpers/__init__.py (100%) rename {hsfs/python => python}/tests/test_helpers/transformation_test_helper.py (100%) rename {hsfs/python => python}/tests/test_hopswork_udf.py (100%) rename {hsfs/python => python}/tests/test_serving_keys.py (100%) rename {hsfs/python => python}/tests/test_split_statistics.py (100%) rename {hsfs/python => python}/tests/test_statistics.py (100%) rename {hsfs/python => python}/tests/test_statistics_config.py (100%) rename {hsfs/python => python}/tests/test_storage_connector.py (100%) rename {hsfs/python => python}/tests/test_training_dataset.py (100%) rename {hsfs/python => python}/tests/test_training_dataset_feature.py (100%) rename {hsfs/python => python}/tests/test_training_dataset_split.py (100%) rename {hsfs/python => python}/tests/test_transformation_function.py (100%) rename {hsfs/python => python}/tests/test_user.py (100%) rename {hsfs/python => python}/tests/test_validation_report.py (100%) rename {hsfs/python => python}/tests/util.py (100%) diff --git a/hsfs/python/tests/client/test_base_client.py b/python/tests/client/test_base_client.py similarity index 100% rename from hsfs/python/tests/client/test_base_client.py rename to python/tests/client/test_base_client.py diff --git a/hsfs/python/tests/constructor/test_external_feature_group_alias.py b/python/tests/constructor/test_external_feature_group_alias.py similarity index 100% rename from hsfs/python/tests/constructor/test_external_feature_group_alias.py rename to python/tests/constructor/test_external_feature_group_alias.py diff --git a/hsfs/python/tests/constructor/test_filter.py b/python/tests/constructor/test_filter.py similarity index 100% rename from hsfs/python/tests/constructor/test_filter.py rename to python/tests/constructor/test_filter.py diff --git a/hsfs/python/tests/constructor/test_fs_query.py b/python/tests/constructor/test_fs_query.py similarity index 100% rename from hsfs/python/tests/constructor/test_fs_query.py rename to python/tests/constructor/test_fs_query.py diff --git a/hsfs/python/tests/constructor/test_hudi_feature_group_alias.py b/python/tests/constructor/test_hudi_feature_group_alias.py similarity index 100% rename from hsfs/python/tests/constructor/test_hudi_feature_group_alias.py rename to python/tests/constructor/test_hudi_feature_group_alias.py diff --git a/hsfs/python/tests/constructor/test_join.py b/python/tests/constructor/test_join.py similarity index 100% rename from hsfs/python/tests/constructor/test_join.py rename to python/tests/constructor/test_join.py diff --git a/hsfs/python/tests/constructor/test_prepared_statement_parameter.py b/python/tests/constructor/test_prepared_statement_parameter.py similarity index 100% rename from hsfs/python/tests/constructor/test_prepared_statement_parameter.py rename to python/tests/constructor/test_prepared_statement_parameter.py diff --git a/hsfs/python/tests/constructor/test_query.py b/python/tests/constructor/test_query.py similarity index 100% rename from hsfs/python/tests/constructor/test_query.py rename to python/tests/constructor/test_query.py diff --git a/hsfs/python/tests/constructor/test_serving_prepared_statement.py b/python/tests/constructor/test_serving_prepared_statement.py similarity index 100% rename from hsfs/python/tests/constructor/test_serving_prepared_statement.py rename to python/tests/constructor/test_serving_prepared_statement.py diff --git a/hsfs/python/tests/core/__init__.py b/python/tests/core/__init__.py similarity index 100% rename from hsfs/python/tests/core/__init__.py rename to python/tests/core/__init__.py diff --git a/hsfs/python/tests/core/test_arrow_flight_client.py b/python/tests/core/test_arrow_flight_client.py similarity index 100% rename from hsfs/python/tests/core/test_arrow_flight_client.py rename to python/tests/core/test_arrow_flight_client.py diff --git a/hsfs/python/tests/core/test_code_engine.py b/python/tests/core/test_code_engine.py similarity index 100% rename from hsfs/python/tests/core/test_code_engine.py rename to python/tests/core/test_code_engine.py diff --git a/hsfs/python/tests/core/test_execution.py b/python/tests/core/test_execution.py similarity index 100% rename from hsfs/python/tests/core/test_execution.py rename to python/tests/core/test_execution.py diff --git a/hsfs/python/tests/core/test_expectation_engine.py b/python/tests/core/test_expectation_engine.py similarity index 100% rename from hsfs/python/tests/core/test_expectation_engine.py rename to python/tests/core/test_expectation_engine.py diff --git a/hsfs/python/tests/core/test_expectation_suite_engine.py b/python/tests/core/test_expectation_suite_engine.py similarity index 100% rename from hsfs/python/tests/core/test_expectation_suite_engine.py rename to python/tests/core/test_expectation_suite_engine.py diff --git a/hsfs/python/tests/core/test_external_feature_group_engine.py b/python/tests/core/test_external_feature_group_engine.py similarity index 100% rename from hsfs/python/tests/core/test_external_feature_group_engine.py rename to python/tests/core/test_external_feature_group_engine.py diff --git a/hsfs/python/tests/core/test_feature_descriptive_statistics.py b/python/tests/core/test_feature_descriptive_statistics.py similarity index 100% rename from hsfs/python/tests/core/test_feature_descriptive_statistics.py rename to python/tests/core/test_feature_descriptive_statistics.py diff --git a/hsfs/python/tests/core/test_feature_group_api.py b/python/tests/core/test_feature_group_api.py similarity index 100% rename from hsfs/python/tests/core/test_feature_group_api.py rename to python/tests/core/test_feature_group_api.py diff --git a/hsfs/python/tests/core/test_feature_group_base_engine.py b/python/tests/core/test_feature_group_base_engine.py similarity index 100% rename from hsfs/python/tests/core/test_feature_group_base_engine.py rename to python/tests/core/test_feature_group_base_engine.py diff --git a/hsfs/python/tests/core/test_feature_group_engine.py b/python/tests/core/test_feature_group_engine.py similarity index 100% rename from hsfs/python/tests/core/test_feature_group_engine.py rename to python/tests/core/test_feature_group_engine.py diff --git a/hsfs/python/tests/core/test_feature_monitoring_config.py b/python/tests/core/test_feature_monitoring_config.py similarity index 100% rename from hsfs/python/tests/core/test_feature_monitoring_config.py rename to python/tests/core/test_feature_monitoring_config.py diff --git a/hsfs/python/tests/core/test_feature_monitoring_config_engine.py b/python/tests/core/test_feature_monitoring_config_engine.py similarity index 100% rename from hsfs/python/tests/core/test_feature_monitoring_config_engine.py rename to python/tests/core/test_feature_monitoring_config_engine.py diff --git a/hsfs/python/tests/core/test_feature_monitoring_result.py b/python/tests/core/test_feature_monitoring_result.py similarity index 100% rename from hsfs/python/tests/core/test_feature_monitoring_result.py rename to python/tests/core/test_feature_monitoring_result.py diff --git a/hsfs/python/tests/core/test_feature_monitoring_result_engine.py b/python/tests/core/test_feature_monitoring_result_engine.py similarity index 100% rename from hsfs/python/tests/core/test_feature_monitoring_result_engine.py rename to python/tests/core/test_feature_monitoring_result_engine.py diff --git a/hsfs/python/tests/core/test_feature_view_engine.py b/python/tests/core/test_feature_view_engine.py similarity index 100% rename from hsfs/python/tests/core/test_feature_view_engine.py rename to python/tests/core/test_feature_view_engine.py diff --git a/hsfs/python/tests/core/test_great_expectation_engine.py b/python/tests/core/test_great_expectation_engine.py similarity index 100% rename from hsfs/python/tests/core/test_great_expectation_engine.py rename to python/tests/core/test_great_expectation_engine.py diff --git a/hsfs/python/tests/core/test_hudi_engine.py b/python/tests/core/test_hudi_engine.py similarity index 100% rename from hsfs/python/tests/core/test_hudi_engine.py rename to python/tests/core/test_hudi_engine.py diff --git a/hsfs/python/tests/core/test_ingestion_job.py b/python/tests/core/test_ingestion_job.py similarity index 100% rename from hsfs/python/tests/core/test_ingestion_job.py rename to python/tests/core/test_ingestion_job.py diff --git a/hsfs/python/tests/core/test_inode.py b/python/tests/core/test_inode.py similarity index 100% rename from hsfs/python/tests/core/test_inode.py rename to python/tests/core/test_inode.py diff --git a/hsfs/python/tests/core/test_job.py b/python/tests/core/test_job.py similarity index 100% rename from hsfs/python/tests/core/test_job.py rename to python/tests/core/test_job.py diff --git a/hsfs/python/tests/core/test_job_configuration.py b/python/tests/core/test_job_configuration.py similarity index 100% rename from hsfs/python/tests/core/test_job_configuration.py rename to python/tests/core/test_job_configuration.py diff --git a/hsfs/python/tests/core/test_kafka_engine.py b/python/tests/core/test_kafka_engine.py similarity index 100% rename from hsfs/python/tests/core/test_kafka_engine.py rename to python/tests/core/test_kafka_engine.py diff --git a/hsfs/python/tests/core/test_monitoring_window_config.py b/python/tests/core/test_monitoring_window_config.py similarity index 100% rename from hsfs/python/tests/core/test_monitoring_window_config.py rename to python/tests/core/test_monitoring_window_config.py diff --git a/hsfs/python/tests/core/test_monitoring_window_config_engine.py b/python/tests/core/test_monitoring_window_config_engine.py similarity index 100% rename from hsfs/python/tests/core/test_monitoring_window_config_engine.py rename to python/tests/core/test_monitoring_window_config_engine.py diff --git a/hsfs/python/tests/core/test_online_store_rest_client.py b/python/tests/core/test_online_store_rest_client.py similarity index 100% rename from hsfs/python/tests/core/test_online_store_rest_client.py rename to python/tests/core/test_online_store_rest_client.py diff --git a/hsfs/python/tests/core/test_online_store_rest_client_api.py b/python/tests/core/test_online_store_rest_client_api.py similarity index 100% rename from hsfs/python/tests/core/test_online_store_rest_client_api.py rename to python/tests/core/test_online_store_rest_client_api.py diff --git a/hsfs/python/tests/core/test_online_store_rest_client_engine.py b/python/tests/core/test_online_store_rest_client_engine.py similarity index 100% rename from hsfs/python/tests/core/test_online_store_rest_client_engine.py rename to python/tests/core/test_online_store_rest_client_engine.py diff --git a/hsfs/python/tests/core/test_opensearch.py b/python/tests/core/test_opensearch.py similarity index 100% rename from hsfs/python/tests/core/test_opensearch.py rename to python/tests/core/test_opensearch.py diff --git a/hsfs/python/tests/core/test_statistics_engine.py b/python/tests/core/test_statistics_engine.py similarity index 100% rename from hsfs/python/tests/core/test_statistics_engine.py rename to python/tests/core/test_statistics_engine.py diff --git a/hsfs/python/tests/core/test_training_dataset_engine.py b/python/tests/core/test_training_dataset_engine.py similarity index 100% rename from hsfs/python/tests/core/test_training_dataset_engine.py rename to python/tests/core/test_training_dataset_engine.py diff --git a/hsfs/python/tests/core/test_transformation_function_engine.py b/python/tests/core/test_transformation_function_engine.py similarity index 100% rename from hsfs/python/tests/core/test_transformation_function_engine.py rename to python/tests/core/test_transformation_function_engine.py diff --git a/hsfs/python/tests/core/test_validation_report_engine.py b/python/tests/core/test_validation_report_engine.py similarity index 100% rename from hsfs/python/tests/core/test_validation_report_engine.py rename to python/tests/core/test_validation_report_engine.py diff --git a/hsfs/python/tests/core/test_validation_result_engine.py b/python/tests/core/test_validation_result_engine.py similarity index 100% rename from hsfs/python/tests/core/test_validation_result_engine.py rename to python/tests/core/test_validation_result_engine.py diff --git a/hsfs/python/tests/core/test_vector_db_client.py b/python/tests/core/test_vector_db_client.py similarity index 100% rename from hsfs/python/tests/core/test_vector_db_client.py rename to python/tests/core/test_vector_db_client.py diff --git a/hsfs/python/tests/data/hadoop/bin/winutils.exe b/python/tests/data/hadoop/bin/winutils.exe similarity index 100% rename from hsfs/python/tests/data/hadoop/bin/winutils.exe rename to python/tests/data/hadoop/bin/winutils.exe diff --git a/hsfs/python/tests/data/test_basic.csv b/python/tests/data/test_basic.csv similarity index 100% rename from hsfs/python/tests/data/test_basic.csv rename to python/tests/data/test_basic.csv diff --git a/hsfs/python/tests/data/test_basic.parquet b/python/tests/data/test_basic.parquet similarity index 100% rename from hsfs/python/tests/data/test_basic.parquet rename to python/tests/data/test_basic.parquet diff --git a/hsfs/python/tests/data/test_basic.tsv b/python/tests/data/test_basic.tsv similarity index 100% rename from hsfs/python/tests/data/test_basic.tsv rename to python/tests/data/test_basic.tsv diff --git a/hsfs/python/tests/engine/__init__.py b/python/tests/engine/__init__.py similarity index 100% rename from hsfs/python/tests/engine/__init__.py rename to python/tests/engine/__init__.py diff --git a/hsfs/python/tests/engine/test_python.py b/python/tests/engine/test_python.py similarity index 100% rename from hsfs/python/tests/engine/test_python.py rename to python/tests/engine/test_python.py diff --git a/hsfs/python/tests/engine/test_python_reader.py b/python/tests/engine/test_python_reader.py similarity index 100% rename from hsfs/python/tests/engine/test_python_reader.py rename to python/tests/engine/test_python_reader.py diff --git a/hsfs/python/tests/engine/test_python_spark_convert_dataframe.py b/python/tests/engine/test_python_spark_convert_dataframe.py similarity index 100% rename from hsfs/python/tests/engine/test_python_spark_convert_dataframe.py rename to python/tests/engine/test_python_spark_convert_dataframe.py diff --git a/hsfs/python/tests/engine/test_python_spark_transformation_functions.py b/python/tests/engine/test_python_spark_transformation_functions.py similarity index 100% rename from hsfs/python/tests/engine/test_python_spark_transformation_functions.py rename to python/tests/engine/test_python_spark_transformation_functions.py diff --git a/hsfs/python/tests/engine/test_python_writer.py b/python/tests/engine/test_python_writer.py similarity index 100% rename from hsfs/python/tests/engine/test_python_writer.py rename to python/tests/engine/test_python_writer.py diff --git a/hsfs/python/tests/engine/test_spark.py b/python/tests/engine/test_spark.py similarity index 100% rename from hsfs/python/tests/engine/test_spark.py rename to python/tests/engine/test_spark.py diff --git a/hsfs/python/tests/fixtures/dataframe_fixtures.py b/python/tests/fixtures/dataframe_fixtures.py similarity index 100% rename from hsfs/python/tests/fixtures/dataframe_fixtures.py rename to python/tests/fixtures/dataframe_fixtures.py diff --git a/hsfs/python/tests/fixtures/execution_fixtures.json b/python/tests/fixtures/execution_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/execution_fixtures.json rename to python/tests/fixtures/execution_fixtures.json diff --git a/hsfs/python/tests/fixtures/expectation_suite_fixtures.json b/python/tests/fixtures/expectation_suite_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/expectation_suite_fixtures.json rename to python/tests/fixtures/expectation_suite_fixtures.json diff --git a/hsfs/python/tests/fixtures/external_feature_group_alias_fixtures.json b/python/tests/fixtures/external_feature_group_alias_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/external_feature_group_alias_fixtures.json rename to python/tests/fixtures/external_feature_group_alias_fixtures.json diff --git a/hsfs/python/tests/fixtures/external_feature_group_fixtures.json b/python/tests/fixtures/external_feature_group_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/external_feature_group_fixtures.json rename to python/tests/fixtures/external_feature_group_fixtures.json diff --git a/hsfs/python/tests/fixtures/feature_descriptive_statistics_fixtures.json b/python/tests/fixtures/feature_descriptive_statistics_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/feature_descriptive_statistics_fixtures.json rename to python/tests/fixtures/feature_descriptive_statistics_fixtures.json diff --git a/hsfs/python/tests/fixtures/feature_fixtures.json b/python/tests/fixtures/feature_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/feature_fixtures.json rename to python/tests/fixtures/feature_fixtures.json diff --git a/hsfs/python/tests/fixtures/feature_group_commit_fixtures.json b/python/tests/fixtures/feature_group_commit_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/feature_group_commit_fixtures.json rename to python/tests/fixtures/feature_group_commit_fixtures.json diff --git a/hsfs/python/tests/fixtures/feature_group_fixtures.json b/python/tests/fixtures/feature_group_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/feature_group_fixtures.json rename to python/tests/fixtures/feature_group_fixtures.json diff --git a/hsfs/python/tests/fixtures/feature_monitoring_config_fixtures.json b/python/tests/fixtures/feature_monitoring_config_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/feature_monitoring_config_fixtures.json rename to python/tests/fixtures/feature_monitoring_config_fixtures.json diff --git a/hsfs/python/tests/fixtures/feature_monitoring_result_fixtures.json b/python/tests/fixtures/feature_monitoring_result_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/feature_monitoring_result_fixtures.json rename to python/tests/fixtures/feature_monitoring_result_fixtures.json diff --git a/hsfs/python/tests/fixtures/feature_store_fixtures.json b/python/tests/fixtures/feature_store_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/feature_store_fixtures.json rename to python/tests/fixtures/feature_store_fixtures.json diff --git a/hsfs/python/tests/fixtures/feature_view_fixtures.json b/python/tests/fixtures/feature_view_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/feature_view_fixtures.json rename to python/tests/fixtures/feature_view_fixtures.json diff --git a/hsfs/python/tests/fixtures/filter_fixtures.json b/python/tests/fixtures/filter_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/filter_fixtures.json rename to python/tests/fixtures/filter_fixtures.json diff --git a/hsfs/python/tests/fixtures/fs_query_fixtures.json b/python/tests/fixtures/fs_query_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/fs_query_fixtures.json rename to python/tests/fixtures/fs_query_fixtures.json diff --git a/hsfs/python/tests/fixtures/ge_expectation_fixtures.json b/python/tests/fixtures/ge_expectation_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/ge_expectation_fixtures.json rename to python/tests/fixtures/ge_expectation_fixtures.json diff --git a/hsfs/python/tests/fixtures/ge_validation_result_fixtures.json b/python/tests/fixtures/ge_validation_result_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/ge_validation_result_fixtures.json rename to python/tests/fixtures/ge_validation_result_fixtures.json diff --git a/hsfs/python/tests/fixtures/generate_backend_fixtures.ipynb b/python/tests/fixtures/generate_backend_fixtures.ipynb similarity index 100% rename from hsfs/python/tests/fixtures/generate_backend_fixtures.ipynb rename to python/tests/fixtures/generate_backend_fixtures.ipynb diff --git a/hsfs/python/tests/fixtures/hudi_feature_group_alias_fixtures.json b/python/tests/fixtures/hudi_feature_group_alias_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/hudi_feature_group_alias_fixtures.json rename to python/tests/fixtures/hudi_feature_group_alias_fixtures.json diff --git a/hsfs/python/tests/fixtures/ingestion_job_fixtures.json b/python/tests/fixtures/ingestion_job_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/ingestion_job_fixtures.json rename to python/tests/fixtures/ingestion_job_fixtures.json diff --git a/hsfs/python/tests/fixtures/inode_fixtures.json b/python/tests/fixtures/inode_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/inode_fixtures.json rename to python/tests/fixtures/inode_fixtures.json diff --git a/hsfs/python/tests/fixtures/job_fixtures.json b/python/tests/fixtures/job_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/job_fixtures.json rename to python/tests/fixtures/job_fixtures.json diff --git a/hsfs/python/tests/fixtures/join_fixtures.json b/python/tests/fixtures/join_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/join_fixtures.json rename to python/tests/fixtures/join_fixtures.json diff --git a/hsfs/python/tests/fixtures/logic_fixtures.json b/python/tests/fixtures/logic_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/logic_fixtures.json rename to python/tests/fixtures/logic_fixtures.json diff --git a/hsfs/python/tests/fixtures/prepared_statement_parameter_fixtures.json b/python/tests/fixtures/prepared_statement_parameter_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/prepared_statement_parameter_fixtures.json rename to python/tests/fixtures/prepared_statement_parameter_fixtures.json diff --git a/hsfs/python/tests/fixtures/query_fixtures.json b/python/tests/fixtures/query_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/query_fixtures.json rename to python/tests/fixtures/query_fixtures.json diff --git a/hsfs/python/tests/fixtures/rondb_server_fixtures.json b/python/tests/fixtures/rondb_server_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/rondb_server_fixtures.json rename to python/tests/fixtures/rondb_server_fixtures.json diff --git a/hsfs/python/tests/fixtures/serving_keys_fixtures.json b/python/tests/fixtures/serving_keys_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/serving_keys_fixtures.json rename to python/tests/fixtures/serving_keys_fixtures.json diff --git a/hsfs/python/tests/fixtures/serving_prepared_statement_fixtures.json b/python/tests/fixtures/serving_prepared_statement_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/serving_prepared_statement_fixtures.json rename to python/tests/fixtures/serving_prepared_statement_fixtures.json diff --git a/hsfs/python/tests/fixtures/spine_group_fixtures.json b/python/tests/fixtures/spine_group_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/spine_group_fixtures.json rename to python/tests/fixtures/spine_group_fixtures.json diff --git a/hsfs/python/tests/fixtures/split_statistics_fixtures.json b/python/tests/fixtures/split_statistics_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/split_statistics_fixtures.json rename to python/tests/fixtures/split_statistics_fixtures.json diff --git a/hsfs/python/tests/fixtures/statistics_config_fixtures.json b/python/tests/fixtures/statistics_config_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/statistics_config_fixtures.json rename to python/tests/fixtures/statistics_config_fixtures.json diff --git a/hsfs/python/tests/fixtures/statistics_fixtures.json b/python/tests/fixtures/statistics_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/statistics_fixtures.json rename to python/tests/fixtures/statistics_fixtures.json diff --git a/hsfs/python/tests/fixtures/storage_connector_fixtures.json b/python/tests/fixtures/storage_connector_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/storage_connector_fixtures.json rename to python/tests/fixtures/storage_connector_fixtures.json diff --git a/hsfs/python/tests/fixtures/training_dataset_feature_fixtures.json b/python/tests/fixtures/training_dataset_feature_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/training_dataset_feature_fixtures.json rename to python/tests/fixtures/training_dataset_feature_fixtures.json diff --git a/hsfs/python/tests/fixtures/training_dataset_fixtures.json b/python/tests/fixtures/training_dataset_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/training_dataset_fixtures.json rename to python/tests/fixtures/training_dataset_fixtures.json diff --git a/hsfs/python/tests/fixtures/training_dataset_split_fixtures.json b/python/tests/fixtures/training_dataset_split_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/training_dataset_split_fixtures.json rename to python/tests/fixtures/training_dataset_split_fixtures.json diff --git a/hsfs/python/tests/fixtures/transformation_function_attached_fixtures.json b/python/tests/fixtures/transformation_function_attached_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/transformation_function_attached_fixtures.json rename to python/tests/fixtures/transformation_function_attached_fixtures.json diff --git a/hsfs/python/tests/fixtures/transformation_function_fixtures.json b/python/tests/fixtures/transformation_function_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/transformation_function_fixtures.json rename to python/tests/fixtures/transformation_function_fixtures.json diff --git a/hsfs/python/tests/fixtures/user_fixtures.json b/python/tests/fixtures/user_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/user_fixtures.json rename to python/tests/fixtures/user_fixtures.json diff --git a/hsfs/python/tests/fixtures/validation_report_fixtures.json b/python/tests/fixtures/validation_report_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/validation_report_fixtures.json rename to python/tests/fixtures/validation_report_fixtures.json diff --git a/hsfs/python/tests/test_expectation_suite.py b/python/tests/test_expectation_suite.py similarity index 100% rename from hsfs/python/tests/test_expectation_suite.py rename to python/tests/test_expectation_suite.py diff --git a/hsfs/python/tests/test_feature.py b/python/tests/test_feature.py similarity index 100% rename from hsfs/python/tests/test_feature.py rename to python/tests/test_feature.py diff --git a/hsfs/python/tests/test_feature_group.py b/python/tests/test_feature_group.py similarity index 100% rename from hsfs/python/tests/test_feature_group.py rename to python/tests/test_feature_group.py diff --git a/hsfs/python/tests/test_feature_group_commit.py b/python/tests/test_feature_group_commit.py similarity index 100% rename from hsfs/python/tests/test_feature_group_commit.py rename to python/tests/test_feature_group_commit.py diff --git a/hsfs/python/tests/test_feature_group_writer.py b/python/tests/test_feature_group_writer.py similarity index 100% rename from hsfs/python/tests/test_feature_group_writer.py rename to python/tests/test_feature_group_writer.py diff --git a/hsfs/python/tests/test_feature_store.py b/python/tests/test_feature_store.py similarity index 100% rename from hsfs/python/tests/test_feature_store.py rename to python/tests/test_feature_store.py diff --git a/hsfs/python/tests/test_feature_view.py b/python/tests/test_feature_view.py similarity index 100% rename from hsfs/python/tests/test_feature_view.py rename to python/tests/test_feature_view.py diff --git a/hsfs/python/tests/test_ge_expectation.py b/python/tests/test_ge_expectation.py similarity index 100% rename from hsfs/python/tests/test_ge_expectation.py rename to python/tests/test_ge_expectation.py diff --git a/hsfs/python/tests/test_ge_validation_result.py b/python/tests/test_ge_validation_result.py similarity index 100% rename from hsfs/python/tests/test_ge_validation_result.py rename to python/tests/test_ge_validation_result.py diff --git a/hsfs/python/tests/test_helpers/__init__.py b/python/tests/test_helpers/__init__.py similarity index 100% rename from hsfs/python/tests/test_helpers/__init__.py rename to python/tests/test_helpers/__init__.py diff --git a/hsfs/python/tests/test_helpers/transformation_test_helper.py b/python/tests/test_helpers/transformation_test_helper.py similarity index 100% rename from hsfs/python/tests/test_helpers/transformation_test_helper.py rename to python/tests/test_helpers/transformation_test_helper.py diff --git a/hsfs/python/tests/test_hopswork_udf.py b/python/tests/test_hopswork_udf.py similarity index 100% rename from hsfs/python/tests/test_hopswork_udf.py rename to python/tests/test_hopswork_udf.py diff --git a/hsfs/python/tests/test_serving_keys.py b/python/tests/test_serving_keys.py similarity index 100% rename from hsfs/python/tests/test_serving_keys.py rename to python/tests/test_serving_keys.py diff --git a/hsfs/python/tests/test_split_statistics.py b/python/tests/test_split_statistics.py similarity index 100% rename from hsfs/python/tests/test_split_statistics.py rename to python/tests/test_split_statistics.py diff --git a/hsfs/python/tests/test_statistics.py b/python/tests/test_statistics.py similarity index 100% rename from hsfs/python/tests/test_statistics.py rename to python/tests/test_statistics.py diff --git a/hsfs/python/tests/test_statistics_config.py b/python/tests/test_statistics_config.py similarity index 100% rename from hsfs/python/tests/test_statistics_config.py rename to python/tests/test_statistics_config.py diff --git a/hsfs/python/tests/test_storage_connector.py b/python/tests/test_storage_connector.py similarity index 100% rename from hsfs/python/tests/test_storage_connector.py rename to python/tests/test_storage_connector.py diff --git a/hsfs/python/tests/test_training_dataset.py b/python/tests/test_training_dataset.py similarity index 100% rename from hsfs/python/tests/test_training_dataset.py rename to python/tests/test_training_dataset.py diff --git a/hsfs/python/tests/test_training_dataset_feature.py b/python/tests/test_training_dataset_feature.py similarity index 100% rename from hsfs/python/tests/test_training_dataset_feature.py rename to python/tests/test_training_dataset_feature.py diff --git a/hsfs/python/tests/test_training_dataset_split.py b/python/tests/test_training_dataset_split.py similarity index 100% rename from hsfs/python/tests/test_training_dataset_split.py rename to python/tests/test_training_dataset_split.py diff --git a/hsfs/python/tests/test_transformation_function.py b/python/tests/test_transformation_function.py similarity index 100% rename from hsfs/python/tests/test_transformation_function.py rename to python/tests/test_transformation_function.py diff --git a/hsfs/python/tests/test_user.py b/python/tests/test_user.py similarity index 100% rename from hsfs/python/tests/test_user.py rename to python/tests/test_user.py diff --git a/hsfs/python/tests/test_validation_report.py b/python/tests/test_validation_report.py similarity index 100% rename from hsfs/python/tests/test_validation_report.py rename to python/tests/test_validation_report.py diff --git a/hsfs/python/tests/util.py b/python/tests/util.py similarity index 100% rename from hsfs/python/tests/util.py rename to python/tests/util.py From 3fd697a34115111bb372530ec48aacdc48c906d3 Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Sat, 13 Jul 2024 12:08:21 +0200 Subject: [PATCH 2/4] Merge hsfs tests --- hsfs/python/tests/__init__.py | 15 -- hsfs/python/tests/conftest.py | 32 --- hsfs/python/tests/fixtures/__init__.py | 15 -- .../python/tests/fixtures/backend_fixtures.py | 75 ------ hsfs/python/tests/fixtures/tag_fixtures.json | 25 -- hsfs/python/tests/pyproject.toml | 37 --- hsfs/python/tests/test_tag.py | 43 ---- hsfs/python/tests/test_util.py | 230 ------------------ python/tests/conftest.py | 13 + python/tests/fixtures/backend_fixtures.py | 50 +++- python/tests/test_util.py | 212 +++++++++++++++- 11 files changed, 268 insertions(+), 479 deletions(-) delete mode 100644 hsfs/python/tests/__init__.py delete mode 100644 hsfs/python/tests/conftest.py delete mode 100644 hsfs/python/tests/fixtures/__init__.py delete mode 100644 hsfs/python/tests/fixtures/backend_fixtures.py delete mode 100644 hsfs/python/tests/fixtures/tag_fixtures.json delete mode 100644 hsfs/python/tests/pyproject.toml delete mode 100644 hsfs/python/tests/test_tag.py delete mode 100644 hsfs/python/tests/test_util.py diff --git a/hsfs/python/tests/__init__.py b/hsfs/python/tests/__init__.py deleted file mode 100644 index 11e65f162..000000000 --- a/hsfs/python/tests/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# -# Copyright 2020 Logical Clocks AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# diff --git a/hsfs/python/tests/conftest.py b/hsfs/python/tests/conftest.py deleted file mode 100644 index 5d20f6318..000000000 --- a/hsfs/python/tests/conftest.py +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright 2022 Hopsworks AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import os -import sys - - -pytest_plugins = [ - "tests.fixtures.backend_fixtures", - "tests.fixtures.dataframe_fixtures", -] - -os.environ["PYSPARK_PYTHON"] = sys.executable -os.environ["PYSPARK_DRIVER_PYTHON"] = sys.executable - -# set hadoop home if on windows -if os.name == "nt": - current_path = os.path.dirname(os.path.realpath(__file__)) - os.environ["HADOOP_HOME"] = current_path + "/data/hadoop/" diff --git a/hsfs/python/tests/fixtures/__init__.py b/hsfs/python/tests/fixtures/__init__.py deleted file mode 100644 index 3ed3ff38a..000000000 --- a/hsfs/python/tests/fixtures/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# -# Copyright 2022 Hopsworks AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# diff --git a/hsfs/python/tests/fixtures/backend_fixtures.py b/hsfs/python/tests/fixtures/backend_fixtures.py deleted file mode 100644 index 5a7029172..000000000 --- a/hsfs/python/tests/fixtures/backend_fixtures.py +++ /dev/null @@ -1,75 +0,0 @@ -# -# Copyright 2022 Hopsworks AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import json -import os - -import pytest - - -FIXTURES_DIR = os.path.dirname(os.path.abspath(__file__)) - -FIXTURES = [ - "execution", - "expectation_suite", - "external_feature_group_alias", - "external_feature_group", - "feature", - "feature_descriptive_statistics", - "feature_group_commit", - "feature_group", - "feature_monitoring_config", - "feature_monitoring_result", - "feature_store", - "feature_view", - "filter", - "fs_query", - "ge_expectation", - "ge_validation_result", - "hudi_feature_group_alias", - "ingestion_job", - "inode", - "job", - "join", - "logic", - "prepared_statement_parameter", - "query", - "serving_prepared_statement", - "split_statistics", - "statistics_config", - "statistics", - "storage_connector", - "tag", - "training_dataset_feature", - "training_dataset", - "training_dataset_split", - "transformation_function", - "user", - "validation_report", - "serving_keys", - "rondb_server", - "spine_group", -] - -backend_fixtures_json = {} -for fixture in FIXTURES: - with open(os.path.join(FIXTURES_DIR, f"{fixture}_fixtures.json"), "r") as json_file: - backend_fixtures_json[fixture] = json.load(json_file) - - -@pytest.fixture -def backend_fixtures(): - return backend_fixtures_json diff --git a/hsfs/python/tests/fixtures/tag_fixtures.json b/hsfs/python/tests/fixtures/tag_fixtures.json deleted file mode 100644 index b171d806f..000000000 --- a/hsfs/python/tests/fixtures/tag_fixtures.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "get": { - "response": { - "count": 1, - "items": [ - { - "name": "test_name", - "value": "test_value", - "schema": "test_schema", - "href": "test_href", - "expand": "test_expand", - "items": [], - "count": 0, - "type": "tagDTO" - } - ] - } - }, - "get_empty": { - "response": { - "count": 0, - "items": [] - } - } -} \ No newline at end of file diff --git a/hsfs/python/tests/pyproject.toml b/hsfs/python/tests/pyproject.toml deleted file mode 100644 index 050735f85..000000000 --- a/hsfs/python/tests/pyproject.toml +++ /dev/null @@ -1,37 +0,0 @@ -[tool.ruff.lint] -# 1. Enable flake8-bugbear (`B`) rules, in addition to the defaults. -select = ["E4", "E7", "E9", "F", "B", "I"] -ignore = [ - "B905", # zip has no strict kwarg until Python 3.10 -] - -# Allow fix for all enabled rules (when `--fix`) is provided. -fixable = ["ALL"] -unfixable = [] - -# Allow unused variables when underscore-prefixed. -dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" - -[tool.ruff.lint.isort] -lines-after-imports = 2 -known-third-party = ["hopsworks", "hsfs", "hsml"] - - -[tool.ruff.format] -# Like Black, use double quotes for strings. -quote-style = "double" - -# Like Black, indent with spaces, rather than tabs. -indent-style = "space" - -# Like Black, respect magic trailing commas. -skip-magic-trailing-comma = false - -# Like Black, automatically detect the appropriate line ending. -line-ending = "auto" - -[tool.pytest.ini_options] -pythonpath = [ - ".", "tests" -] -addopts = "--ignore=python/tests/test_helper/" diff --git a/hsfs/python/tests/test_tag.py b/hsfs/python/tests/test_tag.py deleted file mode 100644 index b66672cbe..000000000 --- a/hsfs/python/tests/test_tag.py +++ /dev/null @@ -1,43 +0,0 @@ -# -# Copyright 2022 Hopsworks AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - - -from hsfs import tag - - -class TestTag: - def test_from_response_json(self, backend_fixtures): - # Arrange - json = backend_fixtures["tag"]["get"]["response"] - - # Act - t_list = tag.Tag.from_response_json(json) - - # Assert - assert len(t_list) == 1 - t = t_list[0] - assert t.name == "test_name" - assert t.value == "test_value" - - def test_from_response_json_empty(self, backend_fixtures): - # Arrange - json = backend_fixtures["tag"]["get_empty"]["response"] - - # Act - t_list = tag.Tag.from_response_json(json) - - # Assert - assert len(t_list) == 0 diff --git a/hsfs/python/tests/test_util.py b/hsfs/python/tests/test_util.py deleted file mode 100644 index 217611bd1..000000000 --- a/hsfs/python/tests/test_util.py +++ /dev/null @@ -1,230 +0,0 @@ -# -# Copyright 2022 Hopsworks AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import asyncio -from datetime import date, datetime - -import pytest -import pytz -from hsfs import util -from hsfs.client.exceptions import FeatureStoreException -from hsfs.core.constants import HAS_AIOMYSQL, HAS_SQLALCHEMY -from hsfs.embedding import EmbeddingFeature, EmbeddingIndex -from hsfs.feature import Feature -from mock import patch - - -if HAS_SQLALCHEMY and HAS_AIOMYSQL: - from hsfs.core import util_sql - - -class TestUtil: - def test_get_hudi_datestr_from_timestamp(self): - dt = util.get_hudi_datestr_from_timestamp(1640995200000) - assert dt == "20220101000000000" - - def test_convert_event_time_to_timestamp_timestamp(self): - dt = util.convert_event_time_to_timestamp(1640995200) - assert dt == 1640995200000 - - def test_convert_event_time_to_timestamp_datetime(self): - dt = util.convert_event_time_to_timestamp(datetime(2022, 1, 1, 0, 0, 0)) - assert dt == 1640995200000 - - def test_convert_event_time_to_timestamp_datetime_tz(self): - dt = util.convert_event_time_to_timestamp( - pytz.timezone("US/Pacific").localize(datetime(2021, 12, 31, 16, 0, 0)) - ) - assert dt == 1640995200000 - - def test_convert_event_time_to_timestamp_date(self): - dt = util.convert_event_time_to_timestamp(date(2022, 1, 1)) - assert dt == 1640995200000 - - def test_convert_event_time_to_timestamp_string(self): - dt = util.convert_event_time_to_timestamp("2022-01-01 00:00:00") - assert dt == 1640995200000 - - def test_convert_iso_event_time_to_timestamp_string(self): - dt = util.convert_event_time_to_timestamp("2022-01-01T00:00:00.000000Z") - assert dt == 1640995200000 - - def test_convert_event_time_to_timestamp_yyyy_mm_dd(self): - timestamp = util.get_timestamp_from_date_string("2022-01-01") - assert timestamp == 1640995200000 - - def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh(self): - timestamp = util.get_timestamp_from_date_string("2022-01-01 00") - assert timestamp == 1640995200000 - - def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh_mm(self): - timestamp = util.get_timestamp_from_date_string("2022-01-01 00:00") - assert timestamp == 1640995200000 - - def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh_mm_ss(self): - timestamp = util.get_timestamp_from_date_string("2022-01-01 00:00:00") - assert timestamp == 1640995200000 - - def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh_mm_ss_f(self): - timestamp = util.get_timestamp_from_date_string("2022-01-01 00:00:00.000") - assert timestamp == 1640995200000 - - def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh_mm_ss_error(self): - with pytest.raises(ValueError): - util.get_timestamp_from_date_string("2022-13-01 00:00:00") - - def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh_mm_ss_error2(self): - with pytest.raises(ValueError): - util.get_timestamp_from_date_string("202-13-01 00:00:00") - - def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh_mm_ss_error3(self): - with pytest.raises(ValueError): - util.get_timestamp_from_date_string("00:00:00 2022-01-01") - - def test_convert_hudi_commit_time_to_timestamp(self): - timestamp = util.get_timestamp_from_date_string("20221118095233099") - assert timestamp == 1668765153099 - - def test_get_dataset_type_HIVEDB(self): - db_type = util.get_dataset_type( - "/apps/hive/warehouse/temp_featurestore.db/storage_connector_resources/kafka__tstore.jks" - ) - assert db_type == "HIVEDB" - - def test_get_dataset_type_HIVEDB_with_dfs(self): - db_type = util.get_dataset_type( - "hdfs:///apps/hive/warehouse/temp_featurestore.db/storage_connector_resources/kafka__tstore.jks" - ) - assert db_type == "HIVEDB" - - def test_get_dataset_type_DATASET(self): - db_type = util.get_dataset_type("/Projects/temp/Resources/kafka__tstore.jks") - assert db_type == "DATASET" - - def test_get_dataset_type_DATASET_with_dfs(self): - db_type = util.get_dataset_type( - "hdfs:///Projects/temp/Resources/kafka__tstore.jks" - ) - assert db_type == "DATASET" - - def test_get_job_url(self, mocker): - # Arrange - mock_client_get_instance = mocker.patch("hsfs.client.get_instance") - - # Act - util.get_job_url(href="1/2/3/4/5/6/7/8") - - # Assert - assert ( - mock_client_get_instance.return_value.replace_public_host.call_args[0][ - 0 - ].path - == "p/5/jobs/named/7/executions" - ) - - def test_get_feature_group_url(self, mocker): - # Arrange - feature_store_id = 99 - feature_group_id = 10 - mock_client_get_instance = mocker.patch("hsfs.client.get_instance") - mock_util_get_hostname_replaced_url = mocker.patch( - "hsfs.util.get_hostname_replaced_url" - ) - mock_client_get_instance.return_value._project_id = 50 - - # Act - util.get_feature_group_url( - feature_group_id=feature_group_id, feature_store_id=feature_store_id - ) - - # Assert - assert mock_util_get_hostname_replaced_url.call_count == 1 - assert ( - mock_util_get_hostname_replaced_url.call_args[0][0] == "/p/50/fs/99/fg/10" - ) - - def test_valid_embedding_type(self): - embedding_index = EmbeddingIndex( - features=[ - EmbeddingFeature("feature1", 3), - EmbeddingFeature("feature2", 3), - EmbeddingFeature("feature3", 3), - EmbeddingFeature("feature4", 3), - ] - ) - # Define a schema with valid feature types - schema = [ - Feature(name="feature1", type="array"), - Feature(name="feature2", type="array"), - Feature(name="feature3", type="array"), - Feature(name="feature4", type="array"), - ] - # Call the method and expect no exceptions - util.validate_embedding_feature_type(embedding_index, schema) - - def test_invalid_embedding_type(self): - embedding_index = EmbeddingIndex( - features=[ - EmbeddingFeature("feature1", 3), - EmbeddingFeature("feature2", 3), - ] - ) - # Define a schema with an invalid feature type - schema = [ - Feature(name="feature1", type="array"), - Feature(name="feature2", type="array"), # Invalid type - ] - # Call the method and expect a FeatureStoreException - with pytest.raises(FeatureStoreException): - util.validate_embedding_feature_type(embedding_index, schema) - - def test_missing_embedding_index(self): - # Define a schema without an embedding index - schema = [ - Feature(name="feature1", type="array"), - Feature(name="feature2", type="array"), - ] - # Call the method with an empty feature_group (no embedding index) - util.validate_embedding_feature_type(None, schema) - # No exception should be raised - - def test_empty_schema(self): - embedding_index = EmbeddingIndex( - features=[ - EmbeddingFeature("feature1", 3), - EmbeddingFeature("feature2", 3), - ] - ) - # Define an empty schema - schema = [] - # Call the method with an empty schema - util.validate_embedding_feature_type(embedding_index, schema) - # No exception should be raised - - @pytest.mark.skipif( - not HAS_SQLALCHEMY or not HAS_AIOMYSQL, - reason="SQLAlchemy or aiomysql is not installed", - ) - def test_create_async_engine(self, mocker): - # Test when get_running_loop() raises a RuntimeError - with patch("asyncio.get_running_loop", side_effect=RuntimeError): - # mock storage connector - online_connector = patch.object(util, "get_online_connector") - with pytest.raises( - RuntimeError, - match="Event loop is not running. Please invoke this co-routine from a running loop or provide an event loop.", - ): - asyncio.run(util_sql.create_async_engine(online_connector, True, 1)) diff --git a/python/tests/conftest.py b/python/tests/conftest.py index 00d23a9fc..52132b0bb 100644 --- a/python/tests/conftest.py +++ b/python/tests/conftest.py @@ -14,7 +14,20 @@ # limitations under the License. # +import os +import sys + + pytest_plugins = [ "tests.fixtures.backend_fixtures", "tests.fixtures.model_fixtures", + "tests.fixtures.dataframe_fixtures", ] + +os.environ["PYSPARK_PYTHON"] = sys.executable +os.environ["PYSPARK_DRIVER_PYTHON"] = sys.executable + +# set hadoop home if on windows +if os.name == "nt": + current_path = os.path.dirname(os.path.realpath(__file__)) + os.environ["HADOOP_HOME"] = current_path + "/data/hadoop/" diff --git a/python/tests/fixtures/backend_fixtures.py b/python/tests/fixtures/backend_fixtures.py index c79bc6ddb..6fec74e3f 100644 --- a/python/tests/fixtures/backend_fixtures.py +++ b/python/tests/fixtures/backend_fixtures.py @@ -23,15 +23,53 @@ FIXTURES_DIR = os.path.dirname(os.path.abspath(__file__)) FIXTURES = [ - "tag", + "execution", + "expectation_suite", + "external_feature_group", + "external_feature_group_alias", + "feature", + "feature_descriptive_statistics", + "feature_group", + "feature_group_commit", + "feature_monitoring_config", + "feature_monitoring_result", + "feature_store", + "feature_view", + "filter", + "fs_query", + "ge_expectation", + "ge_validation_result", + "hudi_feature_group_alias", + "inference_batcher", + "inference_endpoint", + "inference_logger", + "ingestion_job", + "inode", + "job", + "join", + "kafka_topic", + "logic", "model", + "predictor", + "prepared_statement_parameter", + "query", "resources", + "rondb_server", + "serving_keys", + "serving_prepared_statement", + "spine_group", + "split_statistics", + "statistics", + "statistics_config", + "storage_connector", + "tag", + "training_dataset", + "training_dataset_feature", + "training_dataset_split", + "transformation_function", "transformer", - "predictor", - "kafka_topic", - "inference_logger", - "inference_batcher", - "inference_endpoint", + "user", + "validation_report", ] backend_fixtures_json = {} diff --git a/python/tests/test_util.py b/python/tests/test_util.py index 3e7d18166..b39501162 100644 --- a/python/tests/test_util.py +++ b/python/tests/test_util.py @@ -14,10 +14,18 @@ # limitations under the License. # +import asyncio import os +from datetime import date, datetime from urllib.parse import ParseResult +import hsfs.util import pytest +import pytz +from hsfs.client.exceptions import FeatureStoreException +from hsfs.core.constants import HAS_AIOMYSQL, HAS_SQLALCHEMY +from hsfs.embedding import EmbeddingFeature, EmbeddingIndex +from hsfs.feature import Feature from hsml import util from hsml.constants import MODEL from hsml.model import Model as BaseModel @@ -30,6 +38,11 @@ from hsml.tensorflow.predictor import Predictor as TFPredictor from hsml.torch.model import Model as TorchModel from hsml.torch.predictor import Predictor as TorchPredictor +from mock import patch + + +if HAS_SQLALCHEMY and HAS_AIOMYSQL: + from hsfs.core import util_sql class TestUtil: @@ -583,7 +596,7 @@ def test_extract_field_from_json_as_instance_of_list_str(self, mocker): assert b == ["2", "2", "2"] assert get_obj_from_json.call_count == 3 assert get_obj_from_json.call_args[1]["obj"] == "2" - assert get_obj_from_json.call_args[1]["cls"] == str + assert get_obj_from_json.call_args[1]["cls"] is str def test_get_obj_from_json_cls(self, mocker): # Arrange @@ -643,3 +656,200 @@ class Test: # Assert assert "cannot be converted to class" in str(e_info.value) + + def test_get_hudi_datestr_from_timestamp(self): + dt = hsfs.util.get_hudi_datestr_from_timestamp(1640995200000) + assert dt == "20220101000000000" + + def test_convert_event_time_to_timestamp_timestamp(self): + dt = hsfs.util.convert_event_time_to_timestamp(1640995200) + assert dt == 1640995200000 + + def test_convert_event_time_to_timestamp_datetime(self): + dt = hsfs.util.convert_event_time_to_timestamp(datetime(2022, 1, 1, 0, 0, 0)) + assert dt == 1640995200000 + + def test_convert_event_time_to_timestamp_datetime_tz(self): + dt = hsfs.util.convert_event_time_to_timestamp( + pytz.timezone("US/Pacific").localize(datetime(2021, 12, 31, 16, 0, 0)) + ) + assert dt == 1640995200000 + + def test_convert_event_time_to_timestamp_date(self): + dt = hsfs.util.convert_event_time_to_timestamp(date(2022, 1, 1)) + assert dt == 1640995200000 + + def test_convert_event_time_to_timestamp_string(self): + dt = hsfs.util.convert_event_time_to_timestamp("2022-01-01 00:00:00") + assert dt == 1640995200000 + + def test_convert_iso_event_time_to_timestamp_string(self): + dt = hsfs.util.convert_event_time_to_timestamp("2022-01-01T00:00:00.000000Z") + assert dt == 1640995200000 + + def test_convert_event_time_to_timestamp_yyyy_mm_dd(self): + timestamp = hsfs.util.get_timestamp_from_date_string("2022-01-01") + assert timestamp == 1640995200000 + + def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh(self): + timestamp = hsfs.util.get_timestamp_from_date_string("2022-01-01 00") + assert timestamp == 1640995200000 + + def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh_mm(self): + timestamp = hsfs.util.get_timestamp_from_date_string("2022-01-01 00:00") + assert timestamp == 1640995200000 + + def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh_mm_ss(self): + timestamp = hsfs.util.get_timestamp_from_date_string("2022-01-01 00:00:00") + assert timestamp == 1640995200000 + + def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh_mm_ss_f(self): + timestamp = hsfs.util.get_timestamp_from_date_string("2022-01-01 00:00:00.000") + assert timestamp == 1640995200000 + + def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh_mm_ss_error(self): + with pytest.raises(ValueError): + hsfs.util.get_timestamp_from_date_string("2022-13-01 00:00:00") + + def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh_mm_ss_error2(self): + with pytest.raises(ValueError): + hsfs.util.get_timestamp_from_date_string("202-13-01 00:00:00") + + def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh_mm_ss_error3(self): + with pytest.raises(ValueError): + hsfs.util.get_timestamp_from_date_string("00:00:00 2022-01-01") + + def test_convert_hudi_commit_time_to_timestamp(self): + timestamp = hsfs.util.get_timestamp_from_date_string("20221118095233099") + assert timestamp == 1668765153099 + + def test_get_dataset_type_HIVEDB(self): + db_type = hsfs.util.get_dataset_type( + "/apps/hive/warehouse/temp_featurestore.db/storage_connector_resources/kafka__tstore.jks" + ) + assert db_type == "HIVEDB" + + def test_get_dataset_type_HIVEDB_with_dfs(self): + db_type = hsfs.util.get_dataset_type( + "hdfs:///apps/hive/warehouse/temp_featurestore.db/storage_connector_resources/kafka__tstore.jks" + ) + assert db_type == "HIVEDB" + + def test_get_dataset_type_DATASET(self): + db_type = hsfs.util.get_dataset_type("/Projects/temp/Resources/kafka__tstore.jks") + assert db_type == "DATASET" + + def test_get_dataset_type_DATASET_with_dfs(self): + db_type = hsfs.util.get_dataset_type( + "hdfs:///Projects/temp/Resources/kafka__tstore.jks" + ) + assert db_type == "DATASET" + + def test_get_job_url(self, mocker): + # Arrange + mock_client_get_instance = mocker.patch("hsfs.client.get_instance") + + # Act + hsfs.util.get_job_url(href="1/2/3/4/5/6/7/8") + + # Assert + assert ( + mock_client_get_instance.return_value.replace_public_host.call_args[0][ + 0 + ].path + == "p/5/jobs/named/7/executions" + ) + + def test_get_feature_group_url(self, mocker): + # Arrange + feature_store_id = 99 + feature_group_id = 10 + mock_client_get_instance = mocker.patch("hsfs.client.get_instance") + mock_util_get_hostname_replaced_url = mocker.patch( + "hsfs.util.get_hostname_replaced_url" + ) + mock_client_get_instance.return_value._project_id = 50 + + # Act + hsfs.util.get_feature_group_url( + feature_group_id=feature_group_id, feature_store_id=feature_store_id + ) + + # Assert + assert mock_util_get_hostname_replaced_url.call_count == 1 + assert ( + mock_util_get_hostname_replaced_url.call_args[0][0] == "/p/50/fs/99/fg/10" + ) + + def test_valid_embedding_type(self): + embedding_index = EmbeddingIndex( + features=[ + EmbeddingFeature("feature1", 3), + EmbeddingFeature("feature2", 3), + EmbeddingFeature("feature3", 3), + EmbeddingFeature("feature4", 3), + ] + ) + # Define a schema with valid feature types + schema = [ + Feature(name="feature1", type="array"), + Feature(name="feature2", type="array"), + Feature(name="feature3", type="array"), + Feature(name="feature4", type="array"), + ] + # Call the method and expect no exceptions + hsfs.util.validate_embedding_feature_type(embedding_index, schema) + + def test_invalid_embedding_type(self): + embedding_index = EmbeddingIndex( + features=[ + EmbeddingFeature("feature1", 3), + EmbeddingFeature("feature2", 3), + ] + ) + # Define a schema with an invalid feature type + schema = [ + Feature(name="feature1", type="array"), + Feature(name="feature2", type="array"), # Invalid type + ] + # Call the method and expect a FeatureStoreException + with pytest.raises(FeatureStoreException): + hsfs.util.validate_embedding_feature_type(embedding_index, schema) + + def test_missing_embedding_index(self): + # Define a schema without an embedding index + schema = [ + Feature(name="feature1", type="array"), + Feature(name="feature2", type="array"), + ] + # Call the method with an empty feature_group (no embedding index) + hsfs.util.validate_embedding_feature_type(None, schema) + # No exception should be raised + + def test_empty_schema(self): + embedding_index = EmbeddingIndex( + features=[ + EmbeddingFeature("feature1", 3), + EmbeddingFeature("feature2", 3), + ] + ) + # Define an empty schema + schema = [] + # Call the method with an empty schema + hsfs.util.validate_embedding_feature_type(embedding_index, schema) + # No exception should be raised + + @pytest.mark.skipif( + not HAS_SQLALCHEMY or not HAS_AIOMYSQL, + reason="SQLAlchemy or aiomysql is not installed", + ) + def test_create_async_engine(self, mocker): + # Test when get_running_loop() raises a RuntimeError + with patch("asyncio.get_running_loop", side_effect=RuntimeError): + # mock storage connector + online_connector = patch.object(hsfs.util, "get_online_connector") + with pytest.raises( + RuntimeError, + match="Event loop is not running. Please invoke this co-routine from a running loop or provide an event loop.", + ): + asyncio.run(util_sql.create_async_engine(online_connector, True, 1)) From 256a7f92129580b61e40162911a6ffd1182c3ca3 Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Sat, 13 Jul 2024 12:11:19 +0200 Subject: [PATCH 3/4] Fix the problem with impure tests changing backend_fixtures One of the tests is impure, changing backend_fixtures, which breaks test_model. This commit makes backend_fixtures to return a deep copy of backend_fixtures_json isntead of returning them directly. --- python/tests/fixtures/backend_fixtures.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/tests/fixtures/backend_fixtures.py b/python/tests/fixtures/backend_fixtures.py index 6fec74e3f..dd455b699 100644 --- a/python/tests/fixtures/backend_fixtures.py +++ b/python/tests/fixtures/backend_fixtures.py @@ -14,6 +14,7 @@ # limitations under the License. # +import copy import json import os @@ -80,4 +81,4 @@ @pytest.fixture def backend_fixtures(): - return backend_fixtures_json + return copy.deepcopy(backend_fixtures_json) From 190da3c0132c2b9200513441d365e38bf159e5de Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Sat, 13 Jul 2024 12:13:54 +0200 Subject: [PATCH 4/4] Fix ruff check of test_base_client --- python/tests/client/test_base_client.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/tests/client/test_base_client.py b/python/tests/client/test_base_client.py index b90b3b6f1..7717f6bbe 100644 --- a/python/tests/client/test_base_client.py +++ b/python/tests/client/test_base_client.py @@ -20,6 +20,7 @@ import requests from hsfs.client.base import Client from hsfs.client.exceptions import RestAPIError + from tests.util import changes_environ