diff --git a/Jenkinsfile b/Jenkinsfile index 58a6d77..66cf002 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,17 +19,18 @@ 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" - 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) } 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 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 } ] }