MCPcopy Index your code
hub / github.com/diffgram/diffgram / serialize_with_annotations

Method serialize_with_annotations

shared/database/source_control/file.py:520–538  ·  view source on GitHub ↗

Better way to do file splitting? Want to track the stuff in source control but may get a bit awkward if lots of file types...

(
        self,
        session = None,
        regen_url = True)

Source from the content-addressed store, hash-verified

518 }
519
520 def serialize_with_annotations(
521 self,
522 session = None,
523 regen_url = True):
524
525 """
526 Better way to do file splitting?
527 Want to track the stuff in source control but may get a bit awkward
528 if lots of file types...
529 """
530 instance_list = session.query(Instance).filter(
531 Instance.file_id == self.id,
532 Instance.soft_delete == False
533 ).all()
534
535 file = self.serialize_with_type(session, regen_url = regen_url)
536 file['instance_list'] = [instance.serialize_with_label() for instance in instance_list]
537
538 return file
539
540 def serialize_annotations_only(self):
541

Callers 7

regen_project_file_statsFunction · 0.80
get_child_files_coreFunction · 0.80
get_annotations_commonFunction · 0.80
file_view_coreMethod · 0.80

Calls 2

serialize_with_typeMethod · 0.95
serialize_with_labelMethod · 0.45

Tested by

no test coverage detected