Skip to content

Commit b536cb2

Browse files
committed
Update dev version
* Improve Code * Add comments * Add MacOS & Ubuntu GitHub Actions
1 parent 8f3a09a commit b536cb2

File tree

63 files changed

+2807
-1867
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+2807
-1867
lines changed
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: AutoControl Stable MacOS Python3.12
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
schedule:
9+
- cron: "0 1 * * *"
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
build_stable_version:
16+
runs-on: macos-latest
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Set up Python 3.12
21+
uses: actions/setup-python@v3
22+
with:
23+
python-version: "3.12"
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip wheel
27+
pip install -r requirements.txt
28+
29+
- name: Test Screen Module
30+
run: python ./test/unit_test/screen/screen_test.py
31+
- name: Test Screenshot
32+
run: python ./test/unit_test/screen/screenshot_test.py
33+
- name: Test Screen Get Pixel
34+
run: python ./test/unit_test/screen/get_pixel_test.py
35+
- name: Save Screenshot Image
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: screenshot_png
39+
path: test.png
40+
41+
- name: Test Keyboard type Function
42+
run: python ./test/unit_test/keyboard/keyboard_type_test.py
43+
- name: Test Keyboard write Function
44+
run: |
45+
python ./test/unit_test/keyboard/keyboard_write_test.py
46+
- name: Test Keyboard is_press Function
47+
run: python ./test/unit_test/keyboard/keyboard_is_press_test.py
48+
- name: Test Keyboard hotkey Function
49+
run: python ./test/unit_test/keyboard/hotkey_test.py
50+
51+
- name: Test Mouse Module
52+
run: python ./test/unit_test/mouse/mouse_test.py
53+
- name: Test Scroll Module
54+
run: python ./test/unit_test/exception/auto_control_exception_test.py
55+
56+
- name: Test Exceptions
57+
run: python ./test/unit_test/exception/auto_control_exception_test.py
58+
59+
- name: Test Critical Exit
60+
run: python ./test/unit_test/critical_exit/critical_exit_test.py
61+
- name: Test Real Critical Situation
62+
run: |
63+
python ./test/unit_test/critical_exit/real_critical_test.py
64+
exit 0
65+
66+
- name: Test Record Module
67+
run: python ./test/unit_test/record/record_test.py
68+
- name: Test Total Record
69+
run: python ./test/unit_test/total_record/total_record_test.py
70+
71+
- name: Test Execute Action
72+
run: python ./test/unit_test/execute_action/execute_action_test.py
73+
74+
- name: Test Json Module
75+
run: python ./test/unit_test/json/json_test.py
76+
- name: Test Generate Json Report
77+
run: python ./test/unit_test/generate_report/json_report.py
78+
- name: Test Timeout Module
79+
run: python ./test/unit_test/timeout/timeout_test.py
80+
- name: Test Generate HTML Report
81+
run: python ./test/unit_test/generate_report/html_report_test.py
82+
83+
- name: Test Argparse
84+
run: python ./test/unit_test/argparse/argparse_test.py
85+
86+
- name: Test Callback Module
87+
run: python ./test/unit_test/callback/callback_test.py
88+
89+
- name: Test Create Project Function
90+
run: python ./test/unit_test/create_project_file/create_project_test.py
91+
92+
- name: Test Get Mouse Info
93+
run: python ./test/unit_test/get_info/mouse_info.py
94+
- name: Test Get Special Info
95+
run: python ./test/unit_test/get_info/special_info.py
96+
- name: Test Get Keyboard Info
97+
run: python ./test/unit_test/get_info/keyboard_info.py
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: AutoControl Stable Python3.12
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
schedule:
9+
- cron: "0 1 * * *"
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
build_stable_version:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Set up Python 3.12
21+
uses: actions/setup-python@v3
22+
with:
23+
python-version: "3.12"
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip wheel
27+
pip install -r requirements.txt
28+
29+
- name: Test Screen Module
30+
run: python ./test/unit_test/screen/screen_test.py
31+
- name: Test Screenshot
32+
run: python ./test/unit_test/screen/screenshot_test.py
33+
- name: Test Screen Get Pixel
34+
run: python ./test/unit_test/screen/get_pixel_test.py
35+
- name: Save Screenshot Image
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: screenshot_png
39+
path: test.png
40+
41+
- name: Test Keyboard type Function
42+
run: python ./test/unit_test/keyboard/keyboard_type_test.py
43+
- name: Test Keyboard write Function
44+
run: |
45+
python ./test/unit_test/keyboard/keyboard_write_test.py
46+
- name: Test Keyboard is_press Function
47+
run: python ./test/unit_test/keyboard/keyboard_is_press_test.py
48+
- name: Test Keyboard hotkey Function
49+
run: python ./test/unit_test/keyboard/hotkey_test.py
50+
51+
- name: Test Mouse Module
52+
run: python ./test/unit_test/mouse/mouse_test.py
53+
- name: Test Scroll Module
54+
run: python ./test/unit_test/exception/auto_control_exception_test.py
55+
56+
- name: Test Exceptions
57+
run: python ./test/unit_test/exception/auto_control_exception_test.py
58+
59+
- name: Test Critical Exit
60+
run: python ./test/unit_test/critical_exit/critical_exit_test.py
61+
- name: Test Real Critical Situation
62+
run: |
63+
python ./test/unit_test/critical_exit/real_critical_test.py
64+
exit 0
65+
66+
- name: Test Record Module
67+
run: python ./test/unit_test/record/record_test.py
68+
- name: Test Total Record
69+
run: python ./test/unit_test/total_record/total_record_test.py
70+
71+
- name: Test Execute Action
72+
run: python ./test/unit_test/execute_action/execute_action_test.py
73+
74+
- name: Test Json Module
75+
run: python ./test/unit_test/json/json_test.py
76+
- name: Test Generate Json Report
77+
run: python ./test/unit_test/generate_report/json_report.py
78+
- name: Test Timeout Module
79+
run: python ./test/unit_test/timeout/timeout_test.py
80+
- name: Test Generate HTML Report
81+
run: python ./test/unit_test/generate_report/html_report_test.py
82+
83+
- name: Test Argparse
84+
run: python ./test/unit_test/argparse/argparse_test.py
85+
86+
- name: Test Callback Module
87+
run: python ./test/unit_test/callback/callback_test.py
88+
89+
- name: Test Create Project Function
90+
run: python ./test/unit_test/create_project_file/create_project_test.py
91+
92+
- name: Test Get Mouse Info
93+
run: python ./test/unit_test/get_info/mouse_info.py
94+
- name: Test Get Special Info
95+
run: python ./test/unit_test/get_info/special_info.py
96+
- name: Test Get Keyboard Info
97+
run: python ./test/unit_test/get_info/keyboard_info.py

