From 005888457d1d8b978cc52fb9e482ac0a872a71ec Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Fri, 12 Dec 2025 15:21:33 +0100 Subject: [PATCH 1/8] WS_3698: update record-similarity example with new field types --- examples/record_similarity.py | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/examples/record_similarity.py b/examples/record_similarity.py index 0ef1ea7..a2c1fe2 100644 --- a/examples/record_similarity.py +++ b/examples/record_similarity.py @@ -31,6 +31,18 @@ def run(key, alt_url='https://analytics.babelstreet.com/rest/v1/'): "dob2": { "type": "rni_date", "weight": 0.1 + }, + "jobTitle": { + "type": "rni_string", + "weight": 0.2 + }, + "age": { + "type": "rni_number", + "weight": 0.4 + }, + "isRetired": { + "type": "rni_boolean", + "weight": 0.05 } } properties = { @@ -52,7 +64,8 @@ def run(key, alt_url='https://analytics.babelstreet.com/rest/v1/'): "dob2": { "date": "04161993", "format": "MMddyyyy" - } + }, + "jobTitle": "software engineer" }, { "dob": { @@ -60,7 +73,9 @@ def run(key, alt_url='https://analytics.babelstreet.com/rest/v1/'): }, "primaryName": { "text": "Evan R" - } + }, + "age": 47, + "isRetired": False } ], "right": [ @@ -71,7 +86,9 @@ def run(key, alt_url='https://analytics.babelstreet.com/rest/v1/'): "primaryName": { "text": "Seth R", "language": "eng" - } + }, + "jobTitle": "manager", + "isRetired": True }, { "primaryName": "Ivan R", @@ -84,7 +101,9 @@ def run(key, alt_url='https://analytics.babelstreet.com/rest/v1/'): }, "dob2": { "date": "1993/04/16" - } + }, + "age": 72, + "isRetired": True } ] } From 276fda04a7317b6330a473c2a909755c5b576a32 Mon Sep 17 00:00:00 2001 From: seth-mg Date: Thu, 23 Apr 2026 11:31:46 -0500 Subject: [PATCH 2/8] Post to Teams not Slack --- Jenkinsfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 58a6d77..969a6e5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -22,14 +22,15 @@ node ("docker-light") { slack(true) } catch (e) { currentBuild.result = "FAILED" - slack(false) + postToTeams(false) throw e } } -def slack(boolean success) { +def postToTeams(boolean success) { + def webhookUrl = "${env.TEAMS_PNC_JENKINS_WEBHOOK_URL}" def color = success ? "#00FF00" : "#FF0000" def status = success ? "SUCCESSFUL" : "FAILED" - def message = status + ": Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})" - slackSend(color: color, channel: "#rapid", message: message) + def message = "*" + status + ":* '${env.JOB_NAME}' - [${env.BUILD_NUMBER}] - ${env.BUILD_URL}" + office365ConnectorSend(webhookUrl: webhookUrl, color: color, message: message, status: status) } From 4932cbcfa510341d6fcae7a9d93f5750fc96cb54 Mon Sep 17 00:00:00 2001 From: seth-mg Date: Thu, 23 Apr 2026 12:18:24 -0500 Subject: [PATCH 3/8] Missed a slack --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 969a6e5..66cf002 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,7 +19,7 @@ node ("docker-light") { sh "docker run --rm -e API_KEY=${API_KEY} -e ALT_URL=${ALT_URL} -v ${SOURCEDIR}:/source rosette/docker-python" } } - slack(true) + postToTeams(true) } catch (e) { currentBuild.result = "FAILED" postToTeams(false) From 8f7ade8123fcf5ca5d8d775c765515b57d825165 Mon Sep 17 00:00:00 2001 From: seth-mg Date: Thu, 7 May 2026 17:41:02 -0500 Subject: [PATCH 4/8] Update logo, doc and support links --- README.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index bc34f47..8a88e63 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,5 @@ - - - - - Babel Street Logo - + + Babel Street Logo # Analytics by Babel Street @@ -38,10 +34,10 @@ in the [examples](https://github.com/rosette-api/python/tree/develop/examples) d #### Documentation & Support - [Binding API](https://rosette-api.github.io/python/) -- [Analytics Platform API](https://docs.babelstreet.com/API/en/index-en.html) +- [Analytics Platform API](https://documentation.babelstreet.com/analytics) - [Binding Release Notes](https://github.com/rosette-api/python/wiki/Release-Notes) -- [Analytics Platform Release Notes](https://docs.babelstreet.com/Release/en/rosette-cloud.html) -- [Support](https://babelstreet.my.site.com/support/s/) +- [Analytics Platform Release Notes](https://docs.babelstreet.com/r/Hosted-Services-Release-Notes) +- [Support](https://babelstreet.my.site.com/support/s/contactsupport) - [Binding License: Apache 2.0](https://github.com/rosette-api/python/blob/develop/LICENSE.txt) ## Binding Developer Information From 0d5a1542e6be1d27506ec1d545d96452b63fb4b8 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Thu, 1 Oct 2026 13:33:09 +0200 Subject: [PATCH 5/8] BX-76308: support record similarity comparison method --- rosette/api.py | 4 ++-- tests/test_rosette_api.py | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/rosette/api.py b/rosette/api.py index 9dadf15..6a7105f 100644 --- a/rosette/api.py +++ b/rosette/api.py @@ -3,7 +3,7 @@ """ Python client for the Babel Street Analytics API. -Copyright (c) 2014-2024 Basis Technology Corporation. +Copyright (c) 2014-2026 Basis Technology Corporation. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -356,7 +356,7 @@ class RecordSimilarityParameters(_RequestParametersBase): def __init__(self): self.use_multipart = False - _RequestParametersBase.__init__(self, ("fields", "properties", "records")) + _RequestParametersBase.__init__(self, ("fields", "properties", "records", "comparisonMethod")) def validate(self): """Internal. Do not use.""" diff --git a/tests/test_rosette_api.py b/tests/test_rosette_api.py index ca8085c..6ea3c20 100644 --- a/tests/test_rosette_api.py +++ b/tests/test_rosette_api.py @@ -678,6 +678,31 @@ def test_the_record_similarity_endpoint(api, json_response): assert result["name"] == "Babel Street Analytics" +@pook.on +def test_record_similarity_comparison_method(api, json_response): + """Accept and serialize the optional comparison method.""" + pook.post(url=get_base_url() + "v1/record-similarity", + response_json=json_response, + reply=200) + + params = RecordSimilarityParameters() + params["fields"] = {} + params["records"] = {} + assert params["comparisonMethod"] is None + assert "comparisonMethod" not in params.serialize(None) + + params["comparisonMethod"] = "one_to_n" + assert params["comparisonMethod"] == "one_to_n" + assert params.serialize(None) == { + "fields": {}, + "records": {}, + "comparisonMethod": "one_to_n" + } + + result = api.record_similarity(params) + assert result["name"] == "Babel Street Analytics" + + @pook.on def test_for_record_similarity_required_parameters(api, json_response): pook.post(url=get_base_url() + "v1/record-similarity", From ffed93be999775d8b094478c92875c04d4efa8ad Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Mon, 5 Oct 2026 12:17:46 +0200 Subject: [PATCH 6/8] BX-76308: Update the lsit of supported python versions --- CI.Jenkinsfile | 2 +- LICENSE.txt | 2 +- setup.py | 3 +- tests/test_rosette_api.py | 80 +++++++++++++++++++-------------------- 4 files changed, 43 insertions(+), 44 deletions(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index 8704189..9cde98f 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -1,6 +1,6 @@ -def versions = [3.9, 3.10, 3.11, 3.12, 3.13] +def versions = [3.11, 3.12, 3.13, 3.14] def runSonnarForPythonVersion(sourceDir, ver){ mySonarOpts="-Dsonar.sources=/source -Dsonar.host.url=${env.SONAR_HOST_URL} -Dsonar.login=${env.SONAR_AUTH_TOKEN}" diff --git a/LICENSE.txt b/LICENSE.txt index 5723e02..b95ebb6 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2014-2019 Basis Technology Corporation. +Copyright (c) 2014-2026 Babel Street Rosette Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/setup.py b/setup.py index 1bcd653..7eab950 100755 --- a/setup.py +++ b/setup.py @@ -49,11 +49,10 @@ def read(*filenames, **kwargs): 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', 'Programming Language :: Python :: 3.13', + 'Programming Language :: Python :: 3.14', 'Topic :: Software Development :: Libraries :: Python Modules' ] ) diff --git a/tests/test_rosette_api.py b/tests/test_rosette_api.py index 6ea3c20..738f49e 100644 --- a/tests/test_rosette_api.py +++ b/tests/test_rosette_api.py @@ -248,46 +248,46 @@ def test_document_endpoints(api, json_response, doc_params, endpoint): response_json=json_response, reply=200) - # TODO: Convert to match-case when minimum supported version is 3.10 - if endpoint == "categories": - result = api.categories(doc_params) - elif endpoint == "entities": - result = api.entities(doc_params) - elif endpoint == "events": - result = api.events(doc_params) - elif endpoint == "language": - result = api.language(doc_params) - elif endpoint == "morphology/complete": - result = api.morphology(doc_params) - elif endpoint == "morphology/compound-components": - result = api.morphology(doc_params, "compound-components") - elif endpoint == "morphology/han-readings": - result = api.morphology(doc_params, "han-readings") - elif endpoint == "morphology/lemmas": - result = api.morphology(doc_params, "lemmas") - elif endpoint == "morphology/parts-of-speech": - result = api.morphology(doc_params, "parts-of-speech") - elif endpoint == "relationships": - api.set_option('accuracyMode', 'PRECISION') - result = api.relationships(doc_params) - elif endpoint == "semantics/similar": - result = api.similar_terms(doc_params) - elif endpoint == "semantics/vector": - result = api.semantic_vectors(doc_params) - elif endpoint == "sentences": - result = api.sentences(doc_params) - elif endpoint == "sentiment": - result = api.sentiment(doc_params) - elif endpoint == "syntax/dependencies": - result = api.syntax_dependencies(doc_params) - elif endpoint == "tokens": - result = api.tokens(doc_params) - elif endpoint == "topics": - result = api.topics(doc_params) - elif endpoint == "transliteration": - result = api.transliteration(doc_params) - else: - raise Exception("Unknown endpoint.") + match endpoint: + case "categories": + result = api.categories(doc_params) + case "entities": + result = api.entities(doc_params) + case "events": + result = api.events(doc_params) + case "language": + result = api.language(doc_params) + case "morphology/complete": + result = api.morphology(doc_params) + case "morphology/compound-components": + result = api.morphology(doc_params, "compound-components") + case "morphology/han-readings": + result = api.morphology(doc_params, "han-readings") + case "morphology/lemmas": + result = api.morphology(doc_params, "lemmas") + case "morphology/parts-of-speech": + result = api.morphology(doc_params, "parts-of-speech") + case "relationships": + api.set_option('accuracyMode', 'PRECISION') + result = api.relationships(doc_params) + case "semantics/similar": + result = api.similar_terms(doc_params) + case "semantics/vector": + result = api.semantic_vectors(doc_params) + case "sentences": + result = api.sentences(doc_params) + case "sentiment": + result = api.sentiment(doc_params) + case "syntax/dependencies": + result = api.syntax_dependencies(doc_params) + case "tokens": + result = api.tokens(doc_params) + case "topics": + result = api.topics(doc_params) + case "transliteration": + result = api.transliteration(doc_params) + case _: + raise Exception("Unknown endpoint.") assert result["name"] == "Babel Street Analytics" From b2739bd77d1ddb0157eb5f2e910528e6590e264a Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Mon, 5 Oct 2026 12:22:46 +0200 Subject: [PATCH 7/8] BX-76308: Update copyright headers --- rosette/api.py | 2 +- tests/test_rosette_api.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rosette/api.py b/rosette/api.py index 6a7105f..df3f183 100644 --- a/rosette/api.py +++ b/rosette/api.py @@ -3,7 +3,7 @@ """ Python client for the Babel Street Analytics API. -Copyright (c) 2014-2026 Basis Technology Corporation. +Copyright (c) 2014-2026 Babel Street Rosette Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/tests/test_rosette_api.py b/tests/test_rosette_api.py index 738f49e..8785da3 100644 --- a/tests/test_rosette_api.py +++ b/tests/test_rosette_api.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """ -Copyright (c) 2014-2024 Basis Technology Corporation. +Copyright (c) 2014-2026 Babel Street Rosette Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From d12e0e5640238bade50778e7d2960df4295c048d Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Mon, 5 Oct 2026 11:04:17 +0000 Subject: [PATCH 8/8] Version 1.39.0 --- docs/source/conf.py | 4 ++-- rosette/__init__.py | 2 +- rosette/api.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 2114fa5..5754e5a 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -55,9 +55,9 @@ # built documents. # # The short X.Y version. -version = '1.31.0' +version = '1.39.0' # The full version, including alpha/beta/rc tags. -release = '1.31.0' +release = '1.39.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/rosette/__init__.py b/rosette/__init__.py index 5c89253..a9203f0 100644 --- a/rosette/__init__.py +++ b/rosette/__init__.py @@ -12,4 +12,4 @@ limitations under the License. """ -__version__ = '1.31.0' +__version__ = '1.39.0' diff --git a/rosette/api.py b/rosette/api.py index df3f183..5ed8cee 100644 --- a/rosette/api.py +++ b/rosette/api.py @@ -29,7 +29,7 @@ _APPLICATION_JSON = 'application/json' _BINDING_LANGUAGE = 'python' -_BINDING_VERSION = '1.31.0' +_BINDING_VERSION = '1.39.0' # TODO Remove legacies in future release _LEGACY_CONCURRENCY_HEADER = 'x-rosetteapi-concurrency' _CONCURRENCY_HEADER = 'x-babelstreetapi-concurrency'