Removed a section of code that isn't doing anything:
Outdir gets set to os.path.dirname(args.infile)[0]. This creates a directory that is one character long (the first character of infile).
Once it creates that directory, it never gets used in any way, so I removed the chunk of code that creates this directory.
sheller_great3.py changes:
Updated print statements for python 3. (This was causing a bunch of errors to be printed when running python setup.py install and I wanted to clean those up).
roaster.py changed:
Added a boolean argument --unparallelize into the argument parser section in main(). This should only be passed if you do NOT want to parallelize the function do_sampling. If --unparallelize is not passed, the default is to parallelize.
do_sampling now has an if statement that sets sampler and runs run_sampler accordingly depending on if you want parallelization or not.
Created a function run_sampler that contains the portion of the sampling code to be repeated whether you want parallelization or not. (This needed to be in a function and couldn't simply be after the if loop because it required one extra indentation level if you wanted to run with parallelization).
Fixed line 277 print statement for python 3.
Commented out a print statement that prints the threshold multiplier. I didn't find this print statement to be particularly useful, and it prints often. Perhaps we can add an if verbose statement around this.
roaster_inspector.py changes:
os.path.dirname(args.infile)[0]
. This creates a directory that is one character long (the first character of infile).sheller_great3.py changes:
python setup.py install
and I wanted to clean those up).roaster.py changed:
--unparallelize
into the argument parser section inmain()
. This should only be passed if you do NOT want to parallelize the functiondo_sampling
. If--unparallelize
is not passed, the default is to parallelize.do_sampling
now has an if statement that setssampler
and runsrun_sampler
accordingly depending on if you want parallelization or not.run_sampler
that contains the portion of the sampling code to be repeated whether you want parallelization or not. (This needed to be in a function and couldn't simply be after the if loop because it required one extra indentation level if you wanted to run with parallelization).if verbose
statement around this.