Skip to content

Config Schema

Schemas for the CodeMap configuration.

LLMSchema

Bases: BaseModel

Configuration for the LLM.

Source code in src/codemap/config/config_schema.py
13
14
15
16
17
18
19
class LLMSchema(BaseModel):
	"""Configuration for the LLM."""

	model: str = "openai:gpt-4o-mini"
	base_url: str | None = None
	temperature: float = 0.5
	max_output_tokens: int = 1024

model class-attribute instance-attribute

model: str = 'openai:gpt-4o-mini'

base_url class-attribute instance-attribute

base_url: str | None = None

temperature class-attribute instance-attribute

temperature: float = 0.5

max_output_tokens class-attribute instance-attribute

max_output_tokens: int = 1024

EmbeddingChunkingSchema

Bases: BaseModel

Configuration for the embedding chunking.

Source code in src/codemap/config/config_schema.py
23
24
25
26
27
class EmbeddingChunkingSchema(BaseModel):
	"""Configuration for the embedding chunking."""

	max_hierarchy_depth: int = 2
	max_file_lines: int = 1000

max_hierarchy_depth class-attribute instance-attribute

max_hierarchy_depth: int = 2

max_file_lines class-attribute instance-attribute

max_file_lines: int = 1000

AgglomerativeClusteringSchema

Bases: BaseModel

Configuration for the agglomerative clustering.

Source code in src/codemap/config/config_schema.py
30
31
32
33
34
35
class AgglomerativeClusteringSchema(BaseModel):
	"""Configuration for the agglomerative clustering."""

	metric: Literal["cosine", "euclidean", "manhattan", "l1", "l2", "precomputed"] = "precomputed"
	distance_threshold: float = 0.3
	linkage: Literal["ward", "complete", "average", "single"] = "complete"

metric class-attribute instance-attribute

metric: Literal[
	"cosine",
	"euclidean",
	"manhattan",
	"l1",
	"l2",
	"precomputed",
] = "precomputed"

distance_threshold class-attribute instance-attribute

distance_threshold: float = 0.3

linkage class-attribute instance-attribute

linkage: Literal[
	"ward", "complete", "average", "single"
] = "complete"

DBSCANSchema

Bases: BaseModel

Configuration for the DBSCAN clustering.

Source code in src/codemap/config/config_schema.py
38
39
40
41
42
43
44
class DBSCANSchema(BaseModel):
	"""Configuration for the DBSCAN clustering."""

	eps: float = 0.3
	min_samples: int = 2
	algorithm: Literal["auto", "ball_tree", "kd_tree", "brute"] = "auto"
	metric: Literal["cityblock", "cosine", "euclidean", "l1", "l2", "manhattan", "precomputed"] = "precomputed"

eps class-attribute instance-attribute

eps: float = 0.3

min_samples class-attribute instance-attribute

min_samples: int = 2

algorithm class-attribute instance-attribute

algorithm: Literal[
	"auto", "ball_tree", "kd_tree", "brute"
] = "auto"

metric class-attribute instance-attribute

metric: Literal[
	"cityblock",
	"cosine",
	"euclidean",
	"l1",
	"l2",
	"manhattan",
	"precomputed",
] = "precomputed"

EmbeddingClusteringSchema

Bases: BaseModel

Configuration for the embedding clustering.

Source code in src/codemap/config/config_schema.py
47
48
49
50
51
52
class EmbeddingClusteringSchema(BaseModel):
	"""Configuration for the embedding clustering."""

	method: Literal["agglomerative", "dbscan"] = "agglomerative"
	agglomerative: AgglomerativeClusteringSchema = AgglomerativeClusteringSchema()
	dbscan: DBSCANSchema = DBSCANSchema()

method class-attribute instance-attribute

method: Literal["agglomerative", "dbscan"] = "agglomerative"

agglomerative class-attribute instance-attribute

dbscan class-attribute instance-attribute

EmbeddingSchema

Bases: BaseModel

Configuration for the embedding.

Source code in src/codemap/config/config_schema.py
55
56
57
58
59
60
61
62
63
64
65
66
67
68
class EmbeddingSchema(BaseModel):
	"""Configuration for the embedding."""

	model_name: str = "minishlab/potion-base-8M"
	dimension: int = 256
	dimension_metric: str = "cosine"
	max_content_length: int = 5000
	qdrant_batch_size: int = 1000
	url: str = "http://localhost:6333"
	api_key: str | None = None
	timeout: int = 120
	prefer_grpc: bool = True
	chunking: EmbeddingChunkingSchema = EmbeddingChunkingSchema()
	clustering: EmbeddingClusteringSchema = EmbeddingClusteringSchema()

model_name class-attribute instance-attribute

model_name: str = 'minishlab/potion-base-8M'

dimension class-attribute instance-attribute

dimension: int = 256

dimension_metric class-attribute instance-attribute

dimension_metric: str = 'cosine'

max_content_length class-attribute instance-attribute

max_content_length: int = 5000

qdrant_batch_size class-attribute instance-attribute

qdrant_batch_size: int = 1000

url class-attribute instance-attribute

url: str = 'http://localhost:6333'

api_key class-attribute instance-attribute

api_key: str | None = None

timeout class-attribute instance-attribute

timeout: int = 120

prefer_grpc class-attribute instance-attribute

prefer_grpc: bool = True

chunking class-attribute instance-attribute

clustering class-attribute instance-attribute

RAGSchema

Bases: BaseModel

Configuration for the RAG.

Source code in src/codemap/config/config_schema.py
71
72
73
74
75
76
77
78
79
class RAGSchema(BaseModel):
	"""Configuration for the RAG."""

	max_context_length: int = 8000
	max_context_results: int = 10
	similarity_threshold: float = 0.75
	system_prompt: str | None = None
	include_file_content: bool = True
	include_metadata: bool = True

max_context_length class-attribute instance-attribute

max_context_length: int = 8000

max_context_results class-attribute instance-attribute

max_context_results: int = 10

similarity_threshold class-attribute instance-attribute

similarity_threshold: float = 0.75

system_prompt class-attribute instance-attribute

system_prompt: str | None = None

include_file_content class-attribute instance-attribute

include_file_content: bool = True

include_metadata class-attribute instance-attribute

include_metadata: bool = True

SyncSchema

Bases: BaseModel

Configuration for the sync.

Source code in src/codemap/config/config_schema.py
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
class SyncSchema(BaseModel):
	"""Configuration for the sync."""

	exclude_patterns: list[str] = Field(
		default_factory=lambda: [
			r"^node_modules/",
			r"^\.venv/",
			r"^venv/",
			r"^env/",
			r"^__pycache__/",
			r"^\.mypy_cache/",
			r"^\.pytest_cache/",
			r"^\.ruff_cache/",
			r"^dist/",
			r"^build/",
			r"^\.git/",
			r"\\.pyc$",
			r"\\.pyo$",
			r"\\.so$",
			r"\\.dll$",
		]
	)

exclude_patterns class-attribute instance-attribute

exclude_patterns: list[str] = Field(
	default_factory=lambda: [
		"^node_modules/",
		"^\\.venv/",
		"^venv/",
		"^env/",
		"^__pycache__/",
		"^\\.mypy_cache/",
		"^\\.pytest_cache/",
		"^\\.ruff_cache/",
		"^dist/",
		"^build/",
		"^\\.git/",
		"\\\\.pyc$",
		"\\\\.pyo$",
		"\\\\.so$",
		"\\\\.dll$",
	]
)

GenSchema

Bases: BaseModel

Configuration for the gen command.

Source code in src/codemap/config/config_schema.py
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
class GenSchema(BaseModel):
	"""Configuration for the gen command."""

	max_content_length: int = 5000
	use_gitignore: bool = True
	output_dir: str = "documentation"
	include_tree: bool = True
	include_entity_graph: bool = True
	semantic_analysis: bool = True
	lod_level: str = "docs"
	mermaid_entities: list[str] = Field(
		default_factory=lambda: ["module", "class", "function", "method", "constant", "variable", "import"]
	)
	mermaid_relationships: list[str] = Field(default_factory=lambda: ["declares", "imports", "calls"])
	mermaid_show_legend: bool = True
	mermaid_remove_unconnected: bool = False

max_content_length class-attribute instance-attribute

max_content_length: int = 5000

use_gitignore class-attribute instance-attribute

use_gitignore: bool = True

output_dir class-attribute instance-attribute

output_dir: str = 'documentation'

include_tree class-attribute instance-attribute

include_tree: bool = True

include_entity_graph class-attribute instance-attribute

include_entity_graph: bool = True

semantic_analysis class-attribute instance-attribute

semantic_analysis: bool = True

lod_level class-attribute instance-attribute

lod_level: str = 'docs'

mermaid_entities class-attribute instance-attribute

mermaid_entities: list[str] = Field(
	default_factory=lambda: [
		"module",
		"class",
		"function",
		"method",
		"constant",
		"variable",
		"import",
	]
)

mermaid_relationships class-attribute instance-attribute

mermaid_relationships: list[str] = Field(
	default_factory=lambda: ["declares", "imports", "calls"]
)

mermaid_show_legend class-attribute instance-attribute

mermaid_show_legend: bool = True

mermaid_remove_unconnected class-attribute instance-attribute

mermaid_remove_unconnected: bool = False

WatcherSchema

Bases: BaseModel

Configuration for the watcher.

Source code in src/codemap/config/config_schema.py
124
125
126
127
128
class WatcherSchema(BaseModel):
	"""Configuration for the watcher."""

	enabled: bool = True
	debounce_delay: float = 1.0

enabled class-attribute instance-attribute

enabled: bool = True

debounce_delay class-attribute instance-attribute

debounce_delay: float = 1.0

ProcessorSchema

Bases: BaseModel

Configuration for the processor.

Source code in src/codemap/config/config_schema.py
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
class ProcessorSchema(BaseModel):
	"""Configuration for the processor."""

	enabled: bool = True
	max_workers: int = 4
	ignored_patterns: list[str] = Field(
		default_factory=lambda: [
			"**/.git/**",
			"**/__pycache__/**",
			"**/.venv/**",
			"**/node_modules/**",
			"**/*.pyc",
			"**/dist/**",
			"**/build/**",
		]
	)
	watcher: WatcherSchema = WatcherSchema()
	default_lod_level: str = "signatures"

enabled class-attribute instance-attribute

enabled: bool = True

max_workers class-attribute instance-attribute

max_workers: int = 4

ignored_patterns class-attribute instance-attribute

ignored_patterns: list[str] = Field(
	default_factory=lambda: [
		"**/.git/**",
		"**/__pycache__/**",
		"**/.venv/**",
		"**/node_modules/**",
		"**/*.pyc",
		"**/dist/**",
		"**/build/**",
	]
)

watcher class-attribute instance-attribute

default_lod_level class-attribute instance-attribute

default_lod_level: str = 'signatures'

DiffSplitterSchema

Bases: BaseModel

Configuration for the diff splitter.

Source code in src/codemap/config/config_schema.py
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
class DiffSplitterSchema(BaseModel):
	"""Configuration for the diff splitter."""

	similarity_threshold: float = 0.6
	directory_similarity_threshold: float = 0.3
	file_move_similarity_threshold: float = 0.85
	min_chunks_for_consolidation: int = 2
	max_chunks_before_consolidation: int = 20
	max_file_size_for_llm: int = 50000
	max_log_diff_size: int = 1000
	default_code_extensions: list[str] = Field(
		default_factory=lambda: [
			"js",
			"jsx",
			"ts",
			"tsx",
			"py",
			"java",
			"c",
			"cpp",
			"h",
			"hpp",
			"cc",
			"cs",
			"go",
			"rb",
			"php",
			"rs",
			"swift",
			"scala",
			"kt",
			"sh",
			"pl",
			"pm",
		]
	)

similarity_threshold class-attribute instance-attribute

similarity_threshold: float = 0.6

directory_similarity_threshold class-attribute instance-attribute

directory_similarity_threshold: float = 0.3

file_move_similarity_threshold class-attribute instance-attribute

file_move_similarity_threshold: float = 0.85

min_chunks_for_consolidation class-attribute instance-attribute

min_chunks_for_consolidation: int = 2

max_chunks_before_consolidation class-attribute instance-attribute

max_chunks_before_consolidation: int = 20

max_file_size_for_llm class-attribute instance-attribute

max_file_size_for_llm: int = 50000

max_log_diff_size class-attribute instance-attribute

max_log_diff_size: int = 1000

default_code_extensions class-attribute instance-attribute

default_code_extensions: list[str] = Field(
	default_factory=lambda: [
		"js",
		"jsx",
		"ts",
		"tsx",
		"py",
		"java",
		"c",
		"cpp",
		"h",
		"hpp",
		"cc",
		"cs",
		"go",
		"rb",
		"php",
		"rs",
		"swift",
		"scala",
		"kt",
		"sh",
		"pl",
		"pm",
	]
)

CommitConventionSchema

Bases: BaseModel

Configuration for the commit convention.

Source code in src/codemap/config/config_schema.py
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
class CommitConventionSchema(BaseModel):
	"""Configuration for the commit convention."""

	types: list[str] = Field(
		default_factory=lambda: [
			"feat",
			"fix",
			"docs",
			"style",
			"refactor",
			"perf",
			"test",
			"build",
			"ci",
			"chore",
		]
	)
	scopes: list[str] = Field(default_factory=list)
	max_length: int = 72

types class-attribute instance-attribute

types: list[str] = Field(
	default_factory=lambda: [
		"feat",
		"fix",
		"docs",
		"style",
		"refactor",
		"perf",
		"test",
		"build",
		"ci",
		"chore",
	]
)

scopes class-attribute instance-attribute

scopes: list[str] = Field(default_factory=list)

max_length class-attribute instance-attribute

max_length: int = 72

LintRuleSchema

Bases: BaseModel

Configuration for the lint rule.

Source code in src/codemap/config/config_schema.py
210
211
212
213
214
215
class LintRuleSchema(BaseModel):
	"""Configuration for the lint rule."""

	level: str  # "ERROR", "WARNING", "DISABLED"
	rule: str  # "always", "never"
	value: Any | None = None  # Can be int, str, list of str

level instance-attribute

level: str

rule instance-attribute

rule: str

value class-attribute instance-attribute

value: Any | None = None

CommitLintSchema

Bases: BaseModel

Configuration for the commit lint.

Source code in src/codemap/config/config_schema.py
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
class CommitLintSchema(BaseModel):
	"""Configuration for the commit lint."""

	header_max_length: LintRuleSchema = Field(
		default_factory=lambda: LintRuleSchema(level="ERROR", rule="always", value=100)
	)
	header_case: LintRuleSchema = Field(
		default_factory=lambda: LintRuleSchema(level="DISABLED", rule="always", value="lower-case")
	)
	header_full_stop: LintRuleSchema = Field(
		default_factory=lambda: LintRuleSchema(level="ERROR", rule="never", value=".")
	)
	type_enum: LintRuleSchema = Field(default_factory=lambda: LintRuleSchema(level="ERROR", rule="always"))
	type_case: LintRuleSchema = Field(
		default_factory=lambda: LintRuleSchema(level="ERROR", rule="always", value="lower-case")
	)
	type_empty: LintRuleSchema = Field(default_factory=lambda: LintRuleSchema(level="ERROR", rule="never"))
	scope_case: LintRuleSchema = Field(
		default_factory=lambda: LintRuleSchema(level="ERROR", rule="always", value="lower-case")
	)
	scope_empty: LintRuleSchema = Field(default_factory=lambda: LintRuleSchema(level="DISABLED", rule="never"))
	scope_enum: LintRuleSchema = Field(default_factory=lambda: LintRuleSchema(level="DISABLED", rule="always"))
	subject_case: LintRuleSchema = Field(
		default_factory=lambda: LintRuleSchema(
			level="ERROR", rule="never", value=["sentence-case", "start-case", "pascal-case", "upper-case"]
		)
	)
	subject_empty: LintRuleSchema = Field(default_factory=lambda: LintRuleSchema(level="ERROR", rule="never"))
	subject_full_stop: LintRuleSchema = Field(
		default_factory=lambda: LintRuleSchema(level="ERROR", rule="never", value=".")
	)
	subject_exclamation_mark: LintRuleSchema = Field(
		default_factory=lambda: LintRuleSchema(level="DISABLED", rule="never")
	)
	body_leading_blank: LintRuleSchema = Field(default_factory=lambda: LintRuleSchema(level="WARNING", rule="always"))
	body_empty: LintRuleSchema = Field(default_factory=lambda: LintRuleSchema(level="DISABLED", rule="never"))
	body_max_line_length: LintRuleSchema = Field(
		default_factory=lambda: LintRuleSchema(level="ERROR", rule="always", value=100)
	)
	footer_leading_blank: LintRuleSchema = Field(default_factory=lambda: LintRuleSchema(level="WARNING", rule="always"))
	footer_empty: LintRuleSchema = Field(default_factory=lambda: LintRuleSchema(level="DISABLED", rule="never"))
	footer_max_line_length: LintRuleSchema = Field(
		default_factory=lambda: LintRuleSchema(level="ERROR", rule="always", value=100)
	)

header_max_length class-attribute instance-attribute

header_max_length: LintRuleSchema = Field(
	default_factory=lambda: LintRuleSchema(
		level="ERROR", rule="always", value=100
	)
)

header_case class-attribute instance-attribute

header_case: LintRuleSchema = Field(
	default_factory=lambda: LintRuleSchema(
		level="DISABLED", rule="always", value="lower-case"
	)
)

header_full_stop class-attribute instance-attribute

header_full_stop: LintRuleSchema = Field(
	default_factory=lambda: LintRuleSchema(
		level="ERROR", rule="never", value="."
	)
)

type_enum class-attribute instance-attribute

type_enum: LintRuleSchema = Field(
	default_factory=lambda: LintRuleSchema(
		level="ERROR", rule="always"
	)
)

type_case class-attribute instance-attribute

type_case: LintRuleSchema = Field(
	default_factory=lambda: LintRuleSchema(
		level="ERROR", rule="always", value="lower-case"
	)
)

type_empty class-attribute instance-attribute

type_empty: LintRuleSchema = Field(
	default_factory=lambda: LintRuleSchema(
		level="ERROR", rule="never"
	)
)

scope_case class-attribute instance-attribute

scope_case: LintRuleSchema = Field(
	default_factory=lambda: LintRuleSchema(
		level="ERROR", rule="always", value="lower-case"
	)
)

scope_empty class-attribute instance-attribute

scope_empty: LintRuleSchema = Field(
	default_factory=lambda: LintRuleSchema(
		level="DISABLED", rule="never"
	)
)

scope_enum class-attribute instance-attribute

scope_enum: LintRuleSchema = Field(
	default_factory=lambda: LintRuleSchema(
		level="DISABLED", rule="always"
	)
)

subject_case class-attribute instance-attribute

subject_case: LintRuleSchema = Field(
	default_factory=lambda: LintRuleSchema(
		level="ERROR",
		rule="never",
		value=[
			"sentence-case",
			"start-case",
			"pascal-case",
			"upper-case",
		],
	)
)

subject_empty class-attribute instance-attribute

subject_empty: LintRuleSchema = Field(
	default_factory=lambda: LintRuleSchema(
		level="ERROR", rule="never"
	)
)

subject_full_stop class-attribute instance-attribute

subject_full_stop: LintRuleSchema = Field(
	default_factory=lambda: LintRuleSchema(
		level="ERROR", rule="never", value="."
	)
)

subject_exclamation_mark class-attribute instance-attribute

subject_exclamation_mark: LintRuleSchema = Field(
	default_factory=lambda: LintRuleSchema(
		level="DISABLED", rule="never"
	)
)

body_leading_blank class-attribute instance-attribute

body_leading_blank: LintRuleSchema = Field(
	default_factory=lambda: LintRuleSchema(
		level="WARNING", rule="always"
	)
)

body_empty class-attribute instance-attribute

body_empty: LintRuleSchema = Field(
	default_factory=lambda: LintRuleSchema(
		level="DISABLED", rule="never"
	)
)

body_max_line_length class-attribute instance-attribute

body_max_line_length: LintRuleSchema = Field(
	default_factory=lambda: LintRuleSchema(
		level="ERROR", rule="always", value=100
	)
)

footer_leading_blank class-attribute instance-attribute

footer_leading_blank: LintRuleSchema = Field(
	default_factory=lambda: LintRuleSchema(
		level="WARNING", rule="always"
	)
)

footer_empty class-attribute instance-attribute

footer_empty: LintRuleSchema = Field(
	default_factory=lambda: LintRuleSchema(
		level="DISABLED", rule="never"
	)
)

footer_max_line_length class-attribute instance-attribute

footer_max_line_length: LintRuleSchema = Field(
	default_factory=lambda: LintRuleSchema(
		level="ERROR", rule="always", value=100
	)
)

CommitSchema

Bases: BaseModel

Configuration for the commit.

Source code in src/codemap/config/config_schema.py
264
265
266
267
268
269
270
271
272
273
class CommitSchema(BaseModel):
	"""Configuration for the commit."""

	strategy: str = "file"
	bypass_hooks: bool = False
	use_lod_context: bool = True
	is_non_interactive: bool = False
	diff_splitter: DiffSplitterSchema = DiffSplitterSchema()
	convention: CommitConventionSchema = CommitConventionSchema()
	lint: CommitLintSchema = CommitLintSchema()

strategy class-attribute instance-attribute

strategy: str = 'file'

bypass_hooks class-attribute instance-attribute

bypass_hooks: bool = False

use_lod_context class-attribute instance-attribute

use_lod_context: bool = True

is_non_interactive class-attribute instance-attribute

is_non_interactive: bool = False

diff_splitter class-attribute instance-attribute

convention class-attribute instance-attribute

lint class-attribute instance-attribute

PRDefaultsSchema

Bases: BaseModel

Configuration for the pull request defaults.

Source code in src/codemap/config/config_schema.py
276
277
278
279
280
class PRDefaultsSchema(BaseModel):
	"""Configuration for the pull request defaults."""

	base_branch: str | None = None
	feature_prefix: str = "feature/"

base_branch class-attribute instance-attribute

base_branch: str | None = None

feature_prefix class-attribute instance-attribute

feature_prefix: str = 'feature/'

PRBranchMappingDetailSchema

Bases: BaseModel

Configuration for the pull request branch mapping detail.

Source code in src/codemap/config/config_schema.py
283
284
285
286
287
class PRBranchMappingDetailSchema(BaseModel):
	"""Configuration for the pull request branch mapping detail."""

	base: str
	prefix: str

base instance-attribute

base: str

prefix instance-attribute

prefix: str

PRBranchMappingSchema

Bases: BaseModel

Configuration for the pull request branch mapping.

Source code in src/codemap/config/config_schema.py
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
class PRBranchMappingSchema(BaseModel):
	"""Configuration for the pull request branch mapping."""

	feature: PRBranchMappingDetailSchema = Field(
		default_factory=lambda: PRBranchMappingDetailSchema(base="develop", prefix="feature/")
	)
	release: PRBranchMappingDetailSchema = Field(
		default_factory=lambda: PRBranchMappingDetailSchema(base="main", prefix="release/")
	)
	hotfix: PRBranchMappingDetailSchema = Field(
		default_factory=lambda: PRBranchMappingDetailSchema(base="main", prefix="hotfix/")
	)
	bugfix: PRBranchMappingDetailSchema = Field(
		default_factory=lambda: PRBranchMappingDetailSchema(base="develop", prefix="bugfix/")
	)

feature class-attribute instance-attribute

feature: PRBranchMappingDetailSchema = Field(
	default_factory=lambda: PRBranchMappingDetailSchema(
		base="develop", prefix="feature/"
	)
)

release class-attribute instance-attribute

release: PRBranchMappingDetailSchema = Field(
	default_factory=lambda: PRBranchMappingDetailSchema(
		base="main", prefix="release/"
	)
)

hotfix class-attribute instance-attribute

hotfix: PRBranchMappingDetailSchema = Field(
	default_factory=lambda: PRBranchMappingDetailSchema(
		base="main", prefix="hotfix/"
	)
)

bugfix class-attribute instance-attribute

bugfix: PRBranchMappingDetailSchema = Field(
	default_factory=lambda: PRBranchMappingDetailSchema(
		base="develop", prefix="bugfix/"
	)
)

PRGenerateSchema

Bases: BaseModel

Configuration for the pull request generate.

Source code in src/codemap/config/config_schema.py
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
class PRGenerateSchema(BaseModel):
	"""Configuration for the pull request generate."""

	title_strategy: Literal["commits", "llm"] = "llm"
	description_strategy: Literal["commits", "llm"] = "llm"
	description_template: str = Field(
		default_factory=lambda: dedent(
			"""
            ## Changes
            {changes}

            ## Testing
            {testing_instructions}

            ## Screenshots
            {screenshots}
            """
		).strip()
	)
	use_workflow_templates: bool = True

title_strategy class-attribute instance-attribute

title_strategy: Literal['commits', 'llm'] = 'llm'

description_strategy class-attribute instance-attribute

description_strategy: Literal['commits', 'llm'] = 'llm'

description_template class-attribute instance-attribute

description_template: str = Field(
	default_factory=lambda: strip()
)

use_workflow_templates class-attribute instance-attribute

use_workflow_templates: bool = True

PRSchema

Bases: BaseModel

Configuration for the pull request.

Source code in src/codemap/config/config_schema.py
329
330
331
332
333
334
335
class PRSchema(BaseModel):
	"""Configuration for the pull request."""

	defaults: PRDefaultsSchema = Field(default_factory=PRDefaultsSchema)
	strategy: str = "github-flow"
	branch_mapping: PRBranchMappingSchema = Field(default_factory=PRBranchMappingSchema)
	generate: PRGenerateSchema = Field(default_factory=PRGenerateSchema)

defaults class-attribute instance-attribute

defaults: PRDefaultsSchema = Field(
	default_factory=PRDefaultsSchema
)

strategy class-attribute instance-attribute

strategy: str = 'github-flow'

branch_mapping class-attribute instance-attribute

branch_mapping: PRBranchMappingSchema = Field(
	default_factory=PRBranchMappingSchema
)

generate class-attribute instance-attribute

generate: PRGenerateSchema = Field(
	default_factory=PRGenerateSchema
)

AskSchema

Bases: BaseModel

Configuration for the ask command.

Source code in src/codemap/config/config_schema.py
338
339
340
341
class AskSchema(BaseModel):
	"""Configuration for the ask command."""

	interactive_chat: bool = False

interactive_chat class-attribute instance-attribute

interactive_chat: bool = False

GitHubConfigSchema

Bases: BaseModel

Configuration for GitHub integration (PRs, API, etc).

Source code in src/codemap/config/config_schema.py
344
345
346
347
348
class GitHubConfigSchema(BaseModel):
	"""Configuration for GitHub integration (PRs, API, etc)."""

	token: str | None = None  # OAuth token for GitHub API
	repo: str | None = None  # Optional: default repo (e.g., user/repo)

token class-attribute instance-attribute

token: str | None = None

repo class-attribute instance-attribute

repo: str | None = None

AppConfigSchema

Bases: BaseModel

Configuration for the application.

Source code in src/codemap/config/config_schema.py
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
class AppConfigSchema(BaseModel):
	"""Configuration for the application."""

	llm: LLMSchema = LLMSchema()
	embedding: EmbeddingSchema = EmbeddingSchema()
	rag: RAGSchema = RAGSchema()
	sync: SyncSchema = SyncSchema()
	gen: GenSchema = GenSchema()
	processor: ProcessorSchema = ProcessorSchema()
	commit: CommitSchema = CommitSchema()
	pr: PRSchema = PRSchema()
	ask: AskSchema = AskSchema()
	github: GitHubConfigSchema = GitHubConfigSchema()
	repo_root: Path | None = None

	model_config = {
		"validate_assignment": True  # Useful for ensuring type checks on assignment if loaded config is modified
	}

llm class-attribute instance-attribute

embedding class-attribute instance-attribute

rag class-attribute instance-attribute

sync class-attribute instance-attribute

gen class-attribute instance-attribute

processor class-attribute instance-attribute

commit class-attribute instance-attribute

pr class-attribute instance-attribute

ask class-attribute instance-attribute

github class-attribute instance-attribute

repo_root class-attribute instance-attribute

repo_root: Path | None = None

model_config class-attribute instance-attribute

model_config = {'validate_assignment': True}