.idea/workspace.xml

Lines changed: 22 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

je_auto_control/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
from je_auto_control.wrapper.auto_control_mouse import click_mouse
9797
from je_auto_control.wrapper.auto_control_mouse import get_mouse_position
9898
from je_auto_control.wrapper.auto_control_mouse import mouse_keys_table
99-
from je_auto_control.wrapper.auto_control_mouse import mouse_scroll
99+
from je_auto_control.wrapper.auto_control_mouse import mouse_scroll_error_message
100100
from je_auto_control.wrapper.auto_control_mouse import press_mouse
101101
from je_auto_control.wrapper.auto_control_mouse import release_mouse
102102
from je_auto_control.wrapper.auto_control_mouse import send_mouse_event_to_window
@@ -112,7 +112,7 @@
112112

113113
__all__ = [
114114
"click_mouse", "mouse_keys_table", "get_mouse_position", "press_mouse", "release_mouse",
115-
"mouse_scroll", "set_mouse_position", "special_mouse_keys_table",
115+
"mouse_scroll_error_message", "set_mouse_position", "special_mouse_keys_table",
116116
"keyboard_keys_table", "press_keyboard_key", "release_keyboard_key", "type_keyboard", "check_key_is_press",
117117
"write", "hotkey", "start_exe", "get_keyboard_keys_table",
118118
"screen_size", "screenshot", "locate_all_image", "locate_image_center", "locate_and_click",

je_auto_control/__main__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import sys
55

66
from je_auto_control.utils.exception.exception_tags import \
7-
argparse_get_wrong_data
7+
argparse_get_wrong_data_error_message
88
from je_auto_control.utils.exception.exceptions import \
99
AutoControlArgparseException
1010
from je_auto_control.utils.executor.action_executor import execute_action
@@ -62,7 +62,7 @@ def preprocess_read_str_execute_action(execute_str: str):
6262
if value is not None:
6363
argparse_event_dict.get(key)(value)
6464
if all(value is None for value in args.values()):
65-
raise AutoControlArgparseException(argparse_get_wrong_data)
65+
raise AutoControlArgparseException(argparse_get_wrong_data_error_message)
6666
except Exception as error:
6767
print(repr(error), file=sys.stderr)
6868
sys.exit(1)

0 commit comments

Comments
 (0)