@@ -0,0 +1,2052 @@
+%22%22%22Configuration file for sniffer.%22%22%22%0A%0Aimport os%0Aimport time%0Aimport subprocess%0A%0Afrom sniffer.api import select_runnable, file_validator, runnable%0Atry:%0A    from pync import Notifier%0Aexcept ImportError:%0A    notify = None%0Aelse:%0A    notify = Notifier.notify%0A%0A%0Awatch_paths = %5B%22cf_predict%22, %22tests%22%5D%0A%0A%0A@select_runnable('python')%0A@file_validator%0Adef python_files(filename):%0A    %22%22%22Match Python source files.%22%22%22%0A%0A    return all(%0A        (filename.endswith('.py'),%0A        not os.path.basename(filename).startswith('.')),%0A    )%0A%0A%0A@runnable%0Adef python(*_):%0A    %22%22%22Run targets for Python.%22%22%22%0A%0A    for count, (command, title, retry) in enumerate((%0A        (('make', 'test'), %22Unit Tests%22, True),%0A        (('make', 'tests'), %22Integration Tests%22, False),%0A        (('make', 'check'), %22Static Analysis%22, True),%0A        (('make', 'doc'), None, True),%0A    ), start=1):%0A%0A        if not run(command, title, count, retry):%0A            return False%0A%0A    return True%0A%0A%0AGROUP = int(time.time())  # unique per run%0A%0A_show_coverage = False%0A_rerun_args = None%0A%0A%0Adef run(command, title, count, retry):%0A    %22%22%22Run a command-line program and display the result.%22%22%22%0A    global _rerun_args%0A%0A    if _rerun_args:%0A        args = _rerun_args%0A        _rerun_args = None%0A        if not run(*args):%0A            return False%0A%0A    print(%22%22)%0A    print(%22$ %25s%22 %25 ' '.join(command))%0A    failure = subprocess.call(command)%0A%0A    if failure:%0A        mark = %22%E2%9D%8C%22 * count%0A        message = mark + %22 %5BFAIL%5D %22 + mark%0A    else:%0A        mark = %22%E2%9C%85%22 * count%0A        message = mark + %22 %5BPASS%5D %22 + mark%0A    show_notification(message, title)%0A%0A%0A%0A    show_coverage()%0A%0A    if failure and retry:%0A        _rerun_args = command, title, count, retry%0A%0A%0A%0A%0A%0A    return not failure%0A%0A%0Adef show_notification(message, title):%0A    %22%22%22Show a user notification.%22%22%22%0A    if notify and title:%0A        notify(message, title=title, group=GROUP)%0A%0A%0Adef show_coverage():%0A    %22%22%22Launch the coverage report.%22%22%22%0A    global _show_coverage%0A%0A    if _show_coverage:%0A        subprocess.call(%5B'make', 'read-coverage'%5D)%0A%0A    _show_coverage = False%0A

Add scent.py for sniffer