Skip to content

Commit

Permalink
permissive checks for pre-alpha lessons
Browse files Browse the repository at this point in the history
This will fix swcarpentry#533
  • Loading branch information
zkamvar authored and fmichonneau committed Dec 18, 2020
1 parent a60a74a commit 7fd7d18
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/lesson_check.py
Expand Up @@ -117,7 +117,10 @@ def main():

args = parse_args()
args.reporter = Reporter()
check_config(args.reporter, args.source_dir)
life_cycle = check_config(args.reporter, args.source_dir)
# pre-alpha lessons should report without error
if life_cycle == "pre-alpha":
args.permissive = True
check_source_rmd(args.reporter, args.source_dir, args.parser)
args.references = read_references(args.reporter, args.reference_path)

Expand Down Expand Up @@ -194,6 +197,7 @@ def check_config(reporter, source_dir):
reporter.check(defaults in config.get('defaults', []),
'configuration',
'"root" not set to "." in configuration')
return config['life_cycle']

def check_source_rmd(reporter, source_dir, parser):
"""Check that Rmd episode files include `source: Rmd`"""
Expand Down

0 comments on commit 7fd7d18

Please sign in to comment.