Merged
Conversation
…uggestion classes - Introduced Suggestion classes for complexity, maintainability, and security detectors to encapsulate suggestion strings. - Updated ComplexityDetector to utilize new Suggestion methods for complex conditionals, excessive set facts, and deep include chains. - Refactored MaintainabilityDetector to use Suggestion methods for missing idempotency, monolithic main files, magic values, check mode, variable shadowing, and missing failed_when. - Updated SecurityDetector to leverage Suggestion methods for exposed secrets, missing no_log, insecure permissions, and shell injection risks. - Added unit tests for calculating include depth in ComplexityDetector, including cycle detection. - Improved MarkdownValidator with constants for better readability and maintainability.
…ogic and adjust tests
…s, keep API work the same way, work in progress
…tructure - Removed unused feature flags from render_flags.py. - Introduced FileWriter, MetadataProcessor, TagProcessor, TemplateProcessor classes for better separation of concerns. - Updated ReadmeRenderer to utilize new processors for template loading, content merging, and file writing. - Added RenderContext model to simplify parameter passing in rendering functions. - Implemented tests for new processors and RenderContext to ensure functionality and reliability. - Added migration guide to move away from 25+ params render_role to render_context
…ry(0 func and added tests
…func and add tests
- Added `core_orchestrated.py` for orchestrated implementation of role documentation generation, enabled via `DOCSIBLE_USE_ORCHESTRATOR` environment variable. - Updated `template_processor.py` and `readme_renderer.py` to include debug logging for template paths. - Enhanced `pyproject.toml` with optional dependencies for development, updated classifiers, and improved configuration for linting and type checking. - Created `test_orchestrator_cli.sh` for testing various CLI parameter combinations with the orchestrator. - Added metadata and example files for a complex role in the fixtures directory. - Updated tests for render context to include type hints and validation checks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR focuses on a broad refactoring effort aimed at improving modularity, separation of concerns, and testability across the codebase. Significant progress has been made in rendering, validation, complexity analysis, and orchestration, while
core.pyremains a work in progress pending finalization of the orchestrator design. The orchestrator for the core.py file named core_orchestrated.py can be test from the bash shell script: test_orchestrator_cli.shOrchestration and Core Refactoring
core_orchestrated.py, gated by theDOCSIBLE_USE_ORCHESTRATORenvironment variable.RoleOrchestratoras part of a phased refactor to replace the legacydoc_the_role()flow.core.py, explicitly marked as work in progress until the orchestrator API stabilizes.README Rendering Modularization
Refactored the README rendering pipeline into dedicated processors:
TemplateProcessorMetadataProcessorTagProcessorFileWriterIntroduced the
RenderContextmodel to replace a function signature with 25+ parameters.Kept the external rendering API stable while restructuring internals.
Added migration documentation to guide adoption of the new rendering flow.
Improved logging around template resolution for easier debugging.
Validation Framework Improvements
Complexity, Maintainability, and Security Analysis
Completed modularization of the complexity analyzer.
Introduced
Suggestionclasses to encapsulate recommendation logic for:Refactored detectors to delegate suggestion generation to these classes.
Added and refined unit tests, including coverage for include-depth calculation and cycle detection.
Test Suite Reorganization
integrationtests toend_to_endfor clarity.Documentation and Project Configuration
Updated refactoring assessment plans and migration strategy documentation.
Enhanced
pyproject.tomlwith:Performed general codebase cleanup prior to merge.
Current State
core.pyrefactoring is intentionally incomplete and will be finalized once orchestration responsibilities are fully defined.