diff --git a/dopt.TOM.sln b/dopt.TOM.sln
index 4fb77aa..ca64ec6 100644
--- a/dopt.TOM.sln
+++ b/dopt.TOM.sln
@@ -5,6 +5,8 @@ VisualStudioVersion = 17.11.35327.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dopt.TOMTests", "dopt.TOMTests\dopt.TOMTests.csproj", "{28496580-EF8C-4D54-8FEF-BAA2E4970367}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dopt.TOM", "dopt.TOM\dopt.TOM.csproj", "{73F5A4E6-A788-4BBE-CE74-61670014CEE3}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
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|x64.ActiveCfg = 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
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/dopt.TOM/Plugin.cs b/dopt.TOM/Plugin.cs
index 2d88c0b..244a63a 100644
--- a/dopt.TOM/Plugin.cs
+++ b/dopt.TOM/Plugin.cs
@@ -13,12 +13,14 @@ namespace dopt.TOM
internal const string langMainStopSearchFolderName = "python";
internal const string doptTOMPluginLibraryUsage = "1";
protected dynamic tomWrapperPipelines;
-
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();
using (Py.GIL())
- {
+ {
tomWrapperPipelines = Py.Import("tom_plugin.pipeline");
}
}
diff --git a/dopt.TOMTests/Test1.cs b/dopt.TOMTests/Test1.cs
deleted file mode 100644
index 1cb8318..0000000
--- a/dopt.TOMTests/Test1.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace dopt.TOMTests
-{
- [TestClass]
- public sealed class Test1
- {
- [TestMethod]
- public void TestMethod1()
- {
- }
- }
-}
diff --git a/dopt.TOMTests/Tests.cs b/dopt.TOMTests/Tests.cs
new file mode 100644
index 0000000..5c06f55
--- /dev/null
+++ b/dopt.TOMTests/Tests.cs
@@ -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();
+ }
+ }
+}
diff --git a/dopt.TOMTests/dopt.TOMTests.csproj b/dopt.TOMTests/dopt.TOMTests.csproj
index 1408a42..5e7bdd0 100644
--- a/dopt.TOMTests/dopt.TOMTests.csproj
+++ b/dopt.TOMTests/dopt.TOMTests.csproj
@@ -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
-->
true
+ x64
+ AnyCPU
@@ -22,6 +24,10 @@
+
+
+
+