Skip to content

Commit

Permalink
Merge pull request #90 from scidash/master
Browse files Browse the repository at this point in the history
Merge versioning fixes into dev
  • Loading branch information
rgerkin committed Dec 14, 2018
2 parents 1222187 + 9919e47 commit 16fd5ea
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include requirements.txt
include LICENSE
1 change: 1 addition & 0 deletions sciunit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
from .errors import Error
from .scores.collections import ScoreArray, ScoreMatrix, ScorePanel
from .scores.collections_m2m import ScoreArrayM2M, ScoreMatrixM2M
from .version import __version__
4 changes: 2 additions & 2 deletions sciunit/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import numpy as np
import pandas as pd
import git
from git.exc import GitCommandError
from git.exc import GitCommandError, InvalidGitRepositoryError
from git.cmd import Git

PYTHON_MAJOR_VERSION = sys.version_info.major
Expand Down Expand Up @@ -50,7 +50,7 @@ def get_repo(self, cached=True):
path = os.path.realpath(module.__file__)
try:
repo = git.Repo(path, search_parent_directories=True)
except git.InvalidGitRepositoryError:
except InvalidGitRepositoryError:
repo = None
else:
repo = None
Expand Down
1 change: 1 addition & 0 deletions sciunit/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '0.2.0.2'
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,16 @@ def read_requirements():
install_reqs = parse_requirements(reqs_path, session=PipSession())
reqs = [str(ir.req) for ir in install_reqs]
return reqs

def get_version():
version = {}
with open("sciunit/version.py") as f:
exec(f.read(), version)
return version['__version__']

setup(
name='sciunit',
version='0.2',
version=get_version(),
author='Rick Gerkin',
author_email='rgerkin@asu.edu',
packages=find_packages(),
Expand Down

0 comments on commit 16fd5ea

Please sign in to comment.