Ejemplo n.º 1
0
def make_specs(template: str, location: str, output_dir: str, verbose: int,
               with_debugger: bool) -> None:
    """
    Make model specifications

    click application that takes a template model specification file
    and locations for which to create model specs and uses jinja2 to
    render model specs with the correct location parameters plugged in.

    It will look for the model spec template in "model_spec.in" in the directory
    ``src/vivarium_csu_zenon/model_specifications``.
    Add location strings to the ``src/globals.py`` file. By default, specifications
    for all locations will be built. You can choose to make a model specification
    for a single location by specifying that location. However, the location
    string must exist in the list in ``src/globals.py``.

    The application will look for the model spec based on the python environment
    that is active and these files don't need to be specified if the
    default names and location are used.
    """
    configure_logging_to_terminal(verbose)
    main = handle_exceptions(build_model_specifications,
                             logger,
                             with_debugger=with_debugger)
    main(template, location, output_dir)
Ejemplo n.º 2
0
def make_artifacts(location: str, output_dir: str, append: bool, verbose: int,
                   with_debugger: bool) -> None:
    configure_logging_to_terminal(verbose)
    main = handle_exceptions(build_artifacts,
                             logger,
                             with_debugger=with_debugger)
    main(location, output_dir, append, verbose)
Ejemplo n.º 3
0
def make_sample_histories(location: str, scenarios: str, verbose: int,
                          with_debugger: bool, queue: str) -> None:
    configure_logging_to_terminal(verbose)
    main = handle_exceptions(build_sample_histories,
                             logger,
                             with_debugger=with_debugger)
    main(location, scenarios, verbose, queue)
Ejemplo n.º 4
0
def make_joint_pafs(location: str, draws: str, verbose: int,
                    with_debugger: bool, queue: str) -> None:
    configure_logging_to_terminal(verbose)
    main = handle_exceptions(build_joint_pafs,
                             logger,
                             with_debugger=with_debugger)
    main(location, draws, verbose, queue)
Ejemplo n.º 5
0
def make_ldl_exposure_thresholds(location: str, draws: str, concat_only: bool,
                                 verbose: int, with_debugger: bool) -> None:
    configure_logging_to_terminal(verbose)
    main = handle_exceptions(build_ldl_thresholds,
                             logger,
                             with_debugger=with_debugger)
    main(location, draws, concat_only, verbose)
Ejemplo n.º 6
0
def parse_logs(worker_log_directory, output_file, verbose, with_debugger):
    configure_logging_to_terminal(verbose)
    main = handle_exceptions(build_results_from_logs,
                             logger,
                             with_debugger=with_debugger)
    main(worker_log_directory, output_file)
Ejemplo n.º 7
0
def make_results(output_file: str, verbose: int, with_debugger: bool) -> None:
    configure_logging_to_terminal(verbose)
    main = handle_exceptions(build_results,
                             logger,
                             with_debugger=with_debugger)
    main(output_file)