Skip to content

Commit

Permalink
Hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
fhagemann authored Nov 7, 2024
1 parent d82cc1a commit be0702a
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions ext/LegendDataManagementSolidStateDetectorsExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,33 +47,33 @@ LegendDataManagement provides an extension for SolidStateDetectors, a
methods above.
"""
function SolidStateDetectors.SolidStateDetector(data::LegendData, detector::DetectorIdLike; kwargs...)
SolidStateDetectors.SolidStateDetector{_SSDDefaultNumtype}(data, detector, kwargs...)
SolidStateDetectors.SolidStateDetector{_SSDDefaultNumtype}(data, detector; kwargs...)

Check warning on line 50 in ext/LegendDataManagementSolidStateDetectorsExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/LegendDataManagementSolidStateDetectorsExt.jl#L49-L50

Added lines #L49 - L50 were not covered by tests
end

function SolidStateDetectors.SolidStateDetector{T}(data::LegendData, detector::DetectorIdLike; kwargs...) where {T<:AbstractFloat}
detector_props = getproperty(data.metadata.hardware.detectors.germanium.diodes, Symbol(detector))
xtal_props = getproperty(data.metadata.hardware.detectors.germanium.crystals, Symbol(string(detector)[1:end-1]))
SolidStateDetector{T}(LegendData, detector_props, xtal_props, kwargs...)
SolidStateDetector{T}(LegendData, detector_props, xtal_props; kwargs...)
end

function SolidStateDetectors.SolidStateDetector{T}(::Type{LegendData}, filename::String; kwargs...) where {T<:AbstractFloat}
SolidStateDetector{T}(LegendData, readprops(filename, subst_pathvar = false, subst_env = false, trim_null = false), kwargs...)
SolidStateDetector{T}(LegendData, readprops(filename, subst_pathvar = false, subst_env = false, trim_null = false); kwargs...)

Check warning on line 60 in ext/LegendDataManagementSolidStateDetectorsExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/LegendDataManagementSolidStateDetectorsExt.jl#L59-L60

Added lines #L59 - L60 were not covered by tests
end

function SolidStateDetectors.SolidStateDetector(::Type{LegendData}, filename::String; kwargs...)
SolidStateDetector{_SSDDefaultNumtype}(LegendData, filename, kwargs...)
SolidStateDetector{_SSDDefaultNumtype}(LegendData, filename; kwargs...)

Check warning on line 64 in ext/LegendDataManagementSolidStateDetectorsExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/LegendDataManagementSolidStateDetectorsExt.jl#L63-L64

Added lines #L63 - L64 were not covered by tests
end

function SolidStateDetectors.SolidStateDetector(::Type{LegendData}, meta::AbstractDict; kwargs...)
SolidStateDetectors.SolidStateDetector{_SSDDefaultNumtype}(LegendData, meta, kwargs...)
SolidStateDetectors.SolidStateDetector{_SSDDefaultNumtype}(LegendData, meta; kwargs...)

Check warning on line 68 in ext/LegendDataManagementSolidStateDetectorsExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/LegendDataManagementSolidStateDetectorsExt.jl#L67-L68

Added lines #L67 - L68 were not covered by tests
end

function SolidStateDetectors.SolidStateDetector{T}(::Type{LegendData}, meta::AbstractDict; kwargs...) where {T<:AbstractFloat}
SolidStateDetectors.SolidStateDetector{T}(LegendData, convert(PropDict, meta), LegendDataManagement.NoSuchPropsDBEntry("",[]), kwargs...)
SolidStateDetectors.SolidStateDetector{T}(LegendData, convert(PropDict, meta), LegendDataManagement.NoSuchPropsDBEntry("",[]); kwargs...)

Check warning on line 72 in ext/LegendDataManagementSolidStateDetectorsExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/LegendDataManagementSolidStateDetectorsExt.jl#L71-L72

Added lines #L71 - L72 were not covered by tests
end

function SolidStateDetectors.SolidStateDetector{T}(::Type{LegendData}, meta::PropDict, xtal_meta::Union{PropDict, LegendDataManagement.NoSuchPropsDBEntry}; kwargs...) where {T<:AbstractFloat}
config_dict = create_SSD_config_dict_from_LEGEND_metadata(meta, xtal_meta, kwargs...)
config_dict = create_SSD_config_dict_from_LEGEND_metadata(meta, xtal_meta; kwargs...)
return SolidStateDetector{T}(config_dict, SolidStateDetectors.construct_units(config_dict))
end

Expand All @@ -87,33 +87,33 @@ LegendDataManagement provides an extension for SolidStateDetectors, a
methods above.
"""
function SolidStateDetectors.Simulation(data::LegendData, detector::DetectorIdLike; kwargs...)
SolidStateDetectors.Simulation{_SSDDefaultNumtype}(data, detector, kwargs...)
SolidStateDetectors.Simulation{_SSDDefaultNumtype}(data, detector; kwargs...)

