Skip to content

Commit 1822b8e

Browse files
authored
ci: fix dist/docs scripts (#2238)
1 parent 4cd95eb commit 1822b8e

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

distribution/benchmark.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ def run_benchmarks(
292292
current_bin_path: PathLike,
293293
previous_bin_path: PathLike,
294294
examples_path: PathLike,
295-
output_path: PathLike,
295+
out_path: PathLike,
296296
excluded: list[str] = [],
297297
):
298298
"""Benchmark current development version against previous release
@@ -303,7 +303,7 @@ def run_benchmarks(
303303
current_bin_path = Path(current_bin_path).expanduser().absolute()
304304
previous_bin_path = Path(previous_bin_path).expanduser().absolute()
305305
examples_path = Path(examples_path).expanduser().absolute()
306-
output_path = Path(output_path).expanduser().absolute()
306+
out_path = Path(out_path).expanduser().absolute()
307307

308308
example_dirs = get_model_paths(examples_path, excluded=excluded)
309309
if not any(example_dirs):
@@ -322,7 +322,7 @@ def run_benchmarks(
322322
)
323323

324324
if not old_exe.is_file():
325-
version, download_path = fetch_latest(output_path)
325+
version, download_path = fetch_latest(out_path)
326326
print(f"Rebuilding latest MODFLOW 6 release {version} in development mode")
327327
meson_build(
328328
project_path=download_path,
@@ -360,7 +360,7 @@ def run_benchmarks(
360360
write_results(
361361
current_exe=dev_exe,
362362
previous_exe=old_exe,
363-
output_path=output_path,
363+
output_path=out_path,
364364
current_total=current_total,
365365
previous_total=previous_total,
366366
lines=lines,
@@ -374,7 +374,7 @@ def test_run_benchmarks(tmp_path):
374374
current_bin_path=BIN_PATH,
375375
previous_bin_path=BIN_PATH / "rebuilt",
376376
examples_path=EXAMPLES_REPO_PATH / "examples",
377-
output_path=tmp_path,
377+
out_path=tmp_path,
378378
excluded=["previous"],
379379
)
380380
assert (tmp_path / BENCHMARKS_FILE_NAME).is_file()
@@ -439,6 +439,6 @@ def test_run_benchmarks(tmp_path):
439439
current_bin_path=current_bin_path,
440440
previous_bin_path=previous_bin_path,
441441
examples_path=examples_repo_path / "examples",
442-
output_path=output_path,
442+
out_path=output_path,
443443
excluded=["previous"],
444444
)

distribution/build_docs.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,20 @@ def github_user() -> Optional[str]:
7272

7373

7474
def build_benchmark_tex(
75-
output_path: PathLike,
75+
out_path: PathLike,
7676
force: bool = False,
7777
):
7878
"""Build LaTeX files for MF6 performance benchmarks to go into the release notes."""
7979

8080
# run benchmarks again if no benchmarks found on GitHub or overwrite requested
81-
benchmarks_path = output_path / "run-time-comparison.md"
81+
benchmarks_path = out_path / "run-time-comparison.md"
8282
if force or not benchmarks_path.is_file():
8383
run_benchmarks(
8484
build_path=PROJ_ROOT_PATH / "builddir",
8585
current_bin_path=PROJ_ROOT_PATH / "bin",
8686
previous_bin_path=PROJ_ROOT_PATH / "bin" / "rebuilt",
8787
examples_path=EXAMPLES_REPO_PATH / "examples",
88-
output_path=output_path,
88+
out_path=out_path,
8989
)
9090
assert benchmarks_path.is_file()
9191

@@ -279,7 +279,7 @@ def build_usage_tex(
279279

280280
def build_pdfs(
281281
tex_paths: list[PathLike],
282-
output_path: PathLike,
282+
out_path: PathLike,
283283
passes: int = 3,
284284
force: bool = False,
285285
):
@@ -288,13 +288,13 @@ def build_pdfs(
288288
print("Building PDFs from LaTex:")
289289
pprint(tex_paths)
290290

291-
output_path = Path(output_path).expanduser().absolute()
291+
out_path = Path(out_path).expanduser().absolute()
292292
built_paths = set()
293293
for tex_path in tex_paths:
294294
tex_path = Path(tex_path).expanduser().absolute()
295295
pdf_name = tex_path.stem + ".pdf"
296296
pdf_path = tex_path.parent / pdf_name
297-
tgt_path = output_path / pdf_name
297+
tgt_path = out_path / pdf_name
298298
if force or not tgt_path.is_file():
299299
print(f"Converting {tex_path} to PDF")
300300
with set_dir(tex_path.parent):
@@ -412,7 +412,7 @@ def build_documentation(
412412
else:
413413
tex_paths = TEX_PATHS["minimal"]
414414

415-
build_pdfs(tex_paths=tex_paths, output_path=out_path, force=force)
415+
build_pdfs(tex_paths=tex_paths, out_path=out_path, force=force)
416416

417417
# enforce os line endings on all text files
418418
windows_line_endings = True

0 commit comments

Comments
 (0)