Skip to content

Added verbose= to AstrometryNet#2484

Merged
bsipocz merged 1 commit into
astropy:mainfrom
astrofrog:astrometry-net-verbose
Aug 9, 2022
Merged

Added verbose= to AstrometryNet#2484
bsipocz merged 1 commit into
astropy:mainfrom
astrofrog:astrometry-net-verbose

Conversation

@astrofrog

Copy link
Copy Markdown
Member

With this it is possible to suppress the print() statements which can clutter up stdout when running on many images.

I've also solved a small bug that caused solve_timeout to not be passed through to solve_from_source_list when calling solve_from_image.

…ssed to ``solve_from_source_list`` when calling ``solve_from_image``.
@codecov

codecov Bot commented Aug 8, 2022

Copy link
Copy Markdown

Codecov Report

Merging #2484 (9799890) into main (b1fcfff) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #2484      +/-   ##
==========================================
- Coverage   62.92%   62.90%   -0.03%     
==========================================
  Files         133      133              
  Lines       17302    17308       +6     
==========================================
  Hits        10888    10888              
- Misses       6414     6420       +6     
Impacted Files Coverage Δ
astroquery/astrometry_net/core.py 48.46% <0.00%> (-1.54%) ⬇️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@bsipocz bsipocz added this to the v0.4.7 milestone Aug 8, 2022
@bsipocz

bsipocz commented Aug 8, 2022

Copy link
Copy Markdown
Member

Getting rid of these prints has come up before, thanks for doing the cleanup. One holdup is to decide whether to go with verbose and prints, or put everything in the logger. Currently, we're a mishmash and I would prefer to reach a decision and use that going forward (see #1110 and related open PRs).

I recall @andamian put some very good arguments for the logger approach, but maybe the verbose is a good enough approach for the simple modules like astrometry_net?
Any strong opinions? @keflavich, @pllim or @mwcraig?

@pllim

pllim commented Aug 8, 2022

Copy link
Copy Markdown
Member

Logger is good for pipeline but can be troublesome if astroquery is used as "middleware" where the downstream packages also have their own loggers and find it hard to control yours. Also, it can clutter up notebooks if not set properly for that use case. So, it really depends on how you want it to be used and where.

@keflavich

Copy link
Copy Markdown
Contributor

I like @pllim's point here - if we get included in pipelines, and we've seen cases of that happening, we don't want to spam when different modes are activated. I'd therefore lean toward if verbose

But I can be sold either way.

@mwcraig

mwcraig commented Aug 8, 2022

Copy link
Copy Markdown
Member

I think the verbose approach is fine here.

@bsipocz bsipocz merged commit 902c758 into astropy:main Aug 9, 2022
@bsipocz

bsipocz commented Aug 9, 2022

Copy link
Copy Markdown
Member

Thanks @astrofrog!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants