Watcher upgraded

Hey guys,
I know I just released v1.4, but I also wanted to share what is currently in development. As it stands, running the pylinac watcher script is a bit clunky. I’ve decided to beef up the watcher script and its capabilities. Currently, you have to find the watcher script .py file and run it directly. The analysis settings are also hardcoded. What’s being added:

  • a pylinac console script so you don’t have to find the watcher script file.
  • a YAML configuration file for analysis and email settings.
  • an optional email service to send reports (analysis items attached).

This would be as simple as 1) installing/upgrading pylinac:

$ pip install pylinac

and then 2) running the console script:
$ pylinac watch 'dir/to/watch'

If no configuration file is provided the analysis runs at the default values and with no email service. If you want to make your own config file just make a new YAML file (looks like the following snippet; I’d copy and edit the default file):

  • vmat
  • drgs


Then, pass it to the service:

$ pylinac watch 'dir/to/watch' --config='path/to/config.yaml'

The email service requires you to provide a Gmail account for it to use. I’d set up an ad hoc dummy account and use that. Once it’s set up you can receive emails either anytime an analysis is done or only when a failing analysis occurs. The emails include the analysis image and analysis results text. The failures depend on the YAML analysis settings and are specific to each analysis type.

Happy coding!