Commit 80be02a4 authored by Yannick Roehlly's avatar Yannick Roehlly

Rename stats module to analysis_modules

parent ac381fc6
......@@ -7,7 +7,7 @@ __version__ = "0.1-alpha"
import argparse
from .session.configuration import Configuration
from .stats.common import get_module as get_stats_module
from .analysis_modules.common import get_module as get_analysis_module
def init(config):
......@@ -41,12 +41,13 @@ def run(config):
sed_modules_params = config.sed_modules_conf_array
redshift_module = config.configuration['redshift_module']
redshift_configuration = config.configuration['redshift_configuration']
stat_module = get_stats_module(config.configuration['analysis_method'])
stat_module_params = config.configuration['analysis_method_params']
analysis_module = get_analysis_module(config.configuration[
'analysis_method'])
analysis_module_params = config.configuration['analysis_method_params']
stat_module.process(data_file, column_list, sed_modules,
sed_modules_params, redshift_module,
redshift_configuration, stat_module_params)
analysis_module.process(data_file, column_list, sed_modules,
sed_modules_params, redshift_module,
redshift_configuration, analysis_module_params)
def main():
......
......@@ -150,7 +150,7 @@ def get_module(module_name):
"""
try:
module = import_module('.' + module_name, 'pcigale.stats')
module = import_module('.' + module_name, 'pcigale.analysis_modules')
return module.Module()
except ImportError:
print('Module ' + module_name + ' does not exists!')
......
......@@ -14,7 +14,7 @@ from textwrap import wrap
from .tools import param_dict_combine
from ..data import Database
from ..sed.modules import common as modules
from ..stats import common as analysis
from ..analysis_modules import common as analysis
def list_modules(package_name):
......@@ -134,7 +134,7 @@ class Configuration(object):
self.config['analysis_method'] = ""
self.config.comments['analysis_method'] = [""] + wrap(
"Method used for statistical analysis. Available methods: "
+ ', '.join(list_modules('pcigale.stats')) + ".")
+ ', '.join(list_modules('pcigale.analysis_modules')) + ".")
self.config.write()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment