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

Refactor and Enhance Docker Scout Integration #322

Merged
merged 51 commits into from
Jan 15, 2025
Merged

Conversation

willis89pr
Copy link
Collaborator

This pull request refactors the integration of Docker Scout within the codebase and introduces several improvements:

DockerScoutManager Class: A new class, DockerScoutManager, is introduced to encapsulate the logic for checking Docker Scout installation status and managing its state. This improves code organization and readability.

Error Handling: Enhanced error handling in the run_docker_scout function by adding a json.JSONDecodeError exception to handle potential JSON parsing errors, ensuring robustness in processing Docker Scout outputs.

Initialization Hook: Added an init_hook function to initialize Docker Scout status when the module is loaded, except when the command is "update-db". This ensures that Docker Scout's availability is checked and logged appropriately.

Code Readability: Improved code readability by adding docstrings to functions and methods, providing clear descriptions of their purposes and behaviors.

willis89pr and others added 30 commits November 4, 2024 20:15
Simpler string formatting.

Co-authored-by: Ryan Mast <[email protected]>
Fixed typo.

Co-authored-by: Ryan Mast <[email protected]>
willis89pr and others added 17 commits November 12, 2024 17:23
- Introduced DockerScoutManager class to manage Docker Scout installation checks and state.
- Added error handling for JSON decoding in run_docker_scout function.
- Implemented init_hook to initialize Docker Scout status, excluding update-db command.
- Improved code readability with docstrings and structured initialization.
@willis89pr willis89pr requested a review from nightlark January 14, 2025 22:42
@nightlark nightlark changed the title Refactor and Enhance Docker Scout Integration - Cyt 1163 init docker Refactor and Enhance Docker Scout Integration Jan 14, 2025
@willis89pr willis89pr merged commit e25c99c into main Jan 15, 2025
14 checks passed
@willis89pr willis89pr deleted the cyt-1163-init-docker branch January 15, 2025 15:39
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