Commit Graph
6 Commits
Author SHA1 Message Date
kosmos 5f4487f3ad feat(config): menu-driven multi-account wizard, v2 schema, config-time Launchpad OAuth
Address review of PR #1 (Valentin): replace the linear config walk-through
and single-section schema.

- weekly-activity config becomes a menu loop: Current sources (masked) ->
  Add a new source (pick kind, repeatable) / Remove a source / Exit; the
  file is written only when something changed
- new versioned config layout (version = 2): [[kind.accounts]] arrays so
  several accounts or instances per provider coexist; optional display
  labels; strict unknown-key/type validation kept (errors carry account
  position, e.g. [github.accounts[1]])
- legacy v1 files (no version key, one section per source) migrate
  transparently in memory on load; saving from the wizard persists v2;
  the file itself is never rewritten by load_config
- non-anonymous Launchpad accounts now authenticate at config time:
  constructing LaunchpadSource runs launchpadlib's browser OAuth and the
  token lands in the system keyring before any report; an explicit
  credentials_file stays supported as an additive opt-out
- report aggregates every configured account in stable order with failure
  isolation intact; headings add the account label when it disambiguates
  (source_label shared between aggregate and wizard)
- GitHub accounts gain optional token_env resolved lazily against the
  environment before falling back to GITHUB_TOKEN / `gh auth token`
2026-08-26 22:53:17 +00:00
kosmosandvhaudiquet 6d8cc3d817 Add config onboarding wizard and aggregated report
- `weekly-activity config`: interactive wizard writing
  ~/.config/weekly-activity.toml (XDG-aware, --config override), one
  section per source, 0600 permissions, tokens never echoed; re-runs show
  current settings and pre-fill defaults
- `weekly-activity report` (and bare invocation): loads enabled sources,
  collects each independently, joins blocks under one header; a failing
  source renders as [skipped: <source> — error] without aborting
- config.py: typed schema, tomllib reader with strict validation,
  hand-formatted TOML writer (stdlib-only, no new dependency)
- aggregate.py: source spec building + failure-isolated collection +
  combined rendering
- README: document config/report usage and config schema
- tests/: 16 stdlib-unittest cases (config round-trip/escaping/validation,
  aggregation mapping/isolation)
2026-08-26 20:18:41 +00:00
vhaudiquet 2e51e9c41f Add CI with checks and automated release builds
CI / check (push) Successful in 6s
CI / release (push) Failing after 4s
Gitea Actions workflow (.gitea/workflows/ci.yml):

- check job: ruff format --check, ruff check, ty check on pushes to main
- release job on v* tags: build a standalone Linux executable with
  PyInstaller (--onefile), smoke-test it, create a Gitea release via
  the API and upload the binary as an asset

Also add a pyinstaller build dependency group and bump to 0.3.0.
2026-08-25 20:07:58 +02:00
vhaudiquet 98eb6ab542 Add Debian BTS source for bugs filed and owned
New `bts` subcommand backed by python-debianbts (bugs.debian.org SOAP):

- Identify by email address: get_bugs(submitter=...) for bugs filed,
  get_bugs(owner=...) for bugs owned
- Filed filtered on creation date, owned on log_modified; status
  lookups capped at 500 bugs per collect
- Per-query failures degrade to warnings like other sources
2026-08-25 19:44:56 +02:00
vhaudiquet 5b89313c4a Add GitLab source for gitlab.com and self-hosted instances (Salsa) 2026-08-25 18:02:52 +02:00
vhaudiquet fadb15ccf7 Add README.md 2026-08-25 15:25:01 +02:00