-
Notifications
You must be signed in to change notification settings - Fork 4
Development
Contributor guide for working on the codebase, local tooling, tests, and docs workflow.
yt-study/
.github/
scripts/
hooks/
src/yt_study/
cli.py
setup_wizard.py
core/
config.py
pipeline.py
llm/
prompts/
youtube/
ui/
dashboard.py
tests/
wiki/
Makefile
pyproject.toml
.pre-commit-config.yaml
Clone and initialize the wiki submodule:
git clone https://github.com/whoisjayd/yt-study.git
cd yt-study
git submodule update --init --recursiveInstall dependencies:
make syncInstall hooks:
make hooks-install| Tool | Role |
|---|---|
uv |
dependency management and command runner |
hatchling |
builds |
pytest |
test execution |
pytest-asyncio |
async test support |
ruff |
formatting and linting |
mypy |
type checking |
bandit |
security scanning |
deptry |
dependency hygiene |
pre-commit |
local Git hook orchestration |
| Command | Purpose |
|---|---|
make sync |
install locked dependencies |
make quick |
fast validation |
make ci |
CI-equivalent validation |
make verify |
autofix + full quality pass |
make test-cov |
coverage run |
make help |
full target list |
Do not import Rich, console rendering, or dashboard code into src/yt_study/core/.
pytubefix and youtube-transcript-api calls are blocking and must stay behind asyncio.to_thread(...).
CorePipeline reports progress through PipelineEvent; the CLI is responsible for converting events into UI updates.
If you add a provider key, update:
Config.ALLOWED_KEYSConfig.get_api_key_name_for_model()Config._sync_env_vars()
Do not document keys, paths, or options that do not exist in the code.
| Location | Focus |
|---|---|
tests/test_cli.py |
CLI command behavior |
tests/test_config.py |
config parsing and env overrides |
tests/test_setup_wizard.py |
wizard prompt/save flow |
tests/test_ui.py |
dashboard rendering and state |
tests/test_llm/ |
generator and provider behavior |
tests/test_pipeline/ |
orchestration and event emission |
tests/test_youtube/ |
parser, transcript, metadata, playlist behavior |
The wiki/ directory is a Git submodule. Documentation work may touch:
- root docs such as
README.md,CONTRIBUTING.md, andAGENTS.md - wiki pages inside
wiki/
When adding a wiki page:
- create the page inside
wiki/ - link it from
wiki/Home.md - update the README docs map if it belongs in the public docs surface
Configured through .pre-commit-config.yaml:
- repo hygiene checks
- Ruff formatting and linting
- Bandit
- mypy
- deptry
- pytest on pre-push
- conventional commit checks
- single-line commit message enforcement via
scripts/hooks/check-single-line-commit.sh
Run them manually:
make hooks-runCurrent workflows:
-
ci-main.yml: validation plus test matrix -
pr-gate.yml: PR checks -
release.yml: validate, build, publish to PyPI, create GitHub release
The PR template expects:
- local
make ci - tests updated where appropriate
- docs updated for behavior or workflow changes
- run
yt-study setup --force - process a known public video
- process a playlist
- process a batch file with comments and blank lines
- verify both standard output and chapter-mode output paths
- inspect logs under
~/.yt-study/logs