Skip to content

Commit

Permalink
Merge pull request #70 from Integration-Automation/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
JE-Chen authored Sep 27, 2023
2 parents 33490f3 + f3dad15 commit 4976577
Show file tree
Hide file tree
Showing 8 changed files with 175 additions and 23 deletions.
35 changes: 20 additions & 15 deletions automation_editor/extend/process_executor/task_process_manager.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import os
import queue
import shutil
import subprocess
import sys
import threading
Expand All @@ -14,8 +12,6 @@
from je_editor.utils.venv_check.check_venv import check_and_choose_venv

from automation_editor.automation_editor_ui.show_code_window.code_window import CodeWindow
from automation_editor.utils.exception.exception_tags import compiler_not_found_error
from automation_editor.utils.exception.exceptions import ITEExecException


class TaskProcessManager(object):
Expand All @@ -24,7 +20,7 @@ def __init__(
main_window: CodeWindow,
task_done_trigger_function: typing.Callable = None,
error_trigger_function: typing.Callable = None,
program_buffer_size: int = 1024000,
program_buffer_size: int = 1024,
program_encoding: str = "utf-8"
):
super().__init__()
Expand Down Expand Up @@ -57,14 +53,18 @@ def renew_path(self) -> None:

def start_test_process(self, package: str, exec_str: str):
self.renew_path()
self.process = subprocess.Popen(
[
self.compiler_path,
"-m",
package,
"--execute_str",
exec_str
],
args = [
self.compiler_path,
"-m",
package,
"--execute_str",
exec_str
]
if sys.platform not in ["win32", "cygwin", "msys"]:
args = " ".join([f"{self.compiler_path}", f"-m {package}", "--execute_str", f"{exec_str}"])
print(args)
self.process: subprocess.Popen = subprocess.Popen(
args,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
shell=True
Expand Down Expand Up @@ -144,13 +144,18 @@ def print_and_clear_queue(self):

def read_program_output_from_process(self):
while self.still_run_program:
program_output_data = self.process.stdout.raw.read(self.program_buffer_size).decode(self.program_encoding)
self.process: subprocess.Popen
program_output_data = self.process.stdout.read(self.program_buffer_size).decode(self.program_encoding)
if self.process:
self.process.stdout.flush()
if program_output_data.strip() != "":
self.run_output_queue.put(program_output_data)

def read_program_error_output_from_process(self):
while self.still_run_program:
program_error_output_data = self.process.stderr.raw.read(self.program_buffer_size).decode(
program_error_output_data = self.process.stderr.read(self.program_buffer_size).decode(
self.program_encoding)
if self.process:
self.process.stderr.flush()
if program_error_output_data.strip() != "":
self.run_error_queue.put(program_error_output_data)
8 changes: 4 additions & 4 deletions stable.toml → dev.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Rename to build stable version
# This is stable version
# Rename to dev version
# This is dev version
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "automation_editor"
version = "0.0.32"
name = "automation_editor_dev"
version = "0.0.33"
authors = [
{ name = "JE-Chen", email = "jechenmailman@gmail.com" },
]
Expand Down
133 changes: 133 additions & 0 deletions exe/auto_py_to_exe_setting_linux.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
{
"version": "auto-py-to-exe-configuration_v1",
"pyinstallerOptions": [
{
"optionDest": "noconfirm",
"value": true
},
{
"optionDest": "filenames",
"value": "/home/jeffrey/Projects/AutomationIDE/exe/start_automation_editor.py"
},
{
"optionDest": "onefile",
"value": false
},
{
"optionDest": "console",
"value": false
},
{
"optionDest": "icon_file",
"value": "/home/jeffrey/Projects/AutomationIDE/exe/je_driver_icon.ico"
},
{
"optionDest": "name",
"value": "AutomationIDE"
},
{
"optionDest": "clean_build",
"value": false
},
{
"optionDest": "strip",
"value": false
},
{
"optionDest": "noupx",
"value": false
},
{
"optionDest": "disable_windowed_traceback",
"value": false
},
{
"optionDest": "uac_admin",
"value": false
},
{
"optionDest": "uac_uiaccess",
"value": false
},
{
"optionDest": "argv_emulation",
"value": false
},
{
"optionDest": "bootloader_ignore_signals",
"value": false
},
{
"optionDest": "datas",
"value": "/home/jeffrey/Projects/AutomationIDE/exe/je_driver_icon.ico:."
},
{
"optionDest": "datas",
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/yapf_third_party:yapf_third_party/"
},
{
"optionDest": "datas",
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/jupyter_client:jupyter_client/"
},
{
"optionDest": "datas",
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/jupyter_client-8.3.1.dist-info:jupyter_client-8.3.1.dist-info/"
},
{
"optionDest": "datas",
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/jupyter_core-5.3.1.dist-info:jupyter_core-5.3.1.dist-info/"
},
{
"optionDest": "datas",
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/jupyter_core:jupyter_core/"
},
{
"optionDest": "datas",
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/qtconsole-5.4.4.dist-info:qtconsole-5.4.4.dist-info/"
},
{
"optionDest": "datas",
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/qtconsole:qtconsole/"
},
{
"optionDest": "datas",
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/ipython-8.15.0.dist-info:ipython-8.15.0.dist-info/"
},
{
"optionDest": "datas",
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/IPython:IPython/"
},
{
"optionDest": "datas",
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/debugpy/_vendored/pydevd/pydev_ipython:pydev_ipython/"
},
{
"optionDest": "datas",
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/ipython_genutils-0.2.0.dist-info:ipython_genutils-0.2.0.dist-info/"
},
{
"optionDest": "datas",
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/ipython_genutils:ipython_genutils/"
},
{
"optionDest": "datas",
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/debugpy:debugpy/"
},
{
"optionDest": "datas",
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/parso:parso/"
},
{
"optionDest": "datas",
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/jedi:jedi/"
},
{
"optionDest": "pathex",
"value": "/home/jeffrey/Projects/AutomationIDE"
}
],
"nonPyinstallerOptions": {
"increaseRecursionLimit": true,
"manualArguments": ""
}
}
Binary file modified exe/automation_ide_setup_config.ifp
Binary file not shown.
5 changes: 5 additions & 0 deletions linux_package_source/automation_ide/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Package: AutomationIDE
Version: 1.0.0
Architecture: all
Description: AutomationIDE, python IDE with automation packages.
Maintainer: JE-Chen <jechenmailman@gmail.com>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Desktop Entry]
Version=1.0.0
Name=AutomationIDE
Comment="Python IDE with automation package"
Exec=/usr/lib/AutomationIDE
Icon=/usr/share/icons/je_driver_icon.ico
Terminal=False
Type=Application
Categories=Development
Binary file not shown.
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Rename to dev version
# This is dev version
# Rename to build stable version
# This is stable version
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "automation_editor_dev"
version = "0.0.32"
name = "automation_editor"
version = "0.0.33"
authors = [
{ name = "JE-Chen", email = "jechenmailman@gmail.com" },
]
Expand Down

0 comments on commit 4976577

Please sign in to comment.