Restructure to multi-source architecture; fix GitHub repo timeline filter

- Rename package launchpad_weekly_activity -> weekly_activity
- Split into model.py (ActivityReport, Section), report.py (source-agnostic
  formatter), cli.py (subcommand dispatch), sources/ (per-source modules)
- Move Launchpad code to sources/launchpad.py implementing ActivitySource
- Add GitHub source (sources/github.py) using httpx: PRs, issues, repos, commits
- Fix GitHub 'Repositories modified' filtering on pushed_at not updated_at
  (metadata changes were showing stale repos with no recent code pushes)
- Add --credentials-file for Launchpad OAuth (bypass keyring for headless)
- Add keyring dep (launchpadlib optional dep; bare import crashes without it)
- Graceful per-query error handling: degraded sections + concise warnings
- Rolling 7-day window (was previous calendar week)
This commit is contained in:
2026-08-25 15:24:10 +02:00
parent bc451f9830
commit 3625229056
11 changed files with 662 additions and 275 deletions
+6 -6
View File
@@ -1,12 +1,12 @@
[project]
name = "launchpad-weekly-activity"
version = "0.1.0"
description = "Weekly Launchpad activity report (merge proposals, branches, bugs) for a user."
name = "weekly-activity"
version = "0.2.0"
description = "Weekly activity report (merge proposals, pull requests, bugs, issues) for Launchpad and GitHub."
requires-python = ">=3.11"
dependencies = ["launchpadlib>=2.1.0", "keyring>=25"]
dependencies = ["launchpadlib>=2.1.0", "keyring>=25", "httpx>=0.27"]
[project.scripts]
launchpad-weekly-activity = "launchpad_weekly_activity.cli:main"
weekly-activity = "weekly_activity.cli:main"
[build-system]
requires = ["hatchling"]
@@ -16,7 +16,7 @@ build-backend = "hatchling.build"
dev = ["ruff>=0.6", "ty>=0.0.1"]
[tool.hatch.build.targets.wheel]
packages = ["src/launchpad_weekly_activity"]
packages = ["src/weekly_activity"]
[tool.ruff]
target-version = "py311"