Merge pull request #181 from rgaiacs/styles-offline
[rnaseq-cwl-training.git] / bin / workshop_check.py
index d018b78906171d3427350ad1dcba0d627435effd..39ee0bfe2bb87b8c2d054b6ba30845e45e787dff 100755 (executable)
@@ -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)