Check warning on line 90 in ext/LegendDataManagementSolidStateDetectorsExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/LegendDataManagementSolidStateDetectorsExt.jl#L89-L90

Added lines #L89 - L90 were not covered by tests
end

function SolidStateDetectors.Simulation{T}(data::LegendData, detector::DetectorIdLike; kwargs...) where {T<:AbstractFloat}
detector_props = getproperty(data.metadata.hardware.detectors.germanium.diodes, Symbol(detector))
xtal_props = getproperty(data.metadata.hardware.detectors.germanium.crystals, Symbol(string(detector)[1:end-1]))
Simulation{T}(LegendData, detector_props, xtal_props, kwargs...)
Simulation{T}(LegendData, detector_props, xtal_props; kwargs...)
end

function SolidStateDetectors.Simulation{T}(::Type{LegendData}, filename::String; kwargs...) where {T<:AbstractFloat}
Simulation{T}(LegendData, readprops(filename, subst_pathvar = false, subst_env = false, trim_null = false), kwargs...)
Simulation{T}(LegendData, readprops(filename, subst_pathvar = false, subst_env = false, trim_null = false); kwargs...)

Check warning on line 100 in ext/LegendDataManagementSolidStateDetectorsExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/LegendDataManagementSolidStateDetectorsExt.jl#L99-L100

Added lines #L99 - L100 were not covered by tests
end

function SolidStateDetectors.Simulation(::Type{LegendData}, filename::String; kwargs...)
Simulation{_SSDDefaultNumtype}(LegendData, filename, kwargs...)
Simulation{_SSDDefaultNumtype}(LegendData, filename; kwargs...)

Check warning on line 104 in ext/LegendDataManagementSolidStateDetectorsExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/LegendDataManagementSolidStateDetectorsExt.jl#L103-L104

Added lines #L103 - L104 were not covered by tests
end

function SolidStateDetectors.Simulation(::Type{LegendData}, meta::AbstractDict; kwargs...)
SolidStateDetectors.Simulation{_SSDDefaultNumtype}(LegendData, meta, kwargs...)
SolidStateDetectors.Simulation{_SSDDefaultNumtype}(LegendData, meta; kwargs...)

Check warning on line 108 in ext/LegendDataManagementSolidStateDetectorsExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/LegendDataManagementSolidStateDetectorsExt.jl#L107-L108

Added lines #L107 - L108 were not covered by tests
end

function SolidStateDetectors.Simulation{T}(::Type{LegendData}, meta::AbstractDict; kwargs...) where {T<:AbstractFloat}
SolidStateDetectors.Simulation{T}(LegendData, convert(PropDict, meta), LegendDataManagement.NoSuchPropsDBEntry("", []), kwargs...)
SolidStateDetectors.Simulation{T}(LegendData, convert(PropDict, meta), LegendDataManagement.NoSuchPropsDBEntry("", []); kwargs...)

Check warning on line 112 in ext/LegendDataManagementSolidStateDetectorsExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/LegendDataManagementSolidStateDetectorsExt.jl#L111-L112

Added lines #L111 - L112 were not covered by tests
end

function SolidStateDetectors.Simulation{T}(::Type{LegendData}, meta::PropDict, xtal_meta::Union{PropDict, LegendDataManagement.NoSuchPropsDBEntry}; kwargs...) where {T<:AbstractFloat}
config_dict = create_SSD_config_dict_from_LEGEND_metadata(meta, xtal_meta, kwargs...)
config_dict = create_SSD_config_dict_from_LEGEND_metadata(meta, xtal_meta; kwargs...)
return Simulation{T}(config_dict)
end

Expand Down

0 comments on commit be0702a

Please sign in to comment.