Skip to content

Commit f4af901

Browse files
authored
Merge branch 'main' into cd-before-reading-personal-config
2 parents 7ff2ecb + e9e66ec commit f4af901

File tree

12 files changed

+153
-100
lines changed

12 files changed

+153
-100
lines changed

bin/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@
9393
SEED_DEPENDENCY_RETRIES: Final[int] = 10
9494

9595
# The root directory of the BAPCtools repository.
96-
TOOLS_ROOT: Final[Path] = Path(__file__).resolve().parent.parent
96+
TOOLS_ROOT: Final[Path] = Path(__file__).absolute().parent.parent
9797

9898
# The directory from which BAPCtools is invoked.
99-
current_working_directory: Final[Path] = Path.cwd().resolve()
99+
current_working_directory: Final[Path] = Path.cwd().absolute()
100100

101101
# Add third_party/ to the $PATH for checktestdata.
102102
os.environ["PATH"] += os.pathsep + str(TOOLS_ROOT / "third_party")

bin/interactive.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ def get_validator_command():
5454
return (
5555
output_validator.run_command
5656
+ [
57-
run.in_path.resolve(),
58-
run.testcase.ans_path.resolve(),
59-
run.feedbackdir.resolve(),
57+
run.in_path.absolute(),
58+
run.testcase.ans_path.absolute(),
59+
run.feedbackdir.absolute(),
6060
]
6161
+ run.testcase.test_case_yaml_args(
6262
output_validator,

bin/problem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ class Problem:
341341

342342
def __init__(self, path: Path, tmpdir: Path, label: Optional[str] = None):
343343
# The problem name/shortname, which is the name of the directory and used as a display name.
344-
self.name = path.resolve().name
344+
self.name = path.name
345345
# The Path of the problem directory.
346346
self.path = path
347347
self.tmpdir: Path = tmpdir / self.name

bin/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def _visualize_output(self, bar: BAR_TYPE) -> Optional[ExecResult]:
241241
return None
242242
return output_visualizer.run(
243243
self.testcase.in_path,
244-
self.testcase.ans_path.resolve(),
244+
self.testcase.ans_path.absolute(),
245245
self.out_path if not self.problem.interactive else None,
246246
self.feedbackdir,
247247
args=self.testcase.test_case_yaml_args(output_visualizer, bar),

bin/skel.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,10 +290,10 @@ def git(*args):
290290
error("not inside git")
291291
return
292292

293-
git_root_path = Path(git("rev-parse", "--show-toplevel").strip()).resolve()
293+
git_root_path = Path(git("rev-parse", "--show-toplevel").strip()).absolute()
294294

295295
def problem_source_dir(problem: Problem) -> Path:
296-
return problem.path.resolve().relative_to(git_root_path)
296+
return problem.path.absolute().relative_to(git_root_path)
297297

298298
if config.args.latest_bt:
299299
header_yml = (config.TOOLS_ROOT / "skel/gitlab_ci/header_latest_bt.yaml").read_text()
@@ -302,7 +302,7 @@ def problem_source_dir(problem: Problem) -> Path:
302302
print(header_yml)
303303

304304
contest_yml = (config.TOOLS_ROOT / "skel/gitlab_ci/contest.yaml").read_text()
305-
contest_path = Path(".").resolve().relative_to(git_root_path)
305+
contest_path = Path(".").absolute().relative_to(git_root_path)
306306
changes = "".join(
307307
f" - {problem_source_dir(problem)}/{pdf_type.path().parent}/**/*\n"
308308
for problem in problems

0 commit comments

Comments
 (0)