diff --git a/.github/workflows/check_version.yaml b/.github/workflows/check_version.yaml deleted file mode 100644 index 595840e9..00000000 --- a/.github/workflows/check_version.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: Check if versions are consistent - -on: - push: - tags-ignore: - - '**' - pull_request: - -jobs: - check-version-numbers: - - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Setup Python & Poetry Environment - uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0 - with: - python-version: '3.10' - poetry-version: '1.8.2' - - name: Check Release - run: poetry run python3 scripts/build/check_release.py diff --git a/doc/changes/changelog.md b/doc/changes/changelog.md index e6f56ce8..35413df9 100644 --- a/doc/changes/changelog.md +++ b/doc/changes/changelog.md @@ -1,6 +1,7 @@ # Changes * [unreleased](unreleased.md) +* [2.0.0](changes_2.0.0) * [1.1.0](changes_1.1.0.md) * [1.0.0](changes_1.0.0.md) * [0.21.0](changes_0.21.0.md) diff --git a/doc/changes/changes_2.0.0.md b/doc/changes/changes_2.0.0.md new file mode 100644 index 00000000..4c5cd2c6 --- /dev/null +++ b/doc/changes/changes_2.0.0.md @@ -0,0 +1,11 @@ +# 2.0.0 - 2025-02-04 + +Code name: Fixed Language Definition Model + +## Summary + +This release has a small fix for the Language Definition Model and increases it's schema version to 2. + +## Refactorings + + - #266: Fix SLCParameter and LanguageDefinition diff --git a/exasol/slc/internal/tasks/upload/language_def_parser.py b/exasol/slc/internal/tasks/upload/language_def_parser.py index a6a4a97e..3f0c06ef 100644 --- a/exasol/slc/internal/tasks/upload/language_def_parser.py +++ b/exasol/slc/internal/tasks/upload/language_def_parser.py @@ -27,7 +27,7 @@ def _parse_builtin_language_definition(url: str) -> BuiltInLanguageDefinitionURL def _build_udf_client_abs_path_from_fragments( - fragment_parts: Tuple[str, ...] + fragment_parts: Tuple[str, ...], ) -> UdfClientBucketPath: if len(fragment_parts) < 4: raise ValueError( @@ -101,8 +101,9 @@ def parse_language_definition( if parsed_url.hostname: raise ValueError(f"Invalid language definition: '{lang_def}'") slc_parameters = [ - SLCParameter(key=key, value=value) + SLCParameter(key=key, value=v) for key, value in parse_qs(parsed_url.query).items() + for v in value ] try: udf_client_path = _parse_udf_client_path(parsed_url.fragment) diff --git a/exasol/slc/models/language_definition_common.py b/exasol/slc/models/language_definition_common.py index b02feede..bce98c9f 100644 --- a/exasol/slc/models/language_definition_common.py +++ b/exasol/slc/models/language_definition_common.py @@ -1,7 +1,6 @@ import datetime from enum import Enum from pathlib import PurePosixPath -from typing import List from pydantic import BaseModel @@ -18,7 +17,7 @@ class SLCParameter(BaseModel): """ key: str - value: List[str] + value: str class UdfClientRelativePath(BaseModel): diff --git a/exasol/slc/models/language_definition_components.py b/exasol/slc/models/language_definition_components.py index 1a724ad8..8baf8eda 100644 --- a/exasol/slc/models/language_definition_components.py +++ b/exasol/slc/models/language_definition_components.py @@ -50,7 +50,7 @@ class LanguageDefinitionURL: udf_client_path: Union[UdfClientBucketPath, UdfClientRelativePath] def __str__(self) -> str: - query_params = {p.key: v for p in self.parameters for v in p.value} + query_params = [(p.key, p.value) for p in self.parameters] query_string = urlencode(query_params) url = urlunparse( ParseResult( diff --git a/exasol/slc/models/language_definition_model.py b/exasol/slc/models/language_definition_model.py index edcd01bd..d175586d 100644 --- a/exasol/slc/models/language_definition_model.py +++ b/exasol/slc/models/language_definition_model.py @@ -10,7 +10,7 @@ UdfClientRelativePath, ) -LANGUAGE_DEFINITON_SCHEMA_VERSION = 1 +LANGUAGE_DEFINITON_SCHEMA_VERSION = 2 class LanguageDefinition(BaseModel): @@ -20,7 +20,6 @@ class LanguageDefinition(BaseModel): protocol: str aliases: List[str] - language: SLCLanguage parameters: List[SLCParameter] udf_client_path: UdfClientRelativePath deprecation: Optional[DeprecationInfo] diff --git a/exasol/slc/version.py b/exasol/slc/version.py index 84b9409d..21ef57d2 100644 --- a/exasol/slc/version.py +++ b/exasol/slc/version.py @@ -4,8 +4,8 @@ # * or "poetry run version-check --fix" # Do not edit this file manually! # If you need to change the version, do so in the project.toml, e.g. by using `poetry version X.Y.Z`. -MAJOR = 1 -MINOR = 1 +MAJOR = 2 +MINOR = 0 PATCH = 0 VERSION = f"{MAJOR}.{MINOR}.{PATCH}" __version__ = VERSION diff --git a/poetry.lock b/poetry.lock index 5650eaf9..e8f9c7fb 100644 --- a/poetry.lock +++ b/poetry.lock @@ -93,17 +93,17 @@ tests-mypy = ["mypy (>=1.11.1)", "pytest-mypy-plugins"] [[package]] name = "babel" -version = "2.16.0" +version = "2.17.0" description = "Internationalization utilities" optional = false python-versions = ">=3.8" files = [ - {file = "babel-2.16.0-py3-none-any.whl", hash = "sha256:368b5b98b37c06b7daf6696391c3240c938b37767d4584413e8438c5c435fa8b"}, - {file = "babel-2.16.0.tar.gz", hash = "sha256:d1f3554ca26605fe173f3de0c65f750f5a42f924499bf134de6423582298e316"}, + {file = "babel-2.17.0-py3-none-any.whl", hash = "sha256:4d0b53093fdfb4b21c92b5213dba5a1b23885afa8383709427046b21c366e5f2"}, + {file = "babel-2.17.0.tar.gz", hash = "sha256:0c54cffb19f690cdcc52a3b50bcbf71e07a808d1c80d549f2459b9d2cf0afb9d"}, ] [package.extras] -dev = ["freezegun (>=1.0,<2.0)", "pytest (>=6.0)", "pytest-cov"] +dev = ["backports.zoneinfo", "freezegun (>=1.0,<2.0)", "jinja2 (>=3.0)", "pytest (>=6.0)", "pytest-cov", "pytz", "setuptools", "tzdata"] [[package]] name = "bandit" @@ -170,17 +170,18 @@ typecheck = ["mypy"] [[package]] name = "beautifulsoup4" -version = "4.12.3" +version = "4.13.1" description = "Screen-scraping library" optional = false -python-versions = ">=3.6.0" +python-versions = ">=3.7.0" files = [ - {file = "beautifulsoup4-4.12.3-py3-none-any.whl", hash = "sha256:b80878c9f40111313e55da8ba20bdba06d8fa3969fc68304167741bbf9e082ed"}, - {file = "beautifulsoup4-4.12.3.tar.gz", hash = "sha256:74e3d1928edc070d21748185c46e3fb33490f22f52a3addee9aee0f4f7781051"}, + {file = "beautifulsoup4-4.13.1-py3-none-any.whl", hash = "sha256:72465267014897bb10ca749bb632bde6c2d20f3254afd5458544bd74e6c2e6d8"}, + {file = "beautifulsoup4-4.13.1.tar.gz", hash = "sha256:741c8b6903a1e4ae8ba32b9c9ae7510dab7a197fdbadcf9fcdeb0891ef5ec66a"}, ] [package.dependencies] soupsieve = ">1.2" +typing-extensions = ">=4.0.0" [package.extras] cchardet = ["cchardet"] @@ -191,33 +192,33 @@ lxml = ["lxml"] [[package]] name = "black" -version = "24.10.0" +version = "25.1.0" description = "The uncompromising code formatter." optional = false python-versions = ">=3.9" files = [ - {file = "black-24.10.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e6668650ea4b685440857138e5fe40cde4d652633b1bdffc62933d0db4ed9812"}, - {file = "black-24.10.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1c536fcf674217e87b8cc3657b81809d3c085d7bf3ef262ead700da345bfa6ea"}, - {file = "black-24.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:649fff99a20bd06c6f727d2a27f401331dc0cc861fb69cde910fe95b01b5928f"}, - {file = "black-24.10.0-cp310-cp310-win_amd64.whl", hash = "sha256:fe4d6476887de70546212c99ac9bd803d90b42fc4767f058a0baa895013fbb3e"}, - {file = "black-24.10.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5a2221696a8224e335c28816a9d331a6c2ae15a2ee34ec857dcf3e45dbfa99ad"}, - {file = "black-24.10.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f9da3333530dbcecc1be13e69c250ed8dfa67f43c4005fb537bb426e19200d50"}, - {file = "black-24.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4007b1393d902b48b36958a216c20c4482f601569d19ed1df294a496eb366392"}, - {file = "black-24.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:394d4ddc64782e51153eadcaaca95144ac4c35e27ef9b0a42e121ae7e57a9175"}, - {file = "black-24.10.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b5e39e0fae001df40f95bd8cc36b9165c5e2ea88900167bddf258bacef9bbdc3"}, - {file = "black-24.10.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d37d422772111794b26757c5b55a3eade028aa3fde43121ab7b673d050949d65"}, - {file = "black-24.10.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:14b3502784f09ce2443830e3133dacf2c0110d45191ed470ecb04d0f5f6fcb0f"}, - {file = "black-24.10.0-cp312-cp312-win_amd64.whl", hash = "sha256:30d2c30dc5139211dda799758559d1b049f7f14c580c409d6ad925b74a4208a8"}, - {file = "black-24.10.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:1cbacacb19e922a1d75ef2b6ccaefcd6e93a2c05ede32f06a21386a04cedb981"}, - {file = "black-24.10.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1f93102e0c5bb3907451063e08b9876dbeac810e7da5a8bfb7aeb5a9ef89066b"}, - {file = "black-24.10.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ddacb691cdcdf77b96f549cf9591701d8db36b2f19519373d60d31746068dbf2"}, - {file = "black-24.10.0-cp313-cp313-win_amd64.whl", hash = "sha256:680359d932801c76d2e9c9068d05c6b107f2584b2a5b88831c83962eb9984c1b"}, - {file = "black-24.10.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:17374989640fbca88b6a448129cd1745c5eb8d9547b464f281b251dd00155ccd"}, - {file = "black-24.10.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:63f626344343083322233f175aaf372d326de8436f5928c042639a4afbbf1d3f"}, - {file = "black-24.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ccfa1d0cb6200857f1923b602f978386a3a2758a65b52e0950299ea014be6800"}, - {file = "black-24.10.0-cp39-cp39-win_amd64.whl", hash = "sha256:2cd9c95431d94adc56600710f8813ee27eea544dd118d45896bb734e9d7a0dc7"}, - {file = "black-24.10.0-py3-none-any.whl", hash = "sha256:3bb2b7a1f7b685f85b11fed1ef10f8a9148bceb49853e47a294a3dd963c1dd7d"}, - {file = "black-24.10.0.tar.gz", hash = "sha256:846ea64c97afe3bc677b761787993be4991810ecc7a4a937816dd6bddedc4875"}, + {file = "black-25.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:759e7ec1e050a15f89b770cefbf91ebee8917aac5c20483bc2d80a6c3a04df32"}, + {file = "black-25.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0e519ecf93120f34243e6b0054db49c00a35f84f195d5bce7e9f5cfc578fc2da"}, + {file = "black-25.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:055e59b198df7ac0b7efca5ad7ff2516bca343276c466be72eb04a3bcc1f82d7"}, + {file = "black-25.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:db8ea9917d6f8fc62abd90d944920d95e73c83a5ee3383493e35d271aca872e9"}, + {file = "black-25.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a39337598244de4bae26475f77dda852ea00a93bd4c728e09eacd827ec929df0"}, + {file = "black-25.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:96c1c7cd856bba8e20094e36e0f948718dc688dba4a9d78c3adde52b9e6c2299"}, + {file = "black-25.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bce2e264d59c91e52d8000d507eb20a9aca4a778731a08cfff7e5ac4a4bb7096"}, + {file = "black-25.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:172b1dbff09f86ce6f4eb8edf9dede08b1fce58ba194c87d7a4f1a5aa2f5b3c2"}, + {file = "black-25.1.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4b60580e829091e6f9238c848ea6750efed72140b91b048770b64e74fe04908b"}, + {file = "black-25.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1e2978f6df243b155ef5fa7e558a43037c3079093ed5d10fd84c43900f2d8ecc"}, + {file = "black-25.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3b48735872ec535027d979e8dcb20bf4f70b5ac75a8ea99f127c106a7d7aba9f"}, + {file = "black-25.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:ea0213189960bda9cf99be5b8c8ce66bb054af5e9e861249cd23471bd7b0b3ba"}, + {file = "black-25.1.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8f0b18a02996a836cc9c9c78e5babec10930862827b1b724ddfe98ccf2f2fe4f"}, + {file = "black-25.1.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:afebb7098bfbc70037a053b91ae8437c3857482d3a690fefc03e9ff7aa9a5fd3"}, + {file = "black-25.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:030b9759066a4ee5e5aca28c3c77f9c64789cdd4de8ac1df642c40b708be6171"}, + {file = "black-25.1.0-cp313-cp313-win_amd64.whl", hash = "sha256:a22f402b410566e2d1c950708c77ebf5ebd5d0d88a6a2e87c86d9fb48afa0d18"}, + {file = "black-25.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a1ee0a0c330f7b5130ce0caed9936a904793576ef4d2b98c40835d6a65afa6a0"}, + {file = "black-25.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f3df5f1bf91d36002b0a75389ca8663510cf0531cca8aa5c1ef695b46d98655f"}, + {file = "black-25.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d9e6827d563a2c820772b32ce8a42828dc6790f095f441beef18f96aa6f8294e"}, + {file = "black-25.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:bacabb307dca5ebaf9c118d2d2f6903da0d62c9faa82bd21a33eecc319559355"}, + {file = "black-25.1.0-py3-none-any.whl", hash = "sha256:95e8176dae143ba9097f351d174fdaf0ccd29efb414b362ae3fd72bf0f710717"}, + {file = "black-25.1.0.tar.gz", hash = "sha256:33496d5cd1222ad73391352b4ae8da15253c5de89b93a80b3e2c8d9a19ec2666"}, ] [package.dependencies] @@ -237,13 +238,13 @@ uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "certifi" -version = "2024.12.14" +version = "2025.1.31" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2024.12.14-py3-none-any.whl", hash = "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56"}, - {file = "certifi-2024.12.14.tar.gz", hash = "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db"}, + {file = "certifi-2025.1.31-py3-none-any.whl", hash = "sha256:ca78db4565a652026a4db2bcdf68f2fb589ea80d0be70e03929ed730746b84fe"}, + {file = "certifi-2025.1.31.tar.gz", hash = "sha256:3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651"}, ] [[package]] @@ -1645,13 +1646,13 @@ files = [ [[package]] name = "paramiko" -version = "3.5.0" +version = "3.5.1" description = "SSH2 protocol library" optional = false python-versions = ">=3.6" files = [ - {file = "paramiko-3.5.0-py3-none-any.whl", hash = "sha256:1fedf06b085359051cd7d0d270cebe19e755a8a921cc2ddbfa647fb0cd7d68f9"}, - {file = "paramiko-3.5.0.tar.gz", hash = "sha256:ad11e540da4f55cedda52931f1a3f812a8238a7af7f62a60de538cd80bb28124"}, + {file = "paramiko-3.5.1-py3-none-any.whl", hash = "sha256:43b9a0501fc2b5e70680388d9346cf252cfb7d00b0667c39e80eb43a408b8f61"}, + {file = "paramiko-3.5.1.tar.gz", hash = "sha256:b2c665bc45b2b215bd7d7f039901b14b067da00f3a11e6640995fd58f2664822"}, ] [package.dependencies] @@ -1950,13 +1951,13 @@ windows-terminal = ["colorama (>=0.4.6)"] [[package]] name = "pylint" -version = "3.3.3" +version = "3.3.4" description = "python code static checker" optional = false python-versions = ">=3.9.0" files = [ - {file = "pylint-3.3.3-py3-none-any.whl", hash = "sha256:26e271a2bc8bce0fc23833805a9076dd9b4d5194e2a02164942cb3cdc37b4183"}, - {file = "pylint-3.3.3.tar.gz", hash = "sha256:07c607523b17e6d16e2ae0d7ef59602e332caa762af64203c24b41c27139f36a"}, + {file = "pylint-3.3.4-py3-none-any.whl", hash = "sha256:289e6a1eb27b453b08436478391a48cd53bb0efb824873f949e709350f3de018"}, + {file = "pylint-3.3.4.tar.gz", hash = "sha256:74ae7a38b177e69a9b525d0794bd8183820bfa7eb68cc1bee6e8ed22a42be4ce"}, ] [package.dependencies] @@ -1967,7 +1968,7 @@ dill = [ {version = ">=0.3.7", markers = "python_version >= \"3.12\""}, {version = ">=0.3.6", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, ] -isort = ">=4.2.5,<5.13.0 || >5.13.0,<6" +isort = ">=4.2.5,<5.13.0 || >5.13.0,<7" mccabe = ">=0.6,<0.8" platformdirs = ">=2.2.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} @@ -2387,13 +2388,13 @@ files = [ [[package]] name = "shibuya" -version = "2024.12.21" +version = "2025.1.29" description = "A clean, responsive, and customizable Sphinx documentation theme with light/dark mode." optional = false python-versions = ">=3.8" files = [ - {file = "shibuya-2024.12.21-py3-none-any.whl", hash = "sha256:22019c8b86c5814ac9e5c88432176c47df1e9d60051ba979ba4541b4e7e0d995"}, - {file = "shibuya-2024.12.21.tar.gz", hash = "sha256:d021b4494e5968e4195593c3f45a0e0e4fba37472230da5560c0603e2eb3bd7d"}, + {file = "shibuya-2025.1.29-py3-none-any.whl", hash = "sha256:1b2c7c50eac21ba532d4ea9f07f412149db3c21745e712d5c93381ca83ecf577"}, + {file = "shibuya-2025.1.29.tar.gz", hash = "sha256:e427cfe1e9cfcbf1ab2facdf812b6c382fb7430b06eb0b72f2636412639f3f2e"}, ] [package.dependencies] diff --git a/pyproject.toml b/pyproject.toml index badd65b3..0e2aa41b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "exasol-script-languages-container-tool" -version = "1.1.0" +version = "2.0.0" description = "Script Languages Container Tool" license = "MIT" diff --git a/test/resources/flavors/real-test-flavor/real_flavor_base/language_definitions.json b/test/resources/flavors/real-test-flavor/real_flavor_base/language_definitions.json index 5101463a..9bd6e55d 100644 --- a/test/resources/flavors/real-test-flavor/real_flavor_base/language_definitions.json +++ b/test/resources/flavors/real-test-flavor/real_flavor_base/language_definitions.json @@ -1,11 +1,10 @@ { - "schema_version": 1, + "schema_version": 2, "language_definitions": [ { "protocol": "localzmq+protobuf", "aliases": ["JAVA"], - "language": "java", - "parameters": [], + "parameters": [{"key": "lang", "value": "java"}], "udf_client_path": { "executable": "/exaudf/exaudfclient" }, diff --git a/test/test_docker_api_language_def_json.py b/test/test_docker_api_language_def_json.py index 572de101..cd7b1566 100644 --- a/test/test_docker_api_language_def_json.py +++ b/test/test_docker_api_language_def_json.py @@ -19,6 +19,7 @@ from exasol.slc.models.language_definition_common import ( DeprecationInfo, SLCLanguage, + SLCParameter, UdfClientRelativePath, ) from exasol.slc.models.language_definition_model import ( @@ -128,16 +129,15 @@ def test_docker_build(self) -> None: self.assertEqual( model, LanguageDefinitionsModel( - schema_version=1, + schema_version=2, language_definitions=[ LanguageDefinition( protocol="localzmq+protobuf", aliases=["JAVA"], - language=SLCLanguage.Java, + parameters=[SLCParameter(key="lang", value="java")], udf_client_path=UdfClientRelativePath( executable=PurePosixPath("/exaudf/exaudfclient") ), - parameters=[], deprecation=DeprecationInfo( deprecation_date=datetime.datetime(2024, 10, 31), default_changed_to="Java 17", @@ -223,16 +223,15 @@ def test_docker_build_without_deprecation_info(self): self.assertEqual( model, LanguageDefinitionsModel( - schema_version=1, + schema_version=2, language_definitions=[ LanguageDefinition( protocol="localzmq+protobuf", aliases=["JAVA"], - language=SLCLanguage.Java, + parameters=[SLCParameter(key="lang", value="java")], udf_client_path=UdfClientRelativePath( executable=PurePosixPath("/exaudf/exaudfclient") ), - parameters=[], deprecation=None, ) ], diff --git a/test/test_lang_definitions_builder.py b/test/test_lang_definitions_builder.py index 5a144a72..d9b8e8cb 100644 --- a/test/test_lang_definitions_builder.py +++ b/test/test_lang_definitions_builder.py @@ -58,7 +58,7 @@ def test_without_custom_alias_without_builtin(self): "some_path/my_release/exaudf/exaudfclient_py3" ), ), - parameters=[SLCParameter(key="lang", value=["python"])], + parameters=[SLCParameter(key="lang", value="python")], ), ) ], @@ -98,7 +98,7 @@ def test_without_custom_alias_with_builtin(self): "some_path/my_release/exaudf/exaudfclient_py3" ), ), - parameters=[SLCParameter(key="lang", value=["python"])], + parameters=[SLCParameter(key="lang", value="python")], ), ), LanguageDefinitionComponents( @@ -154,7 +154,7 @@ def test_with_custom_alias_with_builtin(self): "some_path/my_release/exaudf/exaudfclient_py3" ), ), - parameters=[SLCParameter(key="lang", value=["python"])], + parameters=[SLCParameter(key="lang", value="python")], ), ), LanguageDefinitionComponents( diff --git a/test/unit/test_language_def_parser.py b/test/unit/test_language_def_parser.py index 88b0a089..dd6c306e 100644 --- a/test/unit/test_language_def_parser.py +++ b/test/unit/test_language_def_parser.py @@ -67,14 +67,15 @@ ] PARAMETERS = [ - ("?lang=java", [SLCParameter(key="lang", value=["java"])]), - ("?lang=python", [SLCParameter(key="lang", value=["python"])]), - ("?lang=r", [SLCParameter(key="lang", value=["r"])]), + ("?lang=java", [SLCParameter(key="lang", value="java")]), + ("?lang=python", [SLCParameter(key="lang", value="python")]), + ("?lang=r", [SLCParameter(key="lang", value="r")]), ( - "?lang=java&my_param=something", + "?lang=java&my_param=something&my_param=something_else", [ - SLCParameter(key="lang", value=["java"]), - SLCParameter(key="my_param", value=["something"]), + SLCParameter(key="lang", value="java"), + SLCParameter(key="my_param", value="something"), + SLCParameter(key="my_param", value="something_else"), ], ), ("", list()),