MCPcopy Index your code
hub / github.com/FSoft-AI4Code/CodeWiki / from_args

Method from_args

codewiki/src/config.py:139–155  ·  view source on GitHub ↗

Create configuration from parsed arguments.

(cls, args: argparse.Namespace)

Source from the content-addressed store, hash-verified

137
138 @classmethod
139 def from_args(cls, args: argparse.Namespace) -> 'Config':
140 """Create configuration from parsed arguments."""
141 repo_name = os.path.basename(os.path.normpath(args.repo_path))
142 sanitized_repo_name = ''.join(c if c.isalnum() else '_' for c in repo_name)
143
144 return cls(
145 repo_path=args.repo_path,
146 output_dir=OUTPUT_BASE_DIR,
147 dependency_graph_dir=os.path.join(OUTPUT_BASE_DIR, DEPENDENCY_GRAPHS_DIR),
148 docs_dir=os.path.join(OUTPUT_BASE_DIR, DOCS_DIR, f"{sanitized_repo_name}-docs"),
149 max_depth=MAX_DEPTH,
150 llm_base_url=LLM_BASE_URL,
151 llm_api_key=LLM_API_KEY,
152 main_model=MAIN_MODEL,
153 cluster_model=CLUSTER_MODEL,
154 fallback_model=FALLBACK_MODEL_1
155 )
156
157 @classmethod
158 def from_cli(

Callers 2

_process_jobMethod · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected