|
1 | | -# Python Code Harmonizer Configuration Template |
| 1 | +# Python Code Harmonizer Configuration File |
| 2 | +# ------------------------------------------ |
| 3 | +# This file allows you to customize the behavior of the Harmonizer to |
| 4 | +# better suit your project's specific needs. |
2 | 5 | # |
3 | | -# NOTE: Configuration file support is planned for future release |
4 | | -# This template shows what configuration will look like when implemented |
| 6 | +# You can save this file as '.harmonizer.yml' in your project's root |
| 7 | +# directory. |
| 8 | + |
| 9 | +# File and Directory Exclusion |
| 10 | +# ----------------------------- |
| 11 | +# Specify a list of file or directory patterns to exclude from analysis. |
| 12 | +# This is useful for ignoring virtual environments, test suites, or |
| 13 | +# generated code. |
5 | 14 | # |
6 | | -# Copy this file to .harmonizer.yml in your project root |
7 | | -# The harmonizer will read this configuration automatically |
8 | | - |
9 | | -# Disharmony threshold (functions above this are flagged) |
10 | | -# Default: 0.5 |
11 | | -# Range: 0.0 (very strict) to 2.0 (very lenient) |
12 | | -threshold: 0.5 |
13 | | - |
14 | | -# Output format |
15 | | -# Options: table, json, csv |
16 | | -# Default: table |
17 | | -output_format: table |
18 | | - |
19 | | -# Severity level definitions |
20 | | -severity_levels: |
21 | | - critical: 1.2 # Score >= 1.2 |
22 | | - high: 0.8 # Score >= 0.8 |
23 | | - medium: 0.5 # Score >= 0.5 |
24 | | - low: 0.3 # Score >= 0.3 |
25 | | - excellent: 0.0 # Score < 0.3 |
26 | | - |
27 | | -# Files and patterns to ignore |
28 | | -ignore_patterns: |
29 | | - - "**/test_*.py" # Test files |
30 | | - - "**/tests/*.py" # Test directories |
31 | | - - "**/migrations/*.py" # Database migrations |
32 | | - - "**/*_test.py" # Alternative test naming |
33 | | - - "**/conftest.py" # Pytest configuration |
34 | | - - "**/__pycache__/**" # Python cache |
35 | | - - "**/.venv/**" # Virtual environments |
36 | | - |
37 | | -# Files and patterns to include (overrides ignore if specified) |
38 | | -include_patterns: |
39 | | - - "src/**/*.py" # Source files |
40 | | - - "app/**/*.py" # Application files |
41 | | - # - "scripts/**/*.py" # Uncomment to include scripts |
42 | | - |
43 | | -# Fail build in CI/CD if any function exceeds this threshold |
44 | | -# Set to null to never fail builds |
45 | | -# Default: null (warnings only) |
46 | | -fail_threshold: null |
47 | | -# fail_threshold: 1.0 # Uncomment to fail on critical disharmony |
48 | | - |
49 | | -# Enable verbose output |
50 | | -# Default: false |
51 | | -verbose: false |
52 | | - |
53 | | -# Show function details in output |
54 | | -# Default: true |
55 | | -show_function_details: true |
56 | | - |
57 | | -# Sort results by score (descending) |
58 | | -# Default: true |
59 | | -sort_by_score: true |
60 | | - |
61 | | -# Color output (for terminal) |
62 | | -# Default: true |
63 | | -color_output: true |
64 | | - |
65 | | -# Custom vocabulary extensions |
66 | | -# Add domain-specific semantic mappings |
67 | | -# (Advanced: requires understanding of DIVE-V2 engine) |
| 15 | +# The patterns use standard glob syntax. |
| 16 | +exclude: |
| 17 | + - 'venv/' # Exclude a virtual environment directory |
| 18 | + - 'tests/' # Exclude the main test directory |
| 19 | + - '**/test_*.py' # Exclude any file starting with 'test_' |
| 20 | + - 'docs/' # Exclude the documentation directory |
| 21 | + - 'build/' # Exclude build artifacts |
| 22 | + - '*.md' # Exclude Markdown files |
| 23 | + |
| 24 | +# Custom Semantic Vocabulary |
| 25 | +# -------------------------- |
| 26 | +# Extend the Harmonizer's built-in vocabulary with your own domain-specific |
| 27 | +# terms. This is a powerful feature that allows you to teach the Harmonizer |
| 28 | +# the unique language of your project. |
| 29 | +# |
| 30 | +# Map your custom keywords to one of the four core dimensions: |
| 31 | +# - love: Connection, communication, sharing, community |
| 32 | +# - justice: Order, rules, validation, enforcement, structure |
| 33 | +# - power: Action, execution, modification, creation, deletion |
| 34 | +# - wisdom: Analysis, calculation, information retrieval, knowledge |
| 35 | +# |
| 36 | +# This is especially useful for business logic or scientific applications. |
68 | 37 | custom_vocabulary: |
69 | | - # Example: Map domain-specific terms |
70 | | - # "authenticate": "justice" |
71 | | - # "authorize": "power" |
72 | | - # "notify": "love" |
73 | | - |
74 | | -# Report options |
75 | | -report: |
76 | | - # Show summary statistics |
77 | | - show_summary: true |
78 | | - |
79 | | - # Show only disharmonious functions |
80 | | - only_show_disharmony: false |
81 | | - |
82 | | - # Include harmonious functions in output |
83 | | - include_harmonious: true |
84 | | - |
85 | | - # Maximum functions to display (0 = unlimited) |
86 | | - max_display: 0 |
87 | | - |
88 | | -# Future enhancement placeholders |
89 | | -# These will be implemented in upcoming versions |
90 | | - |
91 | | -# auto_fix: |
92 | | -# enabled: false |
93 | | -# suggestions: true |
94 | | - |
95 | | -# metrics: |
96 | | -# track_over_time: false |
97 | | -# output_file: "harmony_metrics.json" |
98 | | - |
99 | | -# integrations: |
100 | | -# github: |
101 | | -# create_review_comments: false |
102 | | -# jira: |
103 | | -# create_tickets_for_critical: false |
104 | | - |
105 | | ---- |
106 | | - |
107 | | -# Example configurations for different use cases: |
108 | | - |
109 | | -# STRICT MODE (for new projects) |
110 | | -# threshold: 0.3 |
111 | | -# fail_threshold: 0.5 |
112 | | - |
113 | | -# LENIENT MODE (for legacy code cleanup) |
114 | | -# threshold: 0.8 |
115 | | -# fail_threshold: 1.2 |
116 | | - |
117 | | -# CI/CD MODE (fail on critical only) |
118 | | -# threshold: 0.5 |
119 | | -# fail_threshold: 1.0 |
120 | | -# only_show_disharmony: true |
121 | | - |
122 | | -# DEVELOPMENT MODE (show everything) |
123 | | -# threshold: 0.5 |
124 | | -# verbose: true |
125 | | -# show_function_details: true |
| 38 | + # Example for a financial application |
| 39 | + invoice: justice |
| 40 | + payment: power |
| 41 | + ledger: justice |
| 42 | + audit: wisdom |
| 43 | + receipt: love # Represents a communication/connection |
| 44 | + |
| 45 | + # Example for a data science application |
| 46 | + dataset: wisdom |
| 47 | + train_model: power |
| 48 | + predict: wisdom |
| 49 | + visualize: love # Represents communication of results |
| 50 | + |
| 51 | + # Example for a web application |
| 52 | + user_profile: wisdom |
| 53 | + session: love |
| 54 | + database_query: justice |
| 55 | + render_template: power |
0 commit comments