MCPcopy Create free account
hub / github.com/apache/datafusion / main

Function main

dev/update_arrow_deps.py:109–131  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

107
108
109def main():
110 parser = argparse.ArgumentParser(description='Update arrow dep versions.')
111 sub_parsers = parser.add_subparsers(help='sub-command help')
112
113 parser_version = sub_parsers.add_parser('version', help='update arrow version')
114 parser_version.add_argument('new_version', type=str, help='new arrow version')
115 parser_version.set_defaults(which='version')
116
117 parser_commit = sub_parsers.add_parser('commit', help='update arrow commit')
118 parser_commit.set_defaults(which='commit')
119
120 args = parser.parse_args()
121
122 repo_root = Path(__file__).parent.parent.absolute()
123
124 if args.which == "version":
125 for cargo_toml in repo_root.rglob('Cargo.toml'):
126 update_version_cargo_toml(cargo_toml, args.new_version)
127 elif args.which == "commit":
128 new_sha = get_arrow_sha()
129 print('Updating files in {} to use sha {}'.format(repo_root, new_sha))
130 for cargo_toml in repo_root.rglob('Cargo.toml'):
131 update_commit_cargo_toml(cargo_toml, new_sha)
132
133
134

Callers 1

Calls 4

get_arrow_shaFunction · 0.85
update_commit_cargo_tomlFunction · 0.85
formatMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…