MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / get_yaml_diff

Function get_yaml_diff

tools/check_api_yaml_same.py:91–108  ·  view source on GitHub ↗
(branch)

Source from the content-addressed store, hash-verified

89
90
91def get_yaml_diff(branch):
92 ops_yaml_path = root_path + "/paddle/phi/ops/yaml/ops.yaml"
93 legacy_yaml_path = (
94 root_path + "/paddle/phi/ops/yaml/inconsistent/dygraph_ops.yaml"
95 )
96 git_cmd = (
97 "git diff -U0 upstream/"
98 + branch
99 + " "
100 + ops_yaml_path
101 + " "
102 + legacy_yaml_path
103 )
104 yaml_diff = os.popen(git_cmd).readlines()
105 result = []
106 for line in yaml_diff:
107 result.append(line.strip('\r\n'))
108 return result
109
110
111api_diffs = get_api_diff(sys.argv[1], sys.argv[2])

Callers 1

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected