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

public and private package configuration #1996

Merged

Conversation

nbargnesi
Copy link
Contributor

@nbargnesi nbargnesi commented Mar 2, 2024

This adds two new methods to lib.common.abstracts.Package:

  1. configure(target)
  2. configure_from_data(target)

Both methods are optional.

If a package doesn't provide a configure method, it's logged but ignored. Likewise if no private configuration is importable from data.packages.<package_name>, it's also logged but ignored.

With this PR, packages like DOC_ANTIVM can separate 40 lines of configuration into a separate method, and provide a way to mask sensitive configuration.

@doomedraven
Copy link
Collaborator

for what do you need the name of the package?

@nbargnesi
Copy link
Contributor Author

nbargnesi commented Mar 3, 2024

for what do you need the name of the package?

The package name identifies the module to import when configure_from_data is called.

In the test case, the package name is configuration_package. So the module we look for is data.packages.configuration_package.

@nbargnesi nbargnesi force-pushed the analyzer-package-configuration branch from fd29145 to 8f8c4b0 Compare March 5, 2024 23:40
@nbargnesi nbargnesi marked this pull request as ready for review March 6, 2024 01:19
@doomedraven doomedraven changed the base branch from master to staging March 6, 2024 05:01
@doomedraven doomedraven merged commit 6f8c150 into kevoreilly:staging Mar 6, 2024
5 checks passed
@doomedraven
Copy link
Collaborator

nice feature thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants