From de88c05652873d6bc218fe5d08600a870d6f247d Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Wed, 18 May 2022 19:11:10 +0100 Subject: [PATCH] ENH: Use name-based service ID --- octue.yaml | 1 + setup.py | 2 +- tests/test_app.py | 4 +--- tests/test_deployment.py | 7 ++----- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/octue.yaml b/octue.yaml index 52ffe1c..16e9bc0 100644 --- a/octue.yaml +++ b/octue.yaml @@ -1,5 +1,6 @@ services: - name: turbsim-service + organisation: aerosense app_configuration_path: app_configuration.json project_name: aerosense-twined region: europe-west1 diff --git a/setup.py b/setup.py index 9cf3466..24e94cc 100644 --- a/setup.py +++ b/setup.py @@ -8,6 +8,6 @@ py_modules=["app"], install_requires=[ "coolname>=1.1,<2", - "octue==0.23.5", + "octue==0.26.0", ], ) diff --git a/tests/test_app.py b/tests/test_app.py index 548bb36..3c6fa6d 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -24,9 +24,7 @@ def test_app(self): """Test that the app takes input and produces an output manifest with a dataset containing a single `.bts` file.""" runner = Runner(app_src=REPOSITORY_ROOT, twine=TWINE_PATH, output_location=OUTPUT_LOCATION) - input_manifest = Manifest( - datasets={"turbsim": storage.path.generate_gs_path("openfast-data", "testing", "turbsim")} - ) + input_manifest = Manifest(datasets={"turbsim": "gs://openfast-data/testing/turbsim"}) # Mock running an OpenFAST analysis by creating an empty output file. with patch("app.run_subprocess_and_log_stdout_and_stderr", self._create_mock_output_file): diff --git a/tests/test_deployment.py b/tests/test_deployment.py index f7cc26e..ad249ea 100644 --- a/tests/test_deployment.py +++ b/tests/test_deployment.py @@ -1,7 +1,6 @@ import os import unittest -from octue.cloud import storage from octue.log_handlers import apply_log_handler from octue.resources import Child, Manifest @@ -22,11 +21,9 @@ def test_cloud_run_integration(self): responses. An input dataset from Google Cloud Storage is used for this test. """ project_name = os.environ["TEST_PROJECT_NAME"] - service_id = "octue.services.c3b47b47-cdfa-433d-b5a8-47a58f3bf7cb" + service_id = "aerosense/turbsim-service" - input_manifest = Manifest( - datasets={"turbsim": storage.path.generate_gs_path("openfast-data", "testing", "turbsim")} - ) + input_manifest = Manifest(datasets={"turbsim": "gs://openfast-data/testing/turbsim"}) child = Child( name="turbsim-service",