Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
296 lines (255 loc) · 8.01 KB
/
Copy pathpyproject.toml
File metadata and controls
296 lines (255 loc) · 8.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
[build-system]
requires = ["setuptools>=68.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "kosmos-ai-scientist"
version = "0.2.0"
description = "Fully autonomous AI scientist powered by Claude for hypothesis generation, experimental design, and iterative discovery"
readme = "README.md"
requires-python = ">=3.11"
license = {text = "MIT"}
authors = [
{name = "Kosmos Contributors"}
]
keywords = ["ai", "science", "research", "autonomous", "claude", "discovery"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
# LLM Providers
"anthropic>=0.40.0", # Claude/Anthropic provider
"openai>=1.0.0", # OpenAI provider and OpenAI-compatible APIs
# Configuration and validation
"pydantic>=2.0.0",
"pydantic-settings>=2.0.0",
"python-dotenv>=1.0.0",
# Database
"sqlalchemy>=2.0.0",
"alembic>=1.13.0",
"redis>=5.0.0", # Redis client for caching
# System monitoring
"psutil>=5.9.0", # System and process utilities
# HTTP client and retry logic
"httpx>=0.27.0",
"tenacity>=8.2.0",
# Scientific computing
"numpy>=1.24.0,<2.0.0", # Pin to 1.x for compatibility
"pandas>=2.0.0",
"scipy>=1.10.0,<1.14.0", # Pin to <1.14.0 for NumPy 1.x compatibility
"scikit-learn>=1.3.0",
"statsmodels>=0.14.0", # Statistical power analysis (Phase 4)
# Visualization
"matplotlib>=3.7.0",
"seaborn>=0.12.0",
"plotly>=5.14.0",
# Literature and knowledge (Phase 1)
"arxiv>=2.1.0",
"chromadb>=0.4.0",
"networkx>=3.1",
# Phase 2: Literature APIs & Processing
"semanticscholar>=0.8.0", # Semantic Scholar API
"biopython>=1.81", # PubMed E-utilities
"pymupdf>=1.23.0", # PDF text extraction
"sentence-transformers>=2.2.0", # SPECTER embeddings
"bibtexparser>=1.4.0", # BibTeX parsing
"pybtex>=0.24.0", # Bibliography generation
"pikepdf>=8.10.0", # PDF metadata
"py2neo>=2021.2.3", # Neo4j Python driver
# Phase 9: Multi-Domain Support - Biology
"pykegg>=0.1.0", # KEGG pathway database API
"mygene>=3.2.0", # Gene annotation queries
"pyensembl>=2.3.0", # Ensembl genome database API
"gseapy>=1.0.0", # Gene Set Enrichment Analysis (pathway enrichment - REQ-DAA-CAP-008)
# Phase 9: Multi-Domain Support - Neuroscience
"pydeseq2>=0.4.0", # Differential expression analysis
# Advanced Analytics (REQ-DAA-CAP-005)
"shap>=0.44.0", # SHAP values for feature importance
"pwlf>=2.2.0", # Piecewise Linear Fit (segmented regression)
"nbformat>=5.9.0", # Jupyter notebook format support (REQ-DAA-SUM-004)
"nbconvert>=7.11.0", # Jupyter notebook conversion
# Phase 9: Multi-Domain Support - Materials/Physics
"pymatgen>=2024.1.0", # Materials analysis and property prediction
"ase>=3.22.0", # Atomic Simulation Environment
"mp-api>=0.41.0", # Materials Project API client
"xgboost>=2.0.0", # Gradient boosting models
# CLI and UI
"rich>=13.0.0",
"click>=8.1.0",
"typer>=0.9.0",
]
[project.optional-dependencies]
dev = [
# Testing
"pytest>=7.4.0",
"pytest-asyncio>=0.21.0",
"pytest-cov>=4.1.0",
"pytest-mock>=3.12.0",
"pytest-timeout>=2.2.0",
"pytest-xdist>=3.5.0", # Parallel test execution
"responses>=0.24.0", # Mock HTTP responses
"freezegun>=1.4.0", # Mock datetime
"faker>=22.0.0", # Generate fake data for tests
# Code quality
"black>=23.0.0",
"ruff>=0.1.0",
"mypy>=1.7.0",
"pre-commit>=3.6.0",
]
test = [
# Core test framework
"pytest>=7.4.0",
"pytest-asyncio>=0.21.0",
"pytest-cov>=4.1.0",
"pytest-timeout>=2.2.0",
# Mocking
"responses>=0.24.0",
"freezegun>=1.4.0",
]
science = [
# Bioinformatics (heavy dependencies)
"scanpy>=1.9.0",
"anndata>=0.9.0",
# Columnar data formats
"pyarrow>=14.0.0",
]
execution = [
# Docker-based sandboxed execution
"docker>=7.0.0",
]
monitoring = [
# Prometheus metrics
"prometheus-client>=0.19.0",
]
all = [
"kosmos-ai-scientist[dev,science,execution,monitoring]",
]
router = [
# Optional: Use anthropic_router for CLI routing
# Users can install this to enable Claude Code CLI support
"anthropic-router @ git+https://github.com/jimmc414/claude_n_codex_api_proxy.git",
]
domain-extended = [
# Extended neuroscience capabilities
"nilearn>=0.10.0", # Neuroimaging analysis and visualization
# Physics simulation engines
"pybullet>=3.2.0", # Physics engine for simulations
"simpy>=4.1.0", # Discrete event simulation
# ML interpretability (optional due to NumPy 1.x dependency)
"shap>=0.44.0", # SHAP analysis (install separately if needed)
# Chemistry tools (future expansion)
# "rdkit>=2023.9.0", # Cheminformatics (requires conda)
# "openbabel>=3.1.0", # Chemical file formats (requires system libs)
]
[project.scripts]
kosmos = "kosmos.cli.main:cli_entrypoint"
[project.urls]
Homepage = "https://github.com/jimmc414/Kosmos"
Documentation = "https://github.com/jimmc414/Kosmos/tree/master/docs"
Repository = "https://github.com/jimmc414/Kosmos"
Issues = "https://github.com/jimmc414/Kosmos/issues"
[tool.setuptools.packages.find]
where = ["."]
include = ["kosmos*"]
exclude = ["tests*", "docs*", "kosmos-figures*"]
[tool.setuptools.package-data]
"*" = [".env.example"]
# Include important files in the distribution
[tool.setuptools]
include-package-data = true
# Ensure .env.example is included in source distributions
[tool.setuptools.data-files]
"." = [".env.example", "alembic.ini"]
"alembic" = ["alembic/**/*.py", "alembic/**/*.mako"]
"alembic/versions" = ["alembic/versions/*.py"]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--strict-markers",
"--strict-config",
"--cov=kosmos",
"--cov-report=term-missing",
"--cov-report=html",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"e2e: marks tests as end-to-end tests",
]
[tool.coverage.run]
source = ["kosmos"]
omit = ["*/tests/*", "*/test_*.py"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"@abstractmethod",
]
[tool.black]
line-length = 100
target-version = ["py311", "py312"]
include = '\.pyi?$'
extend-exclude = '''
/(
# Directories
\.git
| \.mypy_cache
| \.pytest_cache
| \.venv
| venv
| build
| dist
| kosmos-figures
)/
'''
[tool.ruff]
line-length = 100
target-version = "py311"
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long (handled by black)
"B008", # do not perform function calls in argument defaults
"C901", # too complex (we'll handle this case-by-case)
]
exclude = [
".git",
"__pycache__",
".venv",
"venv",
"build",
"dist",
"kosmos-figures",
]
[tool.ruff.per-file-ignores]
"__init__.py" = ["F401"] # Allow unused imports in __init__.py
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false # Start permissive, can tighten later
ignore_missing_imports = true
exclude = [
'kosmos-figures',
'tests',
'docs',
]