Skip to content
Permalink
Browse files

Merge pull request #425 from hcmlab/develop

added option to debug python server, minor package adjustments
  • Loading branch information...
tobiasbaur committed Aug 26, 2019
2 parents 6d3518c + 005f407 commit 9a19206de1cb851bb1722d116a5076adb3d8042d
@@ -16,7 +16,7 @@ public partial class MainHandler
{

//Config
public static string BuildVersion = "1.0.6.0";
public static string BuildVersion = "1.0.6.1";
public static MEDIABACKEND MediaBackend = MEDIABACKEND.MEDIAKIT;
public static bool ENABLE_PYTHON = Properties.Settings.Default.EnablePython;
public static int xaiProcessId;
@@ -589,6 +589,7 @@ private void showSettings()
Properties.Settings.Default.DatabaseAskBeforeOverwrite = s.DBAskforOverwrite();
Properties.Settings.Default.DrawVideoWavform = s.DrawvideoWavform();
Properties.Settings.Default.EnablePython = s.EnablePython();
Properties.Settings.Default.EnablePythonDebug = s.EnablePythonDebug();

Properties.Settings.Default.Save();

@@ -545,12 +545,12 @@ private void GetPython()
"matplotlib==2.2.3",
"https://github.com/albermax/innvestigate/archive/1.0.7.tar.gz",
"lime==0.1.1.31",
"numpy==1.14.0",
"scipy==1.1.0",
"pymongo==3.7.2",
"scikit_image==0.14.0",
"scikit_image==0.14.2",
"Pillow==5.4.1",
"opencv-python==4.0.0.21",
"numpy==1.17.0",
"resampy",
"flask"

@@ -419,11 +419,15 @@ public void checkPythonInstallation()

public static int startExplanationBackend()
{

Process process = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo();

try
{
Process process = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.WindowStyle = ProcessWindowStyle.Hidden;


startInfo.WindowStyle = (Properties.Settings.Default.EnablePythonDebug == true) ? ProcessWindowStyle.Normal : ProcessWindowStyle.Hidden;
startInfo.FileName = "\"" + AppDomain.CurrentDomain.BaseDirectory + "python\\python.exe" + "\"";
startInfo.Arguments = "\"" + AppDomain.CurrentDomain.BaseDirectory + "PythonScripts\\explanation_backend.py" + "\"";
process.StartInfo = startInfo;
@@ -61,7 +61,12 @@
<Label Grid.Row="14" Content="Check for updates on startup:" />
<CheckBox Grid.Row="15" Name="UpdatesCheckbox" Margin="5,0,5,5" />
<Label Grid.Row="16" Content="Enable Python extensions (requires restart):" />
<CheckBox Grid.Row="17" Name="EnablePythonCheckbox" Margin="5,0,5,5" />
<Grid Grid.Row="17">
<CheckBox Grid.Row="0" Grid.Column="0" Name="EnablePythonCheckbox" Margin="5,0,5,5" />
<Label Grid.Row="0" Grid.Column="1" Content="Debug Mode" Margin="240,-7,0,0"/>
<CheckBox Grid.Row="0" Grid.Column="2" Name="EnablePythonDebugCheckbox" Margin="220,0,5,5" />
</Grid>


</Grid>
</TabItem>
@@ -41,6 +41,7 @@ public Settings()
DBPassword.Password = MainHandler.Decode(Properties.Settings.Default.MongoDBPass);
DBConnnect.IsChecked = Properties.Settings.Default.DatabaseAutoLogin;
EnablePythonCheckbox.IsChecked = Properties.Settings.Default.EnablePython;
EnablePythonDebugCheckbox.IsChecked = Properties.Settings.Default.EnablePythonDebug;
UpdatesCheckbox.IsChecked = Properties.Settings.Default.CheckUpdateOnStart;
OverwriteAnnotation.IsChecked = Properties.Settings.Default.DatabaseAskBeforeOverwrite;
DownloadDirectory.Text = Properties.Settings.Default.DatabaseDirectory;
@@ -119,6 +120,11 @@ public bool EnablePython()
return (EnablePythonCheckbox.IsChecked == true);
}

public bool EnablePythonDebug()
{
return (EnablePythonDebugCheckbox.IsChecked == true);
}


public bool DBAutoConnect()
{

Some generated files are not rendered by default. Learn more.

@@ -155,5 +155,8 @@
<Setting Name="CMLTempTrainerPath" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="EnablePythonDebug" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>
@@ -36,25 +36,25 @@
<value>/path/to/your/files/</value>
</setting>
<setting name="DataServerLogin" serializeAs="String">
<value/>
<value />
</setting>
<setting name="DataServerPass" serializeAs="String">
<value/>
<value />
</setting>
<setting name="DataServerConnectionType" serializeAs="String">
<value>sftp</value>
</setting>
<setting name="LastSessionId" serializeAs="String">
<value/>
<value />
</setting>
<setting name="DatabaseAddress" serializeAs="String">
<value>localhost:27017</value>
</setting>
<setting name="DatabaseName" serializeAs="String">
<value/>
<value />
</setting>
<setting name="DatabaseDirectory" serializeAs="String">
<value/>
<value />
</setting>
<setting name="DatabaseAutoLogin" serializeAs="String">
<value>False</value>
@@ -141,7 +141,7 @@
<value>null</value>
</setting>
<setting name="CMLDirectory" serializeAs="String">
<value/>
<value />
</setting>
<setting name="CMLTrainexeGitSha" serializeAs="String">
<value>00000000000000</value>
@@ -150,13 +150,13 @@
<value>False</value>
</setting>
<setting name="CMLDefaultChain" serializeAs="String">
<value/>
<value />
</setting>
<setting name="CMLDefaultAnnotatorPrediction" serializeAs="String">
<value/>
<value />
</setting>
<setting name="SettingCMLDefaultBN" serializeAs="String">
<value/>
<value />
</setting>
<setting name="DrawVideoWavform" serializeAs="String">
<value>False</value>
@@ -174,7 +174,10 @@
<value>False</value>
</setting>
<setting name="CMLTempTrainerPath" serializeAs="String">
<value/>
<value />
</setting>
<setting name="EnablePythonDebug" serializeAs="String">
<value>False</value>
</setting>
</ssi.Properties.Settings>
</userSettings>
BIN +512 Bytes (100%) bin/nova.exe
Binary file not shown.

0 comments on commit 9a19206

Please sign in to comment.
You can’t perform that action at this time.