Skip to content

Schema

Schema for the vector database.

GitBlameSchema

Bases: BaseModel

Metadata for a git blame.

Source code in src/codemap/processor/vector/schema.py
 6
 7
 8
 9
10
11
12
13
class GitBlameSchema(BaseModel):
	"""Metadata for a git blame."""

	commit_id: str
	date: str
	author_name: str
	start_line: int
	end_line: int

commit_id instance-attribute

commit_id: str

date instance-attribute

date: str

author_name instance-attribute

author_name: str

start_line instance-attribute

start_line: int

end_line instance-attribute

end_line: int

GitMetadataSchema

Bases: BaseModel

Metadata for a git repository.

Source code in src/codemap/processor/vector/schema.py
16
17
18
19
20
21
22
class GitMetadataSchema(BaseModel):
	"""Metadata for a git repository."""

	git_hash: str
	tracked: bool
	branch: str
	blame: list[GitBlameSchema]

git_hash instance-attribute

git_hash: str

tracked instance-attribute

tracked: bool

branch instance-attribute

branch: str

blame instance-attribute

blame: list[GitBlameSchema]

FileMetadataSchema

Bases: BaseModel

Metadata for a file.

Source code in src/codemap/processor/vector/schema.py
25
26
27
28
29
30
31
class FileMetadataSchema(BaseModel):
	"""Metadata for a file."""

	file_path: str
	language: str
	last_modified_time: float
	file_content_hash: str

file_path instance-attribute

file_path: str

language instance-attribute

language: str

last_modified_time instance-attribute

last_modified_time: float

file_content_hash instance-attribute

file_content_hash: str

ChunkMetadataSchema

Bases: BaseModel

Metadata for a chunk of code.

Source code in src/codemap/processor/vector/schema.py
34
35
36
37
38
39
40
41
42
43
44
45
class ChunkMetadataSchema(BaseModel):
	"""Metadata for a chunk of code."""

	chunk_id: str
	content_hash: str
	start_line: int
	end_line: int
	entity_type: str
	entity_name: str
	hierarchy_path: str
	git_metadata: GitMetadataSchema
	file_metadata: FileMetadataSchema

chunk_id instance-attribute

chunk_id: str

content_hash instance-attribute

content_hash: str

start_line instance-attribute

start_line: int

end_line instance-attribute

end_line: int

entity_type instance-attribute

entity_type: str

entity_name instance-attribute

entity_name: str

hierarchy_path instance-attribute

hierarchy_path: str

git_metadata instance-attribute

git_metadata: GitMetadataSchema

file_metadata instance-attribute

file_metadata: FileMetadataSchema

ChunkSchema

Bases: BaseModel

Schema for a chunk of code.

Source code in src/codemap/processor/vector/schema.py
48
49
50
51
52
class ChunkSchema(BaseModel):
	"""Schema for a chunk of code."""

	content: str
	metadata: ChunkMetadataSchema

content instance-attribute

content: str

metadata instance-attribute