Skip to content

Commit

Permalink
fix: addressed CI problems with git submodules (#783)
Browse files Browse the repository at this point in the history
* fix: addressed CI problems with git submodules

* fix: pin to git2.x

* pin to git 3.2
  • Loading branch information
jsam committed Oct 30, 2019
1 parent 53f70fb commit 0d3eeb7
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
7 changes: 5 additions & 2 deletions conftest.py
Expand Up @@ -159,7 +159,7 @@ def project(repository):
"""Create a test project."""
from git import Repo

repo = Repo(repository)
repo = Repo(repository, search_parent_directories=True)
commit = repo.head.commit

os.chdir(repository)
Expand Down Expand Up @@ -306,7 +306,10 @@ def old_repository(tmpdir_factory, old_bare_repository):
repo_path = tmpdir_factory.mktemp('repo')
yield {
'repo':
Repo(old_bare_repository['path'].strpath).clone(repo_path.strpath),
Repo(
old_bare_repository['path'].strpath,
search_parent_directories=True
).clone(repo_path.strpath),
'exit_code': old_bare_repository['exit_code']
}
shutil.rmtree(repo_path.strpath)
Expand Down
3 changes: 2 additions & 1 deletion renku/cli/exception_handler.py
Expand Up @@ -136,7 +136,8 @@ def _handle_sentry(self):
from renku.core.commands import get_git_home
from renku.core.models.creators import Creator

user = Creator.from_git(Repo(get_git_home()))
repo = Repo(get_git_home())
user = Creator.from_git(repo)

scope.user = {'name': user.name, 'email': user.email}

Expand Down
1 change: 0 additions & 1 deletion renku/core/commands/graph.py
Expand Up @@ -284,7 +284,6 @@ def process_dependencies(self, dependencies, visited=None):
visited.add(processing.commit)

activity = processing.client.process_commit(processing.commit)

if activity is None:
continue

Expand Down
1 change: 0 additions & 1 deletion renku/core/management/repository.py
Expand Up @@ -180,7 +180,6 @@ def process_commit(self, commit=None, path=None):
from renku.core.models.provenance.activities import Activity

commit = commit or self.repo.head.commit

if len(commit.parents) > 1:
return Activity(commit=commit, client=self)

Expand Down
1 change: 1 addition & 0 deletions renku/core/models/provenance/activities.py
Expand Up @@ -192,6 +192,7 @@ def paths(self):

for file_ in self.commit.diff(self.commit.parents or NULL_TREE):
path_ = Path(file_.a_path)

is_dataset = self.client.DATASETS in str(path_)
not_refs = LinkReference.REFS not in str(path_)
does_not_exists = not path_.exists()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -80,7 +80,7 @@
'cwltool==1.0.20181012180214',
'environ_config>=18.2.0',
'filelock>=3.0.0',
'gitpython>=2.1.8',
'gitpython==3.0.3',
'patool>=1.12',
'psutil>=5.4.7',
'pyasn1>=0.4.5',
Expand Down

0 comments on commit 0d3eeb7

Please sign in to comment.