Skip to content

Commit

Permalink
Dont require default to main (#3)
Browse files Browse the repository at this point in the history
* test putting back tag = None

* push some debug info

* try adding type hint

* remove type hint, didn't help

* type hint but no cast

* no hint and no cast

* put back cast

* shitty hack

* a little more debug info

* fix if statement

* missing check

* fix checks again

* or to and

* fix tests

* debug info

* remove dumb hack

* more debug info

* more debug

* check version type

* try to find out why version is str None not NoneType

* try new check

* remove debug clutter

* tidy up
  • Loading branch information
dcl10 authored Aug 1, 2023
1 parent 45563a6 commit 4038c0a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
12 changes: 0 additions & 12 deletions tests/fetchers/test_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@
RemoteRepo(
repo_url="https://github.com/inab/WfExS-backend.git",
repo_type=RepoType.Git,
tag="main",
),
),
(
"git+https://github.com/inab/WfExS-backend.git",
RemoteRepo(
repo_url="https://github.com/inab/WfExS-backend.git",
repo_type=RepoType.Git,
tag="main",
),
),
(
Expand All @@ -37,23 +35,20 @@
repo_url="https://github.com/inab/WfExS-backend.git",
repo_type=RepoType.Git,
rel_path="workflow_examples/ipc/cosifer_test1_cwl.wfex.stage",
tag="main",
),
),
(
"ssh://[email protected]:inab/WfExS-backend.git",
RemoteRepo(
repo_url="[email protected]:inab/WfExS-backend.git",
repo_type=RepoType.Git,
tag="main",
),
),
(
"git+ssh://[email protected]:inab/WfExS-backend.git",
RemoteRepo(
repo_url="[email protected]:inab/WfExS-backend.git",
repo_type=RepoType.Git,
tag="main",
),
),
(
Expand All @@ -70,23 +65,20 @@
repo_url="[email protected]:inab/WfExS-backend.git",
repo_type=RepoType.Git,
rel_path="workflow_examples/ipc/cosifer_test1_cwl.wfex.stage",
tag="main",
),
),
(
"file:///inab/WfExS-backend/.git",
RemoteRepo(
repo_url="file:///inab/WfExS-backend/.git",
repo_type=RepoType.Git,
tag="main",
),
),
(
"git+file:///inab/WfExS-backend/.git",
RemoteRepo(
repo_url="file:///inab/WfExS-backend/.git",
repo_type=RepoType.Git,
tag="main",
),
),
(
Expand All @@ -103,7 +95,6 @@
repo_url="file:///inab/WfExS-backend/.git",
repo_type=RepoType.Git,
rel_path="workflow_examples/ipc/cosifer_test1_cwl.wfex.stage",
tag="main",
),
),
(
Expand All @@ -119,23 +110,20 @@
RemoteRepo(
repo_url="[email protected]:inab/WfExS-backend",
repo_type=RepoType.Git,
tag="main",
),
),
(
"https://github.com/inab/WfExS-backend",
RemoteRepo(
repo_url="https://github.com/inab/WfExS-backend",
repo_type=RepoType.Git,
tag="main",
),
),
(
"file:///inab/WfExS-backend",
RemoteRepo(
repo_url="file:///inab/WfExS-backend",
repo_type=RepoType.Git,
tag="main",
),
),
],
Expand Down
2 changes: 1 addition & 1 deletion wfexs_backend/fetchers/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def guess_git_repo_params(
if no repo was found.
"""
repoURL = None
repoTag = "main"
repoTag = None
repoRelPath = None
repoType: "Optional[RepoType]" = RepoType.Git

Expand Down
2 changes: 1 addition & 1 deletion wfexs_backend/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def __init__(
self.creds_config = creds_config

self.id = str(workflow_id)
self.version_id = str(version_id)
self.version_id = None if version_id is None else str(version_id)
self.descriptor_type = descriptor_type
self.params = params
self.placeholders = placeholders
Expand Down

0 comments on commit 4038c0a

Please sign in to comment.