Skip to content

Commit

Permalink
fixed build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisTimperley committed Apr 19, 2018
1 parent fca964f commit 54362e0
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/orchestrator/orchestrator.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from typing import List
from typing import List, Tuple, Optional
from enum import Enum
import threading
import time

import hulk
import bugzoo
import bugzoo.client
import darjeeling
from bugzoo.core.fileline import FileLine
from bugzoo.core.fileline import FileLine, FileLineSet
from darjeeling.problem import Problem
from darjeeling.searcher import Searcher

Expand All @@ -27,11 +28,11 @@


class OrchestratorState(Enum):
READY_TO_PERTURB = auto()
PERTURBING = auto()
READY_TO_ADAPT = auto()
SEARCHING = auto()
FINISHED = auto()
READY_TO_PERTURB = 0
PERTURBING = 1
READY_TO_ADAPT = 2
SEARCHING = 3
FINISHED = 4


class Orchestrator(object):
Expand Down Expand Up @@ -90,7 +91,7 @@ def hulk(self) -> hulk.Client:
return self.__client_hulk

@property
def bugzoo(self) -> bugzoo.Client:
def bugzoo(self) -> bugzoo.client.Client:
"""
A connection to the BugZoo server, used to validate patches and provide
a sandboxed environment for interacting with (versions of) the system
Expand Down Expand Up @@ -129,7 +130,7 @@ def files(self) -> List[str]:
return self.lines.files

@property
def lines(self) -> bugzoo.core.fileline.FileLineSet:
def lines(self) -> FileLineSet:
"""
The set of source code lines in the original, unperturbed system that
may be subject to perturbation.
Expand Down Expand Up @@ -209,11 +210,11 @@ def perturbations(self,

line = FileLine(filename, line_num) if line_num else None

if filename is not in self.files:
if filename not in self.files:
raise FileNotFound(filename)
if line is not None and line not in self.lines:
raise LineNotFound(line)
if op_name is not None and op_name is not in OPERATOR_NAMES:
if op_name is not None and op_name not in OPERATOR_NAMES:
raise OperatorNotFound(op_name)

# fetch the mutation operators
Expand Down

0 comments on commit 54362e0

Please sign in to comment.