fixes git repo issue

This commit is contained in:
Mayank Mittal 2023-11-09 12:40:07 +01:00
parent 51d06cff92
commit 112dd68f16
3 changed files with 7 additions and 3 deletions

View File

@ -3,5 +3,5 @@
"""Main module for the rsl_rl package."""
__version__ = "2.0.0"
__version__ = "2.0.1"
__license__ = "BSD-3"

View File

@ -60,7 +60,11 @@ def unpad_trajectories(trajectories, masks):
def store_code_state(logdir, repositories):
for repository_file_path in repositories:
repo = git.Repo(repository_file_path, search_parent_directories=True)
try:
repo = git.Repo(repository_file_path, search_parent_directories=True)
except git.InvalidGitRepositoryError:
# skip if not a git repository
continue
repo_name = pathlib.Path(repo.working_dir).name
t = repo.head.commit.tree
content = f"--- git status ---\n{repo.git.status()} \n\n\n--- git diff ---\n{repo.git.diff(t)}"

View File

@ -5,7 +5,7 @@ from setuptools import find_packages, setup
setup(
name="rsl_rl",
version="2.0.0",
version="2.0.1",
packages=find_packages(),
license="BSD-3",
description="Fast and simple RL algorithms implemented in pytorch",