-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 1023-ruff-linting-for-python-code
# Conflicts: # tests/core/default/test_steps.py
- Loading branch information
Showing
24 changed files
with
1,405 additions
and
971 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
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
Empty file.
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,56 @@ | ||
from dataclasses import dataclass, field | ||
from pathlib import Path | ||
|
||
from gpt_engineer.core.project_config import read_config | ||
|
||
|
||
@dataclass | ||
class AppsConfig: | ||
active: bool | None = True | ||
test_start_index: int | None = 0 | ||
test_end_index: int | None = 1 | ||
train_start_index: int | None = 0 | ||
train_end_index: int | None = 0 | ||
|
||
|
||
@dataclass | ||
class MbppConfig: | ||
active: bool | None = True | ||
test_len: int | None = 1 | ||
train_len: int | None = 0 | ||
|
||
|
||
@dataclass | ||
class GptmeConfig: | ||
active: bool | None = True | ||
|
||
|
||
@dataclass | ||
class GptengConfig: | ||
active: bool | None = True | ||
|
||
|
||
@dataclass | ||
class BenchConfig: | ||
"""Configuration for the GPT Engineer CLI and gptengineer.app via `gpt-engineer.toml`.""" | ||
|
||
apps: AppsConfig = field(default_factory=AppsConfig) | ||
mbpp: MbppConfig = field(default_factory=MbppConfig) | ||
gptme: GptmeConfig = field(default_factory=GptmeConfig) | ||
gpteng: GptengConfig = field(default_factory=GptengConfig) | ||
|
||
@classmethod | ||
def from_toml(cls, config_file: Path | str): | ||
if isinstance(config_file, str): | ||
config_file = Path(config_file) | ||
config_dict = read_config(config_file) | ||
return cls.from_dict(config_dict) | ||
|
||
@classmethod | ||
def from_dict(cls, config_dict: dict): | ||
return cls( | ||
apps=AppsConfig(**config_dict.get("apps", {})), | ||
mbpp=MbppConfig(**config_dict.get("mbpp", {})), | ||
gptme=GptmeConfig(**config_dict.get("gptme", {})), | ||
gpteng=GptengConfig(**config_dict.get("gpteng", {})), | ||
) |
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
Oops, something went wrong.