X-Git-Url: https://git.arvados.org/rnaseq-cwl-training.git/blobdiff_plain/046dfbd4426dae68799194a428cdacf417d5ea3d..a7be7042948191759ed0503a630af16bf926efa7:/bin/workshop_check.py diff --git a/bin/workshop_check.py b/bin/workshop_check.py index d018b78..39ee0bf 100755 --- a/bin/workshop_check.py +++ b/bin/workshop_check.py @@ -4,12 +4,12 @@ docstrings on the checking functions for a summary of the checks. ''' +from __future__ import print_function import sys import os import re from datetime import date -from util import Reporter, split_metadata - +from util import Reporter, split_metadata, load_yaml, check_unwanted_files # Metadata field patterns. EMAIL_PATTERN = r'[^@]+@[^@]+\.[^@]+' @@ -227,12 +227,12 @@ def check_eventbrite(eventbrite): @look_for_fixme -def check_etherpad(etherpad): +def check_collaborative_notes(collaborative_notes): """ - 'etherpad' must be a valid URL. + 'collaborative_notes' must be a valid URL. """ - return bool(re.match(URL_PATTERN, etherpad)) + return bool(re.match(URL_PATTERN, collaborative_notes)) @look_for_fixme @@ -292,7 +292,7 @@ HANDLERS = { 'eventbrite': (False, check_eventbrite, 'Eventbrite key appears invalid'), - 'etherpad': (False, check_etherpad, 'Etherpad URL appears invalid'), + 'collaborative_notes': (False, check_collaborative_notes, 'Collaborative Notes URL appears invalid'), 'venue': (False, check_pass, 'venue name not specified'), @@ -400,6 +400,7 @@ def main(): reporter = Reporter() check_config(reporter, config_file) + check_unwanted_files(root_dir, reporter) with open(index_file) as reader: data = reader.read() check_file(reporter, index_file, data)