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

chore(global_provider): Move methods to class as static #3896

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

jfagoagas
Copy link
Member

Description

Improve code organisation making the set_global_provider and get_global_provider @staticmethod. This implies renaming a lot of code, which is already done and removes a file.

License

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

@jfagoagas jfagoagas added the no-merge Please, DO NOT MERGE this PR. label Apr 30, 2024
@jfagoagas jfagoagas requested review from a team as code owners April 30, 2024 06:22
Copy link
Contributor

You can check the documentation for this PR here -> SaaS Documentation

@github-actions github-actions bot added documentation provider/aws Issues/PRs related with the AWS provider provider/azure Issues/PRs related with the Azure provider provider/gcp Issues/PRs related with the Google Cloud Platform provider provider/kubernetes Issues/PRs related with the Kubernetes provider labels Apr 30, 2024
@@ -38,8 +38,8 @@ def __init__(self, arguments, bulk_checks_metadata):
self.fixer = getattr(arguments, "fixer", None)

# Shodan API Key
if arguments.shodan:
update_provider_config("shodan_api_key", arguments.shodan)
# if arguments.shodan:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review this before merge.

@@ -96,19 +95,6 @@ def check_current_version():
return f"{prowler_version_string}"


# TODO: revisit this function
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot remove this function, it needs to be moved elsewhere.

Copy link
Contributor

You can check the documentation for this PR here -> SaaS Documentation

Copy link
Contributor

github-actions bot commented May 3, 2024

You can check the documentation for this PR here -> SaaS Documentation

Copy link
Contributor

github-actions bot commented May 9, 2024

You can check the documentation for this PR here -> SaaS Documentation

@jfagoagas jfagoagas removed the no-merge Please, DO NOT MERGE this PR. label May 9, 2024
Copy link
Contributor

github-actions bot commented May 9, 2024

You can check the documentation for this PR here -> SaaS Documentation

Copy link
Contributor

github-actions bot commented May 9, 2024

You can check the documentation for this PR here -> SaaS Documentation

Copy link
Contributor

github-actions bot commented May 9, 2024

You can check the documentation for this PR here -> SaaS Documentation

Copy link

codecov bot commented May 9, 2024

Codecov Report

Attention: Patch coverage is 90.08264% with 24 lines in your changes are missing coverage. Please review.

Project coverage is 86.44%. Comparing base (53cfcff) to head (c2096de).

Current head c2096de differs from pull request most recent head c3ef16d

Please upload reports for the commit c3ef16d to get more accurate results.

Files Patch % Lines
prowler/providers/common/provider.py 50.00% 21 Missing ⚠️
prowler/__main__.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3896      +/-   ##
==========================================
- Coverage   86.65%   86.44%   -0.22%     
==========================================
  Files         777      767      -10     
  Lines       24139    23891     -248     
==========================================
- Hits        20918    20652     -266     
- Misses       3221     3239      +18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

You can check the documentation for this PR here -> SaaS Documentation

Copy link
Contributor

You can check the documentation for this PR here -> SaaS Documentation

Copy link
Contributor

You can check the documentation for this PR here -> SaaS Documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation provider/aws Issues/PRs related with the AWS provider provider/azure Issues/PRs related with the Azure provider provider/gcp Issues/PRs related with the Google Cloud Platform provider provider/kubernetes Issues/PRs related with the Kubernetes provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant