carpentries / styles

Styles for The Carpentries lessons. No README to avoid merge conflicts with lessons. Demo 👇
https://carpentries.github.io/lesson-example
Other
84 stars 94 forks source link

lesson_check.py allow for missing life_cycle #557

Closed zkamvar closed 3 years ago

zkamvar commented 3 years ago

There was an issue with make lesson-check on the core lessons that didn't have the life_cycle parameter set. This PR fixes the issue by allowing life_cycle to be missing in the _config.yaml (which is standard for core lessons).

Notably, this was not caught in our earlier checks because our github workflow only tested if the sites could be built, but never checked their validity.

This will fix https://github.com/carpentries/styles/issues/556

maxim-belkin commented 3 years ago

The fix looks good to me. It might be slightly better to set config['life_cycle'] and then return it just in case we want to catch this edge case somewhere else.

    if 'life_cycle' not in config:
        config['life_cycle'] = None

    return config['life_cycle']
zkamvar commented 3 years ago

Thank you! I made the change and will merge once the checks pass.