Skip to content

Refactor orchestrator.py#1005

Open
ObedAmpahECS wants to merge 1 commit intomainfrom
934-refactor-orchestrator
Open

Refactor orchestrator.py#1005
ObedAmpahECS wants to merge 1 commit intomainfrom
934-refactor-orchestrator

Conversation

@ObedAmpahECS
Copy link
Copy Markdown
Collaborator

@ObedAmpahECS ObedAmpahECS commented Apr 22, 2026

🗣 Description

Refactoring of orchestrator.py for continued longterm sustainability

💭 Motivation and context

Closes #934.

As part of a testing initiative ,orchestrator.py was refactored to limit the number of local variables and decompose larger functions into smaller and more focused functions.

🧪 Testing

  1. Pull down this PR to your local env
  2. run pylint scubagoggles/orchestrator.py inside the ScubaGoggles directory
  3. Confirm the results
  4. Go to Actions
  5. Run the Pylint workflow against this MR branch 934-refactor-orchestrator
  6. Confirm Pylint ran successfully with no errors

Initial scans produced pylint results below:

- scubagoggles\orchestrator.py:157:15: W0718: Catching too general exception Exception (broad-exception-caught)
- scubagoggles\orchestrator.py:293:16: W0719: Raising too general exception: Exception (broad-exception-raised)
- scubagoggles\orchestrator.py:384:4: R0914: Too many local variables (17/15) (too-many-locals)
- scubagoggles\orchestrator.py:441:4: R0914: Too many local variables (70/15) (too-many-locals)
- scubagoggles\orchestrator.py:441:4: R0915: Too many statements (114/50) (too-many-statements)

Refactoring produced these pylint results:


- scubagoggles\orchestrator.py:189:4: R0914: Too many local variables (16/15) (too-many-locals)
- scubagoggles\orchestrator.py:286:4: R0914: Too many local variables (18/15) (too-many-locals)
- scubagoggles\orchestrator.py:408:4: R0914: Too many local variables (17/15) (too-many-locals)
- scubagoggles\orchestrator.py:518:4: R0914: Too many local variables (64/15) (too-many-locals)
- scubagoggles\orchestrator.py:518:4: R0915: Too many statements (94/50) (too-many-statements)

These results return warnings and not outright failures, so is not failing the pipeline.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • If applicable, All future TODOs are captured in issues, which are referenced in the PR description.
  • The relevant issues PR resolves are linked preferably via closing keywords.
  • All relevant type-of-change labels have been added.
  • I have read and agree to the CONTRIBUTING.md document.
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated to reflect the changes in this PR.
  • Tests have been added and/or modified to cover the changes in this PR.
  • All new and existing tests pass.

✅ Pre-merge Checklist

  • This PR has been smoke tested to ensure main is in a functional state when this PR is merged.
  • Squash all commits into one PR level commit using the Squash and merge button.

✅ Post-merge Checklist

  • Delete the branch to clean up.
  • Close issues resolved by this PR if the closing keywords did not activate.

@ObedAmpahECS ObedAmpahECS self-assigned this Apr 22, 2026
@ObedAmpahECS ObedAmpahECS marked this pull request as ready for review May 5, 2026 15:02
@ObedAmpahECS ObedAmpahECS requested review from aor7000 and rlxdev May 5, 2026 15:02
@ObedAmpahECS ObedAmpahECS force-pushed the 934-refactor-orchestrator branch from 2c49e41 to d7dfb56 Compare May 5, 2026 17:59
@ObedAmpahECS ObedAmpahECS force-pushed the 934-refactor-orchestrator branch from d7dfb56 to 8049788 Compare May 5, 2026 18:29
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.

Refactor orchestrator.py

1 participant