Skip to content

Commit

Permalink
Merge pull request #35 from JE-Chen/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
JE-Chen authored Jun 19, 2022
2 parents c526b1c + be1ba82 commit 017edff
Show file tree
Hide file tree
Showing 17 changed files with 823 additions and 169 deletions.
35 changes: 20 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
version: 2.1

orbs:
windows: circleci/windows@2.4.1
python: circleci/python@1.5.0
windows: circleci/windows@4.1.1
python: circleci/python@2.0.3

jobs:
build-and-test-windows-dev:
executor:
name: windows/default
shell: powershell.exe

steps:
- checkout
Expand Down Expand Up @@ -62,9 +61,11 @@ jobs:
- run:
command: python ./test/unit_test/record/record_test.py
name: record_test
- run:
command: python ./test/unit_test/total_record_test/total_record_test.py
name: total_record_test
# can't run this because circle ci bug
#- run:
# command: |
# python ./test/unit_test/total_record/total_record_test.py
# exit 0
# execute
- run:
command: python ./test/unit_test/execute_action/execute_action_test.py
Expand Down Expand Up @@ -99,9 +100,10 @@ jobs:
name: locate_image_center_test

# integrated_test
- run:
command: python ./test/integrated_test/total_record_and_html_report_test/total_record_and_html_report_test.py
name: total_record_and_html_report_test
# can't run this because circle ci bug
#- run:
# command: python ./test/integrated_test/total_record_and_html_report_test/total_record_and_html_report_test.py
# name: total_record_and_html_report_test
- run:
command: python ./test/integrated_test/get_dir_file_and_execute/get_dir_file_and_execute.py
name: get_dir_file_and_execute
Expand Down Expand Up @@ -163,9 +165,11 @@ jobs:
- run:
command: python ./test/unit_test/record/record_test.py
name: record_test
- run:
command: python ./test/unit_test/total_record_test/total_record_test.py
name: total_record_test
# can't run this because circle ci bug
#- run:
# command: |
# python ./test/unit_test/total_record/total_record_test.py
# exit 0
# execute
- run:
command: python ./test/unit_test/execute_action/execute_action_test.py
Expand Down Expand Up @@ -201,9 +205,10 @@ jobs:


# integrated_test
- run:
command: python ./test/integrated_test/total_record_and_html_report_test/total_record_and_html_report_test.py
name: total_record_and_html_report_test
# can't run this because circle ci bug
#- run:
# command: python ./test/integrated_test/total_record_and_html_report_test/total_record_and_html_report_test.py
# name: total_record_and_html_report_test
- run:
command: python ./test/integrated_test/get_dir_file_and_execute/get_dir_file_and_execute.py
name: get_dir_file_and_execute
Expand Down
18 changes: 18 additions & 0 deletions .idea/AutoControl.iml

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

13 changes: 1 addition & 12 deletions .idea/Python_JEAutoControl.iml

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

117 changes: 64 additions & 53 deletions .idea/workspace.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
je_auto_control_dev
pillow
wheel
twine
sphinx
sphinx
sphinx-rtd-theme
2 changes: 1 addition & 1 deletion dev_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="je_auto_control_dev",
version="0.0.21",
version="0.0.24",
author="JE-Chen",
author_email="zenmailman@gmail.com",
description="auto testing",
Expand Down
34 changes: 18 additions & 16 deletions je_auto_control/utils/executor/action_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,26 +73,28 @@ def execute_action(action_list: list) -> str:
"""
execute_record_string = ""
try:
if action_list is None:
if len(action_list) > 0 or type(action_list) is list:
pass
else:
raise AutoControlActionNullException(action_is_null_error)
for action in action_list:
try:
event = event_dict.get(action[0])
if len(action) == 2:
event(**action[1])
elif len(action) == 1:
event()
else:
raise AutoControlActionException(cant_execute_action_error)
except Exception as error:
print(repr(error), file=sys.stderr)
record_action_to_list("execute_action", None, repr(error))
temp_string = "execute: " + str(action)
print(temp_string)
execute_record_string = "".join([execute_record_string, temp_string + "\n"])
except Exception as error:
record_action_to_list("execute_action", action_list, repr(error))
print(repr(error), file=sys.stderr)
for action in action_list:
try:
event = event_dict.get(action[0])
if len(action) == 2:
event(**action[1])
elif len(action) == 1:
event()
else:
raise AutoControlActionException(cant_execute_action_error)
except Exception as error:
print(repr(error), file=sys.stderr)
record_action_to_list("execute_action", None, repr(error))
temp_string = "execute: " + str(action)
print(temp_string)
execute_record_string = "".join([execute_record_string, temp_string + "\n"])
return execute_record_string


Expand Down
File renamed without changes.
30 changes: 30 additions & 0 deletions licenses/Pillow_LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
The Python Imaging Library (PIL) is

Copyright © 1997-2011 by Secret Labs AB
Copyright © 1995-2011 by Fredrik Lundh

Pillow is the friendly PIL fork. It is

Copyright © 2010-2022 by Alex Clark and contributors

Like PIL, Pillow is licensed under the open source HPND License:

By obtaining, using, and/or copying this software and/or its associated
documentation, you agree that you have read, understood, and will comply
with the following terms and conditions:

Permission to use, copy, modify, and distribute this software and its
associated documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appears in all copies, and that
both that copyright notice and this permission notice appear in supporting
documentation, and that the name of Secret Labs AB or the author not be
used in advertising or publicity pertaining to distribution of the software
without specific, written prior permission.

SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR BE LIABLE FOR ANY SPECIAL,
INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
30 changes: 30 additions & 0 deletions licenses/numpy_LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Copyright (c) 2005-2022, NumPy Developers.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.

* Neither the name of the NumPy Developers nor the names of any
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21 changes: 21 additions & 0 deletions licenses/opencv_python_LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Olli-Pekka Heinisuo

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 017edff

Please sign in to comment.