FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 83910aea authored by Mark Driver's avatar Mark Driver
Browse files

update logging statements.

parent d3910db2
No related branches found
Tags 1.0.0.a2
No related merge requests found
Pipeline #26276 passed
......@@ -33,13 +33,16 @@ import puresolventinformation.information as pureinf
logging.basicConfig()
LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(logging.WARN)
LOGGER.setLevel(logging.INFO)
INFO_LOGGER = logging.getLogger(__name__)
INFO_LOGGER.setLevel(logging.INFO)
phasecrun.LOGGER.setLevel(logging.INFO)
phasecrun.phasexmlrun.LOGGER.setLevel(logging.DEBUG)
def main():
"""Main function run when program called.
"""Run function when program called.
Returns
-------
......@@ -49,8 +52,11 @@ def main():
"""
# Create parser
parser = create_phasecalculator_argparser()
LOGGER.info("created porser")
# parse args
args = parser.parse_args()
LOGGER.info("parsed args:")
LOGGER.info(args)
return process_args(args)
......@@ -104,6 +110,8 @@ def process_phasecalculator(args):
"""
xml_filename = args.file
system_collection = read_calculator_xml(xml_filename)
LOGGER.info("system collection: ")
LOGGER.info(system_collection)
if args.memreq is not None:
run_system_collection(system_collection, memory_req=args.memreq)
else:
......@@ -111,7 +119,7 @@ def process_phasecalculator(args):
def create_system_collection(args):
"""Create SystemCollection from input arguments
"""Create SystemCollection from input arguments.
Parameters
----------
......@@ -143,7 +151,7 @@ def create_system_collection(args):
def create_output_inf(
fgip_output, similarity_output, similarity_output_type, vle_output
):
"""Create OutputInformation
"""Create OutputInformation.
Parameters
----------
......@@ -168,7 +176,7 @@ def create_output_inf(
def create_runtime_inf(jar_path, scratch_dir, output_dir):
"""Create RuntimeInformation
"""Create RuntimeInformation.
Parameters
----------
......
......@@ -51,14 +51,20 @@ def run_all_analysis(system_info, **kwargs):
None.
"""
LOGGER.info("Creating phase and solvent filename lists")
phase_filename, solvent_list = create_phase_and_solvent_xml_files(
system_info, **kwargs
)
LOGGER.info("Phase filename: %s", phase_filename)
LOGGER.info("Solvent filename list: %s", solvent_list)
if system_info.calc_vle():
LOGGER.info("Running VLE calc")
run_vle_analysis(system_info, phase_filename, **kwargs)
if system_info.calc_fgip():
LOGGER.info("Running FGIP calc")
run_fgip_analysis(system_info, solvent_list, **kwargs)
if system_info.calc_similarity():
LOGGER.info("Running similarity calc")
run_similarity_analysis(system_info, solvent_list, **kwargs)
......
......@@ -57,9 +57,12 @@ def create_phase_and_solvent_files(system_info, filestem="system", **kwargs):
create_scratch_dir(system_info)
phase_file = None
solvent_list = None
LOGGER.info("System calcs: VLE: %s, FGIP: %s, SIM: %s", system_info.calc_vle(),
system_info.calc_fgip(), system_info.calc_similarity())
if system_info.calc_vle():
phase_file = create_phase_file(system_info, filestem + "phase", **kwargs)
if system_info.calc_fgip() or system_info.calc_similarity():
LOGGER.info("Creating solvents")
solvent_list = create_solvent_files(system_info, filestem + "solvent", **kwargs)
return phase_file, solvent_list
......@@ -125,6 +128,7 @@ def create_solvent_files(system_info, filestem, **kwargs):
mole_fractions_by_temp_dict = system_info.get_phase_compositions_by_temperature()
ssip_filename_list = system_info.get_ssip_file_locations()
solvent_list = []
LOGGER.info("SSIP filename list: %s", ssip_filename_list)
for temp_info, mole_fraction_dict_list in mole_fractions_by_temp_dict.items():
solvent_filename = create_solvent_file(
mole_fraction_dict_list,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment