sharppy / SHARPpy

Sounding/Hodograph Analysis and Research Program in Python
https://sharppy.github.io/SHARPpy/index.html
Other
221 stars 110 forks source link

Andover with logging #128

Closed wblumberg closed 5 years ago

wblumberg commented 6 years ago

Made changes to support logging to sharppy.log file and the terminal when full_gui.py is run using debug mode.

wblumberg commented 6 years ago

I thought I had already merged my logging changes, but I guess I hadn't.

This commit includes one key new feature for this program: the ability to do logging so we can now easily trace the flow of the program and understand where errors occur (especially in the GUI). This feature will dump the log data into a sharppy.log file, which can be submitted to us by users if they find some weird bug. I also included output statements for timing to understand where in the Profile object creation step the program lags the most.

There's some edits to how observed data is loaded into the program in this commit that got mixed in (I kept getting some odd bugs that said that SHARPpy couldn't load SPC data), so we'll need to check to see if that still works.

There's also a test_url.py script that will take in a URL or file through the command line and run SHARPpy's calculations for the ConvectiveProfile object. I wrote this to ease the debugging step when the program craps out while running the numerics for some data.