-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow nf-core pipelines download -r
to download commits
#3374
base: dev
Are you sure you want to change the base?
Changes from 5 commits
bf3224c
9dcb4a0
7b931f1
c356337
b0b9559
12f6e36
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -81,6 +81,48 @@ def test_get_release_hash_branch(self): | |||||
== "https://github.com/nf-core/exoseq/archive/819cbac792b76cf66c840b567ed0ee9a2f620db7.zip" | ||||||
) | ||||||
|
||||||
def test_get_release_hash_long_commit(self): | ||||||
wfs = nf_core.pipelines.list.Workflows() | ||||||
wfs.get_remote_workflows() | ||||||
# Exoseq pipeline is archived, so `dev` branch should be stable | ||||||
pipeline = "exoseq" | ||||||
|
||||||
download_obj = DownloadWorkflow(pipeline="exoseq", revision="819cbac792b76cf66c840b567ed0ee9a2f620db7") | ||||||
( | ||||||
download_obj.pipeline, | ||||||
download_obj.wf_revisions, | ||||||
download_obj.wf_branches, | ||||||
) = nf_core.utils.get_repo_releases_branches(pipeline, wfs) | ||||||
download_obj.get_revision_hash() | ||||||
print(download_obj) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
assert download_obj.wf_sha[download_obj.revision[0]] == "819cbac792b76cf66c840b567ed0ee9a2f620db7" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
assert download_obj.outdir == "nf-core-exoseq_819cbac792b76cf66c840b567ed0ee9a2f620db7" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
assert ( | ||||||
download_obj.wf_download_url[download_obj.revision[0]] | ||||||
== "https://github.com/nf-core/exoseq/archive/819cbac792b76cf66c840b567ed0ee9a2f620db7.zip" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
) | ||||||
|
||||||
def test_get_release_hash_short_commit(self): | ||||||
wfs = nf_core.pipelines.list.Workflows() | ||||||
wfs.get_remote_workflows() | ||||||
# Exoseq pipeline is archived, so `dev` branch should be stable | ||||||
pipeline = "exoseq" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same suggestions from |
||||||
|
||||||
download_obj = DownloadWorkflow(pipeline="exoseq", revision="819cbac") | ||||||
( | ||||||
download_obj.pipeline, | ||||||
download_obj.wf_revisions, | ||||||
download_obj.wf_branches, | ||||||
) = nf_core.utils.get_repo_releases_branches(pipeline, wfs) | ||||||
download_obj.get_revision_hash() | ||||||
print(download_obj) | ||||||
assert download_obj.wf_sha[download_obj.revision[0]] == "819cbac792b76cf66c840b567ed0ee9a2f620db7" | ||||||
assert download_obj.outdir == "nf-core-exoseq_819cbac" | ||||||
assert ( | ||||||
download_obj.wf_download_url[download_obj.revision[0]] | ||||||
== "https://github.com/nf-core/exoseq/archive/819cbac792b76cf66c840b567ed0ee9a2f620db7.zip" | ||||||
) | ||||||
|
||||||
def test_get_release_hash_non_existent_release(self): | ||||||
wfs = nf_core.pipelines.list.Workflows() | ||||||
wfs.get_remote_workflows() | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.