Development
Public Documentation
Documentation for Documenter.jl
's public interface.
See the Internals section of the manual for internal package docs covering all submodules.
Index
ModelSelectionGUI.load_envvars
ModelSelectionGUI.reset_envvars
ModelSelectionGUI.set_envvars
ModelSelectionGUI.start
ModelSelectionGUI.stop
ModelSelectionGUI.to_dict
Contents
ModelSelectionGUI.set_envvars
— Methodset_envvars(;
server_host::Union{String,Nothing} = nothing,
server_port::Union{Int64,Nothing} = nothing,
ssl_enabled::Union{Bool,Nothing} = nothing,
open_documentation::Union{Bool,Nothing} = nothing,
open_client::Union{Bool,Nothing} = nothing,
)
Set environment variables. If a certain environment variable is not defined in the file, the corresponding global variable will be updated.
Parameters
server_host::Union{String, Nothing}
: The server host address.server_port::Union{Int64, Nothing}
: The server port number.ssl_enabled::Union{Bool, Nothing}
: Indicates whether SSL encryption is enabled.open_client::Union{Bool, Nothing}
: Indicates whether to open the client automatically.open_documentation::Union{Bool, Nothing}
: Indicates whether to open the documentation automatically.
Globals
SERVER_HOST::String
: The server host address.SERVER_PORT::Int64
: The server port number.SSL_ENABLED::Bool
: Indicates whether SSL encryption is enabled.OPEN_DOCUMENTATION::Bool
: Indicates whether to open the documentation automatically.OPEN_CLIENT::Bool
: Indicates whether to open the client automatically.
Example
set_envvars(
server_host = "localhost",
server_port = 8000,
ssl_enabled = false,
open_client = true,
open_documentation = true,
)
ModelSelectionGUI.load_envvars
— Functionload_envvars(path::String = ENV_FILE_DEFAULT)
Load environment variables from a .env
file specified by path
. If a certain environment variable is not defined in the file, the default value will be used.
Parameters
path:String
: Path to the.env
file. If not provided, the default path (as defined inENV_FILE_DEFAULT
) is used.
Example
load_envvars("./path/to/.env")
ModelSelectionGUI.reset_envvars
— Methodreset_envvars()
Reset environment variables to the default values.
Globals
SERVER_HOST::String
: The server host address.SERVER_PORT::Int64
: The server port number.SSL_ENABLED::Bool
: Indicates whether SSL encryption is enabled.OPEN_DOCUMENTATION::Bool
: Indicates whether to open the documentation automatically.OPEN_CLIENT::Bool
: Indicates whether to open the client automatically.
Example
reset_envvars()
ModelSelectionGUI.start
— Methodstart(; server_host::Union{String,Nothing} = nothing, server_port::Union{Int, Nothing} = nothing, client_port::Union{Int, Nothing} = nothing, OPEN_DOCUMENTATION::Union{Bool, Nothing} = nothing, open_client::Union{Bool, Nothing} = nothing, dotenv::String = ENV_FILE_DEFAULT, no_task::Bool = false)
Initiate the server with optional parameters. Default values are loaded from environment variables if the parameters are not provided. This function also sets up several routes, a WebSocket channel, and initiates a background task.
Parameters
server_host::String
: The server host address.server_port::Int64
: Port number for the server.ssl_enabled::Bool
: Indicates whether SSL encryption is enabled.open_client::Bool
: Indicates whether to open a client window automatically.open_documentation::Bool
: Indicates whether to open a documentation window automatically.dotenv::String
: Specifies the path to the file containing environment variables. Default value is.env
.no_task::Bool
: Iftrue
, does not initiate a background task. Dafault value isfalse
.
Example
start(server_port = 8080, OPEN_DOCUMENTATION = true)
ModelSelectionGUI.stop
— Methodstop()
Shut down the server, close all windows and stop backgound tasks.
Example
stop()
ModelSelectionGUI.to_dict
— Methodto_dict(job::ModelSelectionJob)
Convert a ModelSelectionJob object to a dictionary.
Parameters
job::ModelSelectionJob
: The job to convert.
Returns
Dict{Symbol,Any}
: A dictionary representation of the job.
Example
to_dict(job)