guma44 / GEOparse

Python library to access Gene Expression Omnibus Database (GEO)
BSD 3-Clause "New" or "Revised" License
137 stars 51 forks source link

get_GEO(... silent=True) is NOT silent #19

Closed dtenenba closed 7 years ago

dtenenba commented 7 years ago

When I call getGEO() with silent=True I expect no output at all. But the result is identical to that obtained with silent=False.

Even if I redirect sys.stdout and sys.stderr to files, I still see the same output.

Is it possible to really silence the output of getGEO?

Python 3.5.2 GEOparse 0.1.10 macOS 10.12.4

guma44 commented 7 years ago

Hi, I will look at this. The ideal solution would be to use logging module and I think I will try to make it happen.

xguse commented 7 years ago

What is the status of this? I was thinking that adding the logging functionality might be a great solution. But in the mean time, would you be interested in PRs that fix the immediate issue?

guma44 commented 7 years ago

Hey, I did not touch it yet. I can make a quick fix for the time being without logging.

bgriffen commented 7 years ago

Indeed I get the same problem of silent=True not doing anything.

guma44 commented 7 years ago

I see I really have to take a look on this. For the silent option, I noticed I have to come back to the old download function and omit wgetter because there is no option to silence it out. This is a bit more work I expected and I focused on solving more urgent issues. However, I see this is quite urgent too.

bgriffen commented 7 years ago

It doesn't break functionality but it sure makes debugging code a big of a nightmare as the window is 99% get_GEO stdout. :)

xguse commented 7 years ago

I think I saw that it is literally like a single function that needs to be changed. One where the silent var is set but the if test didn't get added or something. I will look again on Monday.

Gus

Sent from my mobile. Please excuse any brevity, typos, and/or lack of nuance!

-------- Original Message -------- From: Brendan Griffen notifications@github.com Sent: Friday, July 14, 2017 05:56 PM To: guma44/GEOparse GEOparse@noreply.github.com Subject: Re: [guma44/GEOparse] get_GEO(... silent=True) is NOT silent (#19) [EXTERNAL] [Bulk] CC: "Dunn, Gus (William)" Gus.Dunn@childrens.harvard.edu,Comment comment@noreply.github.com

It doesn't break functionality but it sure makes debugging code a big of a nightmare as the widow is 99% get_GEO stdout. :)

- You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_guma44_GEOparse_issues_19-23issuecomment-2D315477602&d=DwMCaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=5Z0uIExN_wGyuHwlzcBdJGa_zD9XxTYYLrhQ43zclZ9ilJykN-GF6dh04QDSvbzD&m=rHJAisa_s-9e1IH80_Es4ikfV85HP3aTpH6iDw6VsN0&s=wxmMbyf_CQYYy5IBv-CBi8U--3dTBUMca5dFJvK0qnQ&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAIes0rILbn-5FdeHWX997kiMByha3WFLLks5sN-2DQBgaJpZM4Nmej2&d=DwMCaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=5Z0uIExN_wGyuHwlzcBdJGa_zD9XxTYYLrhQ43zclZ9ilJykN-GF6dh04QDSvbzD&m=rHJAisa_s-9e1IH80_Es4ikfV85HP3aTpH6iDw6VsN0&s=-z9U8OkpV_1vrJ06SbLzW6wkSZRV1oiFtkm8fjLxuKs&e=.

guma44 commented 7 years ago

I pushed to the master changes that should solve this issue. I have to prepare release now. If you find something wrong please let me know.