From d0f4d5dfa9948037b163fc3296a15c6a83b17009 Mon Sep 17 00:00:00 2001 From: CREATIVE_tg1 <1+creative_tg1@noreply.localhost> Date: Wed, 27 May 2026 14:53:12 +0000 Subject: [PATCH] Create wiki page 'Development and CI' --- Development-and-CI.md | 78 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 Development-and-CI.md diff --git a/Development-and-CI.md b/Development-and-CI.md new file mode 100644 index 0000000..fd90acb --- /dev/null +++ b/Development-and-CI.md @@ -0,0 +1,78 @@ +# Development and CI + +## Local development + +Install development dependencies: + +```bash +uv sync --group dev +``` + +Useful commands: + +```bash +make format +make lint +make typecheck +make test +make ci-check +make build +make package-version +``` + +## Tooling + +- Ruff for linting and formatting +- mypy in strict mode +- pytest for tests +- deptry for dependency checks +- local `stubs` directory for untyped third-party packages + +## Architecture + +Project layout: + +- `src/yt_shorts_downloader/api.py`: public API +- `src/yt_shorts_downloader/cli.py`: CLI +- `src/yt_shorts_downloader/models`: typed models +- `src/yt_shorts_downloader/services`: session validation +- `src/yt_shorts_downloader/core`: yt-dlp integration, runtime detection, URL validation +- `stubs`: local typing stubs + +## CI workflow + +The main Gitea Actions workflow runs: + +- Ruff +- mypy +- deptry +- pytest + +After successful CI on a push to `main`, the workflow attempts publication to Gitea Packages. + +## Package publishing + +The package version is read from `[project].version` in `pyproject.toml`. + +Publishing rules: + +- if the current version does not exist in Gitea Packages, it is uploaded +- if the current version already exists, upload is skipped +- old published versions remain available in the registry + +Required CI secrets: + +- `PYPI_REPOSITORY_URL` +- `PACKAGE_USERNAME` +- `PACKAGE_TOKEN` + +Local publish example: + +```bash +export PYPI_REPOSITORY_URL='https://gitea.example.com/api/packages//pypi' +export PACKAGE_USERNAME='' +export PACKAGE_TOKEN='' + +make package-version +make publish-gitea +```