diff --git a/.cookiecutterrc b/.cookiecutterrc index 769883d..4b06a71 100644 --- a/.cookiecutterrc +++ b/.cookiecutterrc @@ -35,4 +35,4 @@ default_context: project_slug: 'osparc-python-runner' project_type: 'computational' release_date: '2020' - version: '1.4.0' + version: '1.4.1' diff --git a/VERSION b/VERSION index 88c5fb8..347f583 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.4.0 +1.4.1 diff --git a/docker-compose-meta.yml b/docker-compose-meta.yml index 809b686..eaa2143 100644 --- a/docker-compose-meta.yml +++ b/docker-compose-meta.yml @@ -34,7 +34,7 @@ services: under OUTPUT_FOLDER/output_4 as output_4.zip", "type": "data:*/*", "fileToKeyMap": {"output_4.zip": "output_4"}}}}' io.simcore.type: '{"type": "computational"}' - io.simcore.version: '{"version": "1.4.0"}' + io.simcore.version: '{"version": "1.4.1"}' org.label-schema.build-date: ${BUILD_DATE} org.label-schema.schema-version: '1.0' org.label-schema.vcs-ref: ${VCS_REF} diff --git a/metadata/metadata.yml b/metadata/metadata.yml index 1c83dc1..994ffe6 100644 --- a/metadata/metadata.yml +++ b/metadata/metadata.yml @@ -1,9 +1,11 @@ name: oSparc Python Runner +description: https://raw.githubusercontent.com/ZurichMedTech/s4l-assets/refs/heads/main/app/full/services/simcore_services_comp_osparc-python-runner.md +icon: https://raw.githubusercontent.com/ZurichMedTech/s4l-assets/main/app/icons/s4l/simcore_services_comp_osparc-python-runner.png +thumbnail: https://raw.githubusercontent.com/ZurichMedTech/s4l-assets/main/app/thumbnails/s4l/simcore_services_comp_osparc-python-runner.png key: simcore/services/comp/osparc-python-runner type: computational integration-version: 1.0.0 -version: 1.4.0 -description: oSparc Python Runner +version: 1.4.1 contact: anderegg@itis.swiss authors: - name: Sylvain Anderegg diff --git a/service.cli/run b/service.cli/run index 2810032..da63b94 100755 --- a/service.cli/run +++ b/service.cli/run @@ -1,3 +1,4 @@ + #!/bin/sh #--------------------------------------------------------------- # AUTO-GENERATED CODE, do not modify this will be overwritten!!! diff --git a/tests/integration/test_docker_image.py b/tests/integration/test_docker_image.py index 3ba272f..a5ef691 100644 --- a/tests/integration/test_docker_image.py +++ b/tests/integration/test_docker_image.py @@ -3,6 +3,7 @@ # pylint:disable=redefined-outer-name import json +from copy import deepcopy import shutil import urllib.request from pathlib import Path @@ -18,7 +19,7 @@ # HELPERS def _download_url(url: str, file: Path): # Download the file from `url` and save it locally under `file_name`: - with urllib.request.urlopen(url) as response, file.open('wb') as out_file: + with urllib.request.urlopen(url) as response, file.open("wb") as out_file: shutil.copyfileobj(response, out_file) assert file.exists() @@ -36,6 +37,7 @@ def _convert_to_simcore_labels(image_labels: Dict) -> Dict: assert len(io_simcore_labels) > 0 return io_simcore_labels + # FIXTURES @pytest.fixture def osparc_service_labels_jsonschema(tmp_path) -> Dict: @@ -44,19 +46,25 @@ def osparc_service_labels_jsonschema(tmp_path) -> Dict: _download_url(url, file_name) with file_name.open() as fp: json_schema = json.load(fp) + # artifically add to legacy scheme new icon field which is optional + # NOTE: a prpoer fix is to migrate this repository to using ooil + json_schema["properties"]["icon"] = deepcopy(json_schema["properties"]["thumbnail"]) return json_schema -@pytest.fixture(scope='session') +@pytest.fixture(scope="session") def metadata_labels(metadata_file: Path) -> Dict: with metadata_file.open() as fp: metadata = yaml.safe_load(fp) return metadata + # TESTS -def test_docker_io_simcore_labels_against_files(docker_image: docker.models.images.Image, metadata_labels: Dict): +def test_docker_io_simcore_labels_against_files( + docker_image: docker.models.images.Image, metadata_labels: Dict +): image_labels = docker_image.labels io_simcore_labels = _convert_to_simcore_labels(image_labels) # check files are identical @@ -65,16 +73,18 @@ def test_docker_io_simcore_labels_against_files(docker_image: docker.models.imag assert value == metadata_labels[key] -def test_validate_docker_io_simcore_labels(docker_image: docker.models.images.Image, osparc_service_labels_jsonschema: Dict): +def test_validate_docker_io_simcore_labels( + docker_image: docker.models.images.Image, osparc_service_labels_jsonschema: Dict +): image_labels = docker_image.labels # get io labels io_simcore_labels = _convert_to_simcore_labels(image_labels) # validate schema try: - jsonschema.validate(io_simcore_labels, - osparc_service_labels_jsonschema) + jsonschema.validate(io_simcore_labels, osparc_service_labels_jsonschema) except jsonschema.SchemaError: - pytest.fail("Schema {} contains errors".format( - osparc_service_labels_jsonschema)) + pytest.fail( + "Schema {} contains errors".format(osparc_service_labels_jsonschema) + ) except jsonschema.ValidationError: pytest.fail("Failed to validate docker image io labels against schema") diff --git a/versioning/service.cfg b/versioning/service.cfg index 44754b8..2696cf4 100644 --- a/versioning/service.cfg +++ b/versioning/service.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.4.0 +current_version = 1.4.1 commit = False message = service/kernel version: {current_version} → {new_version} tag = False