open-data-sci 0.1.0__tar.gz
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.
- open_data_sci-0.1.0/.env.example +106 -0
- open_data_sci-0.1.0/.gitignore +112 -0
- open_data_sci-0.1.0/LICENSE +201 -0
- open_data_sci-0.1.0/Makefile +106 -0
- open_data_sci-0.1.0/PKG-INFO +629 -0
- open_data_sci-0.1.0/README.md +343 -0
- open_data_sci-0.1.0/dev/scripts/test_pypi_install.sh +67 -0
- open_data_sci-0.1.0/dev/scripts/test_pypi_publish.sh +65 -0
- open_data_sci-0.1.0/docs/api/agent.md +92 -0
- open_data_sci-0.1.0/docs/api/config.md +167 -0
- open_data_sci-0.1.0/docs/api/index.md +57 -0
- open_data_sci-0.1.0/docs/api/memory.md +62 -0
- open_data_sci-0.1.0/docs/api/open_data_sci.md +39 -0
- open_data_sci-0.1.0/docs/api/session.md +108 -0
- open_data_sci-0.1.0/docs/api/session_manager.md +48 -0
- open_data_sci-0.1.0/docs/api/types.md +100 -0
- open_data_sci-0.1.0/docs/api/workbench.md +64 -0
- open_data_sci-0.1.0/docs/getting-started.md +315 -0
- open_data_sci-0.1.0/docs/index.md +40 -0
- open_data_sci-0.1.0/docs/requirements.txt +3 -0
- open_data_sci-0.1.0/examples/README.md +100 -0
- open_data_sci-0.1.0/examples/configs/config_anthropic.yaml +127 -0
- open_data_sci-0.1.0/examples/configs/config_azure.yaml +58 -0
- open_data_sci-0.1.0/examples/configs/config_bedrock.yaml +53 -0
- open_data_sci-0.1.0/examples/configs/config_gemini.yaml +45 -0
- open_data_sci-0.1.0/examples/configs/config_ollama.yaml +51 -0
- open_data_sci-0.1.0/examples/configs/config_openai.yaml +42 -0
- open_data_sci-0.1.0/examples/configs/config_openai_compatible_server.yaml +52 -0
- open_data_sci-0.1.0/examples/configs/config_vertexai.yaml +52 -0
- open_data_sci-0.1.0/examples/notebooks/030_notebook_anthropic.ipynb +220 -0
- open_data_sci-0.1.0/examples/notebooks/031_notebook_openai_compatible_server.ipynb +260 -0
- open_data_sci-0.1.0/examples/notebooks/032_notebook_bedrock.ipynb +232 -0
- open_data_sci-0.1.0/examples/scripts/020_script_anthropic.py +116 -0
- open_data_sci-0.1.0/examples/scripts/021_script_openai_compatible_server.py +125 -0
- open_data_sci-0.1.0/examples/scripts/022_script_bedrock.py +128 -0
- open_data_sci-0.1.0/examples/tui/010_tui_anthropic.md +169 -0
- open_data_sci-0.1.0/examples/tui/011_tui_openai_compatible_server.md +145 -0
- open_data_sci-0.1.0/examples/tui/012_tui_bedrock.md +160 -0
- open_data_sci-0.1.0/mkdocs.yaml +98 -0
- open_data_sci-0.1.0/opendatasci/__init__.py +47 -0
- open_data_sci-0.1.0/opendatasci/_tui/__init__.py +1 -0
- open_data_sci-0.1.0/opendatasci/_tui/adapter.py +102 -0
- open_data_sci-0.1.0/opendatasci/_tui/app.py +429 -0
- open_data_sci-0.1.0/opendatasci/_tui/commands.py +95 -0
- open_data_sci-0.1.0/opendatasci/_tui/completion.py +139 -0
- open_data_sci-0.1.0/opendatasci/_tui/controller.py +644 -0
- open_data_sci-0.1.0/opendatasci/_tui/file_refs.py +153 -0
- open_data_sci-0.1.0/opendatasci/_tui/models.py +4 -0
- open_data_sci-0.1.0/opendatasci/_tui/presenter.py +259 -0
- open_data_sci-0.1.0/opendatasci/_tui/service.py +78 -0
- open_data_sci-0.1.0/opendatasci/_tui/session.py +53 -0
- open_data_sci-0.1.0/opendatasci/_tui/styles.tcss +248 -0
- open_data_sci-0.1.0/opendatasci/_tui/styles_visible.tcss +245 -0
- open_data_sci-0.1.0/opendatasci/_tui/theme.py +113 -0
- open_data_sci-0.1.0/opendatasci/_tui/tools_display.py +86 -0
- open_data_sci-0.1.0/opendatasci/_tui/widgets.py +1001 -0
- open_data_sci-0.1.0/opendatasci/_utils/__init__.py +0 -0
- open_data_sci-0.1.0/opendatasci/_utils/async_utils.py +11 -0
- open_data_sci-0.1.0/opendatasci/_utils/data_formats.py +135 -0
- open_data_sci-0.1.0/opendatasci/_utils/hash_utils.py +52 -0
- open_data_sci-0.1.0/opendatasci/_utils/langchain_utils.py +155 -0
- open_data_sci-0.1.0/opendatasci/_utils/streaming_utils.py +23 -0
- open_data_sci-0.1.0/opendatasci/agents/__init__.py +12 -0
- open_data_sci-0.1.0/opendatasci/agents/agents.py +515 -0
- open_data_sci-0.1.0/opendatasci/agents/agents_factory.py +71 -0
- open_data_sci-0.1.0/opendatasci/agents/chat_memory.py +397 -0
- open_data_sci-0.1.0/opendatasci/agents/graphs.py +84 -0
- open_data_sci-0.1.0/opendatasci/agents/nodes.py +74 -0
- open_data_sci-0.1.0/opendatasci/agents/states.py +36 -0
- open_data_sci-0.1.0/opendatasci/agents/turn_memory.py +124 -0
- open_data_sci-0.1.0/opendatasci/configs.py +275 -0
- open_data_sci-0.1.0/opendatasci/context/__init__.py +7 -0
- open_data_sci-0.1.0/opendatasci/context/base.py +56 -0
- open_data_sci-0.1.0/opendatasci/context/local.py +236 -0
- open_data_sci-0.1.0/opendatasci/models/__init__.py +7 -0
- open_data_sci-0.1.0/opendatasci/models/anthropic.py +40 -0
- open_data_sci-0.1.0/opendatasci/models/aws.py +86 -0
- open_data_sci-0.1.0/opendatasci/models/factory.py +179 -0
- open_data_sci-0.1.0/opendatasci/models/google.py +79 -0
- open_data_sci-0.1.0/opendatasci/models/local.py +79 -0
- open_data_sci-0.1.0/opendatasci/models/microsoft.py +62 -0
- open_data_sci-0.1.0/opendatasci/models/openai.py +49 -0
- open_data_sci-0.1.0/opendatasci/models/providers.py +12 -0
- open_data_sci-0.1.0/opendatasci/prompts/__init__.py +5 -0
- open_data_sci-0.1.0/opendatasci/prompts/builders.py +85 -0
- open_data_sci-0.1.0/opendatasci/prompts/caching.py +42 -0
- open_data_sci-0.1.0/opendatasci/prompts/message_templates.py +7 -0
- open_data_sci-0.1.0/opendatasci/prompts/prompt_templates.py +227 -0
- open_data_sci-0.1.0/opendatasci/resources/skills/competitive_data_science.md +241 -0
- open_data_sci-0.1.0/opendatasci/resources/skills/data_science.md +55 -0
- open_data_sci-0.1.0/opendatasci/resources/skills/data_science_education.md +42 -0
- open_data_sci-0.1.0/opendatasci/resources/skills/deep_learning.md +205 -0
- open_data_sci-0.1.0/opendatasci/resources/skills/machine_learning.md +68 -0
- open_data_sci-0.1.0/opendatasci/resources/skills/quantitative_analysis.md +45 -0
- open_data_sci-0.1.0/opendatasci/sandbox/__init__.py +14 -0
- open_data_sci-0.1.0/opendatasci/sandbox/_runner.py +114 -0
- open_data_sci-0.1.0/opendatasci/sandbox/base.py +170 -0
- open_data_sci-0.1.0/opendatasci/sandbox/srt.py +490 -0
- open_data_sci-0.1.0/opendatasci/skills/__init__.py +9 -0
- open_data_sci-0.1.0/opendatasci/skills/base.py +28 -0
- open_data_sci-0.1.0/opendatasci/skills/local.py +131 -0
- open_data_sci-0.1.0/opendatasci/streaming/__init__.py +37 -0
- open_data_sci-0.1.0/opendatasci/streaming/events.py +159 -0
- open_data_sci-0.1.0/opendatasci/streaming/processors.py +387 -0
- open_data_sci-0.1.0/opendatasci/tools/__init__.py +58 -0
- open_data_sci-0.1.0/opendatasci/tools/coding.py +261 -0
- open_data_sci-0.1.0/opendatasci/tools/critic.py +136 -0
- open_data_sci-0.1.0/opendatasci/tools/dataset_info.py +391 -0
- open_data_sci-0.1.0/opendatasci/tools/factory.py +172 -0
- open_data_sci-0.1.0/opendatasci/tools/mcp.py +179 -0
- open_data_sci-0.1.0/opendatasci/tools/planning.py +88 -0
- open_data_sci-0.1.0/opendatasci/tools/skills.py +90 -0
- open_data_sci-0.1.0/opendatasci/tools/user_interaction.py +54 -0
- open_data_sci-0.1.0/opendatasci/tools/web.py +236 -0
- open_data_sci-0.1.0/opendatasci/tools/workers.py +237 -0
- open_data_sci-0.1.0/opendatasci/tools/workspace.py +55 -0
- open_data_sci-0.1.0/opendatasci/workspace/__init__.py +9 -0
- open_data_sci-0.1.0/opendatasci/workspace/base.py +20 -0
- open_data_sci-0.1.0/opendatasci/workspace/local.py +25 -0
- open_data_sci-0.1.0/pyproject.toml +233 -0
- open_data_sci-0.1.0/tests/__init__.py +0 -0
- open_data_sci-0.1.0/tests/component/__init__.py +0 -0
- open_data_sci-0.1.0/tests/component/conftest.py +326 -0
- open_data_sci-0.1.0/tests/component/test_agent_integrations.py +297 -0
- open_data_sci-0.1.0/tests/component/test_cli_controller.py +602 -0
- open_data_sci-0.1.0/tests/component/test_lifecycle.py +57 -0
- open_data_sci-0.1.0/tests/component/test_real_streaming.py +105 -0
- open_data_sci-0.1.0/tests/component/test_service.py +110 -0
- open_data_sci-0.1.0/tests/component/test_streaming.py +31 -0
- open_data_sci-0.1.0/tests/unit/__init__.py +0 -0
- open_data_sci-0.1.0/tests/unit/_tui/__init__.py +0 -0
- open_data_sci-0.1.0/tests/unit/_tui/conftest.py +88 -0
- open_data_sci-0.1.0/tests/unit/_tui/test_app.py +263 -0
- open_data_sci-0.1.0/tests/unit/_tui/test_controller.py +1413 -0
- open_data_sci-0.1.0/tests/unit/_tui/test_presenter.py +718 -0
- open_data_sci-0.1.0/tests/unit/_tui/test_service.py +302 -0
- open_data_sci-0.1.0/tests/unit/_tui/test_session.py +80 -0
- open_data_sci-0.1.0/tests/unit/_tui/test_tools_display.py +285 -0
- open_data_sci-0.1.0/tests/unit/_tui/test_widgets.py +1532 -0
- open_data_sci-0.1.0/tests/unit/_utils/__init__.py +0 -0
- open_data_sci-0.1.0/tests/unit/_utils/test_async_utils.py +60 -0
- open_data_sci-0.1.0/tests/unit/_utils/test_data_formats.py +139 -0
- open_data_sci-0.1.0/tests/unit/_utils/test_hash_utils.py +150 -0
- open_data_sci-0.1.0/tests/unit/_utils/test_langchain_utils.py +382 -0
- open_data_sci-0.1.0/tests/unit/agents/__init__.py +0 -0
- open_data_sci-0.1.0/tests/unit/agents/test_agents.py +974 -0
- open_data_sci-0.1.0/tests/unit/agents/test_agents_factory.py +51 -0
- open_data_sci-0.1.0/tests/unit/agents/test_chat_memory.py +187 -0
- open_data_sci-0.1.0/tests/unit/agents/test_graphs.py +57 -0
- open_data_sci-0.1.0/tests/unit/agents/test_nodes.py +252 -0
- open_data_sci-0.1.0/tests/unit/agents/test_turn_memory.py +145 -0
- open_data_sci-0.1.0/tests/unit/conftest.py +46 -0
- open_data_sci-0.1.0/tests/unit/context/__init__.py +0 -0
- open_data_sci-0.1.0/tests/unit/context/test_local_context_store.py +262 -0
- open_data_sci-0.1.0/tests/unit/context/test_local_work_context.py +357 -0
- open_data_sci-0.1.0/tests/unit/models/__init__.py +0 -0
- open_data_sci-0.1.0/tests/unit/models/test_anthropic.py +110 -0
- open_data_sci-0.1.0/tests/unit/models/test_aws.py +254 -0
- open_data_sci-0.1.0/tests/unit/models/test_google.py +172 -0
- open_data_sci-0.1.0/tests/unit/models/test_local.py +203 -0
- open_data_sci-0.1.0/tests/unit/models/test_microsoft.py +150 -0
- open_data_sci-0.1.0/tests/unit/models/test_openai.py +109 -0
- open_data_sci-0.1.0/tests/unit/prompts/__init__.py +0 -0
- open_data_sci-0.1.0/tests/unit/prompts/test_builders.py +336 -0
- open_data_sci-0.1.0/tests/unit/prompts/test_caching.py +39 -0
- open_data_sci-0.1.0/tests/unit/sandbox/__init__.py +0 -0
- open_data_sci-0.1.0/tests/unit/sandbox/test_cli_validation.py +91 -0
- open_data_sci-0.1.0/tests/unit/sandbox/test_exec_result.py +25 -0
- open_data_sci-0.1.0/tests/unit/sandbox/test_runner.py +139 -0
- open_data_sci-0.1.0/tests/unit/sandbox/test_srt.py +97 -0
- open_data_sci-0.1.0/tests/unit/skills/__init__.py +0 -0
- open_data_sci-0.1.0/tests/unit/skills/test_local.py +213 -0
- open_data_sci-0.1.0/tests/unit/streaming/__init__.py +0 -0
- open_data_sci-0.1.0/tests/unit/streaming/test_processors.py +1353 -0
- open_data_sci-0.1.0/tests/unit/test_configs.py +228 -0
- open_data_sci-0.1.0/tests/unit/tools/__init__.py +0 -0
- open_data_sci-0.1.0/tests/unit/tools/test_coding.py +536 -0
- open_data_sci-0.1.0/tests/unit/tools/test_critic.py +141 -0
- open_data_sci-0.1.0/tests/unit/tools/test_dataset_info.py +409 -0
- open_data_sci-0.1.0/tests/unit/tools/test_factory.py +249 -0
- open_data_sci-0.1.0/tests/unit/tools/test_mcp.py +453 -0
- open_data_sci-0.1.0/tests/unit/tools/test_planning.py +138 -0
- open_data_sci-0.1.0/tests/unit/tools/test_skills.py +152 -0
- open_data_sci-0.1.0/tests/unit/tools/test_user_interaction.py +91 -0
- open_data_sci-0.1.0/tests/unit/tools/test_web.py +363 -0
- open_data_sci-0.1.0/tests/unit/tools/test_workers.py +321 -0
- open_data_sci-0.1.0/tests/unit/tools/test_workspace.py +137 -0
- open_data_sci-0.1.0/uv.lock +3554 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
########################################################
|
|
2
|
+
# open-data-sci environment variables
|
|
3
|
+
#
|
|
4
|
+
# Copy this file to .env and fill in the values you need.
|
|
5
|
+
# Only the section that matches your chosen PROVIDER
|
|
6
|
+
# needs to be populated.
|
|
7
|
+
########################################################
|
|
8
|
+
|
|
9
|
+
# ── Model selection ────────────────────────────────────
|
|
10
|
+
PROVIDER=
|
|
11
|
+
MODEL=
|
|
12
|
+
SECONDARY_PROVIDER=
|
|
13
|
+
SECONDARY_MODEL=
|
|
14
|
+
|
|
15
|
+
# ── Anthropic ──────────────────────────────────────────
|
|
16
|
+
# PROVIDER=anthropic
|
|
17
|
+
ANTHROPIC_API_KEY=
|
|
18
|
+
|
|
19
|
+
# ── OpenAI ─────────────────────────────────────────────
|
|
20
|
+
# PROVIDER=openai
|
|
21
|
+
OPENAI_API_KEY=
|
|
22
|
+
|
|
23
|
+
# ── Google Gemini (direct API) ─────────────────────────
|
|
24
|
+
# PROVIDER=gemini
|
|
25
|
+
GOOGLE_API_KEY=
|
|
26
|
+
|
|
27
|
+
# ── Google Vertex AI ───────────────────────────────────
|
|
28
|
+
# PROVIDER=vertexai
|
|
29
|
+
#
|
|
30
|
+
# Always required:
|
|
31
|
+
GOOGLE_CLOUD_PROJECT=
|
|
32
|
+
GOOGLE_CLOUD_LOCATION=
|
|
33
|
+
#
|
|
34
|
+
# Authentication (pick one):
|
|
35
|
+
# a) Service account key file — set this to the path of your JSON key:
|
|
36
|
+
GOOGLE_APPLICATION_CREDENTIALS=
|
|
37
|
+
# b) User credentials — run: gcloud auth application-default login
|
|
38
|
+
# (no env var needed; ADC picks up ~/.config/gcloud/... automatically)
|
|
39
|
+
# c) On GCP infrastructure (Cloud Run, GCE, GKE) — no env var needed;
|
|
40
|
+
# the metadata server provides credentials automatically.
|
|
41
|
+
|
|
42
|
+
# ── Azure OpenAI ───────────────────────────────────────
|
|
43
|
+
# PROVIDER=azure
|
|
44
|
+
#
|
|
45
|
+
# Always required:
|
|
46
|
+
AZURE_OPENAI_ENDPOINT=
|
|
47
|
+
AZURE_OPENAI_API_VERSION=
|
|
48
|
+
#
|
|
49
|
+
# Authentication (pick one):
|
|
50
|
+
# a) API key:
|
|
51
|
+
AZURE_OPENAI_API_KEY=
|
|
52
|
+
# b) Service principal (requires pip install 'open-data-sci[azure]');
|
|
53
|
+
# azure-identity's DefaultAzureCredential reads these automatically:
|
|
54
|
+
AZURE_TENANT_ID=
|
|
55
|
+
AZURE_CLIENT_ID=
|
|
56
|
+
AZURE_CLIENT_SECRET=
|
|
57
|
+
|
|
58
|
+
# ── AWS Bedrock ────────────────────────────────────────
|
|
59
|
+
# PROVIDER=bedrock
|
|
60
|
+
#
|
|
61
|
+
REGION=
|
|
62
|
+
#
|
|
63
|
+
# Authentication (pick one):
|
|
64
|
+
# a) Long-lived IAM credentials:
|
|
65
|
+
AWS_ACCESS_KEY_ID=
|
|
66
|
+
AWS_SECRET_ACCESS_KEY=
|
|
67
|
+
# b) Temporary credentials via aws-vault / sts assume-role
|
|
68
|
+
# (aws-vault exports all three automatically):
|
|
69
|
+
AWS_SESSION_TOKEN=
|
|
70
|
+
# c) On AWS infrastructure (EC2, ECS, Lambda) — no env var needed;
|
|
71
|
+
# boto3 fetches credentials from the instance metadata service.
|
|
72
|
+
|
|
73
|
+
# ── Ollama / OpenAI-compatible server (self-hosted) ─────────────────
|
|
74
|
+
# PROVIDER=ollama | openai_compatible_server
|
|
75
|
+
LLM_SERVER_BASE_URL=
|
|
76
|
+
#
|
|
77
|
+
# For openai_compatible_server, set an API key if your server requires one
|
|
78
|
+
# (falls back to "EMPTY" when unset, which works for most local servers):
|
|
79
|
+
# OPENAI_API_KEY=
|
|
80
|
+
|
|
81
|
+
# ── Sampling & reasoning ───────────────────────────────
|
|
82
|
+
TEMPERATURE=
|
|
83
|
+
THINKING_BUDGET=
|
|
84
|
+
|
|
85
|
+
# ── Agent customization ────────────────────────────────
|
|
86
|
+
NAME=
|
|
87
|
+
MCP_SERVERS=
|
|
88
|
+
|
|
89
|
+
# ── Web access ─────────────────────────────────────────
|
|
90
|
+
EXTRA_FETCH_DOMAINS=
|
|
91
|
+
|
|
92
|
+
# ── Context management ─────────────────────────────────
|
|
93
|
+
MIDTURN_COMPACTION_THRESHOLD=
|
|
94
|
+
|
|
95
|
+
# ── Skills ─────────────────────────────────────────────
|
|
96
|
+
# Path to a directory of user-defined skill files (.yaml, .yml, .json, .md).
|
|
97
|
+
# Leave unset to disable user-defined skill loading.
|
|
98
|
+
SKILLS_DIRECTORY=
|
|
99
|
+
# Path to the built-in skills directory. Defaults to the bundled resources/skills.
|
|
100
|
+
BUILTIN_SKILLS_DIRECTORY=
|
|
101
|
+
|
|
102
|
+
# ── Worker configuration ───────────────────────────────
|
|
103
|
+
WORKER_TIMEOUT_SECONDS=
|
|
104
|
+
|
|
105
|
+
# ── Code execution ─────────────────────────────────────
|
|
106
|
+
CODE_EXEC_TIMEOUT=
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
*.manifest
|
|
31
|
+
*.spec
|
|
32
|
+
|
|
33
|
+
# Installer logs
|
|
34
|
+
pip-log.txt
|
|
35
|
+
pip-delete-this-directory.txt
|
|
36
|
+
|
|
37
|
+
# Unit test / coverage reports
|
|
38
|
+
htmlcov/
|
|
39
|
+
.tox/
|
|
40
|
+
.nox/
|
|
41
|
+
.coverage
|
|
42
|
+
.coverage.*
|
|
43
|
+
.cache
|
|
44
|
+
coverage.xml
|
|
45
|
+
*.cover
|
|
46
|
+
*.py.cover
|
|
47
|
+
*.lcov
|
|
48
|
+
.hypothesis/
|
|
49
|
+
.pytest_cache/
|
|
50
|
+
cover/
|
|
51
|
+
coverage/
|
|
52
|
+
|
|
53
|
+
# Jupyter Notebook
|
|
54
|
+
.ipynb_checkpoints
|
|
55
|
+
|
|
56
|
+
# IPython
|
|
57
|
+
profile_default/
|
|
58
|
+
ipython_config.py
|
|
59
|
+
|
|
60
|
+
# pyenv / uv python pins
|
|
61
|
+
.python-version
|
|
62
|
+
|
|
63
|
+
# Environments
|
|
64
|
+
.env
|
|
65
|
+
.envrc
|
|
66
|
+
.venv/
|
|
67
|
+
env/
|
|
68
|
+
venv/
|
|
69
|
+
ENV/
|
|
70
|
+
env.bak/
|
|
71
|
+
venv.bak/
|
|
72
|
+
|
|
73
|
+
# mypy
|
|
74
|
+
.mypy_cache/
|
|
75
|
+
.dmypy.json
|
|
76
|
+
dmypy.json
|
|
77
|
+
|
|
78
|
+
# Ruff
|
|
79
|
+
.ruff_cache/
|
|
80
|
+
|
|
81
|
+
# mkdocs
|
|
82
|
+
/site
|
|
83
|
+
|
|
84
|
+
# Pyright / pytype
|
|
85
|
+
.pytype/
|
|
86
|
+
.pyre/
|
|
87
|
+
|
|
88
|
+
# Logs
|
|
89
|
+
*.log
|
|
90
|
+
logs/
|
|
91
|
+
|
|
92
|
+
# OS
|
|
93
|
+
.DS_Store
|
|
94
|
+
Thumbs.db
|
|
95
|
+
|
|
96
|
+
# Editor
|
|
97
|
+
.idea/
|
|
98
|
+
.vscode/
|
|
99
|
+
*.swp
|
|
100
|
+
*.swo
|
|
101
|
+
*~
|
|
102
|
+
|
|
103
|
+
# Project-specific: datasets and workspace data
|
|
104
|
+
data/
|
|
105
|
+
|
|
106
|
+
# Project-specific: sandbox / agent output
|
|
107
|
+
output/
|
|
108
|
+
*.xlsx
|
|
109
|
+
!examples/*.xlsx
|
|
110
|
+
|
|
111
|
+
# Benchmark artifacts
|
|
112
|
+
.benchmarks/
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [2026] Farouk Boukil
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
.PHONY: help install install-dev install-system-dependencies format format-check lint lint-fix type-check deadcode static-checks all clean test test-unit test-component docs docs-serve
|
|
2
|
+
|
|
3
|
+
PACKAGE = opendatasci
|
|
4
|
+
|
|
5
|
+
help:
|
|
6
|
+
@echo "Available targets:"
|
|
7
|
+
@echo " install Install package in production mode (EXTRAS=aws,gemini,...)"
|
|
8
|
+
@echo " install-dev Install package with dev dependencies (EXTRAS=aws,gemini,...)"
|
|
9
|
+
@echo " install-system-dependencies Install system-level dependencies required by sandbox-runtime (SRT)"
|
|
10
|
+
@echo " format Run ruff formatter (writes)"
|
|
11
|
+
@echo " format-check Run ruff formatter in check mode (read-only)"
|
|
12
|
+
@echo " lint Run ruff linter"
|
|
13
|
+
@echo " lint-fix Run ruff linter with auto-fix"
|
|
14
|
+
@echo " type-check Run mypy type checker"
|
|
15
|
+
@echo " deadcode Find dead code with vulture (60%% confidence)"
|
|
16
|
+
@echo " static-checks Run format-check, lint, and type-check"
|
|
17
|
+
@echo " all Format, lint-fix, and type-check (writes)"
|
|
18
|
+
@echo " test Run all tests (unit + component)"
|
|
19
|
+
@echo " test-unit Run unit tests only"
|
|
20
|
+
@echo " test-component Run component tests only"
|
|
21
|
+
@echo " docs Build documentation to site/"
|
|
22
|
+
@echo " docs-serve Serve documentation locally with live-reload"
|
|
23
|
+
@echo " clean Remove build artifacts and caches"
|
|
24
|
+
|
|
25
|
+
EXTRAS ?=
|
|
26
|
+
_extra_flags = $(foreach e,$(EXTRAS),--extra $(e))
|
|
27
|
+
|
|
28
|
+
install:
|
|
29
|
+
uv sync $(_extra_flags)
|
|
30
|
+
|
|
31
|
+
install-dev:
|
|
32
|
+
uv sync --extra dev $(_extra_flags)
|
|
33
|
+
|
|
34
|
+
# sandbox-runtime (SRT) relies on native OS sandboxing binaries.
|
|
35
|
+
# macOS needs ripgrep; Linux also needs bubblewrap and socat.
|
|
36
|
+
install-system-dependencies:
|
|
37
|
+
@if [ "$$(uname)" = "Darwin" ]; then \
|
|
38
|
+
echo "Installing macOS system deps for SRT (ripgrep)..."; \
|
|
39
|
+
brew install ripgrep; \
|
|
40
|
+
elif [ "$$(uname)" = "Linux" ]; then \
|
|
41
|
+
echo "Installing Linux system deps for SRT (bubblewrap socat ripgrep)..."; \
|
|
42
|
+
if command -v apt-get >/dev/null 2>&1; then \
|
|
43
|
+
sudo apt-get install -y bubblewrap socat ripgrep; \
|
|
44
|
+
elif command -v dnf >/dev/null 2>&1; then \
|
|
45
|
+
sudo dnf install -y bubblewrap socat ripgrep; \
|
|
46
|
+
elif command -v pacman >/dev/null 2>&1; then \
|
|
47
|
+
sudo pacman -S --noconfirm bubblewrap socat ripgrep; \
|
|
48
|
+
else \
|
|
49
|
+
echo "Unsupported package manager. Install bubblewrap, socat, and ripgrep manually."; \
|
|
50
|
+
exit 1; \
|
|
51
|
+
fi; \
|
|
52
|
+
else \
|
|
53
|
+
echo "Unsupported platform: $$(uname)"; \
|
|
54
|
+
exit 1; \
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
format:
|
|
58
|
+
uv run ruff format $(PACKAGE)
|
|
59
|
+
|
|
60
|
+
format-check:
|
|
61
|
+
uv run ruff format --check $(PACKAGE)
|
|
62
|
+
|
|
63
|
+
lint:
|
|
64
|
+
uv run ruff check $(PACKAGE)
|
|
65
|
+
|
|
66
|
+
lint-fix:
|
|
67
|
+
uv run ruff check --fix $(PACKAGE)
|
|
68
|
+
|
|
69
|
+
type-check:
|
|
70
|
+
uv run mypy $(PACKAGE)
|
|
71
|
+
|
|
72
|
+
deadcode:
|
|
73
|
+
uv run vulture $(PACKAGE) --min-confidence 60
|
|
74
|
+
|
|
75
|
+
static-checks: format-check lint type-check
|
|
76
|
+
|
|
77
|
+
all: format lint-fix type-check
|
|
78
|
+
|
|
79
|
+
test: test-unit test-component
|
|
80
|
+
|
|
81
|
+
test-unit:
|
|
82
|
+
uv run pytest tests/unit -n auto --cov=$(PACKAGE) --cov-report=term-missing --cov-report=html:coverage/unit --cov-report=xml:coverage/unit.xml --junitxml=coverage/unit-junit.xml -o junit_family=legacy
|
|
83
|
+
|
|
84
|
+
test-component:
|
|
85
|
+
uv run pytest tests/component -n auto --cov=$(PACKAGE) --cov-report=term-missing --cov-report=html:coverage/component --cov-report=xml:coverage/component.xml --junitxml=coverage/component-junit.xml -o junit_family=legacy
|
|
86
|
+
|
|
87
|
+
clean:
|
|
88
|
+
rm -rf build/
|
|
89
|
+
rm -rf dist/
|
|
90
|
+
rm -rf *.egg-info/
|
|
91
|
+
rm -rf .pytest_cache/
|
|
92
|
+
rm -rf .mypy_cache/
|
|
93
|
+
rm -rf .ruff_cache/
|
|
94
|
+
rm -rf site/
|
|
95
|
+
rm -rf .uv-cache/
|
|
96
|
+
rm -rf .benchmarks/
|
|
97
|
+
rm -rf coverage/
|
|
98
|
+
rm -f .coverage .coverage.*
|
|
99
|
+
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
|
|
100
|
+
find . -type f -name "*.pyc" -delete 2>/dev/null || true
|
|
101
|
+
|
|
102
|
+
docs:
|
|
103
|
+
uv run mkdocs build --strict -f mkdocs.yaml
|
|
104
|
+
|
|
105
|
+
docs-serve:
|
|
106
|
+
uv run mkdocs serve -f mkdocs.yaml
|