mcp-souschef 2.5.3__py3-none-any.whl → 2.8.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.
@@ -1,31 +1,43 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-souschef
3
- Version: 2.5.3
3
+ Version: 2.8.0
4
4
  Summary: AI-powered MCP server for Chef to Ansible conversion
5
5
  License: MIT
6
6
  License-File: LICENSE
7
+ Keywords: chef,ansible,migration,infrastructure,automation,mcp,ai,conversion
7
8
  Author: SousChef Contributors
8
9
  Requires-Python: >=3.14,<4.0
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Intended Audience :: System Administrators
9
13
  Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
10
15
  Classifier: Programming Language :: Python :: 3
11
16
  Classifier: Programming Language :: Python :: 3.14
17
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
18
+ Classifier: Topic :: System :: Systems Administration
19
+ Classifier: Topic :: Utilities
12
20
  Provides-Extra: ui
13
21
  Requires-Dist: anthropic (>=0.75.0)
14
22
  Requires-Dist: click (>=8.1.0)
15
23
  Requires-Dist: mcp (>=1.25.0)
24
+ Requires-Dist: openai (>=1.0.0)
16
25
  Requires-Dist: pandas (>=2.0.0) ; extra == "ui"
17
26
  Requires-Dist: plotly (>=5.0.0)
18
27
  Requires-Dist: python-dotenv (>=1.2.1)
19
28
  Requires-Dist: pyyaml (>=6.0.0)
20
29
  Requires-Dist: streamlit (>=1.28.0)
21
30
  Requires-Dist: zod (>=0.8.0)
31
+ Project-URL: Documentation, https://kpeacocke.github.io/souschef/
32
+ Project-URL: Homepage, https://github.com/kpeacocke/souschef
33
+ Project-URL: Repository, https://github.com/kpeacocke/souschef
22
34
  Description-Content-Type: text/markdown
23
35
 
24
36
  # Chef to Ansible migration - SousChef MCP
25
37
 
26
38
  An AI-powered MCP (Model Context Protocol) server that provides comprehensive Chef-to-Ansible migration capabilities for enterprise infrastructure transformation.
27
39
 
