Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:scidash/sciunit into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
rgerkin committed Jan 19, 2019
2 parents d896ff5 + 16fd5ea commit da5c847
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 5 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
2 changes: 1 addition & 1 deletion sciunit/scores/collections_m2m.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def __init__(self, test, models, scores):
warnings.filterwarnings("ignore",
message=(".*Pandas doesn't allow columns "
"to be created via a new "))
self.tests = tests
self.test = test
self.models = models

def __getitem__(self, item):
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'
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
try:
from pip.req import parse_requirements
from pip.download import PipSession
except ImportError:
except:
from pip._internal.req import parse_requirements
from pip._internal.download import PipSession

Expand All @@ -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 da5c847

Please sign in to comment.