a
    h                  	   @   s|   d dl mZ d dlmZ d dlmZ g dZeddfeeddd	d
Zeddddddfeee eee	e
ddddZdS )    )Path)Optional)load_results)compute_configrun_dashboardr   zconfig.yamlFN)config_fileforcereturnc                 C   s:   ddl m} |  ddlm} |j| |d}|| dS )a  Run the LCA and fit on the config file.

    Parameters
    ----------
    config_file
        The config file to run the computations on, by default Path("config.yaml")
    force
        Force the computation, i.e. do not load (intermediate) results, by default False
    r   utils)run_workflow)r   r   N)metaDMGr   Zcheck_metaDMG_fitZmetaDMG.fitr   Zmake_configs)r   r   r   r   Zconfigs r   Y/mounts/lovelace/software/anaconda3/envs/py39/lib/python3.9/site-packages/metaDMG/main.pyr      s
    r   ir  z0.0.0.0)r   resultsdebugserverporthostr	   c           	      C   sD   ddl m} |  ddlm} |j| |d}||||||d dS )a&  Visualise the results in an interactive dashboard

    Parameters
    ----------
    config_file
        The the config file to use to locate the results directory, by default Path("config.yaml")
    results
        The results directory, by default None
    debug
        Whether or not the debug-button should be displayed, by default False
    server
        Whether or not it should behave as running on a server, by default False
    port
        Dashboard port, by default 8050
    host
        Dashboard host address, by default "0.0.0.0"
    r   r
   )start_dashboard)r   results_dir)r   r   r   r   r   N)r   r   Zcheck_metaDMG_vizZmetaDMG.vizr   Zget_results_dir)	r   r   r   r   r   r   r   r   r   r   r   r   r   $   s    r   )pathlibr   typingr   ZmetaDMG.filtersr   __all__boolr   intstrr   r   r   r   r   <module>   s2   