lybic-guiagents 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of lybic-guiagents might be problematic. Click here for more details.
- desktop_env/__init__.py +1 -0
- desktop_env/actions.py +203 -0
- desktop_env/controllers/__init__.py +0 -0
- desktop_env/controllers/python.py +471 -0
- desktop_env/controllers/setup.py +882 -0
- desktop_env/desktop_env.py +509 -0
- desktop_env/evaluators/__init__.py +5 -0
- desktop_env/evaluators/getters/__init__.py +41 -0
- desktop_env/evaluators/getters/calc.py +15 -0
- desktop_env/evaluators/getters/chrome.py +1774 -0
- desktop_env/evaluators/getters/file.py +154 -0
- desktop_env/evaluators/getters/general.py +42 -0
- desktop_env/evaluators/getters/gimp.py +38 -0
- desktop_env/evaluators/getters/impress.py +126 -0
- desktop_env/evaluators/getters/info.py +24 -0
- desktop_env/evaluators/getters/misc.py +406 -0
- desktop_env/evaluators/getters/replay.py +20 -0
- desktop_env/evaluators/getters/vlc.py +86 -0
- desktop_env/evaluators/getters/vscode.py +35 -0
- desktop_env/evaluators/metrics/__init__.py +160 -0
- desktop_env/evaluators/metrics/basic_os.py +68 -0
- desktop_env/evaluators/metrics/chrome.py +493 -0
- desktop_env/evaluators/metrics/docs.py +1011 -0
- desktop_env/evaluators/metrics/general.py +665 -0
- desktop_env/evaluators/metrics/gimp.py +637 -0
- desktop_env/evaluators/metrics/libreoffice.py +28 -0
- desktop_env/evaluators/metrics/others.py +92 -0
- desktop_env/evaluators/metrics/pdf.py +31 -0
- desktop_env/evaluators/metrics/slides.py +957 -0
- desktop_env/evaluators/metrics/table.py +585 -0
- desktop_env/evaluators/metrics/thunderbird.py +176 -0
- desktop_env/evaluators/metrics/utils.py +719 -0
- desktop_env/evaluators/metrics/vlc.py +524 -0
- desktop_env/evaluators/metrics/vscode.py +283 -0
- desktop_env/providers/__init__.py +35 -0
- desktop_env/providers/aws/__init__.py +0 -0
- desktop_env/providers/aws/manager.py +278 -0
- desktop_env/providers/aws/provider.py +186 -0
- desktop_env/providers/aws/provider_with_proxy.py +315 -0
- desktop_env/providers/aws/proxy_pool.py +193 -0
- desktop_env/providers/azure/__init__.py +0 -0
- desktop_env/providers/azure/manager.py +87 -0
- desktop_env/providers/azure/provider.py +207 -0
- desktop_env/providers/base.py +97 -0
- desktop_env/providers/gcp/__init__.py +0 -0
- desktop_env/providers/gcp/manager.py +0 -0
- desktop_env/providers/gcp/provider.py +0 -0
- desktop_env/providers/virtualbox/__init__.py +0 -0
- desktop_env/providers/virtualbox/manager.py +463 -0
- desktop_env/providers/virtualbox/provider.py +124 -0
- desktop_env/providers/vmware/__init__.py +0 -0
- desktop_env/providers/vmware/manager.py +455 -0
- desktop_env/providers/vmware/provider.py +105 -0
- gui_agents/__init__.py +0 -0
- gui_agents/agents/Action.py +209 -0
- gui_agents/agents/__init__.py +0 -0
- gui_agents/agents/agent_s.py +832 -0
- gui_agents/agents/global_state.py +610 -0
- gui_agents/agents/grounding.py +651 -0
- gui_agents/agents/hardware_interface.py +129 -0
- gui_agents/agents/manager.py +568 -0
- gui_agents/agents/translator.py +132 -0
- gui_agents/agents/worker.py +355 -0
- gui_agents/cli_app.py +560 -0
- gui_agents/core/__init__.py +0 -0
- gui_agents/core/engine.py +1496 -0
- gui_agents/core/knowledge.py +449 -0
- gui_agents/core/mllm.py +555 -0
- gui_agents/tools/__init__.py +0 -0
- gui_agents/tools/tools.py +727 -0
- gui_agents/unit_test/__init__.py +0 -0
- gui_agents/unit_test/run_tests.py +65 -0
- gui_agents/unit_test/test_manager.py +330 -0
- gui_agents/unit_test/test_worker.py +269 -0
- gui_agents/utils/__init__.py +0 -0
- gui_agents/utils/analyze_display.py +301 -0
- gui_agents/utils/common_utils.py +263 -0
- gui_agents/utils/display_viewer.py +281 -0
- gui_agents/utils/embedding_manager.py +53 -0
- gui_agents/utils/image_axis_utils.py +27 -0
- lybic_guiagents-0.1.0.dist-info/METADATA +416 -0
- lybic_guiagents-0.1.0.dist-info/RECORD +85 -0
- lybic_guiagents-0.1.0.dist-info/WHEEL +5 -0
- lybic_guiagents-0.1.0.dist-info/licenses/LICENSE +201 -0
- lybic_guiagents-0.1.0.dist-info/top_level.txt +2 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
from .basic_os import (
|
|
2
|
+
check_gnome_favorite_apps,
|
|
3
|
+
is_utc_0,
|
|
4
|
+
check_text_enlarged,
|
|
5
|
+
check_moved_jpgs,
|
|
6
|
+
is_in_vm_clickboard
|
|
7
|
+
)
|
|
8
|
+
from .chrome import (
|
|
9
|
+
is_expected_tabs,
|
|
10
|
+
is_expected_bookmarks,
|
|
11
|
+
compare_pdfs,
|
|
12
|
+
compare_htmls,
|
|
13
|
+
compare_archive,
|
|
14
|
+
is_cookie_deleted,
|
|
15
|
+
is_shortcut_on_desktop,
|
|
16
|
+
check_font_size,
|
|
17
|
+
check_enabled_experiments,
|
|
18
|
+
check_history_deleted,
|
|
19
|
+
is_expected_search_query,
|
|
20
|
+
is_expected_active_tab,
|
|
21
|
+
is_expected_url_pattern_match,
|
|
22
|
+
is_added_to_steam_cart,
|
|
23
|
+
is_expected_installed_extensions,
|
|
24
|
+
compare_pdf_images,
|
|
25
|
+
is_expected_active_tab_approximate
|
|
26
|
+
)
|
|
27
|
+
from .docs import (
|
|
28
|
+
compare_font_names,
|
|
29
|
+
compare_subscript_contains,
|
|
30
|
+
has_page_numbers_in_footers,
|
|
31
|
+
compare_docx_lines,
|
|
32
|
+
evaluate_colored_words_in_tables,
|
|
33
|
+
check_highlighted_words,
|
|
34
|
+
evaluate_strike_through_last_paragraph,
|
|
35
|
+
evaluate_conversion,
|
|
36
|
+
evaluate_spacing,
|
|
37
|
+
check_italic_font_size_14,
|
|
38
|
+
evaluate_alignment,
|
|
39
|
+
get_unique_train_ids,
|
|
40
|
+
check_no_duplicates,
|
|
41
|
+
compare_init_lines,
|
|
42
|
+
find_default_font,
|
|
43
|
+
contains_page_break,
|
|
44
|
+
compare_docx_files,
|
|
45
|
+
compare_docx_tables,
|
|
46
|
+
compare_line_spacing,
|
|
47
|
+
compare_insert_equation,
|
|
48
|
+
compare_highlighted_text,
|
|
49
|
+
is_first_line_centered,
|
|
50
|
+
check_file_exists,
|
|
51
|
+
check_tabstops,
|
|
52
|
+
compare_contains_image,
|
|
53
|
+
compare_docx_files_and_ignore_new_lines,
|
|
54
|
+
compare_docx_images,
|
|
55
|
+
compare_image_text,
|
|
56
|
+
compare_references,
|
|
57
|
+
compare_unique_train_records
|
|
58
|
+
)
|
|
59
|
+
from .general import (
|
|
60
|
+
check_csv,
|
|
61
|
+
check_accessibility_tree,
|
|
62
|
+
run_sqlite3,
|
|
63
|
+
check_json,
|
|
64
|
+
check_list,
|
|
65
|
+
exact_match,
|
|
66
|
+
match_in_list,
|
|
67
|
+
is_in_list,
|
|
68
|
+
fuzzy_match,
|
|
69
|
+
check_include_exclude,
|
|
70
|
+
check_direct_json_object,
|
|
71
|
+
compare_time_in_speedtest_results,
|
|
72
|
+
is_included_all_json_objects,
|
|
73
|
+
is_gold_text_included_in_pdf,
|
|
74
|
+
check_line_number,
|
|
75
|
+
file_contains,
|
|
76
|
+
compare_terminal_and_txt,
|
|
77
|
+
fuzzy_place_math,
|
|
78
|
+
compare_python_pure_text,
|
|
79
|
+
diff_text_file,
|
|
80
|
+
literal_match
|
|
81
|
+
)
|
|
82
|
+
from .gimp import (
|
|
83
|
+
check_structure_sim_resized,
|
|
84
|
+
check_brightness_decrease_and_structure_sim,
|
|
85
|
+
check_contrast_increase_and_structure_sim,
|
|
86
|
+
check_saturation_increase_and_structure_sim,
|
|
87
|
+
check_image_size,
|
|
88
|
+
check_image_mirror,
|
|
89
|
+
check_palette_and_structure_sim,
|
|
90
|
+
check_textbox_on_leftside,
|
|
91
|
+
check_green_background,
|
|
92
|
+
check_file_exists_and_structure_sim,
|
|
93
|
+
check_triangle_position,
|
|
94
|
+
check_structure_sim,
|
|
95
|
+
check_config_status,
|
|
96
|
+
compare_image_list,
|
|
97
|
+
increase_saturation,
|
|
98
|
+
decrease_brightness,
|
|
99
|
+
check_file_exists,
|
|
100
|
+
compare_triangle_positions,
|
|
101
|
+
check_sharper,
|
|
102
|
+
check_image_file_size
|
|
103
|
+
)
|
|
104
|
+
from .libreoffice import check_libre_locale
|
|
105
|
+
from .others import compare_epub, check_mp3_meta
|
|
106
|
+
from .pdf import check_pdf_pages
|
|
107
|
+
from .slides import (
|
|
108
|
+
check_presenter_console_disable,
|
|
109
|
+
check_image_stretch_and_center,
|
|
110
|
+
check_slide_numbers_color,
|
|
111
|
+
compare_pptx_files,
|
|
112
|
+
check_strikethrough,
|
|
113
|
+
check_slide_orientation_Portrait,
|
|
114
|
+
evaluate_presentation_fill_to_rgb_distance,
|
|
115
|
+
check_left_panel,
|
|
116
|
+
check_transition,
|
|
117
|
+
check_page_number_colors,
|
|
118
|
+
check_auto_saving_time
|
|
119
|
+
)
|
|
120
|
+
from .table import (
|
|
121
|
+
compare_table,
|
|
122
|
+
compare_csv,
|
|
123
|
+
compare_conference_city_in_order
|
|
124
|
+
)
|
|
125
|
+
from .thunderbird import (
|
|
126
|
+
check_thunderbird_prefs,
|
|
127
|
+
check_thunderbird_filter,
|
|
128
|
+
check_thunderbird_folder
|
|
129
|
+
)
|
|
130
|
+
from .vlc import (
|
|
131
|
+
is_vlc_playing,
|
|
132
|
+
is_vlc_recordings_folder,
|
|
133
|
+
is_vlc_fullscreen,
|
|
134
|
+
compare_images,
|
|
135
|
+
compare_audios,
|
|
136
|
+
compare_videos,
|
|
137
|
+
check_qt_bgcone,
|
|
138
|
+
check_one_instance_when_started_from_file,
|
|
139
|
+
check_qt_minimal_view,
|
|
140
|
+
check_qt_max_volume,
|
|
141
|
+
check_qt_slider_colours,
|
|
142
|
+
check_global_key_play_pause
|
|
143
|
+
)
|
|
144
|
+
from .vscode import (
|
|
145
|
+
compare_text_file,
|
|
146
|
+
compare_config,
|
|
147
|
+
compare_answer,
|
|
148
|
+
compare_result_files,
|
|
149
|
+
is_extension_installed,
|
|
150
|
+
check_json_settings,
|
|
151
|
+
check_json_keybindings,
|
|
152
|
+
check_python_file_by_test_suite,
|
|
153
|
+
check_python_file_by_gold_file,
|
|
154
|
+
check_html_background_image,
|
|
155
|
+
compare_zip_files
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
def infeasible():
|
|
160
|
+
pass
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
def check_gnome_favorite_apps(apps_str: str, rule):
|
|
2
|
+
# parse the string like "['thunderbird.desktop', 'vim.desktop', 'google-chrome.desktop']"
|
|
3
|
+
# to a list of strings
|
|
4
|
+
apps = eval(apps_str)
|
|
5
|
+
|
|
6
|
+
expected_apps = rule["expected"]
|
|
7
|
+
|
|
8
|
+
if len(apps) != len(expected_apps):
|
|
9
|
+
return 0
|
|
10
|
+
|
|
11
|
+
if set(apps) == set(expected_apps):
|
|
12
|
+
return 1
|
|
13
|
+
else:
|
|
14
|
+
return 0
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def is_utc_0(timedatectl_output):
|
|
18
|
+
"""
|
|
19
|
+
Format as:
|
|
20
|
+
Local time: Thu 2024-01-25 12:56:06 WET
|
|
21
|
+
Universal time: Thu 2024-01-25 12:56:06 UTC
|
|
22
|
+
RTC time: Thu 2024-01-25 12:56:05
|
|
23
|
+
Time zone: Atlantic/Faroe (WET, +0000)
|
|
24
|
+
System clock synchronized: yes
|
|
25
|
+
NTP service: inactive
|
|
26
|
+
RTC in local TZ: no
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
utc_line = timedatectl_output.split("\n")[3]
|
|
30
|
+
|
|
31
|
+
if utc_line.endswith("+0000)"):
|
|
32
|
+
return 1
|
|
33
|
+
else:
|
|
34
|
+
return 0
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def check_text_enlarged(scaling_factor_str):
|
|
38
|
+
scaling_factor = float(scaling_factor_str)
|
|
39
|
+
if scaling_factor > 1.0:
|
|
40
|
+
return 1
|
|
41
|
+
else:
|
|
42
|
+
return 0
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def check_moved_jpgs(directory_list, rule):
|
|
46
|
+
expected_jpgs = rule["expected"]
|
|
47
|
+
moved_jpgs = [node['name'] for node in directory_list['children']]
|
|
48
|
+
|
|
49
|
+
if len(moved_jpgs) != len(expected_jpgs):
|
|
50
|
+
return 0
|
|
51
|
+
|
|
52
|
+
if set(moved_jpgs) == set(expected_jpgs):
|
|
53
|
+
return 1
|
|
54
|
+
else:
|
|
55
|
+
return 0
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def is_in_vm_clickboard(config, terminal_output):
|
|
59
|
+
print("terminal_output: ")
|
|
60
|
+
print(terminal_output)
|
|
61
|
+
print("config: ")
|
|
62
|
+
print(config)
|
|
63
|
+
expected_results = config["expected"]
|
|
64
|
+
# check if terminal_output has expected results
|
|
65
|
+
if not isinstance(expected_results, list):
|
|
66
|
+
return 1 if expected_results in terminal_output else 0
|
|
67
|
+
else:
|
|
68
|
+
return 1 if all(result in terminal_output for result in expected_results) else 0
|