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

Function web_export_to_file

walrus/methods/export/export_web.py:17–93  ·  view source on GitHub ↗

Generates annotations Assumes latest version if none provided... Long running operation (starts new thread) Input example (JSON) { directory_id: 1059 file_comparison_mode: "latest" kind: "Annotations" masks: false source: "directory"

(project_string_id)

Source from the content-addressed store, hash-verified

15 apis_user_list = ["api_enabled_builder"])
16@limiter.limit("1000 per minute")
17def web_export_to_file(project_string_id):
18 """
19 Generates annotations
20 Assumes latest version if none provided...
21 Long running operation (starts new thread)
22
23 Input example (JSON)
24 {
25 directory_id: 1059
26 file_comparison_mode: "latest"
27 kind: "Annotations"
28 masks: false
29 source: "directory"
30 version_id: 0
31 }
32
33 wait_for_export_generation == True
34 is in conjunction with return_type
35
36 For job permissions:
37 We assume that we already are operating in context
38 of project permissions, so as long as the job
39 is in the project then it's fine.
40 including things like API enabled builder
41
42 """
43
44 spec_list = [
45 {"kind": str},
46 {"source": str},
47 {"file_comparison_mode": str},
48 {"masks": bool},
49 {"version_id": None},
50 {"directory_id": None},
51 {"job_id": None},
52 {"task_id": None},
53 {"return_type": None},
54 {"wait_for_export_generation": {
55 'default': False,
56 'kind': bool
57 }
58 },
59 {"ann_is_complete": {
60 'default': None,
61 'kind': bool
62 }
63 }
64 ]
65
66 log, input, untrusted_input = regular_input.master(request = request,
67 spec_list = spec_list)
68 if len(log["error"].keys()) >= 1:
69 return jsonify(log = log), 400
70
71 with sessionMaker.session_scope() as session:
72
73 project = Project.get(session, project_string_id)
74 data, log = create_new_export(

Callers

nothing calls this directly

Calls 3

create_new_exportFunction · 0.90
get_memberFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected