diff --git a/CHANGELOG.md b/CHANGELOG.md index 859d74d..55e39e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [UNRELEASED] +### Changed + +- Using executor aliases instead of classes for functional tests + ## [0.24.0] - 2022-12-06 ### Changed diff --git a/tests/functional_tests/basic_workflow_test.py b/tests/functional_tests/basic_workflow_test.py index e5d262f..03d9ff4 100644 --- a/tests/functional_tests/basic_workflow_test.py +++ b/tests/functional_tests/basic_workflow_test.py @@ -21,14 +21,12 @@ import covalent as ct import pytest -from tests.functional_tests.fixtures.executor import executor - # Basic Workflow @pytest.mark.functional_tests def test_basic_workflow(): - @ct.electron(executor=executor) + @ct.electron(executor="ecs") def join_words(a, b): return ", ".join([a, b]) diff --git a/tests/functional_tests/fixtures/__init__.py b/tests/functional_tests/fixtures/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/functional_tests/fixtures/executor.py b/tests/functional_tests/fixtures/executor.py deleted file mode 100644 index 884a7c7..0000000 --- a/tests/functional_tests/fixtures/executor.py +++ /dev/null @@ -1,27 +0,0 @@ -from dotenv import load_dotenv - -load_dotenv() - -import os - -from covalent_ecs_plugin.ecs import ECSExecutor - -executor_config = { - "s3_bucket_name": os.getenv("executor_s3_bucket_name"), - "ecr_repo_name": os.getenv("executor_ecr_repo_name"), - "ecs_cluster_name": os.getenv("executor_ecs_cluster_name"), - "ecs_task_family_name": os.getenv("executor_ecs_task_family_name"), - "ecs_task_execution_role_name": os.getenv("executor_ecs_task_execution_role_name"), - "ecs_task_role_name": os.getenv("executor_ecs_task_role_name"), - "ecs_task_log_group_name": os.getenv("executor_ecs_task_log_group_name"), - "ecs_task_subnet_id": os.getenv("executor_ecs_task_subnet_id"), - "ecs_task_security_group_id": os.getenv("executor_ecs_task_security_group_id"), - "vcpu": os.getenv("executor_vcpu", 0.25), - "memory": os.getenv("executor_memory", 0.5), - "cache_dir": "/tmp/covalent", -} - -print("Using Executor Configuration:") -print(executor_config) - -executor = ECSExecutor(**executor_config) diff --git a/tests/functional_tests/svm_workflow_test.py b/tests/functional_tests/svm_workflow_test.py index 9588534..acdfda5 100644 --- a/tests/functional_tests/svm_workflow_test.py +++ b/tests/functional_tests/svm_workflow_test.py @@ -22,8 +22,6 @@ import covalent as ct import pytest -from tests.functional_tests.fixtures.executor import executor - deps_pip = ct.DepsPip(packages=["numpy==1.22.4", "scikit-learn==1.1.2"]) @@ -40,7 +38,7 @@ def load_data(): iris.target = iris.target[perm] return iris.data, iris.target - @ct.electron(executor=executor, deps_pip=deps_pip) + @ct.electron(executor="ecs", deps_pip=deps_pip) def train_svm(data, C, gamma): X, y = data clf = svm.SVC(C=C, gamma=gamma)