diff --git a/aprendizations/learnapp.py b/aprendizations/learnapp.py index 6972c14..b16b1f1 100644 --- a/aprendizations/learnapp.py +++ b/aprendizations/learnapp.py @@ -143,6 +143,9 @@ class LearnApp(object): logger.error(f'Failed right answer in "{qref}".') errors += 1 continue # to next test + elif q['type'] == 'textarea': + msg = f' consider adding tests to {q["ref"]}' + logger.warning(msg) if 'tests_wrong' in q: for t in q['tests_wrong']: diff --git a/aprendizations/main.py b/aprendizations/main.py index daacbed..7f5343f 100644 --- a/aprendizations/main.py +++ b/aprendizations/main.py @@ -18,24 +18,29 @@ from . import APP_NAME, APP_VERSION # ---------------------------------------------------------------------------- def parse_cmdline_arguments(): argparser = argparse.ArgumentParser( - description='Server for online learning. Students and topics ' - 'have to be previously configured. Please read the documentation ' - 'included with this software before running the server.' + description='Webserver for interactive learning and practice. ' + 'Please read the documentation included with this software before ' + 'using it.' ) argparser.add_argument( - 'courses', type=str, # nargs='*', - help='Courses configuration file in YAML format.' + 'courses', type=str, nargs='?', default='courses.yaml', + help='configuration file in YAML format.' + ) + + argparser.add_argument( + '-v', '--version', action='store_true', + help='show version information and exit' ) argparser.add_argument( '--prefix', type=str, default='.', - help='Path where the topic directories can be found (default: .)' + help='path where the topic directories can be found (default: .)' ) argparser.add_argument( '--port', type=int, default=8443, - help='Port to be used by the HTTPS server (default: 8443)' + help='port for the HTTPS server (default: 8443)' ) argparser.add_argument( @@ -44,18 +49,13 @@ def parse_cmdline_arguments(): ) argparser.add_argument( - '--check', action='store_true', - help='Sanity check questions (can take awhile)' + '-c', '--check', action='store_true', + help='sanity check questions (can take awhile)' ) argparser.add_argument( '--debug', action='store_true', - help='Enable debug mode' - ) - - argparser.add_argument( - '--version', action='store_true', - help='Print version information' + help='enable debug mode' ) return argparser.parse_args() @@ -113,7 +113,7 @@ def main(): arg = parse_cmdline_arguments() if arg.version: - print(f'{APP_NAME} - {APP_VERSION}\nPython {sys.version}') + print(f'{APP_NAME} {APP_VERSION}\nPython {sys.version}') sys.exit(0) # --- Setup logging -- libgit2 0.21.2