Skip to content

Commit

Permalink
Merge pull request #139 from joakim-hove/python3-conda-fix
Browse files Browse the repository at this point in the history
Use fixed version for miniconda + Python3
  • Loading branch information
joakim-hove authored Sep 24, 2018
2 parents a6e79d7 + 39fbc4c commit a69118a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ install:
fi
else
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
wget https://repo.continuum.io/miniconda/Miniconda3-4.4.10-MacOSX-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
wget https://repo.continuum.io/miniconda/Miniconda3-4.4.10-Linux-x86_64.sh -O miniconda.sh;
fi
fi

Expand Down
16 changes: 8 additions & 8 deletions python/python/ert_gui/simulation/models/base_run_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@
# 2. If self._job_queue is None - the decorator argument is returned.

def job_queue(default):

def job_queue_decorator(method):

def dispatch(self , *args, **kwargs):

if self._job_queue is None:
return default
else:
return method( self, *args , **kwargs)
return method( self, *args , **kwargs)

return dispatch

return job_queue_decorator


class ErtRunError(Exception):
pass
Expand All @@ -46,15 +46,15 @@ def __init__(self, name, queue_config, phase_count=1):
self._queue_config = queue_config
self._job_queue = None
self.reset( )

def ert(self):
""" @rtype: res.enkf.EnKFMain"""
return ERT.ert


def reset(self):
self._failed = False


def startSimulations(self, arguments):
try:
Expand All @@ -68,11 +68,11 @@ def startSimulations(self, arguments):
def runSimulations(self, job_queue, run_context):
raise NotImplementedError("Method must be implemented by inheritors!")


def create_context(self, arguments):
raise NotImplementedError("Method must be implemented by inheritors!")


@job_queue(None)
def killAllSimulations(self):
self._job_queue.killAllJobs()
Expand Down Expand Up @@ -215,7 +215,7 @@ def getProgress(self):
def isIndeterminate(self):
""" @rtype: bool """
return not self.isFinished() and self._indeterminate

def checkHaveSufficientRealizations(self, num_successful_realizations):
if num_successful_realizations == 0:
raise ErtRunError("Simulation failed! All realizations failed!")
Expand Down

0 comments on commit a69118a

Please sign in to comment.