Skip to content

Commit

Permalink
Wait for validity before trying to publish test Dandisets
Browse files Browse the repository at this point in the history
  • Loading branch information
jwodder committed Sep 22, 2021
1 parent 95f7985 commit 7ec49de
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/test_backups2datalad.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ def check_version_tag(v: Version) -> None:
metadata = yaml_load(readgit("show", f"{vid}:{dandiset_metadata_file}"))
assert metadata.get("doi")

text_dandiset["dandiset"].wait_until_valid()
v1 = text_dandiset["dandiset"].publish().version
version1 = v1.identifier
di.update_from_backup([dandiset_id])
Expand All @@ -191,6 +192,7 @@ def check_version_tag(v: Version) -> None:
ds.pathobj / "new.txt"
).read_text() == "This file's contents were changed.\n"

text_dandiset["dandiset"].wait_until_valid()
v2 = text_dandiset["dandiset"].publish().version
version2 = v2.identifier
di.update_from_backup([dandiset_id])
Expand Down Expand Up @@ -233,6 +235,7 @@ def readgit(*args: str) -> str:
for i in range(1, 4):
(text_dandiset["dspath"] / "counter.txt").write_text(f"{i}\n")
text_dandiset["reupload"]()
text_dandiset["dandiset"].wait_until_valid()
v = text_dandiset["dandiset"].publish().version
di.update_from_backup([dandiset_id])
assert readgit("tag") == ""
Expand Down

0 comments on commit 7ec49de

Please sign in to comment.