sweverett / CluStR

Calculates various scaling relations from cluster catalogs.
5 stars 4 forks source link

run_options #36

Closed paigemkelly closed 4 years ago

paigemkelly commented 4 years ago

I am getting this error for run_options. I'm not sure what run_options was supposed to refer to, but do you know what I should put in the main for this? thanks!

Traceback (most recent call last): File "clustr.py", line 256, in main() File "clustr.py", line 239, in main config = Config(config_filename) #(2) TypeError: init() missing 1 required positional argument: 'run_options

sweverett commented 4 years ago

run_options does not appear in the master branch, so I'm not sure what it is supposed to be. Presumably the config contains all of the run options so I'd get rid of it. I'd change the Config constructor to look something like this for the time being:

def __init__(self, config_file):
        with open(config_file, 'r') as stream:
            self._config = yaml.safe_load(stream)

        if config.run_name is None:
            self.run_name = _default_run_name
        else:
            self.run_name = config.run_name

        return