• Language: en

popy check

When developing a PoPy script file it is sometimes useful to sanity check the input and automatically detect common errors.

Note this checking process also happens when using popy run, however the popy check enables you to check before you are ready to run a script.

Checking a script

Check a script by opening a Open a PoPy Command Prompt and typing:-

$ popy check my_script.pyml

Note a common switch to use with popy check is:-

$ popy check -o my_script.pyml

Here the ‘-o’ option overwrites previous output automatically. If the script has already been run and you do not use the ‘-o’ option, you will be asked to confirm you want to overwrite any previous output.

For other command line options see Command line options.

Checking multiple scripts

Note you can also check all scripts in a directory using:-

popy check *.pyml

This checks all files with the ‘.pyml’ extension in serial.

Log files created by popy_check

When popy check processes a script file, it creates a log file, my_script.pyml.check.log that should enable you to more easily edit and fix a broken script file.

Command line options

usage: popy_check [-h] [-t] [-v {noset,info,debug,warning,error,critical}]
                  script_path

Checks PoPy script for consistency and returns errors + warnings. Can use
optionally prior to running script.

positional arguments:
  script_path           Required path to configuration file.

options:
  -h, --help            show this help message and exit
  -t, --timestamp       Optionally included timestamp string in log file name
                        and output folder name.
  -v {noset,info,debug,warning,error,critical}, --verbosity {noset,info,debug,warning,error,critical}
                        verbosity of output in log files
Back to Top