Skip to content
11 changes: 8 additions & 3 deletions src/Textkernel.Tx.SDK.Tests/IntegrationTests/MatchV2Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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()
{
Expand Down
6 changes: 3 additions & 3 deletions src/Textkernel.Tx.SDK.Tests/IntegrationTests/ParsingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,17 +158,17 @@ public async Task TestParseResumeGeocodeIndex()
};

// since there isn't an address this will throw an exception
Assert.ThrowsAsync<TxGeocodeResumeException>(async () => {
Assert.ThrowsAsync<TxException>(async () => {
await Client.Parser.ParseResume(new ParseRequest(TestData.Resume)
{
GeocodeOptions = geocodeOptions,
IndexingOptions = indexingOptions
});
});


// confirm you can geocode but indexing fails
Assert.ThrowsAsync<TxIndexResumeException>(async () => {
Assert.ThrowsAsync<TxException>(async () => {
await Client.Parser.ParseResume(new ParseRequest(TestData.ResumeWithAddress)
{
GeocodeOptions = geocodeOptions,
Expand Down
12 changes: 12 additions & 0 deletions src/Textkernel.Tx.SDK.Tests/TestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions src/Textkernel.Tx.SDK/ITxClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -56,6 +57,7 @@ public interface ITxClient
/// <summary>
/// Contains all endpoints/methods for Search &amp; Match V1
/// </summary>
[Obsolete("Search & Match V1 is deprecated. You should use SearchMatchV2 instead.")]
ISearchMatchService SearchMatchV1 { get; }

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions src/Textkernel.Tx.SDK/Services/ISearchMatchService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ namespace Textkernel.Tx.Services
/// <summary>
/// Use <see cref="TxClient.SearchMatchV1"/>
/// </summary>
[Obsolete("Search & Match V1 is deprecated. You should use SearchMatchV2 instead.")]
public interface ISearchMatchService
{

Expand Down Expand Up @@ -261,6 +262,7 @@ Task<SearchResponse> Search(
/// <param name="settings">Settings to be used for this scoring request</param>
/// <typeparam name="TTarget">Either <see cref="ParsedResumeWithId"/> or <see cref="ParsedJobWithId"/></typeparam>
/// <exception cref="TxException">Thrown when an API error occurs</exception>
[Obsolete("BimetricScore is deprecated.")]
Task<BimetricScoreResponse> BimetricScore<TTarget>(
ParsedResumeWithId sourceResume,
List<TTarget> targetDocuments,
Expand All @@ -280,6 +282,7 @@ Task<BimetricScoreResponse> BimetricScore<TTarget>(
/// <param name="settings">Settings to be used for this scoring request</param>
/// <typeparam name="TTarget">Either <see cref="ParsedResumeWithId"/> or <see cref="ParsedJobWithId"/></typeparam>
/// <exception cref="TxException">Thrown when an API error occurs</exception>
[Obsolete("BimetricScore is deprecated.")]
Task<BimetricScoreResponse> BimetricScore<TTarget>(
ParsedJobWithId sourceJob,
List<TTarget> targetDocuments,
Expand Down
2 changes: 1 addition & 1 deletion src/Textkernel.Tx.SDK/Textkernel.Tx.SDK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Copyright>Copyright © $([System.DateTime]::UtcNow.Year) Textkernel BV. All rights reserved.</Copyright>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/textkernel/tx-dotnet</PackageProjectUrl>
<Version>4.0.1</Version>
<Version>4.0.2</Version>
<PackageIcon>images\icon.png</PackageIcon>
<PackageIconUrl>https://raw.githubusercontent.com/textkernel/tx-dotnet/master/src/Textkernel.Tx.SDK/icon.png</PackageIconUrl>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
Expand Down
3 changes: 2 additions & 1 deletion src/Textkernel.Tx.SDK/TxClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@
public IGeocoderService Geocoder { get; private set; }

/// <summary>
/// Contains all endpoints/methods for Search &amp; Match
/// Contains all endpoints/methods for Search &amp; Match V1
/// </summary>
[Obsolete("Search & Match V1 is deprecated. You should use SearchMatchV2 instead.")]
public ISearchMatchService SearchMatchV1 { get; private set; }

/// <summary>
Expand Down Expand Up @@ -168,7 +169,7 @@
Formatter = new FormatterService(_httpClient, settings);
Parser = new ParserService(_httpClient, settings);
Geocoder = new GeocoderService(_httpClient, settings);
SearchMatchV1 = new SearchMatchService(_httpClient, settings);

Check warning on line 172 in src/Textkernel.Tx.SDK/TxClient.cs

View workflow job for this annotation

GitHub Actions / unit-tests

'TxClient.SearchMatchV1' is obsolete: 'Search & Match V1 is deprecated. You should use SearchMatchV2 instead.'

Check warning on line 172 in src/Textkernel.Tx.SDK/TxClient.cs

View workflow job for this annotation

GitHub Actions / build

'TxClient.SearchMatchV1' is obsolete: 'Search & Match V1 is deprecated. You should use SearchMatchV2 instead.'

Check warning on line 172 in src/Textkernel.Tx.SDK/TxClient.cs

View workflow job for this annotation

GitHub Actions / build

'TxClient.SearchMatchV1' is obsolete: 'Search & Match V1 is deprecated. You should use SearchMatchV2 instead.'
SkillsIntelligence = new SkillsIntelligenceClient(_httpClient, settings);
SearchMatchV2 = new MatchV2Service(_httpClient, settings);
}
Expand Down
Loading