mcp-souschef 2.8.0__py3-none-any.whl → 3.0.0__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.
- {mcp_souschef-2.8.0.dist-info → mcp_souschef-3.0.0.dist-info}/METADATA +82 -10
- {mcp_souschef-2.8.0.dist-info → mcp_souschef-3.0.0.dist-info}/RECORD +23 -19
- {mcp_souschef-2.8.0.dist-info → mcp_souschef-3.0.0.dist-info}/WHEEL +1 -1
- souschef/__init__.py +37 -5
- souschef/assessment.py +1248 -57
- souschef/ci/common.py +126 -0
- souschef/ci/github_actions.py +3 -92
- souschef/ci/gitlab_ci.py +2 -52
- souschef/ci/jenkins_pipeline.py +2 -59
- souschef/cli.py +117 -8
- souschef/converters/playbook.py +259 -90
- souschef/converters/resource.py +12 -11
- souschef/converters/template.py +177 -0
- souschef/core/metrics.py +313 -0
- souschef/core/validation.py +53 -0
- souschef/deployment.py +61 -9
- souschef/server.py +680 -0
- souschef/ui/app.py +469 -351
- souschef/ui/pages/ai_settings.py +74 -8
- souschef/ui/pages/cookbook_analysis.py +2467 -298
- souschef/ui/pages/validation_reports.py +274 -0
- {mcp_souschef-2.8.0.dist-info → mcp_souschef-3.0.0.dist-info}/entry_points.txt +0 -0
- {mcp_souschef-2.8.0.dist-info → mcp_souschef-3.0.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mcp-souschef
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.0.0
|
|
4
4
|
Summary: AI-powered MCP server for Chef to Ansible conversion
|
|
5
5
|
License: MIT
|
|
6
6
|
License-File: LICENSE
|
|
7
7
|
Keywords: chef,ansible,migration,infrastructure,automation,mcp,ai,conversion
|
|
8
8
|
Author: SousChef Contributors
|
|
9
|
-
Requires-Python: >=3.
|
|
9
|
+
Requires-Python: >=3.13,<4.0
|
|
10
10
|
Classifier: Development Status :: 4 - Beta
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
12
|
Classifier: Intended Audience :: System Administrators
|
|
13
13
|
Classifier: License :: OSI Approved :: MIT License
|
|
14
14
|
Classifier: Operating System :: OS Independent
|
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
17
|
Classifier: Programming Language :: Python :: 3.14
|
|
17
18
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
18
19
|
Classifier: Topic :: System :: Systems Administration
|
|
@@ -387,12 +388,55 @@ souschef ui --port 8080
|
|
|
387
388
|
docker build -t souschef-ui .
|
|
388
389
|
|
|
389
390
|
# Run the container
|
|
390
|
-
docker run -p
|
|
391
|
+
docker run -p 9999:9999 souschef-ui
|
|
391
392
|
|
|
392
393
|
# Or use docker-compose
|
|
393
394
|
docker-compose up
|
|
394
395
|
```
|
|
395
396
|
|
|
397
|
+
**Docker Environment Configuration:**
|
|
398
|
+
|
|
399
|
+
SousChef supports AI configuration via environment variables in Docker containers. Create a `.env` file in your project root:
|
|
400
|
+
|
|
401
|
+
```bash
|
|
402
|
+
# Copy the example environment file
|
|
403
|
+
cp .env.example .env
|
|
404
|
+
|
|
405
|
+
# Edit with your AI provider settings
|
|
406
|
+
nano .env
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
**Example .env file:**
|
|
410
|
+
```dotenv
|
|
411
|
+
# AI Configuration
|
|
412
|
+
SOUSCHEF_AI_PROVIDER=Anthropic (Claude)
|
|
413
|
+
SOUSCHEF_AI_MODEL=claude-3-5-sonnet-20241022
|
|
414
|
+
SOUSCHEF_AI_API_KEY=your-api-key-here
|
|
415
|
+
SOUSCHEF_AI_BASE_URL=
|
|
416
|
+
SOUSCHEF_AI_PROJECT_ID=
|
|
417
|
+
SOUSCHEF_AI_TEMPERATURE=0.7
|
|
418
|
+
SOUSCHEF_AI_MAX_TOKENS=4000
|
|
419
|
+
|
|
420
|
+
# Streamlit Configuration (optional)
|
|
421
|
+
STREAMLIT_SERVER_PORT=9999
|
|
422
|
+
STREAMLIT_SERVER_HEADLESS=true
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
**Supported AI Providers:**
|
|
426
|
+
- `Anthropic (Claude)` - Anthropic Claude models
|
|
427
|
+
- `OpenAI (GPT)` - OpenAI GPT models
|
|
428
|
+
- `IBM Watsonx` - IBM Watsonx AI models
|
|
429
|
+
- `Red Hat Lightspeed` - Red Hat Lightspeed models
|
|
430
|
+
|
|
431
|
+
**Environment Variables:**
|
|
432
|
+
- `SOUSCHEF_AI_PROVIDER` - AI provider name (required)
|
|
433
|
+
- `SOUSCHEF_AI_MODEL` - Model name (required)
|
|
434
|
+
- `SOUSCHEF_AI_API_KEY` - API key for authentication (required)
|
|
435
|
+
- `SOUSCHEF_AI_BASE_URL` - Custom API base URL (optional)
|
|
436
|
+
- `SOUSCHEF_AI_PROJECT_ID` - Project ID for Watsonx (optional)
|
|
437
|
+
- `SOUSCHEF_AI_TEMPERATURE` - Model temperature 0.0-2.0 (optional, default: 0.7)
|
|
438
|
+
- `SOUSCHEF_AI_MAX_TOKENS` - Maximum tokens to generate (optional, default: 4000)
|
|
439
|
+
|
|
396
440
|
**Docker Compose (recommended for development):**
|
|
397
441
|
```yaml
|
|
398
442
|
version: '3.8'
|
|
@@ -400,7 +444,14 @@ services:
|
|
|
400
444
|
souschef-ui:
|
|
401
445
|
build: .
|
|
402
446
|
ports:
|
|
403
|
-
- "
|
|
447
|
+
- "9999:9999"
|
|
448
|
+
env_file:
|
|
449
|
+
- .env
|
|
450
|
+
environment:
|
|
451
|
+
- PYTHONPATH=/app
|
|
452
|
+
- STREAMLIT_SERVER_ADDRESS=0.0.0.0
|
|
453
|
+
- STREAMLIT_SERVER_PORT=9999
|
|
454
|
+
- STREAMLIT_SERVER_HEADLESS=true
|
|
404
455
|
restart: unless-stopped
|
|
405
456
|
```
|
|
406
457
|
|
|
@@ -671,6 +722,11 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
|
|
|
671
722
|
- **Interactive dependency mapping and visualization** with Plotly graphs and NetworkX analysis
|
|
672
723
|
- **Real-time progress tracking** for all analysis operations with Streamlit progress bars
|
|
673
724
|
- **Static graph visualization** with matplotlib for reports and documentation
|
|
725
|
+
- **Automated ERB to Jinja2 template conversion** - Converts Chef ERB templates to Ansible Jinja2 templates during cookbook conversion
|
|
726
|
+
- Converts ERB syntax to Jinja2: `<%= var %>` → `{{ var }}`, `<% if %>` → `{% if %}`
|
|
727
|
+
- Extracts template variables for validation and documentation
|
|
728
|
+
- Includes converted templates in downloadable playbook archives
|
|
729
|
+
- UI displays converted templates with variable lists and preview
|
|
674
730
|
|
|
675
731
|
### Planned
|
|
676
732
|
- 📅 Enhanced graph layout algorithms for large dependency networks (force-directed, hierarchical)
|
|
@@ -1396,12 +1452,28 @@ The project includes several VS Code tasks:
|
|
|
1396
1452
|
|
|
1397
1453
|
## Contributing
|
|
1398
1454
|
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1455
|
+
Thank you for your interest in contributing to SousChef!
|
|
1456
|
+
|
|
1457
|
+
**Before you start**, please read the [**Architecture Guide**](docs/ARCHITECTURE.md) to understand where different code belongs and why. This is essential for understanding how to structure your contributions.
|
|
1458
|
+
|
|
1459
|
+
For complete contributing guidelines, see [CONTRIBUTING.md](CONTRIBUTING.md), which includes:
|
|
1460
|
+
- Development setup instructions
|
|
1461
|
+
- Code standards and quality tools
|
|
1462
|
+
- Testing requirements and patterns
|
|
1463
|
+
- Commit conventions and PR process
|
|
1464
|
+
- Release procedures
|
|
1465
|
+
|
|
1466
|
+
**Quick Checklist for Contributions:**
|
|
1467
|
+
1. Read [**docs/ARCHITECTURE.md**](docs/ARCHITECTURE.md) to understand module structure
|
|
1468
|
+
2. Ensure all tests pass: `poetry run pytest`
|
|
1469
|
+
3. Code passes linting: `poetry run ruff check .`
|
|
1470
|
+
4. Code is formatted: `poetry run ruff format .`
|
|
1471
|
+
5. Type hints are complete: `poetry run mypy souschef`
|
|
1472
|
+
6. Coverage maintained at 90%+
|
|
1473
|
+
7. All functions have docstrings
|
|
1474
|
+
8. Follow [conventional commits](CONTRIBUTING.md#commit-message-format)
|
|
1475
|
+
|
|
1476
|
+
Questions? Check [ARCHITECTURE.md](docs/ARCHITECTURE.md) for module responsibilities or [CONTRIBUTING.md](CONTRIBUTING.md) for the full developer guide.
|
|
1405
1477
|
|
|
1406
1478
|
## License
|
|
1407
1479
|
|
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
souschef/__init__.py,sha256=
|
|
2
|
-
souschef/assessment.py,sha256=
|
|
1
|
+
souschef/__init__.py,sha256=Wh2DPfy1eWvoA8u1fNr_bY5TPEJvHZMVJ76TtxpmPxM,1521
|
|
2
|
+
souschef/assessment.py,sha256=YOv-EgZHmiBV9IiCxNOi4fYwGl8_0ntoU2kKMgERUTc,93256
|
|
3
3
|
souschef/ci/__init__.py,sha256=GHaqDk4auB2kI7_fQtF2FRg5nP-iX6wJchj_uTlXcYg,411
|
|
4
|
-
souschef/ci/
|
|
5
|
-
souschef/ci/
|
|
6
|
-
souschef/ci/
|
|
7
|
-
souschef/
|
|
4
|
+
souschef/ci/common.py,sha256=kDqIC9cTUN398NgM29cn8HmMjckxvEQ5ENclOZRS8fw,4746
|
|
5
|
+
souschef/ci/github_actions.py,sha256=EVnnOPTLCeUmTfR-acpLp-c_dxapMfrrDWaK4SSBkdM,7818
|
|
6
|
+
souschef/ci/gitlab_ci.py,sha256=4FcK8edci3ixuiUtYb6EFaAfsqjz0OBmW-lyPLH3YzY,6708
|
|
7
|
+
souschef/ci/jenkins_pipeline.py,sha256=XEuZrVKVmOlQOKucgGcd3vhAFh5qT05ILNnjKjkqTPU,7362
|
|
8
|
+
souschef/cli.py,sha256=yB6xo8YqDEWwTgD0RHGHcWFfOrK6fIKM7CRxDcGYgQg,37291
|
|
8
9
|
souschef/converters/__init__.py,sha256=kkPm758XiFDdUYvdVPAVjssFvf15LasJcob1EY1EMIs,681
|
|
9
10
|
souschef/converters/cookbook_specific.py,sha256=ZvE9-bZtyXuf2E3HW4E9_GWzAqtm7e4YHj9qm1Xu_XI,3767
|
|
10
11
|
souschef/converters/cookbook_specific.py.backup,sha256=9XycZz6oNNTEtLINo0hHNR3df-pbZIkLprhLniE2ENI,3468
|
|
11
12
|
souschef/converters/habitat.py,sha256=4eVGAcX0576zLXW9yqYvuaRxOK2g6BOIJo_ws-PonHU,22516
|
|
12
|
-
souschef/converters/playbook.py,sha256=
|
|
13
|
-
souschef/converters/resource.py,sha256=
|
|
13
|
+
souschef/converters/playbook.py,sha256=Ll6gAmUNr30LYGRY3p2eT28knvoKl1LuMI-WxaZZ8PY,91909
|
|
14
|
+
souschef/converters/resource.py,sha256=NYMcp1-obg_ad_XPuYDuUH_0j65agRbAeWzXPfbSi5c,13570
|
|
15
|
+
souschef/converters/template.py,sha256=swX7LpWrKZgFtg6MaR7rltShBkPDbQAb65d1NF_nILo,5447
|
|
14
16
|
souschef/core/__init__.py,sha256=80a0G6wQGfh-Z7U1gsFaeC97bM4sp_3YGil-lN02Pl0,1894
|
|
15
17
|
souschef/core/constants.py,sha256=AyIpc9cJjQEDc1yOcoKc_2-cJB4PekSpPKEK2S9jDl8,5122
|
|
16
18
|
souschef/core/errors.py,sha256=zj_LHDRxUvHmcs-nZjOWu4B_MhY5WVq2okyZOxyycCI,8605
|
|
19
|
+
souschef/core/metrics.py,sha256=k56opuVmRorrBwErbxLgXu_GkfGZXA_rEfhcsHs1JHI,9850
|
|
17
20
|
souschef/core/path_utils.py,sha256=2hG6joupZR_08MMpHHbv2KKOFu-8tMafuQMqV0_1Nqw,1790
|
|
18
21
|
souschef/core/ruby_utils.py,sha256=vUeFZBdjbFFFJlwo4fIboR23rXmbcYL2Tztt4RYhps0,1043
|
|
19
|
-
souschef/core/validation.py,sha256=
|
|
20
|
-
souschef/deployment.py,sha256=
|
|
22
|
+
souschef/core/validation.py,sha256=DXfkm1p5prSAJ-Oruk5JekNiDFI49Dql1bGEzKymYXs,19158
|
|
23
|
+
souschef/deployment.py,sha256=ZCrVK5Ik4TbVfoJ3dS1-6FNUzxfIE6kni5Fnj3rIbCk,61908
|
|
21
24
|
souschef/filesystem/__init__.py,sha256=2H7Pdeedz0MfmgpRlmii_vx61qr0jtxFndT0APPm6Qs,142
|
|
22
25
|
souschef/filesystem/operations.py,sha256=OMMozBfV_o70b47KioiZ2i6HViiUQPE5mVBeKcKFepo,1654
|
|
23
26
|
souschef/parsers/__init__.py,sha256=gF-vPslzs9iLxsaDzFnWDPpYFDAIwyAifjUwzYurPLg,1104
|
|
@@ -29,14 +32,15 @@ souschef/parsers/recipe.py,sha256=guhEttS_AyT2kckbde3_-kAyGoR4JyFMNZFAP5V1XIM,70
|
|
|
29
32
|
souschef/parsers/resource.py,sha256=EHxmojbQ7Hx5GsL5-x9mFBYk3FhGTpx-qw1uUVKQkRo,5348
|
|
30
33
|
souschef/parsers/template.py,sha256=iOHMoQH7KkPzigTyyoxav8rb2ENYmfxgcvKGqvoYkgU,10532
|
|
31
34
|
souschef/profiling.py,sha256=a6Pn57CZR3UPR1YIY8gfbuTPRuPkFrfIFBmctOcaZgY,17315
|
|
32
|
-
souschef/server.py,sha256=
|
|
35
|
+
souschef/server.py,sha256=JJyGSAHzbMxL2PMJVdlLlmNjXESjo6MUmjniNXGdSnc,111463
|
|
33
36
|
souschef/ui/__init__.py,sha256=U3W6X4ww7CxQVuetcocObWn5iY6lUFiNX7WoDBJeD34,195
|
|
34
|
-
souschef/ui/app.py,sha256=
|
|
37
|
+
souschef/ui/app.py,sha256=DlUeYP7eqw76JqIGGHCb13kP1qzq0Rj4X1pEN1_eW-Y,101409
|
|
35
38
|
souschef/ui/health_check.py,sha256=mEzec8L6XPRekOBAXngqQz5dnzal-a4p3D70mkPriiA,903
|
|
36
|
-
souschef/ui/pages/ai_settings.py,sha256=
|
|
37
|
-
souschef/ui/pages/cookbook_analysis.py,sha256=
|
|
38
|
-
|
|
39
|
-
mcp_souschef-
|
|
40
|
-
mcp_souschef-
|
|
41
|
-
mcp_souschef-
|
|
42
|
-
mcp_souschef-
|
|
39
|
+
souschef/ui/pages/ai_settings.py,sha256=tIwgWBqxCEqFykmrLRPiVQjl-m-I1Mbq0RoB1YA5faM,17774
|
|
40
|
+
souschef/ui/pages/cookbook_analysis.py,sha256=92LRrRMi_YbjOLN-zhNH4ZYnO0HK_OMA--CPSYn2I1E,123424
|
|
41
|
+
souschef/ui/pages/validation_reports.py,sha256=R3xHTJb_y2b0tI8N0qPF1oS4f9ZVb539_82dj5nmmxA,7593
|
|
42
|
+
mcp_souschef-3.0.0.dist-info/METADATA,sha256=B96FJM5QKIJCGLMaXqSrR5NLue-3Y9x8nnigYvcuYHw,54133
|
|
43
|
+
mcp_souschef-3.0.0.dist-info/WHEEL,sha256=3ny-bZhpXrU6vSQ1UPG34FoxZBp3lVcvK0LkgUz6VLk,88
|
|
44
|
+
mcp_souschef-3.0.0.dist-info/entry_points.txt,sha256=NVSk61tLG4W0xEkWGOMXAVCIUyodyZCY_j3Z_0m6rkQ,80
|
|
45
|
+
mcp_souschef-3.0.0.dist-info/licenses/LICENSE,sha256=t31dYSuvYYNw6trj-coWSsLK-Tg_Iyl8ObcolQcrUKM,1078
|
|
46
|
+
mcp_souschef-3.0.0.dist-info/RECORD,,
|
souschef/__init__.py
CHANGED
|
@@ -1,18 +1,50 @@
|
|
|
1
1
|
"""SousChef: AI-powered Chef to Ansible converter."""
|
|
2
2
|
|
|
3
|
-
from
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
import tomllib
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# Read version from pyproject.toml
|
|
9
|
+
def _get_version() -> str:
|
|
10
|
+
"""Get version from pyproject.toml."""
|
|
11
|
+
pyproject_path = Path(__file__).parent.parent / "pyproject.toml"
|
|
12
|
+
try:
|
|
13
|
+
with pyproject_path.open("rb") as f:
|
|
14
|
+
data = tomllib.load(f)
|
|
15
|
+
version = data.get("tool", {}).get("poetry", {}).get("version")
|
|
16
|
+
return str(version) if version else "unknown"
|
|
17
|
+
except OSError:
|
|
18
|
+
return "unknown"
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
__version__ = _get_version()
|
|
22
|
+
|
|
23
|
+
from souschef.assessment import ( # noqa: E402
|
|
4
24
|
analyse_cookbook_dependencies,
|
|
5
25
|
assess_chef_migration_complexity,
|
|
6
26
|
generate_migration_plan,
|
|
7
27
|
generate_migration_report,
|
|
8
28
|
validate_conversion,
|
|
9
29
|
)
|
|
10
|
-
from souschef.deployment import (
|
|
30
|
+
from souschef.deployment import ( # noqa: E402
|
|
11
31
|
analyse_chef_application_patterns,
|
|
12
32
|
)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
33
|
+
|
|
34
|
+
# Import server functions only if MCP is available
|
|
35
|
+
try:
|
|
36
|
+
from souschef.server import (
|
|
37
|
+
analyse_chef_search_patterns,
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
_server_available = True
|
|
41
|
+
except ImportError:
|
|
42
|
+
_server_available = False
|
|
43
|
+
|
|
44
|
+
# Define a placeholder function for when MCP is not available
|
|
45
|
+
def analyse_chef_search_patterns(*args, **kwargs):
|
|
46
|
+
raise NotImplementedError("MCP server not available")
|
|
47
|
+
|
|
16
48
|
|
|
17
49
|
__all__ = [
|
|
18
50
|
"analyse_cookbook_dependencies",
|