Skip to content

Commit

Permalink
Doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskawczynski committed May 9, 2024
1 parent 63f82f3 commit 23591a7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/src/repl_scripts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ end
configs = configs_per_config_id()
@assert length(configs) > 0

for (job_id, config) in configs
for (job_id, (; config, config_file)) in configs
println("### Buildkite job `$job_id`")
print_repl_script(config)
println()
Expand Down
6 changes: 3 additions & 3 deletions src/solver/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ end

Base.eltype(::AtmosConfig{FT}) where {FT} = FT

const ContainerType{T} = Union{Tuple{<:T, Vararg{T}}, Vector{<:T}}
TupleOrVector(T) = Union{Tuple{<:T, Vararg{T}}, Vector{<:T}}

# Use short, relative paths, if possible.
function normrelpath(file)
Expand Down Expand Up @@ -520,7 +520,7 @@ AtmosConfig(
) = AtmosConfig((config_file,); job_id, comms_ctx)

function AtmosConfig(
config_files::ContainerType{String};
config_files::TupleOrVector(String);
job_id = config_id_from_config_files(config_files),
comms_ctx = nothing,
)
Expand Down Expand Up @@ -554,7 +554,7 @@ the default configurations set in `default_config_dict()`.
AtmosConfig(configs::AbstractDict; kwargs...) =
AtmosConfig((configs,); kwargs...)
function AtmosConfig(
configs::ContainerType{AbstractDict};
configs::TupleOrVector(AbstractDict);
comms_ctx = nothing,
config_files = [default_config_file],
job_id = "",
Expand Down
6 changes: 3 additions & 3 deletions src/solver/yaml_helper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function config_from_target_job(target_job)
error("Could not find job with id $target_job")
end

const ContainerType{T} = Union{Tuple{<:T, Vararg{T}}, Vector{<:T}}
ContainerType(T) = Union{Tuple{<:T, Vararg{T}}, Vector{<:T}}

"""
override_default_config(override_config)
Expand All @@ -47,10 +47,10 @@ default configuration overridden by the given dicts or parsed YAML files.
override_default_config(config_files::AbstractString) =
override_default_config(YAML.load_file(config_files))

override_default_config(config_files::ContainerType{AbstractString}) =
override_default_config(config_files::ContainerType(AbstractString)) =
override_default_config(YAML.load_file.(config_files))

override_default_config(config_dicts::ContainerType{AbstractDict}) =
override_default_config(config_dicts::ContainerType(AbstractDict)) =
override_default_config(merge(config_dicts...))

function override_default_config(::Nothing)
Expand Down

0 comments on commit 23591a7

Please sign in to comment.