Skip to content

Commit

Permalink
Merge pull request #98 from Integration-Automation/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
JE-Chen committed Jul 13, 2023
2 parents 7d87e37 + 431fbaa commit 9797191
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .idea/je_editor.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 3 additions & 26 deletions architecture_diagram/JEditor_Architecture.drawio
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<mxfile host="app.diagrams.net" modified="2023-04-29T07:56:36.885Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.58" etag="Fhgo0RM2uOXEcV0mK-Oj" version="21.2.3" type="google">
<mxfile host="app.diagrams.net" modified="2023-07-12T08:45:38.864Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.67" etag="-P9zqWgmDWChbq2yXCfQ" version="21.6.2" type="google">
<diagram name="第 1 页" id="JA7bx-cvKyCeYck-8diK">
<mxGraphModel grid="1" page="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
Expand Down Expand Up @@ -31,9 +31,6 @@
<mxCell id="pkGpSB-2TPf8HDVI0NpQ-152" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="pkGpSB-2TPf8HDVI0NpQ-148" target="pkGpSB-2TPf8HDVI0NpQ-151">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="pkGpSB-2TPf8HDVI0NpQ-157" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="pkGpSB-2TPf8HDVI0NpQ-148" target="pkGpSB-2TPf8HDVI0NpQ-156">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="pkGpSB-2TPf8HDVI0NpQ-148" value="CodeEditor" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#42E0FF;fontFamily=Times New Roman;fontSize=20;" vertex="1" parent="1">
<mxGeometry x="1379" y="-590" width="260" height="50" as="geometry" />
</mxCell>
Expand All @@ -46,9 +43,6 @@
<mxCell id="pkGpSB-2TPf8HDVI0NpQ-155" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="pkGpSB-2TPf8HDVI0NpQ-153" target="pkGpSB-2TPf8HDVI0NpQ-154">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="pkGpSB-2TPf8HDVI0NpQ-158" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="pkGpSB-2TPf8HDVI0NpQ-153" target="pkGpSB-2TPf8HDVI0NpQ-156">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="pkGpSB-2TPf8HDVI0NpQ-153" value="Code Result" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#42E0FF;fontFamily=Times New Roman;fontSize=20;" vertex="1" parent="1">
<mxGeometry x="1880" y="-584" width="260" height="50" as="geometry" />
</mxCell>
Expand All @@ -58,9 +52,6 @@
<mxCell id="pkGpSB-2TPf8HDVI0NpQ-156" value="Pyside6" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#7075FF;fontFamily=Times New Roman;fontSize=20;" vertex="1" parent="1">
<mxGeometry x="2170" y="-740" width="260" height="50" as="geometry" />
</mxCell>
<mxCell id="pkGpSB-2TPf8HDVI0NpQ-160" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="pkGpSB-2TPf8HDVI0NpQ-159" target="pkGpSB-2TPf8HDVI0NpQ-156">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="pkGpSB-2TPf8HDVI0NpQ-162" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="pkGpSB-2TPf8HDVI0NpQ-159" target="pkGpSB-2TPf8HDVI0NpQ-161">
<mxGeometry relative="1" as="geometry" />
</mxCell>
Expand All @@ -70,15 +61,9 @@
<mxCell id="pkGpSB-2TPf8HDVI0NpQ-161" value="Global Color" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#42E0FF;fontFamily=Times New Roman;fontSize=20;" vertex="1" parent="1">
<mxGeometry x="880" y="-405" width="260" height="50" as="geometry" />
</mxCell>
<mxCell id="pkGpSB-2TPf8HDVI0NpQ-164" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="pkGpSB-2TPf8HDVI0NpQ-163" target="pkGpSB-2TPf8HDVI0NpQ-156">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="pkGpSB-2TPf8HDVI0NpQ-163" value="Global Color" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#42E0FF;fontFamily=Times New Roman;fontSize=20;" vertex="1" parent="1">
<mxGeometry x="550" y="-584" width="260" height="50" as="geometry" />
</mxCell>
<mxCell id="pkGpSB-2TPf8HDVI0NpQ-166" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="pkGpSB-2TPf8HDVI0NpQ-165" target="pkGpSB-2TPf8HDVI0NpQ-156">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="pkGpSB-2TPf8HDVI0NpQ-165" value="File Dialog" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#42E0FF;fontFamily=Times New Roman;fontSize=20;" vertex="1" parent="1">
<mxGeometry x="220" y="-584" width="260" height="50" as="geometry" />
</mxCell>
Expand All @@ -88,14 +73,6 @@
<mxCell id="pkGpSB-2TPf8HDVI0NpQ-170" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="pkGpSB-2TPf8HDVI0NpQ-167" target="pkGpSB-2TPf8HDVI0NpQ-148">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="pkGpSB-2TPf8HDVI0NpQ-171" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="pkGpSB-2TPf8HDVI0NpQ-167" target="pkGpSB-2TPf8HDVI0NpQ-153">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="1740" y="-795" />
<mxPoint x="1740" y="-559" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="pkGpSB-2TPf8HDVI0NpQ-173" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="pkGpSB-2TPf8HDVI0NpQ-167" target="pkGpSB-2TPf8HDVI0NpQ-163">
<mxGeometry relative="1" as="geometry">
<Array as="points">
Expand All @@ -114,10 +91,10 @@
</Array>
</mxGeometry>
</mxCell>
<mxCell id="pkGpSB-2TPf8HDVI0NpQ-177" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="pkGpSB-2TPf8HDVI0NpQ-167" target="pkGpSB-2TPf8HDVI0NpQ-156">
<mxCell id="pkGpSB-2TPf8HDVI0NpQ-178" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="pkGpSB-2TPf8HDVI0NpQ-175" target="pkGpSB-2TPf8HDVI0NpQ-156">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="pkGpSB-2TPf8HDVI0NpQ-178" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="pkGpSB-2TPf8HDVI0NpQ-175" target="pkGpSB-2TPf8HDVI0NpQ-156">
<mxCell id="KIuu_TPc8f_R1Z2XDZIL-1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.75;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="pkGpSB-2TPf8HDVI0NpQ-167" target="pkGpSB-2TPf8HDVI0NpQ-153">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="pkGpSB-2TPf8HDVI0NpQ-167" value="Main UI Setting" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#42E0FF;fontFamily=Times New Roman;fontSize=20;" vertex="1" parent="1">
Expand Down
Binary file modified architecture_diagram/JEditor_Architecture.drawio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion dev.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "je_editor_dev"
version = "0.0.124"
version = "0.0.125"
authors = [
{ name = "JE-Chen", email = "jechenmailman@gmail.com" },
]
Expand Down
15 changes: 15 additions & 0 deletions je_editor/pyside_ui/code_process/code_exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import sys
from pathlib import Path
from threading import Thread
from typing import List

