core-unit-bioinformatics / reference-container

Build repository for reference container
MIT License
0 stars 0 forks source link

Add information regarding possible other reasons for "No 'metadata_' keys in config..." error #5

Closed svenwillger closed 2 years ago

svenwillger commented 2 years ago

The error for "if not refconmd" would also be thrown if the config file is missing the key "metadata" or refcon_md is empty for another reason. This could be clarified if necessary.

https://github.com/core-unit-bioinformatics/reference-container/blob/2bf3de65ea13b7deed4cf13dedc8d6f8bd97ec55/workflow/rules/functions.smk#L32-L36

ptrebert commented 2 years ago

what about this one?

svenwillger commented 2 years ago

Since the error could only occur if we introduced it or something is broken that causes an empty 'refcon_md' I added a sentence to contact the developers if the user is sure they did everything right.

raise ValueError(
            "\nPotential user error:\n"
            "No 'metadata_' keys found in config. Did you forget to load a reference container config?\n"
            "You must specify the container configuration files via Snakemake's '--configfiles' option.\n\n"
            "If you are sure the container configuration file(s) with the 'metadata_' key word is/are present\n please contact the developers.\n\n"
        )

The commit comment is "Update to resolve issue #5"