Closed alubbock closed 7 years ago
Comment copied from https://github.com/LoLab-VU/pysb-cupsoda/issues/8 by me:
The verbosity option on the github and souceforge versions appears to only take a boolean. Has that changed in a new version somewhere else @lh64 to take multiple levels?
cupSODA now recognizes four verbosity settings. The cupsoda.py code needs to be updated to recognize and pass these:
verbose 0: silent mode, shut down the printing of any debug information; verbose 1: cupSODA just prints model-related information: detected reactions, species, model kind, threads and blocks organization, simulation time; verbose 2: cupSODA prints all debug information (i.e., read from input files and command line arguments) except ODEs and JM; verbose 3: cupSODA prints all debug information including ODEs and JM.
Implemented. PySB now uses python's logging framework, and the cupsoda verbosity level will be set from this level. If set to logger level 10 or below (i.e. DEBUG or higher) cupsoda verbosity flag will be 1. If set to logger level 5 or below cupsoda verbosity flag will be 2. Set the default level using the logging framework (e.g. by environment variable: PYSB_LOG=5
) or by passing a integer value for the verbose argument to the CupSodaSimulator
constructor.
Issue moved from: https://github.com/LoLab-VU/pysb-cupsoda/issues/8 originally filed by @lh64
Output from our Python code is currently getting mixed with output from cupSODA, making it difficult to read the command line output. Also, cupSODA now supports three levels of verbose output. We should improve the verbosity handling to streamline all of this.