chore: remove demo mode#16
Merged
Merged
Conversation
Demo mode (YTSTUDIO_DEMO=1) was a parallel codepath that intercepted get_data_service / get_analytics_service and replaced them with hand-rolled fakes backed by bundled JSON fixtures. It was useful early on for showing the CLI without OAuth, but it has stopped paying for itself: the fixtures drift from the real API shape, new commands silently bypass the demo service (the upload pipeline ignores it entirely), and users get confused about whether a "successful" demo run means anything for their real channel. Delete the whole path: - src/ytstudio/demo.py and src/ytstudio/demo_data/ removed. - services.py drops the is_demo_mode branches; both factories always return the authenticated client. - tests/test_analytics.py drops the demo-only TestQueryDemoMode class and the demo-patched test_overview; the remaining coverage exercises every command path against mocks. - docs/videos.md and docs/livestreams.md drop their "Demo mode" sections. - Incidental "demo" labels in test fixtures (MOCK_VIDEO tags, sidecar filenames and descriptions) renamed to "sample" so no test reads like it is testing the (now nonexistent) demo path. 195 tests pass, ruff clean, mkdocs --strict clean. No `demo` substring left anywhere under docs/, src/, tests/, README.md, or mkdocs.yml.
- Add mocked overview tests (table, json, no-data) to close the coverage gap left after the demo-patched test_overview was removed. - Delete the orphaned demo.gif from the repo root; nothing referenced it. - Drop the now-meaningless `demo/` line from .gitignore.
d6e2f52 to
1541983
Compare
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.
Summary
Demo mode (
YTSTUDIO_DEMO=1) was a parallel codepath that interceptedget_data_service/get_analytics_serviceand substituted hand-rolled fakes backed by bundled JSON fixtures. It was useful early on for showing the CLI without OAuth, but it has stopped earning its keep:videos uploadpipeline) silently bypass the demo service entirely, so partial coverage is itself misleading;Rip it out wholesale.
What changes
src/ytstudio/demo.pyandsrc/ytstudio/demo_data/deleted.src/ytstudio/services.pydrops theis_demo_modebranches; both factories always build the authenticated client.tests/test_analytics.pydrops the demo-onlyTestQueryDemoModeclass and the demo-patchedtest_overview; remaining coverage exercises every command path against mocks.docs/videos.mdanddocs/livestreams.mddrop their "Demo mode" sections.demolabels in test fixtures (MOCK_VIDEOtags, sidecar filenames and descriptions) renamed tosampleso no test reads like it is testing the (now nonexistent) demo path.Test plan
uv run pytest -q-> 195 passed, 80% coverageuv run ruff check .-> cleanuv run mkdocs build --strict-> cleangrep -rni demo docs/ src/ tests/ README.md mkdocs.yml-> no hits