Thanks to visit codestin.com
Credit goes to github.com

Skip to content

RadioNuclideDB looks for JSON files even if we can't read them #1009

@KrisThielemans

Description

@KrisThielemans

RadionuclideDB()
{
read_from_file(find_STIR_config_file("radionuclide_info.json"));
this->radionuclide_lookup_table_str=find_STIR_config_file("radionuclide_names.json");
}

means that find_STIR_config will be called with the filenames, while read_from_file etc won't do anything with it. This makes little sense, especially as that can fail.

For instance, when trying to build with conda, for some reason (probably another bug) the Windows tests fail because it's looking for the file, even if I disable JSON. See conda-forge/stir-feedstock#39 (comment)

Of course, we do install the files always

STIR/src/CMakeLists.txt

Lines 272 to 273 in 06a68d1

install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/config/ DESTINATION ${STIR_CONFIG_DIR}
FILES_MATCHING PATTERN "*.json")

but it makes us sensitive to things that shouldn't matter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions