MCPcopy Create free account
hub / github.com/apache/fory / parse_args

Function parse_args

ci/run_ci.py:248–469  ·  view source on GitHub ↗

Parse command-line arguments and dispatch to the appropriate task module.

()

Source from the content-addressed store, hash-verified

246
247
248def parse_args():
249 """Parse command-line arguments and dispatch to the appropriate task module."""
250 parser = argparse.ArgumentParser(
251 description="Fory CI Runner",
252 formatter_class=argparse.ArgumentDefaultsHelpFormatter,
253 )
254 parser.set_defaults(func=lambda: parser.print_help())
255 subparsers = parser.add_subparsers(dest="command")
256
257 # C++ subparser
258 cpp_parser = subparsers.add_parser(
259 "cpp",
260 description="Run C++ CI",
261 help="Run C++ CI",
262 formatter_class=argparse.ArgumentDefaultsHelpFormatter,
263 )
264 cpp_parser.add_argument(
265 "--install-deps-only",
266 action="store_true",
267 help="Only install dependencies without running tests",
268 )
269 cpp_parser.add_argument(
270 "--skip-doc-tests",
271 action="store_true",
272 help="Skip documentation example tests",
273 )
274 cpp_parser.add_argument(
275 "--doc-tests-only",
276 action="store_true",
277 help="Only run documentation example tests",
278 )
279 cpp_parser.set_defaults(
280 func=lambda install_deps_only, skip_doc_tests, doc_tests_only: cpp.run(
281 install_deps_only, skip_doc_tests, doc_tests_only
282 )
283 )
284
285 # Rust subparser
286 rust_parser = subparsers.add_parser(
287 "rust",
288 description="Run Rust CI",
289 help="Run Rust CI",
290 formatter_class=argparse.ArgumentDefaultsHelpFormatter,
291 )
292 rust_parser.set_defaults(func=rust.run)
293
294 # JavaScript subparser
295 js_parser = subparsers.add_parser(
296 "javascript",
297 description="Run JavaScript CI",
298 help="Run JavaScript CI",
299 formatter_class=argparse.ArgumentDefaultsHelpFormatter,
300 )
301 js_parser.set_defaults(func=javascript.run)
302
303 # Java subparser
304 java_parser = subparsers.add_parser(
305 "java",

Callers 1

run_ci.pyFile · 0.70

Calls 7

is_windowsFunction · 0.90
funcFunction · 0.85
run_shell_scriptFunction · 0.85
runMethod · 0.65
getMethod · 0.65
infoMethod · 0.65
popMethod · 0.45

Tested by

no test coverage detected