Apply new architecture with base plugin dopt.SharpPython
#3
10
dopt.TOM.sln
10
dopt.TOM.sln
@ -5,6 +5,8 @@ VisualStudioVersion = 17.11.35327.3
|
|||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dopt.TOMTests", "dopt.TOMTests\dopt.TOMTests.csproj", "{28496580-EF8C-4D54-8FEF-BAA2E4970367}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dopt.TOMTests", "dopt.TOMTests\dopt.TOMTests.csproj", "{28496580-EF8C-4D54-8FEF-BAA2E4970367}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dopt.TOM", "dopt.TOM\dopt.TOM.csproj", "{73F5A4E6-A788-4BBE-CE74-61670014CEE3}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@ -21,6 +23,14 @@ Global
|
|||||||
{28496580-EF8C-4D54-8FEF-BAA2E4970367}.Release|Any CPU.Build.0 = Release|Any CPU
|
{28496580-EF8C-4D54-8FEF-BAA2E4970367}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{28496580-EF8C-4D54-8FEF-BAA2E4970367}.Release|x64.ActiveCfg = Release|Any CPU
|
{28496580-EF8C-4D54-8FEF-BAA2E4970367}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
{28496580-EF8C-4D54-8FEF-BAA2E4970367}.Release|x64.Build.0 = Release|Any CPU
|
{28496580-EF8C-4D54-8FEF-BAA2E4970367}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{73F5A4E6-A788-4BBE-CE74-61670014CEE3}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||||
|
{73F5A4E6-A788-4BBE-CE74-61670014CEE3}.Debug|Any CPU.Build.0 = Debug|x64
|
||||||
|
{73F5A4E6-A788-4BBE-CE74-61670014CEE3}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{73F5A4E6-A788-4BBE-CE74-61670014CEE3}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{73F5A4E6-A788-4BBE-CE74-61670014CEE3}.Release|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{73F5A4E6-A788-4BBE-CE74-61670014CEE3}.Release|Any CPU.Build.0 = Release|x64
|
||||||
|
{73F5A4E6-A788-4BBE-CE74-61670014CEE3}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{73F5A4E6-A788-4BBE-CE74-61670014CEE3}.Release|x64.Build.0 = Release|x64
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
@ -13,12 +13,14 @@ namespace dopt.TOM
|
|||||||
internal const string langMainStopSearchFolderName = "python";
|
internal const string langMainStopSearchFolderName = "python";
|
||||||
internal const string doptTOMPluginLibraryUsage = "1";
|
internal const string doptTOMPluginLibraryUsage = "1";
|
||||||
protected dynamic tomWrapperPipelines;
|
protected dynamic tomWrapperPipelines;
|
||||||
|
|
||||||
public Plugin(string runtimePath) : base(SharpPython.PyOptimLevels.O, threaded: false, runtimePath: runtimePath, verbose: true)
|
public Plugin(string runtimePath) : base(SharpPython.PyOptimLevels.O, threaded: false, runtimePath: runtimePath, verbose: true)
|
||||||
{
|
{
|
||||||
|
Environment.SetEnvironmentVariable("LANG_MAIN_BASE_FOLDERNAME", langMainBaseFolderName, EnvironmentVariableTarget.Process);
|
||||||
|
Environment.SetEnvironmentVariable("LANG_MAIN_STOP_SEARCH_FOLDERNAME", langMainStopSearchFolderName, EnvironmentVariableTarget.Process);
|
||||||
|
Environment.SetEnvironmentVariable("DOPT_TOM_PLUGIN_LIBRARY_USAGE", doptTOMPluginLibraryUsage, EnvironmentVariableTarget.Process);
|
||||||
base.Initialise();
|
base.Initialise();
|
||||||
using (Py.GIL())
|
using (Py.GIL())
|
||||||
{
|
{
|
||||||
tomWrapperPipelines = Py.Import("tom_plugin.pipeline");
|
tomWrapperPipelines = Py.Import("tom_plugin.pipeline");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,11 +0,0 @@
|
|||||||
namespace dopt.TOMTests
|
|
||||||
{
|
|
||||||
[TestClass]
|
|
||||||
public sealed class Test1
|
|
||||||
{
|
|
||||||
[TestMethod]
|
|
||||||
public void TestMethod1()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
17
dopt.TOMTests/Tests.cs
Normal file
17
dopt.TOMTests/Tests.cs
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
namespace dopt.TOMTests
|
||||||
|
{
|
||||||
|
using dopt.TOM;
|
||||||
|
[TestClass]
|
||||||
|
public sealed class PluginTests
|
||||||
|
{
|
||||||
|
public const string rtPath = @"A:\Arbeitsaufgaben\MOP-TOM\tom-plugin-deploy\bin";
|
||||||
|
public const string dummyData = @"Dummy_Dataset_N_1000.csv";
|
||||||
|
[TestMethod]
|
||||||
|
public void RunPipelineOnTestData()
|
||||||
|
{
|
||||||
|
var plugin = new Plugin(rtPath);
|
||||||
|
plugin.RunOnCSV("t123", dummyData);
|
||||||
|
plugin.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -13,6 +13,8 @@
|
|||||||
For more information, visit https://learn.microsoft.com/dotnet/core/testing/unit-testing-platform-integration-dotnet-test#show-failure-per-test
|
For more information, visit https://learn.microsoft.com/dotnet/core/testing/unit-testing-platform-integration-dotnet-test#show-failure-per-test
|
||||||
-->
|
-->
|
||||||
<TestingPlatformShowTestsFailure>true</TestingPlatformShowTestsFailure>
|
<TestingPlatformShowTestsFailure>true</TestingPlatformShowTestsFailure>
|
||||||
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
|
<Platforms>AnyCPU</Platforms>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -22,6 +24,10 @@
|
|||||||
<PackageReference Include="MSTest" Version="3.6.4" />
|
<PackageReference Include="MSTest" Version="3.6.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\dopt.TOM\dopt.TOM.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Using Include="Microsoft.VisualStudio.TestTools.UnitTesting" />
|
<Using Include="Microsoft.VisualStudio.TestTools.UnitTesting" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user