iDrDex / star_api

API access to STARGEO: stargeo.org
2 stars 2 forks source link

Debug code #15

Open Suor opened 8 years ago

Suor commented 8 years ago

I noticed lots of debug code like this:

debug and df.to_csv("%s.analysis_df.csv" % analysis.analysis_name)

Also debug argument needs to be parsed everywhere, which complicates code. Is this necessary?

You may use ipdb or debug in PyCharm instead.

iDrDex commented 8 years ago

Not necessary. But convenient. We need the same engine running analyses on website as star_api. We also need to submit to website from API. What's the best way to get the tel in sync.

On Mar 2, 2016, at 4:33 AM, Alexander Schepanovski notifications@github.com wrote:

I noticed lots of debug code like this:

debug and df.to_csv("%s.analysis_df.csv" % analysis.analysis_name) Also debug argument needs to be parsed everywhere, which complicates code. Is this necessary?

You may use ipdb or debug in PyCharm instead.

— Reply to this email directly or view it on GitHub.

Suor commented 8 years ago

I wrote this library to help not break anything while refactoring and optimizing. The idea is to cache (save) function result first time and then check it all subsequent times. If result changes app stops, you are presented with explanation of what changed and a debugger promt, where you can examine result and saved_result and compare them.

But to really make everything in sync we should share code. I will create starbase library and extract as much as possible to it. I'll create separate issue for that.