diff --git a/.github/workflows/amorphouspy_api.yml b/.github/workflows/amorphouspy_api.yml index ab87b17e..ef37354f 100644 --- a/.github/workflows/amorphouspy_api.yml +++ b/.github/workflows/amorphouspy_api.yml @@ -36,8 +36,9 @@ jobs: shell: bash -l {0} working-directory: amorphouspy_api run: | - amorphouspy_INTEGRATION=1 uvicorn amorphouspy_api.app:app --port 8002 & - pytest -m integration -s --durations=0 --cov=src/amorphouspy_api --cov-report=xml --cov-report=term --cov-append + echo "amorphouspy_INTEGRATION=1 uvicorn amorphouspy_api.app:app --port 8002 & pytest -m integration -s --durations=0 --cov=src/amorphouspy_api --cov-report=xml --cov-report=term --cov-append" > test.sh + chmod +x test.sh + flux start ./test.sh - name: Pytest coverage comment uses: MishaKav/pytest-coverage-comment@main diff --git a/amorphouspy_api/src/amorphouspy_api/worker.py b/amorphouspy_api/src/amorphouspy_api/worker.py index 9d68bd04..516242c8 100644 --- a/amorphouspy_api/src/amorphouspy_api/worker.py +++ b/amorphouspy_api/src/amorphouspy_api/worker.py @@ -65,8 +65,7 @@ def meltquench_worker(task_id: str, request_dict: dict[str, Any], db_path: str, melt_quench_simulation, ) from amorphouspy.workflows.structural_analysis import analyze_structure - from executorlib import get_item_from_future - from executorlib.api import TestClusterExecutor + from executorlib import FluxClusterExecutor, get_item_from_future # Create composition string from request comp_parts = [] @@ -89,7 +88,7 @@ def meltquench_worker(task_id: str, request_dict: dict[str, Any], db_path: str, logger.info(f"Task {task_id}: Using shared project directory: {project_path}") # Create executor for caching workflow results - exe = TestClusterExecutor(cache_directory=project_path) + exe = FluxClusterExecutor(cache_directory=project_path) atoms_dict_future = exe.submit( get_structure_dict, composition=composition, diff --git a/environment.yml b/environment.yml index 9b915367..a1e505af 100644 --- a/environment.yml +++ b/environment.yml @@ -21,3 +21,5 @@ dependencies: - uvicorn - fastapi-mcp =0.4.0 - sovapy =0.8.3 +- flux-core =0.81.0 +- pysqa =0.3.4