From 13e277e217ea085a0809145264d66d8b0be00593 Mon Sep 17 00:00:00 2001
From: Christoph Schmidt <christoph.,schmidt@tugraz.at>
Date: Wed, 22 Nov 2023 12:19:45 +0100
Subject: [PATCH] Updated import statements

---
 .idea/.gitignore                              |   8 --
 .idea/fileTemplates/internal/Python Script.py |   6 --
 .idea/lasercontrol.iml                        |   8 +-
 .idea/misc.xml                                |   4 +-
 .idea/workspace.xml                           | 102 ++++++++++++++++++
 __init__.py                                   |   6 --
 config.yaml                                   |   9 --
 examples/main.py                              |   3 +-
 pyproject.toml                                |   2 +-
 src/LaserControl/__init__.py                  |   9 ++
 src/LaserControl/controller/__init__.py       |   4 +
 src/LaserControl/model/__init__.py            |   4 +
 src/LaserControl/view/__init__.py             |   4 +
 13 files changed, 129 insertions(+), 40 deletions(-)
 delete mode 100644 .idea/.gitignore
 delete mode 100644 .idea/fileTemplates/internal/Python Script.py
 create mode 100644 .idea/workspace.xml
 delete mode 100644 __init__.py
 delete mode 100644 config.yaml
 create mode 100644 src/LaserControl/controller/__init__.py
 create mode 100644 src/LaserControl/model/__init__.py
 create mode 100644 src/LaserControl/view/__init__.py

diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index 13566b8..0000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Editor-based HTTP Client requests
-/httpRequests/
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml
diff --git a/.idea/fileTemplates/internal/Python Script.py b/.idea/fileTemplates/internal/Python Script.py
deleted file mode 100644
index 47b8d7d..0000000
--- a/.idea/fileTemplates/internal/Python Script.py	
+++ /dev/null
@@ -1,6 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
-Author(s): Christoph Schmidt <christoph.schmidt@tugraz.at>
-Created: 2023-10-19 12:35
-Package Version: 
-"""
diff --git a/.idea/lasercontrol.iml b/.idea/lasercontrol.iml
index ac810ac..2c80e12 100644
--- a/.idea/lasercontrol.iml
+++ b/.idea/lasercontrol.iml
@@ -2,15 +2,9 @@
 <module type="PYTHON_MODULE" version="4">
   <component name="NewModuleRootManager">
     <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/LaserControl" isTestSource="false" />
-      <excludeFolder url="file://$MODULE_DIR$/.venv_Chris_PC" />
-      <excludeFolder url="file://$MODULE_DIR$/src/LaserControlOld" />
       <excludeFolder url="file://$MODULE_DIR$/.venv" />
     </content>
-    <orderEntry type="jdk" jdkName="Python 3.11 (.venv312_al) (2)" jdkType="Python SDK" />
+    <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
   </component>
-  <component name="PackageRequirementsSettings">
-    <option name="removeUnused" value="true" />
-  </component>
 </module>
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 2ea015a..90f8897 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="Black">
-    <option name="sdkName" value="Python 3.12 (lasercontrol)" />
+    <option name="sdkName" value="Python 3.10 (lasercontrol) (2)" />
   </component>
-  <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11 (.venv312_al) (2)" project-jdk-type="Python SDK" />
+  <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (lasercontrol) (2)" project-jdk-type="Python SDK" />
 </project>
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..717bc93
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="AutoImportSettings">
+    <option name="autoReloadType" value="SELECTIVE" />
+  </component>
+  <component name="ChangeListManager">
+    <list default="true" id="a50ed504-7e8f-431b-bd6d-7011e1ba5ef6" name="Changes" comment="">
+      <change afterPath="$PROJECT_DIR$/src/LaserControl/controller/__init__.py" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/LaserControl/model/__init__.py" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/LaserControl/view/__init__.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/.gitignore" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/fileTemplates/internal/Python Script.py" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/lasercontrol.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/lasercontrol.iml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/examples/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/examples/main.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/LaserControl/__init__.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/LaserControl/__init__.py" afterDir="false" />
+    </list>
+    <option name="SHOW_DIALOG" value="false" />
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+    <option name="LAST_RESOLUTION" value="IGNORE" />
+  </component>
+  <component name="Git.Settings">
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
+  </component>
+  <component name="MarkdownSettingsMigration">
+    <option name="stateVersion" value="1" />
+  </component>
+  <component name="ProjectColorInfo"><![CDATA[{
+  "associatedIndex": 4
+}]]></component>
+  <component name="ProjectId" id="2YWpcvYpVcWaxnmlV5VcPRCDFRU" />
+  <component name="ProjectViewState">
+    <option name="hideEmptyMiddlePackages" value="true" />
+    <option name="showLibraryContents" value="true" />
+  </component>
+  <component name="PropertiesComponent"><![CDATA[{
+  "keyToString": {
+    "RunOnceActivity.OpenProjectViewOnStart": "true",
+    "RunOnceActivity.ShowReadmeOnStart": "true",
+    "WebServerToolWindowFactoryState": "true",
+    "ignore.virus.scanning.warn.message": "true",
+    "last_opened_file_path": "H:/ET PhD - Dokumente/Silicon Photonics/FlexSensor 6/flexsensor-public/lasercontrol/src/LaserControl/view",
+    "node.js.detected.package.eslint": "true",
+    "node.js.detected.package.tslint": "true",
+    "node.js.selected.package.eslint": "(autodetect)",
+    "node.js.selected.package.tslint": "(autodetect)",
+    "nodejs_package_manager_path": "npm",
+    "vue.rearranger.settings.migration": "true"
+  }
+}]]></component>
+  <component name="RecentsManager">
+    <key name="CopyFile.RECENT_KEYS">
+      <recent name="H:\ET PhD - Dokumente\Silicon Photonics\FlexSensor 6\flexsensor-public\lasercontrol\src\LaserControl\view" />
+      <recent name="H:\ET PhD - Dokumente\Silicon Photonics\FlexSensor 6\flexsensor-public\lasercontrol\src\LaserControl\model" />
+      <recent name="H:\ET PhD - Dokumente\Silicon Photonics\FlexSensor 6\flexsensor-public\lasercontrol\src\LaserControl\controller" />
+    </key>
+  </component>
+  <component name="RunManager">
+    <configuration name="main" type="PythonConfigurationType" factoryName="Python" nameIsGenerated="true">
+      <module name="lasercontrol" />
+      <option name="INTERPRETER_OPTIONS" value="" />
+      <option name="PARENT_ENVS" value="true" />
+      <envs>
+        <env name="PYTHONUNBUFFERED" value="1" />
+      </envs>
+      <option name="SDK_HOME" value="" />
+      <option name="SDK_NAME" value="Python 3.10 (lasercontrol) (2)" />
+      <option name="WORKING_DIRECTORY" value="" />
+      <option name="IS_MODULE_SDK" value="false" />
+      <option name="ADD_CONTENT_ROOTS" value="true" />
+      <option name="ADD_SOURCE_ROOTS" value="true" />
+      <EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
+      <option name="SCRIPT_NAME" value="$PROJECT_DIR$/examples/main.py" />
+      <option name="PARAMETERS" value="" />
+      <option name="SHOW_COMMAND_LINE" value="false" />
+      <option name="EMULATE_TERMINAL" value="false" />
+      <option name="MODULE_MODE" value="false" />
+      <option name="REDIRECT_INPUT" value="false" />
+      <option name="INPUT_FILE" value="" />
+      <method v="2" />
+    </configuration>
+  </component>
+  <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
+  <component name="TaskManager">
+    <task active="true" id="Default" summary="Default task">
+      <changelist id="a50ed504-7e8f-431b-bd6d-7011e1ba5ef6" name="Changes" comment="" />
+      <created>1700651272522</created>
+      <option name="number" value="Default" />
+      <option name="presentableId" value="Default" />
+      <updated>1700651272522</updated>
+      <workItem from="1700651273767" duration="559000" />
+    </task>
+    <servers />
+  </component>
+  <component name="TypeScriptGeneratedFilesManager">
+    <option name="version" value="3" />
+  </component>
+  <component name="com.intellij.coverage.CoverageDataManagerImpl">
+    <SUITE FILE_PATH="coverage/lasercontrol$main.coverage" NAME="main Coverage Results" MODIFIED="1700651871709" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="" />
+  </component>
+</project>
\ No newline at end of file
diff --git a/__init__.py b/__init__.py
deleted file mode 100644
index e7aafbe..0000000
--- a/__init__.py
+++ /dev/null
@@ -1,6 +0,0 @@
-import os
-
-if os.environ.get('LASER_SIM') == "TRUE":
-    pass
-else:
-    pass
diff --git a/config.yaml b/config.yaml
deleted file mode 100644
index f42d62a..0000000
--- a/config.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
-# - Configuration file stored 2023-11-09 17:17:22.414203 - 
-LaserConfig: #!!python/object:controller.LaserConfig
- wl_sweep_start: 840 # wl_sweep_start: None
- wl_sweep_stop: 850 # wl_sweep_stop: None
- velocity: 2.0 # velocity: None
- acceleration: 1.0 # acceleration: None
- deceleration: 1.0 # deceleration: None
- available_ports: ['USB0', 'USB1', 'USB2', 'USB3', 'USB4', 'USB5', 'USB6', 'USB7', 'USB8', 'USB9'] # available_ports: None
- port: "USB0" # port: None
diff --git a/examples/main.py b/examples/main.py
index 7030a7b..02ff701 100644
--- a/examples/main.py
+++ b/examples/main.py
@@ -3,7 +3,8 @@ import sys
 from rich.logging import RichHandler
 from PySide6.QtWidgets import QApplication
 
-from src import LaserControl as Laser
+sys.path.append('./src')
+import src.LaserControl as Laser
 
 if __name__ == "__main__":
     FORMAT = "%(message)s"
diff --git a/pyproject.toml b/pyproject.toml
index 8acf46d..69f9577 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [project]
 name = "lasercontrol"
-version = "0.0.1"
+version = "0.0.2"
 authors = [
   { name="Christoph Schmidt", email="cschmidt.fs@gmail.com" },
 ]
diff --git a/src/LaserControl/__init__.py b/src/LaserControl/__init__.py
index 8b13789..31ffe2c 100644
--- a/src/LaserControl/__init__.py
+++ b/src/LaserControl/__init__.py
@@ -1 +1,10 @@
+import os
+import sys
 
+sys.path.append(os.path.join(os.path.dirname(__file__), '../'))
+
+
+from .controller.LaserControlController import LaserControlController as Controller
+from .model.LaserControlModel import LaserControlModel as Model
+from .view.LaserControlView import LaserControlView as View
+from LaserConfig import LaserConfig as Config
\ No newline at end of file
diff --git a/src/LaserControl/controller/__init__.py b/src/LaserControl/controller/__init__.py
new file mode 100644
index 0000000..2930a2a
--- /dev/null
+++ b/src/LaserControl/controller/__init__.py
@@ -0,0 +1,4 @@
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(__file__), '../'))
\ No newline at end of file
diff --git a/src/LaserControl/model/__init__.py b/src/LaserControl/model/__init__.py
new file mode 100644
index 0000000..2930a2a
--- /dev/null
+++ b/src/LaserControl/model/__init__.py
@@ -0,0 +1,4 @@
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(__file__), '../'))
\ No newline at end of file
diff --git a/src/LaserControl/view/__init__.py b/src/LaserControl/view/__init__.py
new file mode 100644
index 0000000..2930a2a
--- /dev/null
+++ b/src/LaserControl/view/__init__.py
@@ -0,0 +1,4 @@
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(__file__), '../'))
\ No newline at end of file
-- 
GitLab