MCPcopy Create free account
hub / github.com/StackStorm/st2 / parse_args

Function parse_args

scripts/fixate_requirements.py:77–112  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

75
76
77def parse_args():
78 parser = argparse.ArgumentParser(
79 description="Tool for requirements.txt generation."
80 )
81 parser.add_argument(
82 "-s",
83 "--source-requirements",
84 nargs="+",
85 required=True,
86 help="Specify paths to requirements file(s). "
87 "In case several requirements files are given their content is merged.",
88 )
89 parser.add_argument(
90 "-f",
91 "--fixed-requirements",
92 required=True,
93 help="Specify path to fixed-requirements.txt file.",
94 )
95 parser.add_argument(
96 "-o",
97 "--output-file",
98 default="requirements.txt",
99 help="Specify path to the resulting requirements file.",
100 )
101 parser.add_argument(
102 "--skip",
103 default=None,
104 help=(
105 "Comma delimited list of requirements to not "
106 "include in the generated file."
107 ),
108 )
109 if len(sys.argv) < 2:
110 parser.print_help()
111 sys.exit(1)
112 return vars(parser.parse_args())
113
114
115def load_requirements(file_path):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected