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 Nov 6, 2017
2 parents 376b868 + 5ef6d34 commit f1dbfa7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
# author Rick Gerkin rgerkin@asu.edu
FROM scidash/scipy-notebook-plus

ADD . /home/mnt
WORKDIR /home/mnt
ADD . $HOME/sciunit
WORKDIR $HOME/sciunit
USER root
RUN chown -R $NB_USER .
RUN apt-get update
RUN apt-get install openssh-client -y # Needed for Versioned unit tests to pass
USER $NB_USER

RUN pip install -e . --process-dependency-links
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
| [![RTFD](https://readthedocs.org/projects/sciunit/badge/?version=master)](http://sciunit.readthedocs.io/en/latest/?badge=master) | [![RTFD](https://readthedocs.org/projects/sciunit/badge/?version=dev)](http://sciunit.readthedocs.io/en/latest/?badge=dev) |
| [![Coveralls](https://coveralls.io/repos/github/scidash/sciunit/badge.svg?branch=master)](https://coveralls.io/github/scidash/sciunit?branch=master) | [![Coveralls](https://coveralls.io/repos/github/scidash/sciunit/badge.svg?branch=dev)](https://coveralls.io/github/scidash/sciunit?branch=dev) |
| [![Requirements](https://requires.io/github/scidash/sciunit/requirements.svg?branch=master)](https://requires.io/github/scidash/sciunit/requirements/?branch=master) | [![Requirements](https://requires.io/github/scidash/sciunit/requirements.svg?branch=dev)](https://requires.io/github/scidash/sciunit/requirements/?branch=dev) |
| [![Docker Build Status](https://img.shields.io/docker/build/scidash/sciunit.svg)](https://hub.docker.com/r/scidash/sciunit/builds/) |

![SciUnit Logo](https://raw.githubusercontent.com/scidash/assets/master/logos/sciunit.png)
# SciUnit: A Test-Driven Framework for Formally Validating Scientific Models Against Data
Expand Down Expand Up @@ -32,8 +33,8 @@ There is a [mailing list](https://groups.google.com/forum/?fromgroups#!forum/sci
Please join it if you are at all interested!

## Contributors
* [Cyrus Omar](http://cs.cmu.edu/~comar), Carnegie Mellon University (Dept. of Computer Science)
* [Rick Gerkin](http://rick.gerk.in), Arizona State University (School of Life Science)

* [Cyrus Omar](http://cs.cmu.edu/~comar), Carnegie Mellon University (Dept. of Computer Science)

## License
SciUnit is released under the permissive [MIT license](https://opensource.org/licenses/MIT), requiring only attribution in derivative works. See the LICENSE file for terms.
11 changes: 10 additions & 1 deletion sciunit/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
from quantities.quantity import Quantity
import cypy
import git
from git.exc import GitCommandError
from git.cmd import Git

PRINT_DEBUG_STATE = False # printd does nothing by default.

Expand Down Expand Up @@ -323,6 +325,13 @@ def get_remote_url(self, remote='origin'):
repo = self.get_repo()
remotes = {r.name:r for r in repo.remotes}
r = repo.remotes[0] if remote not in remotes else remotes[remote]
url = list(r.urls)[0]
try:
url = list(r.urls)[0]
except GitCommandError as ex:
if 'correct access rights' in str(ex):
# If ssh is not setup to access this repository
url = Git().execute(['git','config','--get','remote.%s.url' % r.name])
else:
raise ex
return url
remote_url = property(get_remote_url)

0 comments on commit f1dbfa7

Please sign in to comment.