Merge branch 'zdy'
This commit is contained in:
@@ -392,17 +392,13 @@ if __name__ == '__main__':
|
||||
logger.addHandler(stdout_handler)
|
||||
logger.addHandler(sdebug_handler)
|
||||
|
||||
path1 = "../../任务数据/LibreOffice Calc/Multiply_Time_Number.xlsx"
|
||||
path2 = "../../任务数据/LibreOffice Calc/Multiply_Time_Number_gold.xlsx"
|
||||
rules = [{"type": "check_cell"
|
||||
, "sheet_idx": 0
|
||||
, "coordinate": "E3"
|
||||
, "props": {"value": {"method": "approx:0.001"
|
||||
, "ref": 191.6667
|
||||
}
|
||||
}
|
||||
path1 = "snapshots/test/cache/4e6fcf72-daf3-439f-a232-c434ce416af6/Employee_Age_By_Birthday.xlsx"
|
||||
path2 = "snapshots/test/cache/4e6fcf72-daf3-439f-a232-c434ce416af6/Employee_Age_By_Birthday_gold.xlsx"
|
||||
rules = [ { "type": "sheet_data"
|
||||
, "sheet_idx0": 0
|
||||
, "sheet_idx1": "EI0"
|
||||
}
|
||||
]
|
||||
]
|
||||
print(compare_table(path1, path2
|
||||
, rules=rules
|
||||
)
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
|
||||
@@ -69,6 +69,12 @@
|
||||
"/home/user/Represent_in_millions_billions.xlsx"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
|
||||
@@ -50,12 +50,70 @@
|
||||
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "download",
|
||||
"parameters": {
|
||||
"files": [
|
||||
{
|
||||
"url": "https://drive.usercontent.google.com/download?id=1sRI72UGfHiVBRFuV4uwhr173u3Sf46Y6&export=download&authuser=0&confirm=t&uuid=90da5e2b-39c0-449d-b753-09dfed73b509&at=APZUnTVFInccKo2QB9JNnIidFfG3:1705909465173",
|
||||
"path": "/home/user/Employee_Age_By_Birthday_gold.xlsx"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "open",
|
||||
"parameters": {
|
||||
"path": "/home/user/Employee_Age_By_Birthday_gold.xlsx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "activate_window",
|
||||
"parameters": {
|
||||
"window_name": "Employee_Age_By_Birthday_gold.xlsx - LibreOffice Calc",
|
||||
"strict": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "execute",
|
||||
"parameters": {
|
||||
"command": [
|
||||
"python",
|
||||
"-c",
|
||||
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
"expected": {
|
||||
"type": "cloud_file",
|
||||
"path": "https://drive.usercontent.google.com/download?id=1sRI72UGfHiVBRFuV4uwhr173u3Sf46Y6&export=download&authuser=0&confirm=t&uuid=90da5e2b-39c0-449d-b753-09dfed73b509&at=APZUnTVFInccKo2QB9JNnIidFfG3:1705909465173",
|
||||
"type": "vm_file",
|
||||
"path": "/home/user/Employee_Age_By_Birthday_gold.xlsx",
|
||||
"dest": "Employee_Age_By_Birthday_gold.xlsx"
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -69,6 +69,12 @@
|
||||
"/home/user/Padding_Decimals_In_Formular.xlsx"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
|
||||
@@ -69,6 +69,12 @@
|
||||
"/home/user/Keep_Two_decimal_points.xlsx"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "a01fbce3-2793-461f-ab86-43680ccbae25",
|
||||
"snapshot": "libreoffice_calc",
|
||||
"instruction": "I need to set the decimal separator as a comma (,) for localized data representation and clarity in visualization. Can you assist with this?",
|
||||
"instruction": "I need to set the decimal separator as a comma (,) for localized data representation and clarity in visualization. Can you help me to update all the numbers in the sheet? Also please keep the decimal numbers as-is.",
|
||||
"source": "https://superuser.com/questions/1250677/how-to-set-decimal-separator-in-libre-office-calc",
|
||||
"config": [
|
||||
{
|
||||
@@ -69,6 +69,12 @@
|
||||
"/home/user/Set_Decimal_Separator_Dot.xlsx"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"parameters": {
|
||||
"seconds": 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"func": "compare_table",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import ctypes
|
||||
#import ctypes
|
||||
import datetime
|
||||
import json
|
||||
import logging
|
||||
@@ -131,8 +131,10 @@ def main(example_class, example_id):
|
||||
example = json.load(f)
|
||||
example["snapshot"] = "exp_v1"
|
||||
|
||||
logger.info("TASK: %s/%s", example_class, example_id)
|
||||
|
||||
api_key = os.environ.get("OPENAI_API_KEY")
|
||||
agent = GPT4v_Agent(api_key=api_key, model=gpt4_model, instruction=example['instruction'],
|
||||
agent = GPT4v_Agent(api_key=api_key, model=gpt4_model, max_tokens=1000, instruction=example['instruction'],
|
||||
action_space=action_space, exp="som")
|
||||
|
||||
# api_key = os.environ.get("GENAI_API_KEY")
|
||||
|
||||
Reference in New Issue
Block a user