bioguider 0.2.52__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.
- bioguider/__init__.py +0 -0
- bioguider/agents/__init__.py +0 -0
- bioguider/agents/agent_task.py +92 -0
- bioguider/agents/agent_tools.py +176 -0
- bioguider/agents/agent_utils.py +504 -0
- bioguider/agents/collection_execute_step.py +182 -0
- bioguider/agents/collection_observe_step.py +125 -0
- bioguider/agents/collection_plan_step.py +156 -0
- bioguider/agents/collection_task.py +184 -0
- bioguider/agents/collection_task_utils.py +142 -0
- bioguider/agents/common_agent.py +137 -0
- bioguider/agents/common_agent_2step.py +215 -0
- bioguider/agents/common_conversation.py +61 -0
- bioguider/agents/common_step.py +85 -0
- bioguider/agents/consistency_collection_step.py +102 -0
- bioguider/agents/consistency_evaluation_task.py +57 -0
- bioguider/agents/consistency_evaluation_task_utils.py +14 -0
- bioguider/agents/consistency_observe_step.py +110 -0
- bioguider/agents/consistency_query_step.py +77 -0
- bioguider/agents/dockergeneration_execute_step.py +186 -0
- bioguider/agents/dockergeneration_observe_step.py +154 -0
- bioguider/agents/dockergeneration_plan_step.py +158 -0
- bioguider/agents/dockergeneration_task.py +158 -0
- bioguider/agents/dockergeneration_task_utils.py +220 -0
- bioguider/agents/evaluation_installation_task.py +270 -0
- bioguider/agents/evaluation_readme_task.py +767 -0
- bioguider/agents/evaluation_submission_requirements_task.py +172 -0
- bioguider/agents/evaluation_task.py +206 -0
- bioguider/agents/evaluation_tutorial_task.py +169 -0
- bioguider/agents/evaluation_tutorial_task_prompts.py +187 -0
- bioguider/agents/evaluation_userguide_prompts.py +179 -0
- bioguider/agents/evaluation_userguide_task.py +154 -0
- bioguider/agents/evaluation_utils.py +127 -0
- bioguider/agents/identification_execute_step.py +181 -0
- bioguider/agents/identification_observe_step.py +104 -0
- bioguider/agents/identification_plan_step.py +140 -0
- bioguider/agents/identification_task.py +270 -0
- bioguider/agents/identification_task_utils.py +22 -0
- bioguider/agents/peo_common_step.py +64 -0
- bioguider/agents/prompt_utils.py +253 -0
- bioguider/agents/python_ast_repl_tool.py +69 -0
- bioguider/agents/rag_collection_task.py +130 -0
- bioguider/conversation.py +67 -0
- bioguider/database/code_structure_db.py +500 -0
- bioguider/database/summarized_file_db.py +146 -0
- bioguider/generation/__init__.py +39 -0
- bioguider/generation/benchmark_metrics.py +610 -0
- bioguider/generation/change_planner.py +189 -0
- bioguider/generation/document_renderer.py +157 -0
- bioguider/generation/llm_cleaner.py +67 -0
- bioguider/generation/llm_content_generator.py +1128 -0
- bioguider/generation/llm_injector.py +809 -0
- bioguider/generation/models.py +85 -0
- bioguider/generation/output_manager.py +74 -0
- bioguider/generation/repo_reader.py +37 -0
- bioguider/generation/report_loader.py +166 -0
- bioguider/generation/style_analyzer.py +36 -0
- bioguider/generation/suggestion_extractor.py +436 -0
- bioguider/generation/test_metrics.py +189 -0
- bioguider/managers/benchmark_manager.py +785 -0
- bioguider/managers/evaluation_manager.py +215 -0
- bioguider/managers/generation_manager.py +686 -0
- bioguider/managers/generation_test_manager.py +107 -0
- bioguider/managers/generation_test_manager_v2.py +525 -0
- bioguider/rag/__init__.py +0 -0
- bioguider/rag/config.py +117 -0
- bioguider/rag/data_pipeline.py +651 -0
- bioguider/rag/embedder.py +24 -0
- bioguider/rag/rag.py +138 -0
- bioguider/settings.py +103 -0
- bioguider/utils/code_structure_builder.py +59 -0
- bioguider/utils/constants.py +135 -0
- bioguider/utils/default.gitignore +140 -0
- bioguider/utils/file_utils.py +215 -0
- bioguider/utils/gitignore_checker.py +175 -0
- bioguider/utils/notebook_utils.py +117 -0
- bioguider/utils/pyphen_utils.py +73 -0
- bioguider/utils/python_file_handler.py +65 -0
- bioguider/utils/r_file_handler.py +551 -0
- bioguider/utils/utils.py +163 -0
- bioguider-0.2.52.dist-info/LICENSE +21 -0
- bioguider-0.2.52.dist-info/METADATA +51 -0
- bioguider-0.2.52.dist-info/RECORD +84 -0
- bioguider-0.2.52.dist-info/WHEEL +4 -0
bioguider/rag/rag.py
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from typing import Any, List, Tuple, Optional, Dict
|
|
3
|
+
from uuid import uuid4
|
|
4
|
+
import logging
|
|
5
|
+
import re
|
|
6
|
+
import adalflow as adal
|
|
7
|
+
from adalflow.core.types import (
|
|
8
|
+
Conversation,
|
|
9
|
+
DialogTurn,
|
|
10
|
+
UserQuery,
|
|
11
|
+
AssistantResponse,
|
|
12
|
+
)
|
|
13
|
+
from adalflow.components.retriever.faiss_retriever import FAISSRetriever
|
|
14
|
+
from adalflow.components.model_client.openai_client import OpenAIClient
|
|
15
|
+
from adalflow.components.model_client.azureai_client import AzureAIClient
|
|
16
|
+
from .config import configs, create_model_client, create_model_kwargs
|
|
17
|
+
from .data_pipeline import DatabaseManager
|
|
18
|
+
|
|
19
|
+
logger = logging.getLogger(__name__)
|
|
20
|
+
|
|
21
|
+
# Maximum token limit for embedding models
|
|
22
|
+
MAX_INPUT_TOKENS = 7500 # Safe threshold below 8192 token limit
|
|
23
|
+
|
|
24
|
+
class RAG(adal.Component):
|
|
25
|
+
"""RAG with one repo.
|
|
26
|
+
If you want to load a new repos, call prepare_retriever(repo_url_or_path) first."""
|
|
27
|
+
|
|
28
|
+
def __init__(self, use_s3: bool = False):
|
|
29
|
+
"""
|
|
30
|
+
Initialize the RAG component.
|
|
31
|
+
|
|
32
|
+
Args:
|
|
33
|
+
use_s3: Whether to use S3 for database storage (default: False)
|
|
34
|
+
"""
|
|
35
|
+
super().__init__()
|
|
36
|
+
|
|
37
|
+
self.embedder = adal.Embedder(
|
|
38
|
+
model_client=create_model_client(),
|
|
39
|
+
model_kwargs=create_model_kwargs(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
self.initialize_db_manager()
|
|
43
|
+
|
|
44
|
+
@property
|
|
45
|
+
def repo_dir(self):
|
|
46
|
+
if self.db_manager:
|
|
47
|
+
return self.db_manager.repo_dir
|
|
48
|
+
return None
|
|
49
|
+
|
|
50
|
+
def initialize_db_manager(self):
|
|
51
|
+
"""Initialize the database manager with local storage"""
|
|
52
|
+
self.db_manager = DatabaseManager()
|
|
53
|
+
self.transformed_doc_documents: list | None = None
|
|
54
|
+
self.transformed_code_documents: list | None = None
|
|
55
|
+
self.access_token: str | None = None
|
|
56
|
+
|
|
57
|
+
def initialize_repo(self, repo_url_or_path: str, access_token: str = None):
|
|
58
|
+
self.repo_url_or_path = repo_url_or_path
|
|
59
|
+
self.access_token = access_token
|
|
60
|
+
self.db_manager.reset_database_and_create_repo(repo_url_or_path, access_token)
|
|
61
|
+
|
|
62
|
+
def _prepare_retriever(self):
|
|
63
|
+
"""
|
|
64
|
+
Prepare the retriever for a repository.
|
|
65
|
+
Will load database from local storage if available.
|
|
66
|
+
"""
|
|
67
|
+
if self.transformed_code_documents is not None and self.transformed_doc_documents is not None:
|
|
68
|
+
# retrievers have been prepared
|
|
69
|
+
return
|
|
70
|
+
self.transformed_doc_documents, self.transformed_code_documents \
|
|
71
|
+
= self.db_manager.prepare_database()
|
|
72
|
+
logger.info(f"Loaded {len(self.transformed_doc_documents)} doc documents for retrieval")
|
|
73
|
+
logger.info(f"Loaded {len(self.transformed_code_documents)} code documents for retrieval")
|
|
74
|
+
self.doc_retriever = FAISSRetriever(
|
|
75
|
+
**configs["retriever"],
|
|
76
|
+
embedder=self.embedder,
|
|
77
|
+
documents=self.transformed_doc_documents,
|
|
78
|
+
document_map_func=lambda doc: doc.vector,
|
|
79
|
+
dimensions=256,
|
|
80
|
+
)
|
|
81
|
+
self.code_retriever = FAISSRetriever(
|
|
82
|
+
**configs["retriever"],
|
|
83
|
+
embedder=self.embedder,
|
|
84
|
+
documents=self.transformed_code_documents,
|
|
85
|
+
document_map_func=lambda doc: doc.vector,
|
|
86
|
+
dimensions=256,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
def query_doc(self, query: str) -> List:
|
|
90
|
+
"""
|
|
91
|
+
Process a query using RAG.
|
|
92
|
+
|
|
93
|
+
Args:
|
|
94
|
+
query: The user's query
|
|
95
|
+
|
|
96
|
+
Returns:
|
|
97
|
+
retrieved_documents: List of documents retrieved based on the query
|
|
98
|
+
"""
|
|
99
|
+
self._prepare_retriever()
|
|
100
|
+
retrieved_documents = self.doc_retriever(query)
|
|
101
|
+
# Fill in the documents
|
|
102
|
+
retrieved_documents[0].documents = [
|
|
103
|
+
self.transformed_doc_documents[doc_index]
|
|
104
|
+
for doc_index in retrieved_documents[0].doc_indices
|
|
105
|
+
]
|
|
106
|
+
return retrieved_documents
|
|
107
|
+
|
|
108
|
+
def query_code(self, query: str) -> List:
|
|
109
|
+
"""
|
|
110
|
+
Process a code query using RAG.
|
|
111
|
+
|
|
112
|
+
Args:
|
|
113
|
+
query: The user's code query
|
|
114
|
+
|
|
115
|
+
Returns:
|
|
116
|
+
retrieved_documents: List of code documents retrieved based on the query
|
|
117
|
+
"""
|
|
118
|
+
try:
|
|
119
|
+
retrieved_documents = self.code_retriever(query)
|
|
120
|
+
# Fill in the documents
|
|
121
|
+
retrieved_documents[0].documents = [
|
|
122
|
+
self.transformed_code_documents[doc_index]
|
|
123
|
+
for doc_index in retrieved_documents[0].doc_indices
|
|
124
|
+
]
|
|
125
|
+
except Exception as e:
|
|
126
|
+
logger.error(e)
|
|
127
|
+
raise e
|
|
128
|
+
return retrieved_documents
|
|
129
|
+
|
|
130
|
+
@property
|
|
131
|
+
def save_repo_dir(self) -> str:
|
|
132
|
+
"""
|
|
133
|
+
Get the directory where the repository is saved.
|
|
134
|
+
|
|
135
|
+
Returns:
|
|
136
|
+
str: The path to the repository directory
|
|
137
|
+
"""
|
|
138
|
+
return self.db_manager.repo_paths["save_repo_dir"]
|
bioguider/settings.py
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
from enum import StrEnum
|
|
2
|
+
from typing import Optional
|
|
3
|
+
|
|
4
|
+
from iso639 import Language, LanguageNotFoundError
|
|
5
|
+
from pydantic import (
|
|
6
|
+
DirectoryPath,
|
|
7
|
+
Field,
|
|
8
|
+
HttpUrl,
|
|
9
|
+
PositiveFloat,
|
|
10
|
+
PositiveInt,
|
|
11
|
+
SecretStr,
|
|
12
|
+
field_validator,
|
|
13
|
+
)
|
|
14
|
+
from pydantic_settings import BaseSettings
|
|
15
|
+
from pathlib import Path
|
|
16
|
+
|
|
17
|
+
class ProjectSettings(BaseSettings):
|
|
18
|
+
target_repo: DirectoryPath = "" # type: ignore
|
|
19
|
+
hierarchy_name: str = ".project_doc_record"
|
|
20
|
+
markdown_docs_name: str = "markdown_docs"
|
|
21
|
+
ignore_list: list[str] = []
|
|
22
|
+
language: str = "English"
|
|
23
|
+
max_thread_count: PositiveInt = 4
|
|
24
|
+
|
|
25
|
+
@field_validator("language")
|
|
26
|
+
@classmethod
|
|
27
|
+
def validate_language_code(cls, v: str) -> str:
|
|
28
|
+
try:
|
|
29
|
+
language_name = Language.match(v).name
|
|
30
|
+
return language_name # Returning the resolved language name
|
|
31
|
+
except LanguageNotFoundError:
|
|
32
|
+
raise ValueError(
|
|
33
|
+
"Invalid language input. Please enter a valid ISO 639 code or language name."
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
class ChatCompletionSettings(BaseSettings):
|
|
37
|
+
model: str = "gpt-4o-mini" # NOTE: No model restrictions for user flexibility, but it's recommended to use models with a larger context window.
|
|
38
|
+
temperature: PositiveFloat = 0.2
|
|
39
|
+
request_timeout: PositiveInt = 60
|
|
40
|
+
openai_base_url: str = "https://api.openai.com/v1"
|
|
41
|
+
openai_api_key: SecretStr = Field("", exclude=True)
|
|
42
|
+
|
|
43
|
+
@field_validator("openai_base_url", mode="before")
|
|
44
|
+
@classmethod
|
|
45
|
+
def convert_base_url_to_str(cls, openai_base_url: HttpUrl) -> str:
|
|
46
|
+
return str(openai_base_url)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class Setting(BaseSettings):
|
|
50
|
+
project: ProjectSettings = {} # type: ignore
|
|
51
|
+
chat_completion: ChatCompletionSettings = {} # type: ignore
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class SettingsManager:
|
|
55
|
+
_setting_instance: Optional[Setting] = (
|
|
56
|
+
None # Private class attribute, initially None
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def get_setting(cls):
|
|
61
|
+
if cls._setting_instance is None:
|
|
62
|
+
cls._setting_instance = Setting()
|
|
63
|
+
return cls._setting_instance
|
|
64
|
+
|
|
65
|
+
@classmethod
|
|
66
|
+
def initialize_with_params(
|
|
67
|
+
cls,
|
|
68
|
+
target_repo: Path,
|
|
69
|
+
markdown_docs_name: str,
|
|
70
|
+
hierarchy_name: str,
|
|
71
|
+
ignore_list: list[str],
|
|
72
|
+
language: str,
|
|
73
|
+
max_thread_count: int,
|
|
74
|
+
model: str,
|
|
75
|
+
temperature: float,
|
|
76
|
+
request_timeout: int,
|
|
77
|
+
openai_base_url: str,
|
|
78
|
+
):
|
|
79
|
+
project_settings = ProjectSettings(
|
|
80
|
+
target_repo=target_repo,
|
|
81
|
+
hierarchy_name=hierarchy_name,
|
|
82
|
+
markdown_docs_name=markdown_docs_name,
|
|
83
|
+
ignore_list=ignore_list,
|
|
84
|
+
language=language,
|
|
85
|
+
max_thread_count=max_thread_count,
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
chat_completion_settings = ChatCompletionSettings(
|
|
89
|
+
model=model,
|
|
90
|
+
temperature=temperature,
|
|
91
|
+
request_timeout=request_timeout,
|
|
92
|
+
openai_base_url=openai_base_url,
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
cls._setting_instance = Setting(
|
|
96
|
+
project=project_settings,
|
|
97
|
+
chat_completion=chat_completion_settings,
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
if __name__ == "__main__":
|
|
102
|
+
setting = SettingsManager.get_setting()
|
|
103
|
+
print(setting.model_dump())
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
import logging
|
|
3
|
+
|
|
4
|
+
from bioguider.utils.r_file_handler import RFileHandler
|
|
5
|
+
|
|
6
|
+
from .gitignore_checker import GitignoreChecker
|
|
7
|
+
from .python_file_handler import PythonFileHandler
|
|
8
|
+
from ..database.code_structure_db import CodeStructureDb
|
|
9
|
+
from ..rag.config import configs
|
|
10
|
+
|
|
11
|
+
logger = logging.getLogger(__name__)
|
|
12
|
+
|
|
13
|
+
class CodeStructureBuilder:
|
|
14
|
+
def __init__(
|
|
15
|
+
self,
|
|
16
|
+
repo_path: str | Path,
|
|
17
|
+
gitignore_path: str | Path,
|
|
18
|
+
code_structure_db: CodeStructureDb,
|
|
19
|
+
):
|
|
20
|
+
self.repo_path = str(repo_path)
|
|
21
|
+
self.gitignore_checker = GitignoreChecker(
|
|
22
|
+
directory=repo_path,
|
|
23
|
+
gitignore_path=str(gitignore_path),
|
|
24
|
+
exclude_dir_patterns=configs["file_filters"]["excluded_dirs"],
|
|
25
|
+
exclude_file_patterns=configs["file_filters"]["excluded_files"],
|
|
26
|
+
)
|
|
27
|
+
self.file_handler = PythonFileHandler(repo_path)
|
|
28
|
+
self.code_structure_db = code_structure_db
|
|
29
|
+
|
|
30
|
+
def build_code_structure(self):
|
|
31
|
+
if self.code_structure_db.is_database_built():
|
|
32
|
+
return
|
|
33
|
+
files = self.gitignore_checker.check_files_and_folders()
|
|
34
|
+
for file in files:
|
|
35
|
+
if not file.endswith(".py") and not file.endswith(".R"):
|
|
36
|
+
continue
|
|
37
|
+
logger.info(f"Building code structure for {file}")
|
|
38
|
+
if file.endswith(".py"):
|
|
39
|
+
file_handler = PythonFileHandler(Path(self.repo_path) / file)
|
|
40
|
+
else:
|
|
41
|
+
file_handler = RFileHandler(Path(self.repo_path) / file)
|
|
42
|
+
try:
|
|
43
|
+
functions_and_classes = file_handler.get_functions_and_classes()
|
|
44
|
+
except Exception as e:
|
|
45
|
+
logger.error(f"Error getting functions and classes for {file}: {e}")
|
|
46
|
+
continue
|
|
47
|
+
# fixme: currently, we don't extract reference graph for each function or class
|
|
48
|
+
for function_or_class in functions_and_classes:
|
|
49
|
+
self.code_structure_db.insert_code_structure(
|
|
50
|
+
function_or_class[0], # name
|
|
51
|
+
file,
|
|
52
|
+
function_or_class[2], # start line number
|
|
53
|
+
function_or_class[3], # end line number
|
|
54
|
+
function_or_class[1], # parent name
|
|
55
|
+
function_or_class[4], # doc string
|
|
56
|
+
function_or_class[5], # params
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
|
|
2
|
+
from enum import Enum
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from pydantic import BaseModel, Field
|
|
6
|
+
|
|
7
|
+
DEFAULT_TOKEN_USAGE = {
|
|
8
|
+
"total_tokens": 0,
|
|
9
|
+
"completion_tokens": 0,
|
|
10
|
+
"prompt_tokens": 0,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class ProjectTypeEnum(Enum):
|
|
14
|
+
application="application"
|
|
15
|
+
package="package"
|
|
16
|
+
pipeline="pipeline"
|
|
17
|
+
unknown="unknown type"
|
|
18
|
+
|
|
19
|
+
class PrimaryLanguageEnum(Enum):
|
|
20
|
+
python="python"
|
|
21
|
+
R="R"
|
|
22
|
+
unknown="unknown type"
|
|
23
|
+
|
|
24
|
+
class ProjectMetadata:
|
|
25
|
+
def __init__(
|
|
26
|
+
self,
|
|
27
|
+
url: str,
|
|
28
|
+
project_type: ProjectTypeEnum,
|
|
29
|
+
primary_language: PrimaryLanguageEnum,
|
|
30
|
+
repo_name: str=None,
|
|
31
|
+
owner: Optional[str]=None,
|
|
32
|
+
description: Optional[str]=None,
|
|
33
|
+
license: Optional[str]=None,
|
|
34
|
+
):
|
|
35
|
+
self.url = url
|
|
36
|
+
self.project_type = project_type
|
|
37
|
+
self.primary_language = primary_language
|
|
38
|
+
self.repo_name = repo_name
|
|
39
|
+
self.owner = owner
|
|
40
|
+
self.description = description
|
|
41
|
+
self.license = license
|
|
42
|
+
|
|
43
|
+
MAX_FILE_LENGTH=10 *1024 # 10K
|
|
44
|
+
MAX_SENTENCE_NUM=20
|
|
45
|
+
MAX_STEP_COUNT=3*10
|
|
46
|
+
|
|
47
|
+
class ProjectLevelEvaluationREADMEResult(BaseModel):
|
|
48
|
+
project_level: Optional[bool]=Field(description="A boolean value specifying if the README file is **project-level** README. TRUE: project-level, FALSE, folder-level")
|
|
49
|
+
|
|
50
|
+
class StructuredEvaluationREADMEResult(BaseModel):
|
|
51
|
+
available_score: Optional[bool]=Field(description="A boolean value, Is the README accessible and present?")
|
|
52
|
+
readability_score: Optional[int]=Field(description="A number between 0 and 100 representing the readability quality rating.")
|
|
53
|
+
readability_error_count: Optional[int]=Field(default=0, description="Total number of errors found (typos + links + markdown + bio_terms + grammar)")
|
|
54
|
+
readability_errors_found: Optional[list[str]]=Field(default_factory=list, description="List of ALL errors found with format: 'ERROR_TYPE | original text snippet | suggested fix'")
|
|
55
|
+
readability_suggestions: Optional[str]=Field(description="General suggestions to improve readability if necessary")
|
|
56
|
+
project_purpose_score: Optional[bool]=Field(description="A boolean value. Is the project's goal or function clearly stated?")
|
|
57
|
+
project_purpose_suggestions: Optional[str]=Field(description="Suggestions if not clear")
|
|
58
|
+
hardware_and_software_spec_score: Optional[int]=Field(description="A number between 0 and 100 representing the hardware and software spec and compatibility description quality rating.")
|
|
59
|
+
hardware_and_software_spec_suggestions: Optional[str]=Field(description="Suggestions if not clear")
|
|
60
|
+
dependency_score: Optional[int]=Field(description="A number between 0 and 100 representing the dependencies quality rating.")
|
|
61
|
+
dependency_suggestions: Optional[str]=Field(description="Suggestions if dependencies are not clearly stated")
|
|
62
|
+
license_score: Optional[bool]=Field(description="A boolean value, Are contributor or maintainer details provided?")
|
|
63
|
+
license_suggestions: Optional[str]=Field(description="Suggestions to improve license information")
|
|
64
|
+
contributor_author_score: Optional[bool]=Field(description="A boolean value. are contributors or author included?")
|
|
65
|
+
overall_score: int=Field(description="A number between 0 and 100 representing the overall quality rating.")
|
|
66
|
+
|
|
67
|
+
class FreeProjectLevelEvaluationREADMEResult(BaseModel):
|
|
68
|
+
available: Optional[list[str]]=Field(description="markdown texts including newlines that contains detailed assessment and detailed suggestion for the availability of the README file")
|
|
69
|
+
readability: Optional[list[str]]=Field(description="markdown texts including newlines that contains detailed assessment and detailed suggestion for the readability of the README file")
|
|
70
|
+
project_purpose: Optional[list[str]]=Field(description="markdown texts including newlines that contains detailed assessment and detailed suggestion for the project purpose of the README file")
|
|
71
|
+
hardware_and_software_spec: Optional[list[str]]=Field(description="markdown texts including newlines that contains detailed assessment and detailed suggestion for the hardware and software spec and compatibility description of the README file")
|
|
72
|
+
dependency: Optional[list[str]]=Field(description="markdown texts including newlines that contains detailed assessment and detailed suggestion for the dependencies of the README file")
|
|
73
|
+
license: Optional[list[str]]=Field(description="markdown texts including newlines that contains detailed assessment and detailed suggestion for the license information of the README file")
|
|
74
|
+
contributor_author: Optional[list[str]]=Field(description="markdown texts including newlines that contains detailed assessment and detailed suggestion for the contributor and author information of the README file")
|
|
75
|
+
overall_score: Optional[list[str]]=Field(description="markdown texts including newlines that contains detailed assessment and detailed suggestion for the overall score of the README file")
|
|
76
|
+
|
|
77
|
+
class FreeFolderLevelEvaluationREADMEResult(BaseModel):
|
|
78
|
+
score: Optional[str]=Field(description="An overall score")
|
|
79
|
+
key_strengths: Optional[str]=Field(description="A string specifying the key strengths of README file.")
|
|
80
|
+
overall_improvement_suggestions: Optional[list[str]]=Field(description="A list of overall improvement suggestions")
|
|
81
|
+
|
|
82
|
+
class EvaluationREADMEResult(BaseModel):
|
|
83
|
+
project_level: bool
|
|
84
|
+
structured_evaluation: StructuredEvaluationREADMEResult | None
|
|
85
|
+
free_evaluation: FreeProjectLevelEvaluationREADMEResult | FreeFolderLevelEvaluationREADMEResult | None
|
|
86
|
+
structured_reasoning_process: str | None
|
|
87
|
+
free_reasoning_process: str | None
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
class StructuredEvaluationInstallationResult(BaseModel):
|
|
91
|
+
install_available: Optional[bool]=Field(description="A boolean value. Is the installation documents accessible and present?")
|
|
92
|
+
install_tutorial: Optional[bool]=Field(description="A boolean value. Is the installation tutorial provided?")
|
|
93
|
+
dependency_number: Optional[int]=Field(description="A number. It is the number of dependencies that are required to install.")
|
|
94
|
+
dependency_suggestions: Optional[str]=Field(description="A string value. It is the specific improvements if necessary, such as missing dependencies")
|
|
95
|
+
compatible_os: Optional[bool]=Field(description="A boolean value. Is compatible operating system described?")
|
|
96
|
+
overall_score: Optional[int]=Field(description="A number between 0 and 100 representing the overall quality rating.")
|
|
97
|
+
hardware_requirements: Optional[bool]=Field(description="A boolean value. Is the hardware requirements described?")
|
|
98
|
+
|
|
99
|
+
class FreeEvaluationInstallationResult(BaseModel):
|
|
100
|
+
ease_of_access: Optional[list[str]]=Field(description="markdown texts including newlines that contains detailed assessment and detailed suggestions for the ease of access of the installation information")
|
|
101
|
+
clarity_of_dependency: Optional[list[str]]=Field(description="markdown texts including newlines that contains detailed assessment and detailed suggestions for the clarity of dependency specification")
|
|
102
|
+
hardware_requirements: Optional[list[str]]=Field(description="markdown texts including newlines that contains detailed assessment and detailed suggestions for the hardware requirements")
|
|
103
|
+
installation_guide: Optional[list[str]]=Field(description="markdown texts including newlines that contains detailed assessment and detailed suggestions for the installation guide")
|
|
104
|
+
compatible_os: Optional[list[str]]=Field(description="markdown texts including newlines that contains detailed assessment and detailed suggestions for the compatible operating system")
|
|
105
|
+
overall_score: Optional[list[str]]=Field(description="markdown texts including newlines that contains detailed assessment and detailed suggestions for the overall score of the installation")
|
|
106
|
+
|
|
107
|
+
class EvaluationInstallationResult(BaseModel):
|
|
108
|
+
structured_evaluation: StructuredEvaluationInstallationResult | None
|
|
109
|
+
free_evaluation: FreeEvaluationInstallationResult | None
|
|
110
|
+
structured_reasoning_process: str | None
|
|
111
|
+
free_reasoning_process: str | None
|
|
112
|
+
|
|
113
|
+
class SoftwarePackageContentResult(BaseModel):
|
|
114
|
+
compiled_standalone_software: Optional[bool] = Field(description="A boolean value. Does it provide the compiled standalone software?")
|
|
115
|
+
source_code: Optional[bool] = Field(description="A boolean value. Does it provide the source code?")
|
|
116
|
+
demo_dataset: Optional[bool] = Field(description="A boolean value. Does it provide the demo dataset?")
|
|
117
|
+
|
|
118
|
+
class DemoInstructionsResult(BaseModel):
|
|
119
|
+
run_on_data_instruction: Optional[bool] = Field(description="A boolean value. Does it provide instructions on how to run on provided data?")
|
|
120
|
+
run_on_custom_instruction: Optional[bool] = Field(description="A boolean value. Does it provide instructions on how to run on custom data?")
|
|
121
|
+
expected_output_description: Optional[bool] = Field(description="A boolean value. Does it provide the description of expected output?")
|
|
122
|
+
|
|
123
|
+
class EvaluationSubmissionRequirementsResult(BaseModel):
|
|
124
|
+
compiled_standalone_software: bool | None
|
|
125
|
+
source_code: bool | None
|
|
126
|
+
demo_dataset: bool | None
|
|
127
|
+
run_on_data_instruction: bool | None
|
|
128
|
+
run_on_custom_instruction: bool | None
|
|
129
|
+
expected_output_description: bool | None
|
|
130
|
+
complete_readme: bool | None
|
|
131
|
+
software_dependency: bool | None
|
|
132
|
+
install_tutorial: bool | None
|
|
133
|
+
license: bool | None
|
|
134
|
+
hardware_requirements: bool | None
|
|
135
|
+
compatible_os: bool | None
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# History files
|
|
2
|
+
.Rhistory
|
|
3
|
+
.Rapp.history
|
|
4
|
+
|
|
5
|
+
# R session data
|
|
6
|
+
.RData
|
|
7
|
+
.RDataTmp
|
|
8
|
+
|
|
9
|
+
# User-specific files
|
|
10
|
+
.Rproj.user/
|
|
11
|
+
.Ruserdata/
|
|
12
|
+
|
|
13
|
+
# RStudio files
|
|
14
|
+
.rsituational.user
|
|
15
|
+
.Renviron
|
|
16
|
+
*proj.user
|
|
17
|
+
|
|
18
|
+
# Example and temporary files
|
|
19
|
+
*.Rhistory
|
|
20
|
+
*.RData
|
|
21
|
+
*.RData~
|
|
22
|
+
*.Rproj.user
|
|
23
|
+
*~
|
|
24
|
+
.DS_Store # macOS specific
|
|
25
|
+
Thumbs.db # Windows specific
|
|
26
|
+
|
|
27
|
+
# Knitr and R Markdown cache and intermediate files
|
|
28
|
+
*_cache/
|
|
29
|
+
/cache/
|
|
30
|
+
*.utf8.md
|
|
31
|
+
*.knit.md
|
|
32
|
+
*.log
|
|
33
|
+
*.ind
|
|
34
|
+
*.aux
|
|
35
|
+
*.synctex.gz
|
|
36
|
+
*.toc
|
|
37
|
+
*.out
|
|
38
|
+
*.nav
|
|
39
|
+
*.snm
|
|
40
|
+
|
|
41
|
+
# Package and dependency management
|
|
42
|
+
# renv, packrat, etc.
|
|
43
|
+
renv/
|
|
44
|
+
packrat/
|
|
45
|
+
.renv/
|
|
46
|
+
.Rprofile
|
|
47
|
+
|
|
48
|
+
# Compiled code from packages like Rcpp
|
|
49
|
+
/src/*.so
|
|
50
|
+
/src/*.o
|
|
51
|
+
/src/*.dll
|
|
52
|
+
|
|
53
|
+
# Shiny app logs
|
|
54
|
+
*.log
|
|
55
|
+
*.log.*
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
# Byte-compiled / optimized / C files
|
|
59
|
+
__pycache__/
|
|
60
|
+
*.py[cod]
|
|
61
|
+
*$py.class
|
|
62
|
+
|
|
63
|
+
# C extensions
|
|
64
|
+
*.so
|
|
65
|
+
|
|
66
|
+
# Distribution / packaging
|
|
67
|
+
.Python
|
|
68
|
+
build/
|
|
69
|
+
develop-eggs/
|
|
70
|
+
dist/
|
|
71
|
+
downloads/
|
|
72
|
+
eggs/
|
|
73
|
+
.eggs/
|
|
74
|
+
lib/
|
|
75
|
+
lib64/
|
|
76
|
+
parts/
|
|
77
|
+
sdist/
|
|
78
|
+
var/
|
|
79
|
+
wheels/
|
|
80
|
+
*.egg-info/
|
|
81
|
+
.installed.cfg
|
|
82
|
+
*.egg
|
|
83
|
+
MANIFEST
|
|
84
|
+
|
|
85
|
+
# PyInstaller
|
|
86
|
+
# Usually these files are in 'dist' folder, but they may appear in the root directory
|
|
87
|
+
*.manifest
|
|
88
|
+
*.spec
|
|
89
|
+
|
|
90
|
+
# Installer logs
|
|
91
|
+
pip-log.txt
|
|
92
|
+
pip-delete-this-directory.txt
|
|
93
|
+
|
|
94
|
+
# Virtual Environments
|
|
95
|
+
.env
|
|
96
|
+
.venv
|
|
97
|
+
env/
|
|
98
|
+
venv/
|
|
99
|
+
ENV/
|
|
100
|
+
env.bak/
|
|
101
|
+
venv.bak/
|
|
102
|
+
|
|
103
|
+
# IDE and editor configuration files
|
|
104
|
+
# VSCode
|
|
105
|
+
.vscode/
|
|
106
|
+
# PyCharm
|
|
107
|
+
.idea/
|
|
108
|
+
# Sublime Text
|
|
109
|
+
*.sublime-project
|
|
110
|
+
*.sublime-workspace
|
|
111
|
+
# Atom
|
|
112
|
+
.atom/
|
|
113
|
+
# Jupyter Notebook
|
|
114
|
+
.ipynb_checkpoints
|
|
115
|
+
|
|
116
|
+
# Testing
|
|
117
|
+
.pytest_cache/
|
|
118
|
+
.coverage
|
|
119
|
+
.coverage.*
|
|
120
|
+
htmlcov/
|
|
121
|
+
nosetests.xml
|
|
122
|
+
coverage.xml
|
|
123
|
+
*.cover
|
|
124
|
+
.hypothesis/
|
|
125
|
+
.tox/
|
|
126
|
+
|
|
127
|
+
# Scrapy stuff
|
|
128
|
+
.scrapy
|
|
129
|
+
|
|
130
|
+
# Sphinx documentation
|
|
131
|
+
docs/_build/
|
|
132
|
+
|
|
133
|
+
# OS-generated files
|
|
134
|
+
.DS_Store
|
|
135
|
+
.DS_Store?
|
|
136
|
+
._*
|
|
137
|
+
.Spotlight-V100
|
|
138
|
+
.Trashes
|
|
139
|
+
ehthumbs.db
|
|
140
|
+
Thumbs.db
|