from PySide6.QtCore import QTimer
from PySide6.QtWidgets import QMainWindow, QTextEdit
Expand All @@ -14,6 +15,19 @@
from je_editor.utils.venv_check.check_venv import check_and_choose_venv


class RunInstanceManager(object):

def __init__(self):
self.instance_list: List[subprocess.Popen] = list()

def close_all_instance(self):
for process in self.instance_list:
process.terminate()


run_instance_manager = RunInstanceManager()


class ExecManager(object):

def __init__(
Expand Down Expand Up @@ -99,6 +113,7 @@ def exec_code(self, exec_file_name) -> None:
self.timer.setInterval(1)
self.timer.timeout.connect(self.pull_text)
self.timer.start()
run_instance_manager.instance_list.append(self.process)
except Exception as error:
self.code_result.setTextColor(error_color)
self.code_result.append(str(error))
Expand Down
4 changes: 2 additions & 2 deletions je_editor/pyside_ui/menu/menu_bar/run_menu/build_run_menu.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from PySide6.QtGui import QAction, QKeySequence, Qt
from PySide6.QtWidgets import QMainWindow, QMessageBox

from je_editor.pyside_ui.code_process.code_exec import exec_manage, ExecManager
from je_editor.pyside_ui.code_process.code_exec import ExecManager, run_instance_manager
from je_editor.pyside_ui.file_dialog.save_file_dialog import choose_file_get_save_file_path
from je_editor.pyside_ui.shell_process.shell_exec import ShellManager

Expand Down Expand Up @@ -74,7 +74,7 @@ def shell_exec(ui_we_want_to_set: QMainWindow) -> None:


def stop_program() -> None:
exec_manage.exit_program()
run_instance_manager.close_all_instance()


def clean_result(ui_we_want_to_set: QMainWindow) -> None:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "je_editor"
version = "0.0.119"
version = "0.0.120"
authors = [
{ name = "JE-Chen", email = "jechenmailman@gmail.com" },
]
Expand Down

0 comments on commit 9797191

Please sign in to comment.