Skip to content

Commit 5de85f8

Browse files
committed
do not include repo root in file hash
1 parent c7790a2 commit 5de85f8

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/_canary/testspec.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ def _compute_repo_root(cls, path: Path) -> Path:
507507
break
508508
d = d.parent
509509
else:
510-
root = path.parent
510+
root = d
511511
return root
512512

513513
@classmethod
@@ -534,11 +534,6 @@ def file_hash(cls, path: Path) -> bytes:
534534
key = cls.populate_cache(path)
535535
return cls._file_hash[key]
536536

537-
@classmethod
538-
def repo_root(cls, path: Path) -> bytes:
539-
key = cls.populate_cache(path)
540-
return cls._repo_root[key]
541-
542537
@classmethod
543538
def rel_repo(cls, path: Path) -> bytes:
544539
key = cls.populate_cache(path)
@@ -554,7 +549,6 @@ def build_spec_id(spec: BaseSpec) -> str:
554549
for p in sorted(parameters):
555550
hasher.update(f"{p}={stringify(parameters[p], float_fmt='%.16e')}".encode())
556551
hasher.update(_GlobalSpecCache.file_hash(spec.file))
557-
hasher.update(_GlobalSpecCache.repo_root(spec.file))
558552
hasher.update(_GlobalSpecCache.rel_repo(spec.file))
559553
return hasher.hexdigest()
560554

0 commit comments

Comments
 (0)