diff --git a/chk/infrastructure/version.py b/chk/infrastructure/version.py index 446a2d82..387cafbf 100644 --- a/chk/infrastructure/version.py +++ b/chk/infrastructure/version.py @@ -20,7 +20,7 @@ "0.7.2", "0.8.0", ], - "validation": [ + "validate": [ "0.7.2", "0.8.0", ], diff --git a/chk/modules/validate/__init__.py b/chk/modules/validate/__init__.py index 243620a4..1cf6a2a3 100644 --- a/chk/modules/validate/__init__.py +++ b/chk/modules/validate/__init__.py @@ -41,7 +41,7 @@ from chk.modules.validate.entities import ValidationTask from chk.modules.validate.services import ValidatePresenter -VERSION_SCOPE = ["validation"] +VERSION_SCOPE = ["validate"] class ValidationConfigNode(enum.StrEnum): diff --git a/poetry.lock b/poetry.lock index dbc75ba3..f1741bf9 100644 --- a/poetry.lock +++ b/poetry.lock @@ -815,29 +815,29 @@ fixture = ["fixtures"] [[package]] name = "ruff" -version = "0.8.5" +version = "0.8.6" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.8.5-py3-none-linux_armv6l.whl", hash = "sha256:5ad11a5e3868a73ca1fa4727fe7e33735ea78b416313f4368c504dbeb69c0f88"}, - {file = "ruff-0.8.5-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:f69ab37771ea7e0715fead8624ec42996d101269a96e31f4d31be6fc33aa19b7"}, - {file = "ruff-0.8.5-py3-none-macosx_11_0_arm64.whl", hash = "sha256:b5462d7804558ccff9c08fe8cbf6c14b7efe67404316696a2dde48297b1925bb"}, - {file = "ruff-0.8.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d56de7220a35607f9fe59f8a6d018e14504f7b71d784d980835e20fc0611cd50"}, - {file = "ruff-0.8.5-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9d99cf80b0429cbebf31cbbf6f24f05a29706f0437c40413d950e67e2d4faca4"}, - {file = "ruff-0.8.5-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7b75ac29715ac60d554a049dbb0ef3b55259076181c3369d79466cb130eb5afd"}, - {file = "ruff-0.8.5-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:c9d526a62c9eda211b38463528768fd0ada25dad524cb33c0e99fcff1c67b5dc"}, - {file = "ruff-0.8.5-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:587c5e95007612c26509f30acc506c874dab4c4abbacd0357400bd1aa799931b"}, - {file = "ruff-0.8.5-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:622b82bf3429ff0e346835ec213aec0a04d9730480cbffbb6ad9372014e31bbd"}, - {file = "ruff-0.8.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f99be814d77a5dac8a8957104bdd8c359e85c86b0ee0e38dca447cb1095f70fb"}, - {file = "ruff-0.8.5-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:c01c048f9c3385e0fd7822ad0fd519afb282af9cf1778f3580e540629df89725"}, - {file = "ruff-0.8.5-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:7512e8cb038db7f5db6aae0e24735ff9ea03bb0ed6ae2ce534e9baa23c1dc9ea"}, - {file = "ruff-0.8.5-py3-none-musllinux_1_2_i686.whl", hash = "sha256:762f113232acd5b768d6b875d16aad6b00082add40ec91c927f0673a8ec4ede8"}, - {file = "ruff-0.8.5-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:03a90200c5dfff49e4c967b405f27fdfa81594cbb7c5ff5609e42d7fe9680da5"}, - {file = "ruff-0.8.5-py3-none-win32.whl", hash = "sha256:8710ffd57bdaa6690cbf6ecff19884b8629ec2a2a2a2f783aa94b1cc795139ed"}, - {file = "ruff-0.8.5-py3-none-win_amd64.whl", hash = "sha256:4020d8bf8d3a32325c77af452a9976a9ad6455773bcb94991cf15bd66b347e47"}, - {file = "ruff-0.8.5-py3-none-win_arm64.whl", hash = "sha256:134ae019ef13e1b060ab7136e7828a6d83ea727ba123381307eb37c6bd5e01cb"}, - {file = "ruff-0.8.5.tar.gz", hash = "sha256:1098d36f69831f7ff2a1da3e6407d5fbd6dfa2559e4f74ff2d260c5588900317"}, + {file = "ruff-0.8.6-py3-none-linux_armv6l.whl", hash = "sha256:defed167955d42c68b407e8f2e6f56ba52520e790aba4ca707a9c88619e580e3"}, + {file = "ruff-0.8.6-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:54799ca3d67ae5e0b7a7ac234baa657a9c1784b48ec954a094da7c206e0365b1"}, + {file = "ruff-0.8.6-py3-none-macosx_11_0_arm64.whl", hash = "sha256:e88b8f6d901477c41559ba540beeb5a671e14cd29ebd5683903572f4b40a9807"}, + {file = "ruff-0.8.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0509e8da430228236a18a677fcdb0c1f102dd26d5520f71f79b094963322ed25"}, + {file = "ruff-0.8.6-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:91a7ddb221779871cf226100e677b5ea38c2d54e9e2c8ed847450ebbdf99b32d"}, + {file = "ruff-0.8.6-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:248b1fb3f739d01d528cc50b35ee9c4812aa58cc5935998e776bf8ed5b251e75"}, + {file = "ruff-0.8.6-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:bc3c083c50390cf69e7e1b5a5a7303898966be973664ec0c4a4acea82c1d4315"}, + {file = "ruff-0.8.6-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:52d587092ab8df308635762386f45f4638badb0866355b2b86760f6d3c076188"}, + {file = "ruff-0.8.6-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:61323159cf21bc3897674e5adb27cd9e7700bab6b84de40d7be28c3d46dc67cf"}, + {file = "ruff-0.8.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7ae4478b1471fc0c44ed52a6fb787e641a2ac58b1c1f91763bafbc2faddc5117"}, + {file = "ruff-0.8.6-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:0c000a471d519b3e6cfc9c6680025d923b4ca140ce3e4612d1a2ef58e11f11fe"}, + {file = "ruff-0.8.6-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:9257aa841e9e8d9b727423086f0fa9a86b6b420fbf4bf9e1465d1250ce8e4d8d"}, + {file = "ruff-0.8.6-py3-none-musllinux_1_2_i686.whl", hash = "sha256:45a56f61b24682f6f6709636949ae8cc82ae229d8d773b4c76c09ec83964a95a"}, + {file = "ruff-0.8.6-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:496dd38a53aa173481a7d8866bcd6451bd934d06976a2505028a50583e001b76"}, + {file = "ruff-0.8.6-py3-none-win32.whl", hash = "sha256:e169ea1b9eae61c99b257dc83b9ee6c76f89042752cb2d83486a7d6e48e8f764"}, + {file = "ruff-0.8.6-py3-none-win_amd64.whl", hash = "sha256:f1d70bef3d16fdc897ee290d7d20da3cbe4e26349f62e8a0274e7a3f4ce7a905"}, + {file = "ruff-0.8.6-py3-none-win_arm64.whl", hash = "sha256:7d7fc2377a04b6e04ffe588caad613d0c460eb2ecba4c0ccbbfe2bc973cbc162"}, + {file = "ruff-0.8.6.tar.gz", hash = "sha256:dcad24b81b62650b0eb8814f576fc65cfee8674772a6e24c9b747911801eeaa5"}, ] [[package]] diff --git a/tests/modules/validate/assertion_services_test.py b/tests/modules/validate/assertion_services_test.py index 77bc54fc..ba5ec480 100644 --- a/tests/modules/validate/assertion_services_test.py +++ b/tests/modules/validate/assertion_services_test.py @@ -22,7 +22,7 @@ def setup_assertion_entry_list_pass_assert(): ctx = FileContext( document={ - "version": "default:validation:0.7.2", + "version": "default:validate:0.7.2", "asserts": [ { "type": "Equal", @@ -64,7 +64,7 @@ def setup_assertion_entry_list_pass_assert(): def setup_assertion_entry_list_many_items_pass_assert(): ctx = FileContext( document={ - "version": "default:validation:0.7.2", + "version": "default:validate:0.7.2", "asserts": [ { "type": "Equal", diff --git a/tests/modules/validate/validate_entity_test.py b/tests/modules/validate/validate_entity_test.py index 42ee9f73..988c8da8 100644 --- a/tests/modules/validate/validate_entity_test.py +++ b/tests/modules/validate/validate_entity_test.py @@ -20,7 +20,7 @@ class TestValidationDocument: def test_from_file_context_pass_when_no_data(): ctx = FileContext( document={ - "version": "default:validation:0.7.2", + "version": "default:validate:0.7.2", "asserts": [ { "type": "Equal", @@ -47,7 +47,7 @@ def test_from_file_context_pass_when_no_data(): def test_from_file_context_pass_when_data(): ctx = FileContext( document={ - "version": "default:validation:0.7.2", + "version": "default:validate:0.7.2", "asserts": [ { "type": "Equal", @@ -80,7 +80,7 @@ def test_from_file_context_pass_when_data(): def test_from_file_context_fail_when_no_asserts(): ctx = FileContext( document={ - "version": "default:validation:0.7.2", + "version": "default:validate:0.7.2", "data": { "name": "Sadaqat", "roll": 39, @@ -98,7 +98,7 @@ def test_from_file_context_fail_when_no_asserts(): def test_as_dict_pass(): ctx = FileContext( document={ - "version": "default:validation:0.7.2", + "version": "default:validate:0.7.2", "asserts": [ { "type": "Equal", @@ -133,7 +133,7 @@ def test_build_schema_pass(): def test_set_data_template_pass_when_set_from_exec_ctx(self): ctx = FileContext( document={ - "version": "default:validation:0.7.2", + "version": "default:validate:0.7.2", "asserts": [ { "type": "Equal", @@ -162,7 +162,7 @@ def test_set_data_template_pass_when_set_from_exec_ctx(self): def test_set_data_template_pass_when_set_from_doc(self): ctx = FileContext( document={ - "version": "default:validation:0.7.2", + "version": "default:validate:0.7.2", "asserts": [ { "type": "Equal", @@ -191,7 +191,7 @@ def test_set_data_template_pass_when_set_from_doc(self): def test_set_data_template_pass_exec_ctx_prioritise(self): ctx = FileContext( document={ - "version": "default:validation:0.7.2", + "version": "default:validate:0.7.2", "asserts": [ { "type": "Equal", @@ -226,7 +226,7 @@ def test_set_data_template_pass_exec_ctx_prioritise(self): def test_process_data_template_pass(): ctx = FileContext( document={ - "version": "default:validation:0.7.2", + "version": "default:validate:0.7.2", "asserts": [ { "type": "Equal", @@ -265,7 +265,7 @@ def test_process_data_template_pass(): def test_make_assertion_entry_list_pass(): ctx = FileContext( document={ - "version": "default:validation:0.7.2", + "version": "default:validate:0.7.2", "asserts": [ { "type": "Equal", diff --git a/tests/modules/validate/validate_module_test.py b/tests/modules/validate/validate_module_test.py index f361b007..725f3bf2 100644 --- a/tests/modules/validate/validate_module_test.py +++ b/tests/modules/validate/validate_module_test.py @@ -14,7 +14,7 @@ class TestValidateCall: def test_fail() -> None: file_ctx = FileContext( document={ - # "version": "default:validation:0.7.2", + # "version": "default:validate:0.7.2", "asserts": [ { "type": "Equal", @@ -42,7 +42,7 @@ def test_fail() -> None: def test_fail_for_wrong_key() -> None: file_ctx = FileContext( document={ - "version": "default:validation:0.7.2", + "version": "default:validate:0.7.2", "asserts": [ { "type": "Equals", diff --git a/tests/resources/storage/spec_docs/validate/btc-usd-validate.chk b/tests/resources/storage/spec_docs/validate/btc-usd-validate.chk index 5821ebcd..3a42c608 100644 --- a/tests/resources/storage/spec_docs/validate/btc-usd-validate.chk +++ b/tests/resources/storage/spec_docs/validate/btc-usd-validate.chk @@ -1,5 +1,5 @@ --- -version: default:validation:0.7.2 +version: default:validate:0.7.2 asserts: - { type: Equal, actual: <% _data.code %>, expected: 200, msg_pass: 'Response was successful with code `{type_actual}({value_actual})`' } diff --git a/tests/resources/storage/spec_docs/validate/student-validate.chk b/tests/resources/storage/spec_docs/validate/student-validate.chk index a68dd8c5..10a7945f 100644 --- a/tests/resources/storage/spec_docs/validate/student-validate.chk +++ b/tests/resources/storage/spec_docs/validate/student-validate.chk @@ -1,5 +1,5 @@ --- -version: default:validation:0.7.2 +version: default:validate:0.7.2 asserts: - { type: Equal, actual: <% _data.roll %>, expected: 39 } diff --git a/tests/resources/storage/spec_docs/validate/validate-asserts.chk b/tests/resources/storage/spec_docs/validate/validate-asserts.chk index bafd9101..5bd31d21 100644 --- a/tests/resources/storage/spec_docs/validate/validate-asserts.chk +++ b/tests/resources/storage/spec_docs/validate/validate-asserts.chk @@ -1,5 +1,5 @@ --- -version: default:validation:0.7.2 +version: default:validate:0.7.2 variables: response: diff --git a/tests/resources/storage/spec_docs/workflow_cases/get-req-vars/coinstats-usd-validate.chk b/tests/resources/storage/spec_docs/workflow_cases/get-req-vars/coinstats-usd-validate.chk index cd98fb04..adcfbc95 100644 --- a/tests/resources/storage/spec_docs/workflow_cases/get-req-vars/coinstats-usd-validate.chk +++ b/tests/resources/storage/spec_docs/workflow_cases/get-req-vars/coinstats-usd-validate.chk @@ -1,5 +1,5 @@ --- -version: default:validation:0.7.2 +version: default:validate:0.7.2 variables: vdata: ~ diff --git a/tests/resources/storage/spec_docs/workflow_cases/jsonplaceholder/get-comments-valid.yml b/tests/resources/storage/spec_docs/workflow_cases/jsonplaceholder/get-comments-valid.yml index 57e56791..15deb3ad 100644 --- a/tests/resources/storage/spec_docs/workflow_cases/jsonplaceholder/get-comments-valid.yml +++ b/tests/resources/storage/spec_docs/workflow_cases/jsonplaceholder/get-comments-valid.yml @@ -1,5 +1,5 @@ --- -version: default:validation:0.7.2 +version: default:validate:0.7.2 asserts: - { type: List, actual: <% _data.body %> } diff --git a/tests/resources/storage/spec_docs/workflow_cases/lozoacademy/register-flow/me-valid.yml b/tests/resources/storage/spec_docs/workflow_cases/lozoacademy/register-flow/me-valid.yml index 69d54565..bb871f98 100644 --- a/tests/resources/storage/spec_docs/workflow_cases/lozoacademy/register-flow/me-valid.yml +++ b/tests/resources/storage/spec_docs/workflow_cases/lozoacademy/register-flow/me-valid.yml @@ -1,5 +1,5 @@ --- -version: default:validation:0.7.2 +version: default:validate:0.7.2 asserts: - { type: MapHasKeys, actual: <% _data %>, expected: ["id", "username", "name", "email", "provider"] } diff --git a/tests/resources/storage/spec_docs/workflow_cases/lozoacademy/register-flow/register-valid.yml b/tests/resources/storage/spec_docs/workflow_cases/lozoacademy/register-flow/register-valid.yml index f1703077..0480d72d 100644 --- a/tests/resources/storage/spec_docs/workflow_cases/lozoacademy/register-flow/register-valid.yml +++ b/tests/resources/storage/spec_docs/workflow_cases/lozoacademy/register-flow/register-valid.yml @@ -1,5 +1,5 @@ --- -version: default:validation:0.7.2 +version: default:validate:0.7.2 variables: userName: ~ diff --git a/tests/resources/storage/spec_docs/workflow_cases/lozoacademy/register-flow/streaks-valid.yml b/tests/resources/storage/spec_docs/workflow_cases/lozoacademy/register-flow/streaks-valid.yml index ce93fa00..db1c94ba 100644 --- a/tests/resources/storage/spec_docs/workflow_cases/lozoacademy/register-flow/streaks-valid.yml +++ b/tests/resources/storage/spec_docs/workflow_cases/lozoacademy/register-flow/streaks-valid.yml @@ -1,5 +1,5 @@ --- -version: default:validation:0.7.2 +version: default:validate:0.7.2 asserts: - { type: MapHasKeys, actual: <% _data %>, expected: ["userId", "currentStreak", "longestStreak", "lastStreaksDay"] } diff --git a/tests/resources/storage/spec_docs/workflow_cases/lozoacademy/register-flow/update-grade-valid.yml b/tests/resources/storage/spec_docs/workflow_cases/lozoacademy/register-flow/update-grade-valid.yml index 37891511..e38ad737 100644 --- a/tests/resources/storage/spec_docs/workflow_cases/lozoacademy/register-flow/update-grade-valid.yml +++ b/tests/resources/storage/spec_docs/workflow_cases/lozoacademy/register-flow/update-grade-valid.yml @@ -1,5 +1,5 @@ --- -version: default:validation:0.7.2 +version: default:validate:0.7.2 variables: userName: ~ diff --git a/tests/resources/storage/spec_docs/workflow_cases/pass_data/coinstats-usd-validate.chk b/tests/resources/storage/spec_docs/workflow_cases/pass_data/coinstats-usd-validate.chk index 51481362..cbcb47e4 100644 --- a/tests/resources/storage/spec_docs/workflow_cases/pass_data/coinstats-usd-validate.chk +++ b/tests/resources/storage/spec_docs/workflow_cases/pass_data/coinstats-usd-validate.chk @@ -1,5 +1,5 @@ --- -version: default:validation:0.7.2 +version: default:validate:0.7.2 asserts: - { type: Equal, actual: <% _data.code %>, expected: 200, msg_pass: 'Response was successful with code `{type_actual}({value_actual})`', cast_actual_to: int } diff --git a/tests/resources/storage/spec_docs/workflow_cases/simple-error-1/coinstats-usd-validate.chk b/tests/resources/storage/spec_docs/workflow_cases/simple-error-1/coinstats-usd-validate.chk index a2e5113b..fa7c7b47 100644 --- a/tests/resources/storage/spec_docs/workflow_cases/simple-error-1/coinstats-usd-validate.chk +++ b/tests/resources/storage/spec_docs/workflow_cases/simple-error-1/coinstats-usd-validate.chk @@ -1,5 +1,5 @@ --- -version: default:validation:0.7.2 +version: default:validate:0.7.2 asserts: - { type: Equal, actual: <% _data.code %>, expected: 200, msg_pass: 'Response was successful with code `{type_actual}({value_actual})`' } diff --git a/tests/resources/storage/spec_docs/workflow_cases/simple/coinstats-usd-validate.chk b/tests/resources/storage/spec_docs/workflow_cases/simple/coinstats-usd-validate.chk index 6b4f6729..0fc8fb31 100644 --- a/tests/resources/storage/spec_docs/workflow_cases/simple/coinstats-usd-validate.chk +++ b/tests/resources/storage/spec_docs/workflow_cases/simple/coinstats-usd-validate.chk @@ -1,5 +1,5 @@ --- -version: default:validation:0.7.2 +version: default:validate:0.7.2 asserts: - { type: Equal, actual: <% _data.code %>, expected: 200, msg_pass: 'Response was successful with code `{type_actual}({value_actual})`' }