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

docs(kubernetes): improve docstrings for methods #5717

Merged

Conversation

pedrooot
Copy link
Member

Description

This pull request introduces comprehensive documentation for the KubernetesProvider class in prowler/providers/kubernetes/kubernetes_provider.py. The changes include detailed docstrings for the class, its attributes, and its methods, providing clear descriptions, expected arguments, return values, exceptions, and usage examples.

Documentation Enhancements:

  • Added a class-level docstring to KubernetesProvider, detailing its attributes and methods.
  • Expanded the __init__ method docstring to include exceptions, return values, and usage examples. [1] [2]
  • Enhanced the setup_session method docstring with exceptions.
  • Improved the test_connection method docstring by adding exceptions and usage examples.
  • Updated docstrings for various methods (search_and_save_roles, get_context_user_roles, get_all_namespaces, get_pod_current_namespace, and print_credentials) to include exceptions and usage examples. [1] [2] [3] [4] [5]

Checklist

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@pedrooot pedrooot requested review from a team as code owners November 11, 2024 13:18
@github-actions github-actions bot added the provider/kubernetes Issues/PRs related with the Kubernetes provider label Nov 11, 2024
Copy link

codecov bot commented Nov 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.88%. Comparing base (344d541) to head (a75ea84).
Report is 1160 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5717      +/-   ##
==========================================
- Coverage   89.94%   89.88%   -0.06%     
==========================================
  Files        1124     1132       +8     
  Lines       34815    35275     +460     
==========================================
+ Hits        31313    31707     +394     
- Misses       3502     3568      +66     
Components Coverage Δ
prowler 89.88% <ø> (-0.06%) ⬇️
api ∅ <ø> (∅)

@jfagoagas jfagoagas changed the title feat(kubernetes): improve docstrings for methods docs(kubernetes): improve docstrings for methods Nov 18, 2024
@jfagoagas jfagoagas self-requested a review November 18, 2024 11:17
@jfagoagas jfagoagas merged commit 0a63e70 into master Nov 18, 2024
10 of 11 checks passed
@jfagoagas jfagoagas deleted the PRWLR-5135-kubernetes-document-provider-authentication branch November 18, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
provider/kubernetes Issues/PRs related with the Kubernetes provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants