Compare commits

..

3 Commits

Author SHA1 Message Date
SwiftyOS
0571eb33e6 bump python version 2024-05-09 10:32:46 +02:00
SwiftyOS
d07dd42776 fix: linting 2024-05-09 10:24:04 +02:00
SwiftyOS
557894e6c1 fixed benchmark dependecy issue 2024-05-09 09:36:37 +02:00
12 changed files with 3483 additions and 3201 deletions

View File

@@ -34,7 +34,7 @@ jobs:
fail-fast: false
timeout-minutes: 20
env:
min-python-version: '3.10'
min-python-version: '3.12'
steps:
- name: Checkout repository
uses: actions/checkout@v4

File diff suppressed because one or more lines are too long

View File

@@ -64,6 +64,8 @@ spacy = "^3.0.0"
tenacity = "^8.2.2"
tiktoken = "^0.5.0"
webdriver-manager = "*"
click-default-group = "^1.2.4"
# OpenAI and Generic plugins import
openapi-python-client = "^0.14.0"

File diff suppressed because it is too large Load Diff

View File

@@ -28,6 +28,7 @@ agbenchmark = { path = "../../benchmark", optional = true }
# agbenchmark = {git = "https://github.com/Significant-Gravitas/AutoGPT.git", subdirectory = "benchmark", optional = true}
webdriver-manager = "^4.0.1"
google-cloud-storage = "^2.13.0"
click-default-group = "^1.2.4"
[tool.poetry.extras]
benchmark = ["agbenchmark"]

View File

@@ -18,7 +18,9 @@ class TestPasswordGenerator(unittest.TestCase):
def test_password_content(self):
password = password_generator.generate_password()
self.assertTrue(any(c.isdigit() for c in password))
self.assertTrue(any(c in password_generator.string.punctuation for c in password))
self.assertTrue(
any(c in password_generator.string.punctuation for c in password)
)
if __name__ == "__main__":

View File

@@ -1,17 +1,17 @@
from sample_code import multiply_int
# from sample_code import multiply_int
def test_multiply_int(num: int, multiplier, expected_result: int) -> None:
result = multiply_int(num, multiplier)
print(result)
assert (
result == expected_result
), f"AssertionError: Expected the output to be {expected_result}"
# def test_multiply_int(num: int, multiplier, expected_result: int) -> None:
# result = multiply_int(num, multiplier)
# print(result)
# assert (
# result == expected_result
# ), f"AssertionError: Expected the output to be {expected_result}"
if __name__ == "__main__":
# create a trivial test that has 4 as the num, and 2 as the multiplier. Make sure to fill in the expected result
num =
multiplier =
expected_result =
test_multiply_int()
# if __name__ == "__main__":
# # create a trivial test that has 4 as the num, and 2 as the multiplier. Make sure to fill in the expected result
# num =
# multiplier =
# expected_result =
# test_multiply_int()

View File

@@ -1,7 +1,5 @@
from typing import List
from import
def test_two_sum(nums: List, target: int, expected_result: List[int]) -> None:
result = two_sum(nums, target)

View File

@@ -21,7 +21,6 @@ def generate_password(length: int = 8) -> str:
if __name__ == "__main__":
password_length = (
int(sys.argv[sys.argv.index("--length") + 1])
if "--length" in sys.argv else 8
int(sys.argv[sys.argv.index("--length") + 1]) if "--length" in sys.argv else 8
)
print(generate_password(password_length))

View File

@@ -18,7 +18,9 @@ class TestPasswordGenerator(unittest.TestCase):
def test_password_content(self):
password = password_generator.generate_password()
self.assertTrue(any(c.isdigit() for c in password))
self.assertTrue(any(c in password_generator.string.punctuation for c in password))
self.assertTrue(
any(c in password_generator.string.punctuation for c in password)
)
if __name__ == "__main__":

View File

@@ -1,7 +1,13 @@
from typing import Dict
from abstract_class import (AbstractBattleship, Game, GameStatus,
ShipPlacement, Turn, TurnResponse)
from abstract_class import (
AbstractBattleship,
Game,
GameStatus,
ShipPlacement,
Turn,
TurnResponse,
)
class Battleship(AbstractBattleship):

View File

@@ -258,7 +258,8 @@ class WebArenaChallengeSpec(BaseModel):
f"{' and '.join(s.base_url for s in sites)}.\n\n"
+ "\n".join(
s.additional_info.format(url=s.base_url)
for s in sites if s.additional_info
for s in sites
if s.additional_info
)
).strip()
@@ -462,7 +463,7 @@ class WebArenaChallenge(BaseChallenge):
def load_webarena_challenges(
skip_unavailable: bool = True
skip_unavailable: bool = True,
) -> Iterator[type[WebArenaChallenge]]:
logger.info("Loading WebArena challenges...")