Deborah.Sarah.StringTranscoder
Deborah.Sarah.StringTranscoder.AbbreviationConfig — Typestruct AbbreviationConfigConfiguration for encoding and decoding input names using abbreviations and numeric IDs.
Fields
name_to_code: Map from file name (e.g."plaq.dat") to abbreviation (e.g."Plaq").code_to_name: Reverse map from abbreviation to file name.name_to_num: Map from file name to integer ID.num_to_name: Map from integer ID to file name.code_to_num: Map from abbreviation to integer ID.num_to_code: Map from integer ID to abbreviation.
Deborah.Sarah.StringTranscoder.abbreviation_map — Functionabbreviation_map(
letter_map::Dict{String, Any},
jobid::Union{Nothing, String}=nothing
) -> AbbreviationConfigConstruct an AbbreviationConfig from a dictionary mapping names to abbreviations.
Arguments
letter_map: Dictionary mapping file names to abbreviation codes.jobid::Union{Nothing, String}: Optional job identifier for structured logging.
Returns
AbbreviationConfig: Struct with complete forward/reverse maps and numeric IDs.
Throws
ErrorExceptionif any value is not a string or if a code is empty.
Deborah.Sarah.StringTranscoder.input_decoder_abbrev — Functioninput_decoder_abbrev(
code_str::String,
abbrev_config::AbbreviationConfig,
jobid::Union{Nothing, String}=nothing
) -> StringDecode an abbreviation string back into the underscore-joined original file names.
Arguments
code_str: Hyphen-separated abbreviation string (e.g."Plaq-Rect-TrM1").abbrev_config: Abbreviation configuration struct.jobid: Optional job ID for logging.
Returns
String: Underscore-separated file names (e.g."plaq.dat_rect.dat_pbp.dat").
Throws
JobLoggerTools.error_benjiif any code is not found in the reverse map.
Deborah.Sarah.StringTranscoder.input_decoder_abbrev_dict — Functioninput_decoder_abbrev_dict(
code_str::String,
reverse_map::Dict{String, String},
jobid::Union{Nothing, String}=nothing
) -> StringDecode an abbreviation string into the full underscore-joined file name string using a reverse map.
Arguments
code_str: Hyphen-separated abbreviation string.reverse_map: Dictionary mapping abbreviation codes back to names.jobid: Optional job ID for logging.
Returns
String: Underscore-joined decoded names.
Throws
JobLoggerTools.error_benjiif any code is not found in the reverse map.
Deborah.Sarah.StringTranscoder.input_encoder_abbrev — Functioninput_encoder_abbrev(
X::Vector{String},
Y::String,
abbrev_config::AbbreviationConfig,
jobid::Union{Nothing, String}=nothing
) -> StringEncode a combination of X and Y input names into a hyphen-joined abbreviation string.
Arguments
X: Vector of input file names (e.g.["plaq.dat", "rect.dat"]).Y: Output file name (e.g."pbp.dat").abbrev_config: Abbreviation configuration struct.jobid: Optional job ID for logging.
Returns
String: Hyphen-separated encoded string (e.g."Plaq-Rect-TrM1").
Throws
JobLoggerTools.error_benjiif any input has no abbreviation.
Deborah.Sarah.StringTranscoder.input_encoder_abbrev_dict — Functioninput_encoder_abbrev_dict(
X::Vector{String},
Y::String,
abbrev_map::Dict{String, String},
jobid::Union{Nothing, String}=nothing
) -> StringEncode input names using a simple abbreviation dictionary.
Arguments
X: Vector of input file names.Y: Output file name.abbrev_map: Dictionary mapping names to abbreviation codes.jobid: Optional job ID for logging.
Returns
String: Hyphen-separated abbreviation string.
Throws
JobLoggerTools.error_benjiif any name is not found in the map.
Deborah.Sarah.StringTranscoder.parse_string_dict — Methodparse_string_dict(
dict_any::Dict{String, Any}
) -> Dict{String, String}Convert all values in a dictionary to strings.
Arguments
dict_any: Dictionary with string keys and arbitrary values.
Returns
Dict{String, String}: Dictionary where all values have been stringified.