Repository navigation
fix: run_all() takes settings explicitly, matching the other pipeline modules - #31
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #28.
run_all() (pipeline/run_daily.py) previously read the global config.settings singleton directly, unlike sync_pipedrive()/sync_calendar()/reconcile(), which all take settings as an explicit parameter. Now consistent: run_all(settings, apply=False).
This wasn't just a style inconsistency — it was a real testability gap: run_all() couldn't be tested in isolation before this without either mutating the global singleton (which scripts/generate_readme_assets.py had to do) or bypassing it entirely and testing run_source() directly (which is what the existing test suite did). cli.py's run() command updated to pass its own settings through explicitly, same pattern it already uses for the other sync commands.
Added 3 new tests for run_all() itself — dry-run vs apply, disabled portals skipped — proving the fix actually closes the testability gap, not just refactoring for its own sake; these literally could not have been written cleanly against the old signature.
Verified: 59/59 tests pass; smoke-tested tendertracker run and run --apply end-to-end, unchanged behavior.