From 6aa862955bd15678e766a13cf86c9efb86354d10 Mon Sep 17 00:00:00 2001 From: bealsbe Date: Mon, 23 Mar 2026 23:57:44 +0000 Subject: [PATCH 1/9] add parseint udf --- .../osprey/engine/stdlib/udfs/categories.py | 1 + .../osprey/engine/stdlib/udfs/parse_int.py | 20 +++++++++++++++++++ .../stdlib/udfs/tests/test_parse_int.py | 18 +++++++++++++++++ uv.lock | 10 ++++++---- 4 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 osprey_worker/src/osprey/engine/stdlib/udfs/parse_int.py create mode 100644 osprey_worker/src/osprey/engine/stdlib/udfs/tests/test_parse_int.py diff --git a/osprey_worker/src/osprey/engine/stdlib/udfs/categories.py b/osprey_worker/src/osprey/engine/stdlib/udfs/categories.py index 5b4e40d8..393a3fe5 100644 --- a/osprey_worker/src/osprey/engine/stdlib/udfs/categories.py +++ b/osprey_worker/src/osprey/engine/stdlib/udfs/categories.py @@ -13,5 +13,6 @@ class UdfCategories(str, Enum): HTTP = 'HTTP' IP = 'IP' PHONE = 'Phone' + NUMERIC = 'Numeric' RANDOM = 'Random' STRING = 'String' diff --git a/osprey_worker/src/osprey/engine/stdlib/udfs/parse_int.py b/osprey_worker/src/osprey/engine/stdlib/udfs/parse_int.py new file mode 100644 index 00000000..2422872b --- /dev/null +++ b/osprey_worker/src/osprey/engine/stdlib/udfs/parse_int.py @@ -0,0 +1,20 @@ +from osprey.engine.executor.execution_context import ExpectedUdfException + +from ._prelude import ArgumentsBase, ExecutionContext, UDFBase +from .categories import UdfCategories + + +class Arguments(ArgumentsBase): + s: str + + +class ParseInt(UDFBase[Arguments, int]): + """Converts a numeric string to an integer.""" + + category = UdfCategories.NUMERIC + + def execute(self, execution_context: ExecutionContext, arguments: Arguments) -> int: + try: + return int(arguments.s) + except ValueError: + raise ExpectedUdfException() diff --git a/osprey_worker/src/osprey/engine/stdlib/udfs/tests/test_parse_int.py b/osprey_worker/src/osprey/engine/stdlib/udfs/tests/test_parse_int.py new file mode 100644 index 00000000..57c3f962 --- /dev/null +++ b/osprey_worker/src/osprey/engine/stdlib/udfs/tests/test_parse_int.py @@ -0,0 +1,18 @@ +import pytest +from osprey.engine.conftest import ExecuteFunction +from osprey.engine.executor.execution_context import ExpectedUdfException +from osprey.engine.stdlib.udfs.parse_int import ParseInt +from osprey.engine.udf.registry import UDFRegistry + +pytestmark = [pytest.mark.use_udf_registry(UDFRegistry.with_udfs(ParseInt))] + + +@pytest.mark.parametrize('s,expected', [('15', 15), ('04', 4), ('0', 0), ('-7', -7), ('-092', -92)]) +def test_parse_int(execute: ExecuteFunction, s: str, expected: int) -> None: + data = execute(f'Result = ParseInt(s="{s}")') + assert data == {'Result': expected} + + +def test_parse_int_invalid(execute: ExecuteFunction) -> None: + with pytest.raises(ExpectedUdfException): + execute('Result = ParseInt(s="ABC")') diff --git a/uv.lock b/uv.lock index 55564472..178d35c2 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 3 +revision = 2 requires-python = ">=3.11" resolution-markers = [ "python_full_version >= '4' and platform_machine == 'x86_64'", @@ -497,7 +497,7 @@ dependencies = [ [[package]] name = "example-plugins" version = "0.1.0" -source = { editable = "example_plugins" } +source = { virtual = "example_plugins" } dependencies = [ { name = "pluggy" }, ] @@ -924,6 +924,7 @@ dependencies = [ ] sdist = { url = "https://files.pythonhosted.org/packages/a3/1c/c42834d4fee45c5cf2d9546e97e879a1cbcdecfd16eb1a12144dcb91edae/grpcio-1.49.1.tar.gz", hash = "sha256:d4725fc9ec8e8822906ae26bb26f5546891aa7fbc3443de970cc556d43a5c99f", size = 22059239, upload-time = "2022-09-22T03:02:44.376Z" } wheels = [ + { url = "https://files.pythonhosted.org/packages/2d/e2/aaccddb8b06637625d847dbb5fe76ec3d15a74d89d983f5202f3666706e3/grpcio-1.49.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:9fb17ff8c0d56099ac6ebfa84f670c5a62228d6b5c695cf21c02160c2ac1446b", size = 73399185, upload-time = "2022-09-22T02:57:56.219Z" }, { url = "https://files.pythonhosted.org/packages/90/0f/4d614d59f500835cbd27cb90743fb6b299098b0f22b8fd058d3586c933c0/grpcio-1.49.1-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:075f2d06e3db6b48a2157a1bcd52d6cbdca980dd18988fe6afdb41795d51625f", size = 4296299, upload-time = "2022-09-22T02:58:01.417Z" }, { url = "https://files.pythonhosted.org/packages/4d/ea/359a98f8b3b4ff9a2f457a0d20ed81775a64149fbb7617177ed23d9d10c9/grpcio-1.49.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dc79b2b37d779ac42341ddef40ad5bf0966a64af412c89fc2b062e3ddabb093f", size = 4656437, upload-time = "2022-09-22T02:58:06.23Z" }, { url = "https://files.pythonhosted.org/packages/fc/89/4952d2dff95f5b95db5943b2d1b55c82a485830b992f52f212b33616b523/grpcio-1.49.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:49b301740cf5bc8fed4fee4c877570189ae3951432d79fa8e524b09353659811", size = 4888051, upload-time = "2022-09-22T02:58:11.411Z" }, @@ -1052,6 +1053,7 @@ dependencies = [ ] sdist = { url = "https://files.pythonhosted.org/packages/6c/e4/3416d25aebc4477141a491fae2c9494c5e0437a706c59103a936aac7d072/grpcio-tools-1.49.1.tar.gz", hash = "sha256:84cc64e5b46bad43d5d7bd2fd772b656eba0366961187a847e908e2cb735db91", size = 2252679, upload-time = "2022-09-22T03:03:00.279Z" } wheels = [ + { url = "https://files.pythonhosted.org/packages/e4/c1/ba298fe650b67c9e31a7ad88b2fe1d8d22ff2c6a9e131604054835397dfc/grpcio_tools-1.49.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:9e5c13809ab2f245398e8446c4c3b399a62d591db651e46806cccf52a700452e", size = 36912892, upload-time = "2022-09-22T03:00:51.237Z" }, { url = "https://files.pythonhosted.org/packages/9c/8b/a45a39bf7d1c4956d48179831e4da88c3f6ee14dbdcb273e575bbeb7de20/grpcio_tools-1.49.1-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:ab3d0ee9623720ee585fdf3753b3755d3144a4a8ae35bca8e3655fa2f41056be", size = 2025040, upload-time = "2022-09-22T03:00:55.219Z" }, { url = "https://files.pythonhosted.org/packages/6d/7f/89dc6036b91f8cbada98b06801ac2f5db60885000feaf88f9d7cabe665b7/grpcio_tools-1.49.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13e13b3643e7577a3ec13b79689eb4d7548890b1e104c04b9ed6557a3c3dd452", size = 2370982, upload-time = "2022-09-22T03:00:59.807Z" }, { url = "https://files.pythonhosted.org/packages/01/98/4730bfff6bcd3163db8c3d70689e19a1a5f419152316edfc1f13ff06a5d7/grpcio_tools-1.49.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:a64bab81b220c50033f584f57978ebbea575f09c1ccee765cd5c462177988098", size = 2731915, upload-time = "2022-09-22T03:01:05.44Z" }, @@ -1557,7 +1559,7 @@ wheels = [ [[package]] name = "osprey-rpc" version = "0.1.0" -source = { editable = "osprey_rpc" } +source = { virtual = "osprey_rpc" } [[package]] name = "osprey-worker" @@ -1571,7 +1573,7 @@ dependencies = [ [package.metadata] requires-dist = [ { name = "flask-cors", specifier = ">=6.0.1" }, - { name = "osprey-rpc", editable = "osprey_rpc" }, + { name = "osprey-rpc", virtual = "osprey_rpc" }, ] [[package]] From cf01c4b177149df7e3e70c35064d6500ae9f4c27 Mon Sep 17 00:00:00 2001 From: bealsbe Date: Mon, 23 Mar 2026 23:59:35 +0000 Subject: [PATCH 2/9] remove uv.lock changes --- uv.lock | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/uv.lock b/uv.lock index 178d35c2..55564472 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 2 +revision = 3 requires-python = ">=3.11" resolution-markers = [ "python_full_version >= '4' and platform_machine == 'x86_64'", @@ -497,7 +497,7 @@ dependencies = [ [[package]] name = "example-plugins" version = "0.1.0" -source = { virtual = "example_plugins" } +source = { editable = "example_plugins" } dependencies = [ { name = "pluggy" }, ] @@ -924,7 +924,6 @@ dependencies = [ ] sdist = { url = "https://files.pythonhosted.org/packages/a3/1c/c42834d4fee45c5cf2d9546e97e879a1cbcdecfd16eb1a12144dcb91edae/grpcio-1.49.1.tar.gz", hash = "sha256:d4725fc9ec8e8822906ae26bb26f5546891aa7fbc3443de970cc556d43a5c99f", size = 22059239, upload-time = "2022-09-22T03:02:44.376Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/2d/e2/aaccddb8b06637625d847dbb5fe76ec3d15a74d89d983f5202f3666706e3/grpcio-1.49.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:9fb17ff8c0d56099ac6ebfa84f670c5a62228d6b5c695cf21c02160c2ac1446b", size = 73399185, upload-time = "2022-09-22T02:57:56.219Z" }, { url = "https://files.pythonhosted.org/packages/90/0f/4d614d59f500835cbd27cb90743fb6b299098b0f22b8fd058d3586c933c0/grpcio-1.49.1-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:075f2d06e3db6b48a2157a1bcd52d6cbdca980dd18988fe6afdb41795d51625f", size = 4296299, upload-time = "2022-09-22T02:58:01.417Z" }, { url = "https://files.pythonhosted.org/packages/4d/ea/359a98f8b3b4ff9a2f457a0d20ed81775a64149fbb7617177ed23d9d10c9/grpcio-1.49.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dc79b2b37d779ac42341ddef40ad5bf0966a64af412c89fc2b062e3ddabb093f", size = 4656437, upload-time = "2022-09-22T02:58:06.23Z" }, { url = "https://files.pythonhosted.org/packages/fc/89/4952d2dff95f5b95db5943b2d1b55c82a485830b992f52f212b33616b523/grpcio-1.49.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:49b301740cf5bc8fed4fee4c877570189ae3951432d79fa8e524b09353659811", size = 4888051, upload-time = "2022-09-22T02:58:11.411Z" }, @@ -1053,7 +1052,6 @@ dependencies = [ ] sdist = { url = "https://files.pythonhosted.org/packages/6c/e4/3416d25aebc4477141a491fae2c9494c5e0437a706c59103a936aac7d072/grpcio-tools-1.49.1.tar.gz", hash = "sha256:84cc64e5b46bad43d5d7bd2fd772b656eba0366961187a847e908e2cb735db91", size = 2252679, upload-time = "2022-09-22T03:03:00.279Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e4/c1/ba298fe650b67c9e31a7ad88b2fe1d8d22ff2c6a9e131604054835397dfc/grpcio_tools-1.49.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:9e5c13809ab2f245398e8446c4c3b399a62d591db651e46806cccf52a700452e", size = 36912892, upload-time = "2022-09-22T03:00:51.237Z" }, { url = "https://files.pythonhosted.org/packages/9c/8b/a45a39bf7d1c4956d48179831e4da88c3f6ee14dbdcb273e575bbeb7de20/grpcio_tools-1.49.1-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:ab3d0ee9623720ee585fdf3753b3755d3144a4a8ae35bca8e3655fa2f41056be", size = 2025040, upload-time = "2022-09-22T03:00:55.219Z" }, { url = "https://files.pythonhosted.org/packages/6d/7f/89dc6036b91f8cbada98b06801ac2f5db60885000feaf88f9d7cabe665b7/grpcio_tools-1.49.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13e13b3643e7577a3ec13b79689eb4d7548890b1e104c04b9ed6557a3c3dd452", size = 2370982, upload-time = "2022-09-22T03:00:59.807Z" }, { url = "https://files.pythonhosted.org/packages/01/98/4730bfff6bcd3163db8c3d70689e19a1a5f419152316edfc1f13ff06a5d7/grpcio_tools-1.49.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:a64bab81b220c50033f584f57978ebbea575f09c1ccee765cd5c462177988098", size = 2731915, upload-time = "2022-09-22T03:01:05.44Z" }, @@ -1559,7 +1557,7 @@ wheels = [ [[package]] name = "osprey-rpc" version = "0.1.0" -source = { virtual = "osprey_rpc" } +source = { editable = "osprey_rpc" } [[package]] name = "osprey-worker" @@ -1573,7 +1571,7 @@ dependencies = [ [package.metadata] requires-dist = [ { name = "flask-cors", specifier = ">=6.0.1" }, - { name = "osprey-rpc", virtual = "osprey_rpc" }, + { name = "osprey-rpc", editable = "osprey_rpc" }, ] [[package]] From 4d1d19a32b15790f040059c2cea8637605e8ba39 Mon Sep 17 00:00:00 2001 From: bealsbe Date: Tue, 24 Mar 2026 00:07:45 +0000 Subject: [PATCH 3/9] fix exception with test --- .../src/osprey/engine/stdlib/udfs/tests/test_parse_int.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/osprey_worker/src/osprey/engine/stdlib/udfs/tests/test_parse_int.py b/osprey_worker/src/osprey/engine/stdlib/udfs/tests/test_parse_int.py index 57c3f962..299c4e62 100644 --- a/osprey_worker/src/osprey/engine/stdlib/udfs/tests/test_parse_int.py +++ b/osprey_worker/src/osprey/engine/stdlib/udfs/tests/test_parse_int.py @@ -1,6 +1,5 @@ import pytest from osprey.engine.conftest import ExecuteFunction -from osprey.engine.executor.execution_context import ExpectedUdfException from osprey.engine.stdlib.udfs.parse_int import ParseInt from osprey.engine.udf.registry import UDFRegistry @@ -14,5 +13,5 @@ def test_parse_int(execute: ExecuteFunction, s: str, expected: int) -> None: def test_parse_int_invalid(execute: ExecuteFunction) -> None: - with pytest.raises(ExpectedUdfException): - execute('Result = ParseInt(s="ABC")') + data = execute('Result = ParseInt(s="ABC")') + assert data == {'Result': None} From 804cb26eb0b392ee8ce9bcdb70838bc2711095b2 Mon Sep 17 00:00:00 2001 From: bealsbe Date: Tue, 24 Mar 2026 00:16:45 +0000 Subject: [PATCH 4/9] naming --- .../src/osprey/engine/stdlib/udfs/categories.py | 2 +- .../src/osprey/engine/stdlib/udfs/parse_int.py | 2 +- uv.lock | 10 ++++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/osprey_worker/src/osprey/engine/stdlib/udfs/categories.py b/osprey_worker/src/osprey/engine/stdlib/udfs/categories.py index 393a3fe5..a244cb57 100644 --- a/osprey_worker/src/osprey/engine/stdlib/udfs/categories.py +++ b/osprey_worker/src/osprey/engine/stdlib/udfs/categories.py @@ -13,6 +13,6 @@ class UdfCategories(str, Enum): HTTP = 'HTTP' IP = 'IP' PHONE = 'Phone' - NUMERIC = 'Numeric' + CAST = 'Cast' RANDOM = 'Random' STRING = 'String' diff --git a/osprey_worker/src/osprey/engine/stdlib/udfs/parse_int.py b/osprey_worker/src/osprey/engine/stdlib/udfs/parse_int.py index 2422872b..e4707606 100644 --- a/osprey_worker/src/osprey/engine/stdlib/udfs/parse_int.py +++ b/osprey_worker/src/osprey/engine/stdlib/udfs/parse_int.py @@ -11,7 +11,7 @@ class Arguments(ArgumentsBase): class ParseInt(UDFBase[Arguments, int]): """Converts a numeric string to an integer.""" - category = UdfCategories.NUMERIC + category = UdfCategories.CAST def execute(self, execution_context: ExecutionContext, arguments: Arguments) -> int: try: diff --git a/uv.lock b/uv.lock index 55564472..178d35c2 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 3 +revision = 2 requires-python = ">=3.11" resolution-markers = [ "python_full_version >= '4' and platform_machine == 'x86_64'", @@ -497,7 +497,7 @@ dependencies = [ [[package]] name = "example-plugins" version = "0.1.0" -source = { editable = "example_plugins" } +source = { virtual = "example_plugins" } dependencies = [ { name = "pluggy" }, ] @@ -924,6 +924,7 @@ dependencies = [ ] sdist = { url = "https://files.pythonhosted.org/packages/a3/1c/c42834d4fee45c5cf2d9546e97e879a1cbcdecfd16eb1a12144dcb91edae/grpcio-1.49.1.tar.gz", hash = "sha256:d4725fc9ec8e8822906ae26bb26f5546891aa7fbc3443de970cc556d43a5c99f", size = 22059239, upload-time = "2022-09-22T03:02:44.376Z" } wheels = [ + { url = "https://files.pythonhosted.org/packages/2d/e2/aaccddb8b06637625d847dbb5fe76ec3d15a74d89d983f5202f3666706e3/grpcio-1.49.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:9fb17ff8c0d56099ac6ebfa84f670c5a62228d6b5c695cf21c02160c2ac1446b", size = 73399185, upload-time = "2022-09-22T02:57:56.219Z" }, { url = "https://files.pythonhosted.org/packages/90/0f/4d614d59f500835cbd27cb90743fb6b299098b0f22b8fd058d3586c933c0/grpcio-1.49.1-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:075f2d06e3db6b48a2157a1bcd52d6cbdca980dd18988fe6afdb41795d51625f", size = 4296299, upload-time = "2022-09-22T02:58:01.417Z" }, { url = "https://files.pythonhosted.org/packages/4d/ea/359a98f8b3b4ff9a2f457a0d20ed81775a64149fbb7617177ed23d9d10c9/grpcio-1.49.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dc79b2b37d779ac42341ddef40ad5bf0966a64af412c89fc2b062e3ddabb093f", size = 4656437, upload-time = "2022-09-22T02:58:06.23Z" }, { url = "https://files.pythonhosted.org/packages/fc/89/4952d2dff95f5b95db5943b2d1b55c82a485830b992f52f212b33616b523/grpcio-1.49.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:49b301740cf5bc8fed4fee4c877570189ae3951432d79fa8e524b09353659811", size = 4888051, upload-time = "2022-09-22T02:58:11.411Z" }, @@ -1052,6 +1053,7 @@ dependencies = [ ] sdist = { url = "https://files.pythonhosted.org/packages/6c/e4/3416d25aebc4477141a491fae2c9494c5e0437a706c59103a936aac7d072/grpcio-tools-1.49.1.tar.gz", hash = "sha256:84cc64e5b46bad43d5d7bd2fd772b656eba0366961187a847e908e2cb735db91", size = 2252679, upload-time = "2022-09-22T03:03:00.279Z" } wheels = [ + { url = "https://files.pythonhosted.org/packages/e4/c1/ba298fe650b67c9e31a7ad88b2fe1d8d22ff2c6a9e131604054835397dfc/grpcio_tools-1.49.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:9e5c13809ab2f245398e8446c4c3b399a62d591db651e46806cccf52a700452e", size = 36912892, upload-time = "2022-09-22T03:00:51.237Z" }, { url = "https://files.pythonhosted.org/packages/9c/8b/a45a39bf7d1c4956d48179831e4da88c3f6ee14dbdcb273e575bbeb7de20/grpcio_tools-1.49.1-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:ab3d0ee9623720ee585fdf3753b3755d3144a4a8ae35bca8e3655fa2f41056be", size = 2025040, upload-time = "2022-09-22T03:00:55.219Z" }, { url = "https://files.pythonhosted.org/packages/6d/7f/89dc6036b91f8cbada98b06801ac2f5db60885000feaf88f9d7cabe665b7/grpcio_tools-1.49.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13e13b3643e7577a3ec13b79689eb4d7548890b1e104c04b9ed6557a3c3dd452", size = 2370982, upload-time = "2022-09-22T03:00:59.807Z" }, { url = "https://files.pythonhosted.org/packages/01/98/4730bfff6bcd3163db8c3d70689e19a1a5f419152316edfc1f13ff06a5d7/grpcio_tools-1.49.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:a64bab81b220c50033f584f57978ebbea575f09c1ccee765cd5c462177988098", size = 2731915, upload-time = "2022-09-22T03:01:05.44Z" }, @@ -1557,7 +1559,7 @@ wheels = [ [[package]] name = "osprey-rpc" version = "0.1.0" -source = { editable = "osprey_rpc" } +source = { virtual = "osprey_rpc" } [[package]] name = "osprey-worker" @@ -1571,7 +1573,7 @@ dependencies = [ [package.metadata] requires-dist = [ { name = "flask-cors", specifier = ">=6.0.1" }, - { name = "osprey-rpc", editable = "osprey_rpc" }, + { name = "osprey-rpc", virtual = "osprey_rpc" }, ] [[package]] From 444bd15e5acd58308d7014ea95ee5cfe971c349f Mon Sep 17 00:00:00 2001 From: bealsbe Date: Tue, 24 Mar 2026 00:20:53 +0000 Subject: [PATCH 5/9] fix diff --- uv.lock | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/uv.lock b/uv.lock index 178d35c2..55564472 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 2 +revision = 3 requires-python = ">=3.11" resolution-markers = [ "python_full_version >= '4' and platform_machine == 'x86_64'", @@ -497,7 +497,7 @@ dependencies = [ [[package]] name = "example-plugins" version = "0.1.0" -source = { virtual = "example_plugins" } +source = { editable = "example_plugins" } dependencies = [ { name = "pluggy" }, ] @@ -924,7 +924,6 @@ dependencies = [ ] sdist = { url = "https://files.pythonhosted.org/packages/a3/1c/c42834d4fee45c5cf2d9546e97e879a1cbcdecfd16eb1a12144dcb91edae/grpcio-1.49.1.tar.gz", hash = "sha256:d4725fc9ec8e8822906ae26bb26f5546891aa7fbc3443de970cc556d43a5c99f", size = 22059239, upload-time = "2022-09-22T03:02:44.376Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/2d/e2/aaccddb8b06637625d847dbb5fe76ec3d15a74d89d983f5202f3666706e3/grpcio-1.49.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:9fb17ff8c0d56099ac6ebfa84f670c5a62228d6b5c695cf21c02160c2ac1446b", size = 73399185, upload-time = "2022-09-22T02:57:56.219Z" }, { url = "https://files.pythonhosted.org/packages/90/0f/4d614d59f500835cbd27cb90743fb6b299098b0f22b8fd058d3586c933c0/grpcio-1.49.1-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:075f2d06e3db6b48a2157a1bcd52d6cbdca980dd18988fe6afdb41795d51625f", size = 4296299, upload-time = "2022-09-22T02:58:01.417Z" }, { url = "https://files.pythonhosted.org/packages/4d/ea/359a98f8b3b4ff9a2f457a0d20ed81775a64149fbb7617177ed23d9d10c9/grpcio-1.49.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dc79b2b37d779ac42341ddef40ad5bf0966a64af412c89fc2b062e3ddabb093f", size = 4656437, upload-time = "2022-09-22T02:58:06.23Z" }, { url = "https://files.pythonhosted.org/packages/fc/89/4952d2dff95f5b95db5943b2d1b55c82a485830b992f52f212b33616b523/grpcio-1.49.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:49b301740cf5bc8fed4fee4c877570189ae3951432d79fa8e524b09353659811", size = 4888051, upload-time = "2022-09-22T02:58:11.411Z" }, @@ -1053,7 +1052,6 @@ dependencies = [ ] sdist = { url = "https://files.pythonhosted.org/packages/6c/e4/3416d25aebc4477141a491fae2c9494c5e0437a706c59103a936aac7d072/grpcio-tools-1.49.1.tar.gz", hash = "sha256:84cc64e5b46bad43d5d7bd2fd772b656eba0366961187a847e908e2cb735db91", size = 2252679, upload-time = "2022-09-22T03:03:00.279Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e4/c1/ba298fe650b67c9e31a7ad88b2fe1d8d22ff2c6a9e131604054835397dfc/grpcio_tools-1.49.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:9e5c13809ab2f245398e8446c4c3b399a62d591db651e46806cccf52a700452e", size = 36912892, upload-time = "2022-09-22T03:00:51.237Z" }, { url = "https://files.pythonhosted.org/packages/9c/8b/a45a39bf7d1c4956d48179831e4da88c3f6ee14dbdcb273e575bbeb7de20/grpcio_tools-1.49.1-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:ab3d0ee9623720ee585fdf3753b3755d3144a4a8ae35bca8e3655fa2f41056be", size = 2025040, upload-time = "2022-09-22T03:00:55.219Z" }, { url = "https://files.pythonhosted.org/packages/6d/7f/89dc6036b91f8cbada98b06801ac2f5db60885000feaf88f9d7cabe665b7/grpcio_tools-1.49.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13e13b3643e7577a3ec13b79689eb4d7548890b1e104c04b9ed6557a3c3dd452", size = 2370982, upload-time = "2022-09-22T03:00:59.807Z" }, { url = "https://files.pythonhosted.org/packages/01/98/4730bfff6bcd3163db8c3d70689e19a1a5f419152316edfc1f13ff06a5d7/grpcio_tools-1.49.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:a64bab81b220c50033f584f57978ebbea575f09c1ccee765cd5c462177988098", size = 2731915, upload-time = "2022-09-22T03:01:05.44Z" }, @@ -1559,7 +1557,7 @@ wheels = [ [[package]] name = "osprey-rpc" version = "0.1.0" -source = { virtual = "osprey_rpc" } +source = { editable = "osprey_rpc" } [[package]] name = "osprey-worker" @@ -1573,7 +1571,7 @@ dependencies = [ [package.metadata] requires-dist = [ { name = "flask-cors", specifier = ">=6.0.1" }, - { name = "osprey-rpc", virtual = "osprey_rpc" }, + { name = "osprey-rpc", editable = "osprey_rpc" }, ] [[package]] From 3c34211152ded4d924776ec2afb4488fb5e296a2 Mon Sep 17 00:00:00 2001 From: bealsbe Date: Fri, 27 Mar 2026 17:48:53 +0000 Subject: [PATCH 6/9] update changelog.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 467a0c7f..0874b129 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### 🎉 New features - Add Postgres execution result store ([#171](https://github.com/roostorg/osprey/pull/171) by [@serendipty01](https://github.com/serendipty01)) + - Add `parseInt` UDF ([#190](https://github.com/roostorg/osprey/pull/190) by [@bealsbe](https://github.com/bealsbe)) ### 🐛 Bug fixes From c265dd96a8cbfa54fd0d12e86489baf2955a5021 Mon Sep 17 00:00:00 2001 From: bealsbe Date: Fri, 27 Mar 2026 17:51:04 +0000 Subject: [PATCH 7/9] fix change log --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0874b129..85da62a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### 🎉 New features - Add Postgres execution result store ([#171](https://github.com/roostorg/osprey/pull/171) by [@serendipty01](https://github.com/serendipty01)) - - Add `parseInt` UDF ([#190](https://github.com/roostorg/osprey/pull/190) by [@bealsbe](https://github.com/bealsbe)) + - Add `ParseInt` UDF ([#190](https://github.com/roostorg/osprey/pull/190) by [@bealsbe](https://github.com/bealsbe)) ### 🐛 Bug fixes From a9e77e2d1b7492f619b8024395a7e6b19938702a Mon Sep 17 00:00:00 2001 From: bealsbe Date: Fri, 27 Mar 2026 18:52:35 +0000 Subject: [PATCH 8/9] update changelog.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85da62a5..5d422dcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### 🎉 New features - Add Postgres execution result store ([#171](https://github.com/roostorg/osprey/pull/171) by [@serendipty01](https://github.com/serendipty01)) - - Add `ParseInt` UDF ([#190](https://github.com/roostorg/osprey/pull/190) by [@bealsbe](https://github.com/bealsbe)) + - Add `ParseInt` UDF — converts a numeric string to an integer ([#190](https://github.com/roostorg/osprey/pull/190) by [@bealsbe](https://github.com/bealsbe)) ### 🐛 Bug fixes From 20767b1f2d8070f24249f6d532018a6e0c447fdb Mon Sep 17 00:00:00 2001 From: bealsbe Date: Wed, 1 Apr 2026 17:10:21 +0000 Subject: [PATCH 9/9] register parseint --- osprey_worker/src/osprey/worker/_stdlibplugin/udf_register.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/osprey_worker/src/osprey/worker/_stdlibplugin/udf_register.py b/osprey_worker/src/osprey/worker/_stdlibplugin/udf_register.py index 7bd1e1cb..0325dc1e 100644 --- a/osprey_worker/src/osprey/worker/_stdlibplugin/udf_register.py +++ b/osprey_worker/src/osprey/worker/_stdlibplugin/udf_register.py @@ -20,6 +20,7 @@ from osprey.engine.stdlib.udfs.list_read import ListRead from osprey.engine.stdlib.udfs.list_sort import ListSort from osprey.engine.stdlib.udfs.mx_lookup import MXLookup +from osprey.engine.stdlib.udfs.parse_int import ParseInt from osprey.engine.stdlib.udfs.phone_country import PhoneCountry from osprey.engine.stdlib.udfs.phone_prefix import PhonePrefix from osprey.engine.stdlib.udfs.random_bool import RandomBool @@ -94,6 +95,7 @@ def register_udfs() -> Sequence[Type[UDFBase[Any, Any]]]: ListRead, ListSort, MXLookup, + ParseInt, PhoneCountry, PhonePrefix, RandomBool,