Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing parentheses in SourceProperties/source_properties example call #35

Open
delaneydunne opened this issue Oct 30, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@delaneydunne
Copy link

delaneydunne commented Oct 30, 2020

Edit: This has been moved over from photutils. Rendered issue is visible here: https://photutils.readthedocs.io/en/latest/api/photutils.segmentation.source_properties.html#photutils.segmentation.source_properties


In the online docs for both the source_properties() function and the SourceProperties class, the example call with all arguments listed is missing parentheses around the kron_params tuple entries:

Screen Shot 2020-10-29 at 9 38 57 PM

I think it should be:

 photutils.segmentation.source_properties(data, segment_img, error=None, mask=None, 
                                                       background=None, filter_kernel=None, 
                                                       wcs=None, labels=None, 
                                                       localbkg_width=None, 
                                                       kron_params=**(**'mask', 2.5, 0.0, 'exact', 5**)**)

I would have fixed it myself, but it seems to be fine in all of the source code, and it runs well. Is this just an issue with the online docs?

Thanks!

@bsipocz
Copy link
Member

bsipocz commented Oct 30, 2020

Thanks for reporting,

The code itself is indeed fine, this is an issue with the docs building.

Locally everything builds without an issue using sphinx 2.4, but upgrading to the latest, 3.2.1 I get the same issue as in the report, so I think we better move the issue to the sphinx-astropy repo.

Screen Shot 2020-10-29 at 19 14 37

cc @astropy/documentation-infrastructure-maintainers

@bsipocz bsipocz transferred this issue from astropy/photutils Oct 30, 2020
@bsipocz bsipocz added the bug Something isn't working label Oct 30, 2020
@pllim
Copy link
Member

pllim commented Oct 30, 2020

At a glance, I don't see anything we have that customizes function signature appearance. What if you simply use vanilla Sphinx, does it still happen? If so, then maybe this is a Sphinx bug further upstream.

@pllim
Copy link
Member

pllim commented Oct 30, 2020

Or maybe this issue should be moved to https://github.com/astropy/sphinx-automodapi/ . I think it is either a Sphinx bug or our automodapi . cc @astrofrog

@bsipocz
Copy link
Member

bsipocz commented Oct 30, 2020

I didn't have more time to investigate rather than just confirming the behaviour. I also failed to find a similar usage for the core, so I'm fairly certain this is a not very frequent issue, and therefore is only low priority.

@bsipocz
Copy link
Member

bsipocz commented Oct 30, 2020

(Oh, re moving it here: my thinking was that this can be a parking spot until it becomes clear whether it is due to sphinx, or sphinx-automodapi. An a workaround could certainly be to limit the sphinx version here (but again, this is a very minor rendering issue so I don't think it's worth limiting the version just because of it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants