Git Product home page Git Product logo

noticer's Introduction

noticer -- for rerunning commands

What is noticer?

I wanted a way to rerun a command when files changed, killing the old process beforehand if required; noticer achieves this. Under the hood it uses inotify (via pyinotify), handling CREATE and MODIFY events.

How do I install noticer?

You can install straight from Github:

$ pip install https://github.com/dsalisbury/noticer/archive/master.zip

noticer's People

Contributors

ch3pjw avatar dsalisbury avatar leth avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

ch3pjw

noticer's Issues

Stop tests writing to stderr

When using noticer to test noticer (i.e. noticer -e py -- nosetests) we get output like:

Handling <Event dir=False mask=0x100 maskname=IN_CREATE name=test_noticer.py path=. pathname=/home/david/projects/noticer/test_noticer.py wd=1 >
Handling <Event dir=False mask=0x2 maskname=IN_MODIFY name=test_noticer.py path=. pathname=/home/david/projects/noticer/test_noticer.py wd=1 >
- * - * - * - * - * - * - * - * - * - * -





- * - * - * - * - * - * - * - * - * - * -





..- * - * - * - * - * - * - * - * - * - * -





.- * - * - * - * - * - * - * - * - * - * -





...- * - * - * - * - * - * - * - * - * - * -





Caught exception while running 'gogo': RuntimeError('Bang!',)
- * - * - * - * - * - * - * - * - * - * -








COMMAND SUCCEEDED
- * - * - * - * - * - * - * - * - * - * -





Caught exception while running 'gogo': RuntimeError('Bang!',)
- * - * - * - * - * - * - * - * - * - * -





Caught exception while running 'gogo': RuntimeError('Bang!',)
- * - * - * - * - * - * - * - * - * - * -








COMMAND SUCCEEDED
.- * - * - * - * - * - * - * - * - * - * -








COMMAND SUCCEEDED
- * - * - * - * - * - * - * - * - * - * -








COMMAND SUCCEEDED
- * - * - * - * - * - * - * - * - * - * -








COMMAND SUCCEEDED
- * - * - * - * - * - * - * - * - * - * -








COMMAND SUCCEEDED
.
----------------------------------------------------------------------
Ran 8 tests in 0.030s

OK



COMMAND SUCCEEDED

Which "COMMAND SUCCEEDED" pertains to a test, and which is for the noticer instance hosting the nosetests command?

Provide failure notifications

It would be great if once my given command had finished running I got a nice prominent notification of the exit status, particularly on failure. Something like a nice bold red failed and a nice green ok would be grand!

I can have a look myself at some point, just thought I'd note it down whilst I think of it.

Modifying command file when it is also a watched file leads to `OSError`

I'm using noticer -e.py ./run_tests.py to run tests in my project repo. However, run_tests.py is also watched by noticer, and I get a OSError: [Errno 26] Text file busy when I modify run_tests.py whilst noticer is running.

My expected behaviour would be that run_tests.py does still count towards "you modified something important", but that the command doesn't fall over.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.