28
- [![PyPI version](https://img.shields.io/pypi/v/mcp-souschef.svg)](https://pypi.org/project/mcp-souschef/)
40
+ [![GitHub release](https://img.shields.io/github/v/release/kpeacocke/souschef)](https://github.com/kpeacocke/souschef/releases)
29
41
  [![Python Version](https://img.shields.io/badge/python-3.14%2B-blue.svg)](https://www.python.org/downloads/)
30
42
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
31
43
  [![Test Coverage](https://img.shields.io/badge/coverage-91%25-brightgreen.svg)](htmlcov/index.html)
@@ -37,17 +49,17 @@ An AI-powered MCP (Model Context Protocol) server that provides comprehensive Ch
37
49
 
38
50
  ## Overview - Chef to Ansible features
39
51
 
40
- SousChef is a complete enterprise-grade migration platform with **27 primary MCP tools** organised across **9 major capability areas** to facilitate Chef-to-Ansible AWX/AAP migrations. From cookbook analysis to deployment pattern conversion, including Chef Habitat to containerised deployments and CI/CD pipeline generation, SousChef provides everything needed for a successful infrastructure automation migration.
52
+ SousChef is a complete enterprise-grade migration platform with **32 primary MCP tools** organised across **10 major capability areas** to facilitate Chef-to-Ansible AWX/AAP migrations. From cookbook analysis to deployment pattern conversion, including Chef Habitat to containerised deployments and CI/CD pipeline generation, SousChef provides everything needed for a successful infrastructure automation migration.
41
53
 
42
54
  ### About Tool Counts
43
55
 
44
- **Why 27 tools in the documentation but more in the server?**
56
+ **Why 32 tools in the documentation but more in the server?**
45
57
 
46
- The MCP server provides **37 total tools** (35 public + 2 internal). This documentation focuses on the **27 primary user-facing tools** that cover the main migration capabilities. The remaining 10 tools are low-level filesystem operations and helper utilities used internally by the main tools.
58
+ The MCP server provides **37 total tools** (35 public + 2 internal). This documentation focuses on the **32 primary user-facing tools** that cover the main migration capabilities. The remaining 3 tools are low-level filesystem operations and helper utilities used internally by the main tools.
47
59
 
48
60
  As a user, you'll primarily interact with the 27 documented tools. Your AI assistant may use the additional tools automatically when needed, but you don't need to know about them for successful migrations.
49
61
 
50
- > 💡 **For developers:** See `souschef/server.py` for the complete list of all 37 registered tools.
62
+ > **For developers:** See `souschef/server.py` for the complete list of all 37 registered tools.
51
63
 
52
64
  ## Model Agnostic - Works with Any AI Model
53
65
 
@@ -95,7 +107,7 @@ Complete cookbook introspection and analysis tools:
95
107
  - **list_directory** - Navigate and explore cookbook directory structures
96
108
  - **read_file** - Read cookbook files with error handling
97
109
  - **read_cookbook_metadata** - Parse metadata.rb files for dependencies and cookbook information
98
- - **parse_recipe** - Analyze Chef recipes and extract resources, actions, and properties
110
+ - **parse_recipe** - Analyse Chef recipes and extract resources, actions, and properties
99
111
  - **parse_attributes** - Parse attribute files with **advanced precedence resolution** (6 levels: default, force_default, normal, override, force_override, automatic)
100
112
  - **list_cookbook_structure** - Display complete cookbook directory hierarchy
101
113
 
@@ -116,7 +128,7 @@ Convert Chef search patterns to dynamic Ansible inventory:
116
128
 
117
129
  - **convert_chef_search_to_inventory** - Transform Chef search queries to Ansible inventory groups
118
130
  - **generate_dynamic_inventory_script** - Create dynamic inventory scripts from Chef server queries
119
- - **analyze_chef_search_patterns** - Discover and analyze search usage in cookbooks
131
+ - **analyse_chef_search_patterns** - Discover and analyse search usage in cookbooks
120
132
 
121
133
  ### 4. InSpec Integration & Validation
122
134
  Complete InSpec-to-Ansible testing pipeline:
@@ -130,14 +142,14 @@ Chef data bags to Ansible vars/vault conversion:
130
142
 
131
143
  - **convert_chef_databag_to_vars** - Transform data bags to Ansible variable files
132
144
  - **generate_ansible_vault_from_databags** - Convert encrypted data bags to Ansible Vault
133
- - **analyze_chef_databag_usage** - Analyze data bag usage patterns in cookbooks
145
+ - **analyse_chef_databag_usage** - Analyse data bag usage patterns in cookbooks
134
146
 
135
147
  ### 6. Environment & Configuration Management
136
148
  Chef environments to Ansible inventory groups:
137
149
 
138
150
  - **convert_chef_environment_to_inventory_group** - Transform Chef environments to inventory
139
151
  - **generate_inventory_from_chef_environments** - Generate complete inventory from environments
140
- - **analyze_chef_environment_usage** - Analyze environment usage in cookbooks
152
+ - **analyse_chef_environment_usage** - Analyse environment usage in cookbooks
141
153
 
142
154
  ### 7. AWX/Ansible Automation Platform Integration
143
155
  Enterprise AWX/AAP configuration generation:
@@ -263,10 +275,10 @@ Output formats:
263
275
  - **json**: Structured JSON for programmatic processing
264
276
  - **summary**: Quick overview with counts only
265
277
 
266
- - **analyze_chef_application_patterns** - Identify application deployment patterns
278
+ - **analyse_chef_application_patterns** - Identify application deployment patterns
267
279
  - **assess_chef_migration_complexity** - Comprehensive migration complexity assessment
268
280
  - **generate_migration_plan** - Create detailed migration execution plans
269
- - **analyze_cookbook_dependencies** - Analyze dependencies and migration order
281
+ - **analyse_cookbook_dependencies** - Analyse dependencies and migration order
270
282
  - **generate_migration_report** - Generate executive and technical migration reports
271
283
 
272
284
  ## Migration Workflow
@@ -276,8 +288,8 @@ Output formats:
276
288
  # Assess migration complexity
277
289
  assess_chef_migration_complexity /path/to/cookbooks
278
290
 
279
- # Analyze cookbook dependencies
280
- analyze_cookbook_dependencies /path/to/cookbook
291
+ # Analyse cookbook dependencies
292
+ analyse_cookbook_dependencies /path/to/cookbook
281
293
 
282
294
  # Generate migration plan
283
295
  generate_migration_plan '{\"cookbooks\": [\"/path/to/cookbook1\", \"/path/to/cookbook2\"]}'
@@ -369,6 +381,29 @@ souschef ui
369
381
  souschef ui --port 8080
370
382
  ```
371
383
 
384
+ **Run in Docker:**
385
+ ```bash
386
+ # Build the image
387
+ docker build -t souschef-ui .
388
+
389
+ # Run the container
390
+ docker run -p 8501:8501 souschef-ui
391
+
392
+ # Or use docker-compose
393
+ docker-compose up
394
+ ```
395
+
396
+ **Docker Compose (recommended for development):**
397
+ ```yaml
398
+ version: '3.8'
399
+ services:
400
+ souschef-ui:
401
+ build: .
402
+ ports:
403
+ - "8501:8501"
404
+ restart: unless-stopped
405
+ ```
406
+
372
407
  **Features:**
373
408
  - Clean, professional design matching documentation standards
374
409
  - Real-time cookbook analysis with progress indicators
@@ -592,7 +627,7 @@ Each MCP tool includes comprehensive documentation:
592
627
  - **[Testing Strategy Guide](docs/testing-strategy.md)** - Validation and testing approaches
593
628
  - **[Best Practices](docs/best-practices.md)** - Recommended patterns and approaches
594
629
 
595
- ## 🤝 Contributing
630
+ ## Contributing
596
631
 
597
632
  We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for:
598
633
  - Development setup and workflow
@@ -600,13 +635,13 @@ We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for:
600
635
  - Pull request process
601
636
  - Issue reporting guidelines
602
637
 
603
- ## 📄 License
638
+ ## License
604
639
 
605
640
  This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
606
641
 
607
642
  ## Roadmap
608
643
 
609
- ### Completed
644
+ ### Completed
610
645
  - Complete Chef cookbook parsing (recipes, attributes, metadata, templates)
611
646
  - InSpec profile parsing and conversion to Testinfra/Ansible tests
612
647
  - Chef resource to Ansible task conversion with module mapping
@@ -637,7 +672,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
637
672
  - **Real-time progress tracking** for all analysis operations with Streamlit progress bars
638
673
  - **Static graph visualization** with matplotlib for reports and documentation
639
674
 
640
- ### Planned 📅
675
+ ### Planned
641
676
  - 📅 Enhanced graph layout algorithms for large dependency networks (force-directed, hierarchical)
642
677
  - 📅 Export functionality for graphs (PNG, SVG, PDF formats)
643
678
  - 📅 UI configuration options and themes
@@ -649,7 +684,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
649
684
  - 📅 Migration templates and presets
650
685
  - 📅 Terraform provider for infrastructure state management
651
686
 
652
- ## 🙋‍♀️ Support & Community
687
+ ## Support & Community
653
688
 
654
689
  - **Issues**: [GitHub Issues](https://github.com/kpeacocke/souschef/issues)
655
690
  - **Discussions**: [GitHub Discussions](https://github.com/kpeacocke/souschef/discussions)
@@ -657,7 +692,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
657
692
 
658
693
  ---
659
694
 
660
- **SousChef** - *Transforming infrastructure automation, one recipe at a time.*
695
+ **SousChef** - *Transforming infrastructure automation, one recipe at a time.*
661
696
  desc 'Ensure package nginx is properly configured'
662
697
  impact 1.0
663
698
 
@@ -1374,5 +1409,5 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
1374
1409
 
1375
1410
  ---
1376
1411
 
1377
- **SousChef** - *Ansible automation, one recipe at a time.*
1412
+ **SousChef** - *Ansible automation, one recipe at a time.*
1378
1413
 
@@ -0,0 +1,42 @@
1
+ souschef/__init__.py,sha256=oJgStDVoLf97poc0CoNXfD6ZTRe23R9vE_37Q8L2OhE,650
2
+ souschef/assessment.py,sha256=QRU3bgGrASYyp2f0aAgdnqt8t1Uvpz-0oj7Z5nuhMqw,53933
3
+ souschef/ci/__init__.py,sha256=GHaqDk4auB2kI7_fQtF2FRg5nP-iX6wJchj_uTlXcYg,411
4
+ souschef/ci/github_actions.py,sha256=-Ov7pD2cEyImMgOY3ZYBC7qTc6Z9Rq0WUUVCZ0HjBSE,11215
5
+ souschef/ci/gitlab_ci.py,sha256=p7N5t5AavQyJMUFN1JwIBENltNggBBnpdQGkNbD6ieY,8373
6
+ souschef/ci/jenkins_pipeline.py,sha256=rKeyc0fozKJRektAFz75J5rSODE5JpZXGwfvJs_v28w,9264
7
+ souschef/cli.py,sha256=q7p9bY75PHFPAyHtXboWbMorxFoJ-ruojLS6JnzUrpw,33772
8
+ souschef/converters/__init__.py,sha256=kkPm758XiFDdUYvdVPAVjssFvf15LasJcob1EY1EMIs,681
9
+ souschef/converters/cookbook_specific.py,sha256=ZvE9-bZtyXuf2E3HW4E9_GWzAqtm7e4YHj9qm1Xu_XI,3767
10
+ souschef/converters/cookbook_specific.py.backup,sha256=9XycZz6oNNTEtLINo0hHNR3df-pbZIkLprhLniE2ENI,3468
11
+ souschef/converters/habitat.py,sha256=4eVGAcX0576zLXW9yqYvuaRxOK2g6BOIJo_ws-PonHU,22516
12
+ souschef/converters/playbook.py,sha256=fHOBNwO2a1-_mFwdJpME3xQzgrtfvqrmfLcZOoChDIo,84425
13
+ souschef/converters/resource.py,sha256=MTfesZ9aGj1GeYZXxoyeupFS6ErcxiZg81CQ1zK7FiE,13428
14
+ souschef/core/__init__.py,sha256=80a0G6wQGfh-Z7U1gsFaeC97bM4sp_3YGil-lN02Pl0,1894
15
+ souschef/core/constants.py,sha256=AyIpc9cJjQEDc1yOcoKc_2-cJB4PekSpPKEK2S9jDl8,5122
16
+ souschef/core/errors.py,sha256=zj_LHDRxUvHmcs-nZjOWu4B_MhY5WVq2okyZOxyycCI,8605
17
+ souschef/core/path_utils.py,sha256=2hG6joupZR_08MMpHHbv2KKOFu-8tMafuQMqV0_1Nqw,1790
18
+ souschef/core/ruby_utils.py,sha256=vUeFZBdjbFFFJlwo4fIboR23rXmbcYL2Tztt4RYhps0,1043
19
+ souschef/core/validation.py,sha256=f37CFiJwPVaC0tN1nKlLFHIAdcZwT2CPNPnj2SHavss,17896
20
+ souschef/deployment.py,sha256=EANWsnMN0VxGS17gQdJU4yXhwmCzMe73TVXcRfQ7Eas,60332
21
+ souschef/filesystem/__init__.py,sha256=2H7Pdeedz0MfmgpRlmii_vx61qr0jtxFndT0APPm6Qs,142
22
+ souschef/filesystem/operations.py,sha256=OMMozBfV_o70b47KioiZ2i6HViiUQPE5mVBeKcKFepo,1654
23
+ souschef/parsers/__init__.py,sha256=gF-vPslzs9iLxsaDzFnWDPpYFDAIwyAifjUwzYurPLg,1104
24
+ souschef/parsers/attributes.py,sha256=JmgFaYjlT0i2__hCk6hSqZRjq4xJaTdGsBDgHEu3ItY,18239
25
+ souschef/parsers/habitat.py,sha256=CtVgLfmpo7SLp-ADyR-DXRYaRUur3bwJjlnpLyocMhc,10483
26
+ souschef/parsers/inspec.py,sha256=zhlIDZmE6A9qws5gnrLxhGGBfHOebNTLWpZZI-XXTkU,34209
27
+ souschef/parsers/metadata.py,sha256=laSxlsebsgTzRDM_B8eIXddeApbR4ATm-W4GAGucZpc,6324
28
+ souschef/parsers/recipe.py,sha256=guhEttS_AyT2kckbde3_-kAyGoR4JyFMNZFAP5V1XIM,7090
29
+ souschef/parsers/resource.py,sha256=EHxmojbQ7Hx5GsL5-x9mFBYk3FhGTpx-qw1uUVKQkRo,5348
30
+ souschef/parsers/template.py,sha256=iOHMoQH7KkPzigTyyoxav8rb2ENYmfxgcvKGqvoYkgU,10532
31
+ souschef/profiling.py,sha256=a6Pn57CZR3UPR1YIY8gfbuTPRuPkFrfIFBmctOcaZgY,17315
32
+ souschef/server.py,sha256=O5WAYc992M9QzowcURDsw91q-WUnErDL68ftjMLRuXo,87150
33
+ souschef/ui/__init__.py,sha256=U3W6X4ww7CxQVuetcocObWn5iY6lUFiNX7WoDBJeD34,195
34
+ souschef/ui/app.py,sha256=pKzoVQE_qy4FzjLIxF5BUpfe76evxz6a6Ossarib37Q,98112
35
+ souschef/ui/health_check.py,sha256=mEzec8L6XPRekOBAXngqQz5dnzal-a4p3D70mkPriiA,903
36
+ souschef/ui/pages/ai_settings.py,sha256=HRmTQjs0EPg8FdSkcozonpDDXnTf0WHn9IvFAhigGM4,15911
37
+ souschef/ui/pages/cookbook_analysis.py,sha256=Llx3o1QJsD9PCHhZD_SjjVyz_JwrA9K3iToMtp9ZF9g,47108
38
+ mcp_souschef-2.8.0.dist-info/METADATA,sha256=yc21kT6owG-dLD6pXdkEJOzpmQuSj7XS0QcLnyKZETo,51221
39
+ mcp_souschef-2.8.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
40
+ mcp_souschef-2.8.0.dist-info/entry_points.txt,sha256=NVSk61tLG4W0xEkWGOMXAVCIUyodyZCY_j3Z_0m6rkQ,80
41
+ mcp_souschef-2.8.0.dist-info/licenses/LICENSE,sha256=t31dYSuvYYNw6trj-coWSsLK-Tg_Iyl8ObcolQcrUKM,1078
42
+ mcp_souschef-2.8.0.dist-info/RECORD,,
souschef/__init__.py CHANGED
@@ -1,17 +1,25 @@
1
1
  """SousChef: AI-powered Chef to Ansible converter."""
2
2
 
3
3
  from souschef.assessment import (
4
- analyze_cookbook_dependencies,
4
+ analyse_cookbook_dependencies,
5
5
  assess_chef_migration_complexity,
6
6
  generate_migration_plan,
7
7
  generate_migration_report,
8
8
  validate_conversion,
9
9
  )
10
+ from souschef.deployment import (
11
+ analyse_chef_application_patterns,
12
+ )
13
+ from souschef.server import (
14
+ analyse_chef_search_patterns,
15
+ )
10
16
 
11
17
  __all__ = [
12
- "analyze_cookbook_dependencies",
18
+ "analyse_cookbook_dependencies",
13
19
  "assess_chef_migration_complexity",
14
20
  "generate_migration_plan",
15
21
  "generate_migration_report",
16
22
  "validate_conversion",
23
+ "analyse_chef_application_patterns",
24
+ "analyse_chef_search_patterns",
17
25
  ]
souschef/assessment.py CHANGED
@@ -63,7 +63,7 @@ def _process_cookbook_assessment(
63
63
  valid_paths = _parse_cookbook_paths(cookbook_paths)
64
64
 
65
65
  # Analyze all cookbooks (handles empty list gracefully)
66
- cookbook_assessments, overall_metrics = _analyze_cookbook_metrics(valid_paths)
66
+ cookbook_assessments, overall_metrics = _analyse_cookbook_metrics(valid_paths)
67
67
 
68
68
  # Generate recommendations and reports
69
69
  recommendations = _generate_migration_recommendations_from_assessment(
@@ -111,7 +111,7 @@ def parse_chef_migration_assessment(
111
111
  valid_paths = _parse_cookbook_paths(cookbook_paths)
112
112
 
113
113
  # Analyze all cookbooks (handles empty list gracefully)
114
- cookbook_assessments, overall_metrics = _analyze_cookbook_metrics(valid_paths)
114
+ cookbook_assessments, overall_metrics = _analyse_cookbook_metrics(valid_paths)
115
115
 
116
116
  # Generate recommendations and reports
117
117
  recommendations = _generate_migration_recommendations_from_assessment(
@@ -294,11 +294,11 @@ def generate_migration_plan(
294
294
  return format_error_with_context(e, "generating migration plan", cookbook_paths)
295
295
 
296
296
 
297
- def analyze_cookbook_dependencies(
297
+ def analyse_cookbook_dependencies(
298
298
  cookbook_path: str, dependency_depth: str = "direct"
299
299
  ) -> str:
300
300
  """
301
- Analyze cookbook dependencies and identify migration order requirements.
301
+ Analyse cookbook dependencies and identify migration order requirements.
302
302
 
303
303
  Args:
304
304
  cookbook_path: Path to Chef cookbook or cookbooks directory
@@ -325,7 +325,7 @@ def analyze_cookbook_dependencies(
325
325
  )
326
326
 
327
327
  # Analyze dependencies
328
- dependency_analysis = _analyze_cookbook_dependencies_detailed(cookbook_path_obj)
328
+ dependency_analysis = _analyse_cookbook_dependencies_detailed(cookbook_path_obj)
329
329
 
330
330
  # Determine migration order
331
331
  migration_order = _determine_migration_order(dependency_analysis)
@@ -356,7 +356,7 @@ def analyze_cookbook_dependencies(
356
356
  {_format_community_cookbooks(dependency_analysis)}
357
357
 
358
358
  ## Migration Impact Analysis:
359
- {_analyze_dependency_migration_impact(dependency_analysis)}
359
+ {_analyse_dependency_migration_impact(dependency_analysis)}
360
360
  """
361
361
  except Exception as e:
362
362
  return format_error_with_context(
@@ -539,11 +539,11 @@ def _parse_cookbook_paths(cookbook_paths: str) -> list[Any]:
539
539
  return valid_paths
540
540
 
541
541
 
542
- def _analyze_cookbook_metrics(
542
+ def _analyse_cookbook_metrics(
543
543
  valid_paths: list[Any],
544
544
  ) -> tuple[list[Any], dict[str, int]]:
545
545
  """
546
- Analyze metrics for all cookbooks.
546
+ Analyse metrics for all cookbooks.
547
547
 
548
548
  Args:
549
549
  valid_paths: List of valid cookbook paths
@@ -656,8 +656,8 @@ def _count_cookbook_artifacts(cookbook_path) -> dict[str, int]:
656
656
  }
657
657
 
658
658
 
659
- def _analyze_recipe_complexity(cookbook_path) -> dict[str, int]:
660
- """Analyze recipe files for resource counts, Ruby blocks, and custom resources."""
659
+ def _analyse_recipe_complexity(cookbook_path) -> dict[str, int]:
660
+ """Analyse recipe files for resource counts, Ruby blocks, and custom resources."""
661
661
  recipes_dir = _safe_join(cookbook_path, "recipes")
662
662
  resource_count = 0
663
663
  custom_resources = 0
@@ -741,7 +741,7 @@ def _assess_single_cookbook(cookbook_path: Path) -> dict:
741
741
 
742
742
  # Collect metrics
743
743
  artifact_counts = _count_cookbook_artifacts(cookbook)
744
- recipe_complexity = _analyze_recipe_complexity(cookbook)
744
+ recipe_complexity = _analyse_recipe_complexity(cookbook)
745
745
  metrics = {**artifact_counts, **recipe_complexity}
746
746
 
747
747
  # Calculate complexity and effort
@@ -1025,7 +1025,7 @@ def _estimate_resource_requirements(metrics: dict, target_platform: str) -> str:
1025
1025
  • **Training:** 2-3 days Ansible/AWX training for team"""
1026
1026
 
1027
1027
 
1028
- def _analyze_cookbook_dependencies_detailed(cookbook_path) -> dict:
1028
+ def _analyse_cookbook_dependencies_detailed(cookbook_path) -> dict:
1029
1029
  """Analyze cookbook dependencies in detail."""
1030
1030
  analysis = {
1031
1031
  "cookbook_name": cookbook_path.name,
@@ -1364,8 +1364,8 @@ def _format_community_cookbooks(analysis: dict) -> str:
1364
1364
  )
1365
1365
 
1366
1366
 
1367
- def _analyze_dependency_migration_impact(analysis: dict) -> str:
1368
- """Analyze migration impact of dependencies."""
1367
+ def _analyse_dependency_migration_impact(analysis: dict) -> str:
1368
+ """Analyse migration impact of dependencies."""
1369
1369
  impacts = []
1370
1370
 
1371
1371
  if analysis["community_cookbooks"]:
@@ -52,8 +52,8 @@ def generate_github_workflow_from_chef_ci(
52
52
  if not cookbook_dir.exists():
53
53
  raise FileNotFoundError(f"Cookbook directory not found: {cookbook_path}")
54
54
 
55
- # Analyze Chef CI patterns
56
- patterns = _analyze_chef_ci_patterns(cookbook_dir)
55
+ # Analyse Chef CI patterns
56
+ patterns = _analyse_chef_ci_patterns(cookbook_dir)
57
57
 
58
58
  # Build workflow structure
59
59
  workflow = _build_workflow_structure(
@@ -63,16 +63,16 @@ def generate_github_workflow_from_chef_ci(
63
63
  return yaml.dump(workflow, default_flow_style=False, sort_keys=False)
64
64
 
65
65
 
66
- def _analyze_chef_ci_patterns(cookbook_dir: Path) -> dict[str, Any]:
66
+ def _analyse_chef_ci_patterns(cookbook_dir: Path) -> dict[str, Any]:
67
67
  """
68
- Analyze Chef cookbook for CI/CD patterns and testing configurations.
68
+ Analyse Chef cookbook for CI/CD patterns and testing configurations.
69
69
 
70
70
  This function examines a Chef cookbook directory to detect various
71
71
  testing and linting tools, as well as Test Kitchen configurations
72
72
  including suites and platforms.
73
73
 
74
74
  Args:
75
- cookbook_dir: Path to the Chef cookbook directory to analyze.
75
+ cookbook_dir: Path to the Chef cookbook directory to analyse.
76
76
 
77
77
  Returns:
78
78
  Dictionary containing detected patterns with the following keys:
souschef/ci/gitlab_ci.py CHANGED
@@ -27,8 +27,8 @@ def generate_gitlab_ci_from_chef_ci(
27
27
  GitLab CI YAML content.
28
28
 
29
29
  """
30
- # Analyze Chef CI patterns
31
- ci_patterns = _analyze_chef_ci_patterns(cookbook_path)
30
+ # Analyse Chef CI patterns
31
+ ci_patterns = _analyse_chef_ci_patterns(cookbook_path)
32
32
 
33
33
  # Generate CI configuration
34
34
  return _generate_gitlab_ci_yaml(
@@ -36,9 +36,9 @@ def generate_gitlab_ci_from_chef_ci(
36
36
  )
37
37
 
38
38
 
39
- def _analyze_chef_ci_patterns(cookbook_path: str) -> dict[str, Any]:
39
+ def _analyse_chef_ci_patterns(cookbook_path: str) -> dict[str, Any]:
40
40
  """
41
- Analyze Chef cookbook for CI/CD patterns.
41
+ Analyse Chef cookbook for CI/CD patterns.
42
42
 
43
43
  Args:
44
44
  cookbook_path: Path to Chef cookbook.
@@ -28,8 +28,8 @@ def generate_jenkinsfile_from_chef_ci(
28
28
  Jenkinsfile content (Groovy DSL).
29
29
 
30
30
  """
31
- # Analyze Chef CI patterns
32
- ci_patterns = _analyze_chef_ci_patterns(cookbook_path)
31
+ # Analyse Chef CI patterns
32
+ ci_patterns = _analyse_chef_ci_patterns(cookbook_path)
33
33
 
34
34
  if pipeline_type == "declarative":
35
35
  return _generate_declarative_pipeline(
@@ -39,9 +39,9 @@ def generate_jenkinsfile_from_chef_ci(
39
39
  return _generate_scripted_pipeline(pipeline_name, enable_parallel)
40
40
 
41
41
 
42
- def _analyze_chef_ci_patterns(cookbook_path: str) -> dict[str, Any]:
42
+ def _analyse_chef_ci_patterns(cookbook_path: str) -> dict[str, Any]:
43
43
  """
44
- Analyze Chef cookbook for CI/CD patterns.
44
+ Analyse Chef cookbook for CI/CD patterns.
45
45
 
46
46
  Detects:
47
47
  - Test Kitchen configuration (.kitchen.yml)
souschef/cli.py CHANGED
@@ -281,16 +281,16 @@ def _display_template_summary(template_file: Path) -> None:
281
281
  @click.option("--dry-run", is_flag=True, help="Show what would be done")
282
282
  def cookbook(cookbook_path: str, output: str | None, dry_run: bool) -> None:
283
283
  """
284
- Analyze an entire Chef cookbook.
284
+ Analyse an entire Chef cookbook.
285
285
 
286
286
  COOKBOOK_PATH: Path to the cookbook root directory
287
287
 
288
- This command analyzes the cookbook structure, metadata, recipes,
288
+ This command analyses the cookbook structure, metadata, recipes,
289
289
  attributes, templates, and custom resources.
290
290
  """
291
291
  cookbook_dir = Path(cookbook_path)
292
292
 
293
- click.echo(f"Analyzing cookbook: {cookbook_dir.name}")
293
+ click.echo(f"Analysing cookbook: {cookbook_dir.name}")
294
294
  click.echo("=" * 50)
295
295
 
296
296
  # Parse metadata
@@ -418,7 +418,7 @@ def generate_jenkinsfile(
418
418
 
419
419
  COOKBOOK_PATH: Path to the Chef cookbook root directory
420
420
 
421
- This command analyzes the cookbook for CI patterns (Test Kitchen,
421
+ This command analyses the cookbook for CI patterns (Test Kitchen,
422
422
  lint tools, test suites) and generates an appropriate Jenkinsfile
423
423
  with stages for linting, testing, and convergence.
424
424
 
@@ -495,7 +495,7 @@ def generate_gitlab_ci(
495
495
 
496
496
  COOKBOOK_PATH: Path to the Chef cookbook root directory
497
497
 
498
- This command analyzes the cookbook for CI patterns (Test Kitchen,
498
+ This command analyses the cookbook for CI patterns (Test Kitchen,
499
499
  lint tools, test suites) and generates an appropriate GitLab CI
500
500
  configuration with jobs for linting, testing, and convergence.
501
501
 
@@ -575,7 +575,7 @@ def generate_github_workflow(
575
575
 
576
576
  COOKBOOK_PATH: Path to the Chef cookbook root directory
577
577
 
578
- This command analyzes the cookbook for CI patterns (Test Kitchen,
578
+ This command analyses the cookbook for CI patterns (Test Kitchen,
579
579
  lint tools, test suites) and generates an appropriate GitHub Actions
580
580
  workflow with jobs for linting, testing, and convergence.
581
581
 
@@ -687,7 +687,7 @@ def profile(cookbook_path: str, output: str | None) -> None:
687
687
 
688
688
  COOKBOOK_PATH: Path to the Chef cookbook to profile
689
689
 
690
- This command analyzes the performance of parsing all cookbook components
690
+ This command analyses the performance of parsing all cookbook components
691
691
  (recipes, attributes, resources, templates) and provides recommendations
692
692
  for optimization.
693
693
  """
@@ -850,7 +850,7 @@ def assess_cookbook(cookbook_path: str, output_format: str) -> None:
850
850
  """
851
851
  Assess a Chef cookbook for migration complexity.
852
852
 
853
- Analyzes the cookbook and provides complexity level, recipe/resource counts,
853
+ Analyses the cookbook and provides complexity level, recipe/resource counts,
854
854
  estimated migration effort, and recommendations. Used by Terraform provider.
855
855
 
856
856
  Example:
@@ -870,8 +870,8 @@ def assess_cookbook(cookbook_path: str, output_format: str) -> None:
870
870
  click.echo(f"Error: {cookbook_path} is not a directory", err=True)
871
871
  sys.exit(1)
872
872
 
873
- # Analyze cookbook
874
- analysis = _analyze_cookbook_for_assessment(cookbook_dir)
873
+ # Analyse cookbook
874
+ analysis = _analyse_cookbook_for_assessment(cookbook_dir)
875
875
 
876
876
  if output_format == "json":
877
877
  click.echo(json.dumps(analysis))
@@ -883,8 +883,8 @@ def assess_cookbook(cookbook_path: str, output_format: str) -> None:
883
883
  sys.exit(1)
884
884
 
885
885
 
886
- def _analyze_cookbook_for_assessment(cookbook_dir: Path) -> dict:
887
- """Analyze cookbook and return assessment data."""
886
+ def _analyse_cookbook_for_assessment(cookbook_dir: Path) -> dict:
887
+ """Analyse cookbook and return assessment data."""
888
888
  recipe_count = 0
889
889
  resource_count = 0
890
890
  recipes_dir = cookbook_dir / "recipes"
@@ -5,7 +5,7 @@ from souschef.converters.habitat import (
5
5
  generate_compose_from_habitat,
6
6
  )
7
7
  from souschef.converters.playbook import (
8
- analyze_chef_search_patterns,
8
+ analyse_chef_search_patterns,
9
9
  convert_chef_search_to_inventory,
10
10
  generate_dynamic_inventory_script,
11
11
  generate_playbook_from_recipe,
@@ -17,7 +17,7 @@ __all__ = [
17
17
  "generate_playbook_from_recipe",
18
18
  "convert_chef_search_to_inventory",
19
19
  "generate_dynamic_inventory_script",
20
- "analyze_chef_search_patterns",
20
+ "analyse_chef_search_patterns",
21
21
  "convert_habitat_to_dockerfile",
22
22
  "generate_compose_from_habitat",
23
23
  ]