Documentation incorrect for firetask/addition_task.py

Hello,
The code displayed in the documentation for firetask tutorial https://pythonhosted.org/FireWorks/firetask_tutorial.html is different than what is in addition_task.py.

#!/usr/bin/env python

from fireworks.core.firework import FWAction, FiretaskBase

author = ‘Anubhav Jain’

copyright = ‘Copyright 2013, The Materials Project’

version = ‘0.1’

maintainer = ‘Anubhav Jain’

email = ‘a…@lbl.gov

date = ‘Feb 17, 2013’

class AdditionTask(FiretaskBase):

_fw_name = “Addition Task”

def run_task(self, fw_spec):

input_array = fw_spec[‘input_array’]

m_sum = sum(input_array)

print(“The sum of {} is: {}”.format(input_array, m_sum))

return FWAction(stored_data={‘sum’: m_sum}, mod_spec=[{’_push’: {‘input_array’: m_sum}}])

Apologies if this is not the place to bring this up. Thanks! Hope to use this at JGI!

  • Mario

Hi Mario,

This is indeed the correct place - thanks for pointing out the inconsistency. We have fixed it and it’s pushed online.

Let us know if you have any questions during your investigation of using FireWorks at JGI.

Anubhav

···

On Tuesday, February 14, 2017 at 4:18:29 PM UTC-8, Mario Melara Jr. wrote:

Hello,
The code displayed in the documentation for firetask tutorial https://pythonhosted.org/FireWorks/firetask_tutorial.html is different than what is in addition_task.py.

#!/usr/bin/env python

from fireworks.core.firework import FWAction, FiretaskBase

author = ‘Anubhav Jain’

copyright = ‘Copyright 2013, The Materials Project’

version = ‘0.1’

maintainer = ‘Anubhav Jain’

email = ‘aj…@lbl.gov

date = ‘Feb 17, 2013’

class AdditionTask(FiretaskBase):

_fw_name = “Addition Task”

def run_task(self, fw_spec):

input_array = fw_spec[‘input_array’]

m_sum = sum(input_array)

print(“The sum of {} is: {}”.format(input_array, m_sum))

return FWAction(stored_data={‘sum’: m_sum}, mod_spec=[{’_push’: {‘input_array’: m_sum}}])

Apologies if this is not the place to bring this up. Thanks! Hope to use this at JGI!

  • Mario