Skip to content

Commit

Permalink
Avoid fetching docs on constraints-only mode (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsutaj authored Jun 21, 2023
1 parent 0297123 commit fc439ee
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions statements_manager/src/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,23 +284,20 @@ def run(
problemset_cache: dict[str, Any] = {}
for problem_id in problem_ids:
logger.info(f"rendering [problem id: {problem_id}]")
status, raw_statement = self.get_contents(problem_id)

self.create_params_file(problem_id)
if constraints_only:
continue

status, raw_statement = self.get_contents(problem_id)
if status == ContentsStatus.NG:
logger.info(f"skipped [problem id: {problem_id}]")
logger.info("")
continue

# 問題文取得
valid_problem_ids.append(problem_id)
self.problem_attr[problem_id]["raw_statement"] = raw_statement

# パラメータファイル作成
self.create_params_file(problem_id)
# 制約ファイルのみを更新する場合はこれで終了
if constraints_only:
continue

# 問題文ファイル出力先
output_dir = self.problem_attr[problem_id]["output_path"]
if output_dir.exists():
Expand Down

0 comments on commit fc439ee

Please sign in to comment.