diff --git a/src/Textkernel.Tx.SDK.Tests/IntegrationTests/MatchV2Tests.cs b/src/Textkernel.Tx.SDK.Tests/IntegrationTests/MatchV2Tests.cs index 45b091ae..9947af9a 100644 --- a/src/Textkernel.Tx.SDK.Tests/IntegrationTests/MatchV2Tests.cs +++ b/src/Textkernel.Tx.SDK.Tests/IntegrationTests/MatchV2Tests.cs @@ -22,8 +22,8 @@ public class MatchV2Tests : TestBase public async Task SetupAIMatchingIndexes() { // add a document to each index - await Client.SearchMatchV2.AddJob(_documentId, TestParsedJobTech); - await Client.SearchMatchV2.AddCandidate(_documentId, TestParsedResume); + await Client.SearchMatchV2.AddJob(_documentId, TestParsedJobTechV2); + await Client.SearchMatchV2.AddCandidate(_documentId, TestParsedResumeV2); await DelayForIndexSync(5_000); } @@ -77,7 +77,12 @@ public async Task TestParseAndUpload() { ProfessionsSettings = new ProfessionsSettings() { - Normalize = false + Normalize = true + }, + SkillsSettings = new SkillsSettings() + { + Normalize = true, + TaxonomyVersion = "V2" }, IndexingOptions = new Models.API.Indexes.IndexingOptionsGeneric() { diff --git a/src/Textkernel.Tx.SDK.Tests/IntegrationTests/ParsingTests.cs b/src/Textkernel.Tx.SDK.Tests/IntegrationTests/ParsingTests.cs index 45713f82..285d0ca2 100644 --- a/src/Textkernel.Tx.SDK.Tests/IntegrationTests/ParsingTests.cs +++ b/src/Textkernel.Tx.SDK.Tests/IntegrationTests/ParsingTests.cs @@ -158,7 +158,7 @@ public async Task TestParseResumeGeocodeIndex() }; // since there isn't an address this will throw an exception - Assert.ThrowsAsync(async () => { + Assert.ThrowsAsync(async () => { await Client.Parser.ParseResume(new ParseRequest(TestData.Resume) { GeocodeOptions = geocodeOptions, @@ -166,9 +166,9 @@ await Client.Parser.ParseResume(new ParseRequest(TestData.Resume) }); }); - + // confirm you can geocode but indexing fails - Assert.ThrowsAsync(async () => { + Assert.ThrowsAsync(async () => { await Client.Parser.ParseResume(new ParseRequest(TestData.ResumeWithAddress) { GeocodeOptions = geocodeOptions, diff --git a/src/Textkernel.Tx.SDK.Tests/TestBase.cs b/src/Textkernel.Tx.SDK.Tests/TestBase.cs index b1cee459..73f23073 100644 --- a/src/Textkernel.Tx.SDK.Tests/TestBase.cs +++ b/src/Textkernel.Tx.SDK.Tests/TestBase.cs @@ -29,6 +29,7 @@ public abstract class TestBase protected static readonly ParsedJob TestParsedJob; protected static readonly ParsedJob TestParsedJobWithAddress; protected static readonly ParsedJob TestParsedJobTech; + protected static readonly ParsedJob TestParsedJobTechV2; protected static readonly ParsedJobWithId TestParsedJobWithId; protected static readonly ParsedResumeWithId TestParsedResumeWithId; @@ -94,6 +95,17 @@ static TestBase() parseJobResponseValue = Client.Parser.ParseJob(new ParseRequest(TestData.JobOrderTech)).Result.Value; TestParsedJobTech = parseJobResponseValue.JobData; + parseJobResponseValue = Client.Parser.ParseJob(new ParseRequest(TestData.JobOrderTech, new ParseOptions + { + ProfessionsSettings = new ProfessionsSettings { Normalize = true }, + SkillsSettings = new SkillsSettings + { + Normalize = true, + TaxonomyVersion = "V2" + } + })).Result.Value; + TestParsedJobTechV2 = parseJobResponseValue.JobData; + TestParsedJobWithId = new ParsedJobWithId() { Id = "1", diff --git a/src/Textkernel.Tx.SDK/ITxClient.cs b/src/Textkernel.Tx.SDK/ITxClient.cs index 68a58910..db7f4a0b 100644 --- a/src/Textkernel.Tx.SDK/ITxClient.cs +++ b/src/Textkernel.Tx.SDK/ITxClient.cs @@ -20,6 +20,7 @@ using Textkernel.Tx.Models.Job; using Textkernel.Tx.Models.Matching; using Textkernel.Tx.Models.Resume; +using System; using System.Collections.Generic; using System.Threading.Tasks; using Textkernel.Tx.Models.API.JobDescription; @@ -56,6 +57,7 @@ public interface ITxClient /// /// Contains all endpoints/methods for Search & Match V1 /// + [Obsolete("Search & Match V1 is deprecated. You should use SearchMatchV2 instead.")] ISearchMatchService SearchMatchV1 { get; } /// diff --git a/src/Textkernel.Tx.SDK/Services/ISearchMatchService.cs b/src/Textkernel.Tx.SDK/Services/ISearchMatchService.cs index 7e0000e1..29e5e8aa 100644 --- a/src/Textkernel.Tx.SDK/Services/ISearchMatchService.cs +++ b/src/Textkernel.Tx.SDK/Services/ISearchMatchService.cs @@ -22,6 +22,7 @@ namespace Textkernel.Tx.Services /// /// Use /// + [Obsolete("Search & Match V1 is deprecated. You should use SearchMatchV2 instead.")] public interface ISearchMatchService { @@ -261,6 +262,7 @@ Task Search( /// Settings to be used for this scoring request /// Either or /// Thrown when an API error occurs + [Obsolete("BimetricScore is deprecated.")] Task BimetricScore( ParsedResumeWithId sourceResume, List targetDocuments, @@ -280,6 +282,7 @@ Task BimetricScore( /// Settings to be used for this scoring request /// Either or /// Thrown when an API error occurs + [Obsolete("BimetricScore is deprecated.")] Task BimetricScore( ParsedJobWithId sourceJob, List targetDocuments, diff --git a/src/Textkernel.Tx.SDK/Textkernel.Tx.SDK.csproj b/src/Textkernel.Tx.SDK/Textkernel.Tx.SDK.csproj index 7952797e..81adfc49 100644 --- a/src/Textkernel.Tx.SDK/Textkernel.Tx.SDK.csproj +++ b/src/Textkernel.Tx.SDK/Textkernel.Tx.SDK.csproj @@ -10,7 +10,7 @@ Copyright © $([System.DateTime]::UtcNow.Year) Textkernel BV. All rights reserved. Apache-2.0 https://github.com/textkernel/tx-dotnet - 4.0.1 + 4.0.2 images\icon.png https://raw.githubusercontent.com/textkernel/tx-dotnet/master/src/Textkernel.Tx.SDK/icon.png true diff --git a/src/Textkernel.Tx.SDK/TxClient.cs b/src/Textkernel.Tx.SDK/TxClient.cs index 95c2acae..5a40920a 100644 --- a/src/Textkernel.Tx.SDK/TxClient.cs +++ b/src/Textkernel.Tx.SDK/TxClient.cs @@ -96,8 +96,9 @@ public class TxClient : ITxClient, IDisposable public IGeocoderService Geocoder { get; private set; } /// - /// Contains all endpoints/methods for Search & Match + /// Contains all endpoints/methods for Search & Match V1 /// + [Obsolete("Search & Match V1 is deprecated. You should use SearchMatchV2 instead.")] public ISearchMatchService SearchMatchV1 { get; private set; } ///