Skip to main content

chama_django.management.commands package

Submodules

chama_django.management.commands.chama_opt module

class chama_django.management.commands.chama_opt.Command(stdout=None, stderr=None, no_color=False, force_color=False)

Bases: BaseCommand

execute_insert_update_query(database, query_str)

Executes insert or update query statments

  • Parameters:
    • database (_type_) – Connection to the database
    • query_str (_type_) – Insert query string.

execute_select_query(database, query_str)

Executes select query statments and returns of the query.

  • Parameters:
    • database (_type_) – Connection to the database
    • query_str (_type_) – select query string.
  • Returns: returns the results of the select query.
  • Return type:_type_

get_config(argv)

Method to parse command-line parameters and return the contents of the config JSON file as a dictionary.

Args: : argv (type): _description_

Returns: : _type: _description

get_connection()

handle(*args, **kwargs)

_summary_

plot()

_summary_

Method with common code for printing a help message and exiting the script. Used when something is wrong with the command-line arguments/config file.

chama_django.management.commands.combine_signal_files module

class chama_django.management.commands.combine_signal_files.Command(stdout=None, stderr=None, no_color=False, force_color=False)

Bases: BaseCommand

get_config(argv)

Method to parse command-line parameters and return the contents of the config JSON file as a dictionary.

handle(*args, **kwargs)

TODO

chama_django.management.commands.combine_singal_files module

class chama_django.management.commands.combine_singal_files.Command(stdout=None, stderr=None, no_color=False, force_color=False)

Bases: BaseCommand

get_config(argv)

Method to parse command-line parameters and return the contents of the config JSON file as a dictionary.

handle(*args, **kwargs)

TODO

chama_django.management.commands.generate_chama_inputs module

class chama_django.management.commands.generate_chama_inputs.Command(stdout=None, stderr=None, no_color=False, force_color=False)

Bases: BaseCommand

MAX_ITER = 1000

generate_signals(inp, sim_rpt_time_incr, sim_timestep_window_in_sec, out_path, pollutant, potential_sensor_locations_csv, scenario_name, csv_out_name='signals.csv')

_summary_

  • Parameters:
    • inp (_type_) – _description_
    • out_path (_type_) – _description_
    • pollutant (_type_) – _description_
    • csv_out_name (_type_**, optional) – _description_. Defaults to None.
    • db_table (_type_**, optional) – _description_. Defaults to None.

get_config(argv)

Method to parse command-line parameters and return the contents of the config JSON file as a dictionary.

handle(*args, **kwargs)

TODO

iterate_swmm(sim, sim_rpt_time_incr, sim_timestep_window_in_sec, pollutant, load=None)

TODO

max_poll_dict = {}

node_list = []

Method with common code for printing a help message and exiting the script. Used when something is wrong with the command-line arguments/config file.

step_ind = 1

subcatchment_list = []

write_to_log(message)

Module contents