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

[doc improvment] inconsistent usage of img_key and img_res_key in code base #884

Open
TTTPOB opened this issue Sep 3, 2024 · 1 comment
Labels
doc Improvements or additions to documentation

Comments

@TTTPOB
Copy link

TTTPOB commented Sep 3, 2024

I encountered a problem today using sq.pl.spatial_scatter, I have to use lowres image in my object, so I see the docstring said - Use ``img_key`` to display the image in the background.

- Use ``img_key`` to display the image in the background.

but when I specified img_key in sq.pl.spatial_scatter, I encountered error saying that it is not a valid parameter.
So I looked into the source code, and found sq.pl.spatial_scatter calls _spatial_plot
def _spatial_plot(

in which the real parameter is named img_res_key

img_res_key: str | None = Key.uns.image_res_key,

but the docstring of _spatial_plot says img_key as well
If :attr:`anndata.AnnData.uns` ``['spatial']`` is present, use ``img_key``, ``seg_key`` and

I wanted to submit a pr because this seems a simple fix, just fix the docstring would be good, but when I grep the code base I found
image
image

There seem to be a major name inconsistency, and I don't know what is the intended name in opinion of your team, so I gave up and file an issue.

@giovp
Copy link
Member

giovp commented Sep 16, 2024

hi @TTTPOB , thank you for pointing it out. Feel free to submit a PR for fixing the docstrings. Thank you!

@giovp giovp added the doc Improvements or additions to documentation label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants