Configuration

Read, parse, and extract the configuration parameters.

Contents

Index

Parser

ACTest.inp_tomlFunction
inp_toml(f::String, necessary::Bool)

Parse the configuration file (in toml format). It reads the whole file.

Arguments

  • f -> Filename of configuration.
  • necessary -> If it is true and configuration is absent, raise an error.

Returns

  • dict -> A Dictionary struct that contains all the key-value pairs.
ACTest.fil_dictFunction
fil_dict(cfg::Dict{String,Any})

Transfer configurations from dict cfg to internal dict (PTEST). In other words, all the relevant internal dicts should be filled / updated in this function.

Arguments

  • cfg -> A dict struct that contains all the configurations (from act.toml).

Returns

N/A

ACTest.rev_dictFunction
rev_dict(TEST::Dict{String,Any})

Setup the configuration dictionary: PTEST.

Arguments

  • TEST -> A dict struct that contains configurations from the [Test] block.

Returns

N/A

See also: PTEST.

rev_dict(TEST::Dict{String,Vector{Any}})

Setup the configuration dictionary: PTEST.

Arguments

  • TEST -> A dict struct that contains configurations from the [Test] block.

Returns

N/A

See also: PTEST.

ACTest.see_dictFunction
see_dict()

Display all of the relevant configuration parameters to the terminal.

Arguments

N/A

Returns

N/A

See also: fil_dict.

Validation

ACTest.chk_dictFunction
chk_dict()

Validate the correctness and consistency of configurations.

Arguments

N/A

Returns

N/A

See also: fil_dict, _v.

ACTest._vFunction
_v(key::String, val::Array{Any,1})

Verify the value array. Called by chk_dict() function only.

Arguments

  • key -> Key of parameter.
  • val -> Value of parameter.

Returns

N/A

See also: chk_dict.

Extraction

ACTest.get_tFunction
get_t(key::String)

Extract configurations from dict: PTEST.

Arguments

  • key -> Key of parameter.

Returns

  • value -> Value of parameter.

See also: PTEST.