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.
Files changed (84) hide show
  1. bioguider/__init__.py +0 -0
  2. bioguider/agents/__init__.py +0 -0
  3. bioguider/agents/agent_task.py +92 -0
  4. bioguider/agents/agent_tools.py +176 -0
  5. bioguider/agents/agent_utils.py +504 -0
  6. bioguider/agents/collection_execute_step.py +182 -0
  7. bioguider/agents/collection_observe_step.py +125 -0
  8. bioguider/agents/collection_plan_step.py +156 -0
  9. bioguider/agents/collection_task.py +184 -0
  10. bioguider/agents/collection_task_utils.py +142 -0
  11. bioguider/agents/common_agent.py +137 -0
  12. bioguider/agents/common_agent_2step.py +215 -0
  13. bioguider/agents/common_conversation.py +61 -0
  14. bioguider/agents/common_step.py +85 -0
  15. bioguider/agents/consistency_collection_step.py +102 -0
  16. bioguider/agents/consistency_evaluation_task.py +57 -0
  17. bioguider/agents/consistency_evaluation_task_utils.py +14 -0
  18. bioguider/agents/consistency_observe_step.py +110 -0
  19. bioguider/agents/consistency_query_step.py +77 -0
  20. bioguider/agents/dockergeneration_execute_step.py +186 -0
  21. bioguider/agents/dockergeneration_observe_step.py +154 -0
  22. bioguider/agents/dockergeneration_plan_step.py +158 -0
  23. bioguider/agents/dockergeneration_task.py +158 -0
  24. bioguider/agents/dockergeneration_task_utils.py +220 -0
  25. bioguider/agents/evaluation_installation_task.py +270 -0
  26. bioguider/agents/evaluation_readme_task.py +767 -0
  27. bioguider/agents/evaluation_submission_requirements_task.py +172 -0
  28. bioguider/agents/evaluation_task.py +206 -0
  29. bioguider/agents/evaluation_tutorial_task.py +169 -0
  30. bioguider/agents/evaluation_tutorial_task_prompts.py +187 -0
  31. bioguider/agents/evaluation_userguide_prompts.py +179 -0
  32. bioguider/agents/evaluation_userguide_task.py +154 -0
  33. bioguider/agents/evaluation_utils.py +127 -0
  34. bioguider/agents/identification_execute_step.py +181 -0
  35. bioguider/agents/identification_observe_step.py +104 -0
  36. bioguider/agents/identification_plan_step.py +140 -0
  37. bioguider/agents/identification_task.py +270 -0
  38. bioguider/agents/identification_task_utils.py +22 -0
  39. bioguider/agents/peo_common_step.py +64 -0
  40. bioguider/agents/prompt_utils.py +253 -0
  41. bioguider/agents/python_ast_repl_tool.py +69 -0
  42. bioguider/agents/rag_collection_task.py +130 -0
  43. bioguider/conversation.py +67 -0
  44. bioguider/database/code_structure_db.py +500 -0
  45. bioguider/database/summarized_file_db.py +146 -0
  46. bioguider/generation/__init__.py +39 -0
  47. bioguider/generation/benchmark_metrics.py +610 -0
  48. bioguider/generation/change_planner.py +189 -0
  49. bioguider/generation/document_renderer.py +157 -0
  50. bioguider/generation/llm_cleaner.py +67 -0
  51. bioguider/generation/llm_content_generator.py +1128 -0
  52. bioguider/generation/llm_injector.py +809 -0
  53. bioguider/generation/models.py +85 -0
  54. bioguider/generation/output_manager.py +74 -0
  55. bioguider/generation/repo_reader.py +37 -0
  56. bioguider/generation/report_loader.py +166 -0
  57. bioguider/generation/style_analyzer.py +36 -0
  58. bioguider/generation/suggestion_extractor.py +436 -0
  59. bioguider/generation/test_metrics.py +189 -0
  60. bioguider/managers/benchmark_manager.py +785 -0
  61. bioguider/managers/evaluation_manager.py +215 -0
  62. bioguider/managers/generation_manager.py +686 -0
  63. bioguider/managers/generation_test_manager.py +107 -0
  64. bioguider/managers/generation_test_manager_v2.py +525 -0
  65. bioguider/rag/__init__.py +0 -0
  66. bioguider/rag/config.py +117 -0
  67. bioguider/rag/data_pipeline.py +651 -0
  68. bioguider/rag/embedder.py +24 -0
  69. bioguider/rag/rag.py +138 -0
  70. bioguider/settings.py +103 -0
  71. bioguider/utils/code_structure_builder.py +59 -0
  72. bioguider/utils/constants.py +135 -0
  73. bioguider/utils/default.gitignore +140 -0
  74. bioguider/utils/file_utils.py +215 -0
  75. bioguider/utils/gitignore_checker.py +175 -0
  76. bioguider/utils/notebook_utils.py +117 -0
  77. bioguider/utils/pyphen_utils.py +73 -0
  78. bioguider/utils/python_file_handler.py +65 -0
  79. bioguider/utils/r_file_handler.py +551 -0
  80. bioguider/utils/utils.py +163 -0
  81. bioguider-0.2.52.dist-info/LICENSE +21 -0
  82. bioguider-0.2.52.dist-info/METADATA +51 -0
  83. bioguider-0.2.52.dist-info/RECORD +84 -0
  84. bioguider-0.2.52.dist-info/WHEEL +4 -0
@@ -0,0 +1,117 @@
1
+ import os
2
+ from typing import List
3
+ from adalflow import GoogleGenAIClient
4
+ from adalflow.components.model_client.openai_client import OpenAIClient
5
+ from adalflow.components.model_client.azureai_client import AzureAIClient
6
+
7
+
8
+ DEFAULT_EXCLUDED_DIRS: List[str] = [
9
+ # Virtual environments and package managers
10
+ "./.venv/", "./venv/", "./env/", "./virtualenv/",
11
+ "./node_modules/", "./bower_components/", "./jspm_packages/",
12
+ # Version control
13
+ "./.git/", "./.svn/", "./.hg/", "./.bzr/",
14
+ # Cache and compiled files
15
+ "./__pycache__/", "./.pytest_cache/", "./.mypy_cache/", "./.ruff_cache/", "./.coverage/",
16
+ # Build and distribution
17
+ "./dist/", "./build/", "./out/", "./target/", "./bin/", "./obj/",
18
+ # Documentation
19
+ "./docs/", "./_docs/", "./site-docs/", "./_site/",
20
+ # IDE specific
21
+ "./.idea/", "./.vscode/", "./.vs/", "./.eclipse/", "./.settings/",
22
+ # Logs and temporary files
23
+ "./logs/", "./log/", "./tmp/", "./temp/",
24
+ ]
25
+
26
+ DEFAULT_EXCLUDED_FILES: List[str] = [
27
+ ]
28
+
29
+ configs = {
30
+ "embedder": {
31
+ "batch_size": 500,
32
+ "model_client": OpenAIClient,
33
+ "model_kwargs": {
34
+ "model": "text-embedding-3-small",
35
+ "dimensions": 256,
36
+ "encoding_format": "float",
37
+ },
38
+ },
39
+ "retriever": {
40
+ "top_k": 20,
41
+ },
42
+ "generator": {
43
+ "model_client": GoogleGenAIClient,
44
+ "model_kwargs": {
45
+ "model": "gemini-2.5-flash-preview-04-17",
46
+ "temperature": 0.7,
47
+ "top_p": 0.8,
48
+ },
49
+ },
50
+ "text_splitter": {
51
+ "split_by": "word",
52
+ "chunk_size": 350,
53
+ "chunk_overlap": 100,
54
+ },
55
+ "file_filters": {
56
+ "excluded_dirs": [
57
+ "./.venv/", "./venv/", "./env/", "./virtualenv/",
58
+ "./node_modules/", "./bower_components/", "./jspm_packages/",
59
+ "./.git/", "./.svn/", "./.hg/", "./.bzr/",
60
+ "./__pycache__/", "./.pytest_cache/", "./.mypy_cache/", "./.ruff_cache/", "./.coverage/",
61
+ "./dist/", "./build/", "./out/", "./target/", "./bin/", "./obj/",
62
+ "./_docs/", "./site-docs/", "./_site/",
63
+ "./.idea/", "./.vscode/", "./.vs/", "./.eclipse/", "./.settings/",
64
+ "./logs/", "./log/", "./tmp/", "./temp/",
65
+ ],
66
+ "excluded_files": [
67
+ "package-lock.json", "yarn.lock", "pnpm-lock.yaml", "npm-shrinkwrap.json",
68
+ "poetry.lock", "Pipfile.lock", "requirements.txt.lock", "Cargo.lock", "composer.lock",
69
+ ".lock", ".DS_Store", "Thumbs.db", "desktop.ini", "*.lnk",
70
+ ".env", ".env.*", "*.env", "*.cfg", "*.ini", ".flaskenv",
71
+ ".gitignore", ".gitattributes", ".gitmodules", ".github", ".gitlab-ci.yml",
72
+ ".prettierrc", ".eslintrc", ".eslintignore", ".stylelintrc", ".editorconfig",
73
+ ".jshintrc", ".pylintrc", ".flake8", "mypy.ini", "pyproject.toml",
74
+ "tsconfig.json", "webpack.config.js", "babel.config.js", "rollup.config.js",
75
+ "jest.config.js", "karma.conf.js", "vite.config.js", "next.config.js",
76
+ "*.min.js", "*.min.css", "*.bundle.js", "*.bundle.css",
77
+ "*.map", "*.gz", "*.zip", "*.tar", "*.tgz", "*.rar",
78
+ "*.pyc", "*.pyo", "*.pyd", "*.so", "*.dll", "*.class", "*.exe", "*.o", "*.a",
79
+ "*.jpg", "*.jpeg", "*.png", "*.gif", "*.ico", "*.svg", "*.webp",
80
+ "*.mp3", "*.mp4", "*.wav", "*.avi", "*.mov", "*.webm",
81
+ "*.csv", "*.tsv", "*.xls", "*.xlsx", "*.db", "*.sqlite", "*.sqlite3",
82
+ "*.pdf", "*.docx", "*.pptx",
83
+ ],
84
+ },
85
+ "repository": {
86
+ # Maximum repository size in MB
87
+ "size_limit_mb": 50000,
88
+ },
89
+ }
90
+
91
+ def get_embedder_config():
92
+ return configs["embedder"]
93
+
94
+ def create_model_client():
95
+ openai_type = os.environ.get("OPENAI_API_TYPE")
96
+ is_azure = openai_type == "azure" if openai_type is not None else False
97
+ if not is_azure:
98
+ return OpenAIClient()
99
+ return AzureAIClient(
100
+ api_key=os.environ.get("OPENAI_API_KEY"),
101
+ api_version=os.environ.get("OPENAI_API_VERSION"),
102
+ azure_endpoint=os.environ.get("AZURE_OPENAI_ENDPOINT"),
103
+ )
104
+ def create_model_kwargs():
105
+ openai_type = os.environ.get("OPENAI_API_TYPE")
106
+ is_azure = openai_type == "azure" if openai_type is not None else False
107
+ if not is_azure:
108
+ return {
109
+ "model": "text-embedding-3-small",
110
+ "dimensions": 256,
111
+ "encoding_format": "float",
112
+ }
113
+ return {
114
+ "model": os.environ.get("OPENAI_TEXT_EMBEDDING_DEPLOYMENT_NAME"),
115
+ "dimensions": 256,
116
+ "encoding_format": "float",
117
+ }