From 9eda5ac6ce206b35130958bb29efcb00615940c1 Mon Sep 17 00:00:00 2001 From: Yadu Babuji Date: Fri, 22 Nov 2024 13:10:14 -0600 Subject: [PATCH] Updating github action --- .github/{ => workflows}/gce_test.yaml | 32 +++++---------------------- globus_compute_executor/executor.py | 7 +++--- 2 files changed, 9 insertions(+), 30 deletions(-) rename .github/{ => workflows}/gce_test.yaml (78%) diff --git a/.github/gce_test.yaml b/.github/workflows/gce_test.yaml similarity index 78% rename from .github/gce_test.yaml rename to .github/workflows/gce_test.yaml index a24d2c1..6663aa6 100644 --- a/.github/gce_test.yaml +++ b/.github/workflows/gce_test.yaml @@ -34,22 +34,16 @@ jobs: as_ascii="$(echo "${{ github.ref_name }}" | perl -pe "s/[^A-z0-9-]+/-/g; s/^-+|-+\$//g; s/--+/-/g;")" echo "as-ascii=$as_ascii" >> $GITHUB_OUTPUT - - name: setup virtual env + - name: install dependencies run: | - make virtualenv - source .venv/bin/activate - - - name: make deps clean_coverage - run: | - source .venv/bin/activate - pip3 install . + python3 -m pip install -U pip + python3 -m pip install pre-commit tox globus-compute-endpoint - name: start globus_compute_endpoint env: GLOBUS_COMPUTE_CLIENT_ID: ${{ secrets.GLOBUS_COMPUTE_CLIENT_ID }} GLOBUS_COMPUTE_CLIENT_SECRET: ${{ secrets.GLOBUS_COMPUTE_SECRET_KEY }} run: | - source /home/runner/work/parsl/parsl/.venv/bin/activate globus-compute-endpoint configure default which globus-compute-endpoint python3 -c "import globus_compute_sdk; print(globus_compute_sdk.__version__)" @@ -67,33 +61,19 @@ jobs: - name: mypy run: | tox -e mypy - - name: make test + + - name: run tests env: GLOBUS_COMPUTE_CLIENT_ID: ${{ secrets.GLOBUS_COMPUTE_CLIENT_ID }} GLOBUS_COMPUTE_CLIENT_SECRET: ${{ secrets.GLOBUS_COMPUTE_SECRET_KEY }} run: | - source .venv/bin/activate export GLOBUS_COMPUTE_ENDPOINT=$(globus-compute-endpoint list | grep default | cut -c 3-38) echo "GLOBUS_COMPUTE_ENDPOINT = $GLOBUS_COMPUTE_ENDPOINT" - - tox -e mypy - + tox -e py - name: stop globus_compute_endpoint env: GLOBUS_COMPUTE_CLIENT_ID: ${{ secrets.GLOBUS_COMPUTE_CLIENT_ID }} GLOBUS_COMPUTE_CLIENT_SECRET: ${{ secrets.GLOBUS_COMPUTE_SECRET_KEY }} run: | - source /home/runner/work/parsl/parsl/.venv/bin/activate globus-compute-endpoint stop default - - - name: Archive runinfo logs - if: ${{ always() }} - uses: actions/upload-artifact@v4 - with: - name: runinfo-${{ env.PYTHON_VERSION }}-${{ steps.job-info.outputs.as-ascii }}-${{ github.sha }} - path: | - runinfo/ - pytest-parsl/ - ci_job_info.txt - compression-level: 9 \ No newline at end of file diff --git a/globus_compute_executor/executor.py b/globus_compute_executor/executor.py index 611e9bf..da57a3a 100644 --- a/globus_compute_executor/executor.py +++ b/globus_compute_executor/executor.py @@ -1,5 +1,6 @@ +from __future__ import annotations + import copy -import uuid from concurrent.futures import Future from typing import Any, Callable @@ -7,8 +8,6 @@ from parsl.executors.base import ParslExecutor from parsl.utils import RepresentationMixin -UUID_LIKE_T = uuid.UUID | str - class GlobusComputeExecutor(ParslExecutor, RepresentationMixin): """GlobusComputeExecutor is a plug-in for Parsl that enables remote task submission @@ -76,7 +75,7 @@ def submit( func: Callable, resource_specification: dict[str, Any], *args: Any, - **kwargs: Any + **kwargs: Any, ) -> Future: """Submit func to globus-compute