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

Updated Documentation of adapt_rgb.py #7276

Closed
wants to merge 4 commits into from

Conversation

Ganesh2409
Copy link

@Ganesh2409 Ganesh2409 commented Dec 22, 2023

Description

Updated Documentation of adapt_rgb.py by adding more information in docstring

Fixes:#7276

  • I have added the "image" parameter as an array and highlighted the additional arguments (*args, **kwargs) that can be passed to the underlying image filter function into Docstring

  • The docstring now explains that if the image is RGB-like, the apply_to_rgb function is used to apply the filter. Otherwise, the image filter is applied directly.

@lagru
Copy link
Member

lagru commented Dec 22, 2023

@Ganesh2409, welcome and thanks for giving this a shot! Could you take a look at the indent level of the added docstrings. They are tripping up the tests..

@lagru lagru added the 📄 type: Documentation Updates, fixes and additions to documentation label Dec 22, 2023
@Ganesh2409
Copy link
Author

Thanks for ur suggestion ....! I am new to open source contribution please guide me through this ...... :)

@Ganesh2409 Ganesh2409 closed this Dec 23, 2023
@Ganesh2409
Copy link
Author

Ganesh2409 commented Dec 23, 2023

  • Actually I encountered the indentation error u have specified still my checks have been failing
def image_filter_adapted(image, *args, **kwargs):
    """Adapted image filter function to handle both RGB-like and non-RGB-like images.
    
    Parameters
    ----------
    image : array
        Input image. The format should be checked using the `is_rgb_like` function.
    
    *args, **kwargs : additional arguments
        Additional arguments to be passed to the underlying image filter function.
    
    Returns
    -------
    filtered_image : array
        Filtered image obtained by applying the image filter function.
    """
    if is_rgb_like(image):
        return apply_to_rgb(image_filter, image, *args, **kwargs)
    else:
        return image_filter(image, *args, **kwargs)
    
    return image_filter_adapted
  • Is there any thing I am messing with

@lagru
Copy link
Member

lagru commented Dec 23, 2023

In cases like this its often useful to take a look at other parts of the library and see how docstrings are formatted there. I've edited your comment above so that the docstring should be formatted accordingly.

Also please have a look at our Contribution guide. I noticed that you created your PR from your main branch. That can lead to future problems (see Don’t Start Pull Requests from Your Main Branch) so it's best to use feature branches.

However in this case, feel welcome to reopen this PR and give it a shot. ;)

@Ganesh2409
Copy link
Author

@lagru i need ur assistance sir please .. :)
Screenshot 2023-12-24 204924

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📄 type: Documentation Updates, fixes and additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants