-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
110 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
browsergym-core==0.1.0rc1 | ||
browsergym-core==0.1.0rc2 | ||
english-words>=2.0.1 | ||
numpy>=1.14 | ||
requests>=2.31 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
__version__ = "0.1.0rc1" | ||
__version__ = "0.1.0rc2" | ||
|
||
from browsergym.core.registration import register_task | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
src/browsergym/workarena/data_files/task_configs/create_change_request_task.json
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
src/browsergym/workarena/data_files/task_configs/create_hardware_asset_task.json
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
src/browsergym/workarena/data_files/task_configs/create_incident_task.json
Large diffs are not rendered by default.
Oops, something went wrong.
3 changes: 2 additions & 1 deletion
3
src/browsergym/workarena/data_files/task_configs/create_problem_task.json
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
src/browsergym/workarena/data_files/task_configs/create_user_task.json
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
src/browsergym/workarena/data_files/task_configs/filter_hardware_list_task.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
""" | ||
Tests that are not specific to any particular kind of task. | ||
""" | ||
|
||
import pytest | ||
import json | ||
import logging | ||
import random | ||
|
||
# bugfix: use same playwright instance in browsergym and pytest | ||
from utils import setup_playwright | ||
from playwright.sync_api import Page, TimeoutError | ||
from tenacity import retry, stop_after_attempt, retry_if_exception_type | ||
from browsergym.workarena.config import ORDER_APPLE_WATCH_TASK_CONFIG_PATH | ||
|
||
from browsergym.workarena.tasks.service_catalog import OrderAppleWatchTask | ||
from browsergym.workarena.tasks.scripts.validate import validate_configs | ||
|
||
|
||
@retry( | ||
stop=stop_after_attempt(2), | ||
retry=retry_if_exception_type(TimeoutError), | ||
reraise=True, | ||
before_sleep=lambda _: logging.info("Retrying due to a TimeoutError..."), | ||
) | ||
def test_validate_configs(page: Page): | ||
failed_tasks = validate_configs( | ||
OrderAppleWatchTask, | ||
ORDER_APPLE_WATCH_TASK_CONFIG_PATH, | ||
num_tasks=2, | ||
save_failed_tasks=False, | ||
page=page, | ||
) | ||
assert len(failed_tasks) == 0 |