Skip to content

Commit

Permalink
Tests: only request a single core (#4572)
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c authored Sep 21, 2023
1 parent 68932a1 commit 31c8c4e
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/toil/test/docs/scripts/tutorial_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class HelloWorld(Job):
def __init__(self, message):
Job.__init__(self, memory="2G", cores=2, disk="3G")
Job.__init__(self)
self.message = message

def run(self, fileStore):
Expand Down
2 changes: 1 addition & 1 deletion src/toil/test/docs/scripts/tutorial_invokeworkflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class HelloWorld(Job):
def __init__(self, message):
Job.__init__(self, memory="2G", cores=2, disk="3G")
Job.__init__(self)
self.message = message

def run(self, fileStore):
Expand Down
2 changes: 1 addition & 1 deletion src/toil/test/docs/scripts/tutorial_invokeworkflow2.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class HelloWorld(Job):
def __init__(self, message):
Job.__init__(self, memory="2G", cores=2, disk="3G")
Job.__init__(self)
self.message = message

def run(self, fileStore):
Expand Down
2 changes: 1 addition & 1 deletion src/toil/test/docs/scripts/tutorial_multiplejobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from toil.job import Job


def helloWorld(job, message, memory="2G", cores=2, disk="3G"):
def helloWorld(job, message):
job.log(f"Hello world, I have a message: {message}")


Expand Down
2 changes: 1 addition & 1 deletion src/toil/test/docs/scripts/tutorial_multiplejobs2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from toil.job import Job


def helloWorld(job, message, memory="2G", cores=2, disk="3G"):
def helloWorld(job, message):
job.log(f"Hello world, I have a message: {message}")


Expand Down
2 changes: 1 addition & 1 deletion src/toil/test/docs/scripts/tutorial_multiplejobs3.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from toil.job import Job


def helloWorld(job, message, memory="2G", cores=2, disk="3G"):
def helloWorld(job, message):
job.log(f"Hello world, I have a message: {message}")


Expand Down
2 changes: 1 addition & 1 deletion src/toil/test/docs/scripts/tutorial_quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from toil.job import Job


def helloWorld(message, memory="2G", cores=2, disk="3G"):
def helloWorld(message):
return f"Hello, world!, here's a message: {message}"


Expand Down
4 changes: 2 additions & 2 deletions src/toil/test/docs/scripts/tutorial_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ def parentJob(job):
job.addFollowOn(analysis)


def stageFn(job, url, cores=1):
def stageFn(job, url):
importedFile = job.fileStore.import_file(url)
return importedFile, importedFile.size


def analysisJob(job, fileStoreID, cores=2):
def analysisJob(job, fileStoreID):
# now do some analysis on the file
pass

Expand Down
2 changes: 1 addition & 1 deletion src/toil/test/docs/scripts/tutorial_staging.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class HelloWorld(Job):
def __init__(self, id):
Job.__init__(self, memory="2G", cores=2, disk="3G")
Job.__init__(self)
self.inputFileID = id

def run(self, fileStore):
Expand Down
2 changes: 1 addition & 1 deletion src/toil/test/src/helloWorldTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def testHelloWorld(self):

class HelloWorld(Job):
def __init__(self):
Job.__init__(self, memory=100000, cores=2, disk="3G")
Job.__init__(self, memory=100000, cores=1, disk="3G")

def run(self, fileStore):
fileID = self.addChildJobFn(childFn, cores=1, memory="1M", disk="3G").rv()
Expand Down
2 changes: 1 addition & 1 deletion src/toil/test/src/realtimeLoggerTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def emit(self, record):

class LogTest(Job):
def __init__(self):
Job.__init__(self, memory=100000, cores=2, disk='3G')
Job.__init__(self, memory=100000, cores=1, disk='3G')

def run(self, fileStore):
RealtimeLogger.info('This should be logged at info level')
Expand Down
4 changes: 2 additions & 2 deletions src/toil/test/src/toilContextManagerTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ def testExportAfterFailedExport(self):

class HelloWorld(Job):
def __init__(self):
Job.__init__(self, memory=100000, cores=2, disk='1M')
Job.__init__(self, memory=100000, disk='1M')

def run(self, fileStore):
fileID = self.addChildJobFn(childFn, cores=1, memory='1M', disk='1M').rv()
fileID = self.addChildJobFn(childFn, memory='1M', disk='1M').rv()
return self.addFollowOn(FollowOn(fileID)).rv()


Expand Down
2 changes: 1 addition & 1 deletion src/toil/test/src/userDefinedJobArgTypeTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def _testFromMain(self):

class JobClass(Job):
def __init__(self, level, foo):
Job.__init__(self, memory=100000, cores=2, disk="300M")
Job.__init__(self, memory=100000, cores=1, disk="300M")
self.level = level
self.foo = foo

Expand Down

0 comments on commit 31c8c4e

Please sign in to comment.