Skip to content

launch prep: PyPI packaging, README, CI, bug fixes#16

Merged
chiruu12 merged 8 commits into
mainfrom
feat/launch-prep
May 9, 2026
Merged

launch prep: PyPI packaging, README, CI, bug fixes#16
chiruu12 merged 8 commits into
mainfrom
feat/launch-prep

Conversation

@chiruu12
Copy link
Copy Markdown
Owner

@chiruu12 chiruu12 commented May 9, 2026

Summary

  • Fix me command missing --enrich/--model/--verbose params
  • Add prominent rate limit warning for unauthenticated users
  • Package mappings/schema into wheel via hatch force-include
  • Fix enrichment error message for pip users
  • Reduce 202 retry to best-effort (1 retry instead of 3)
  • Add PyPI metadata (classifiers, keywords, URLs, py.typed)
  • Add CI workflow (pytest + ruff, Python 3.11-3.13)
  • Add CONTRIBUTING.md
  • Rewrite README for launch (hero SVG, pip install, "Why DevCard?", "Made for AI Agents")

Test plan

  • 361 tests pass
  • Ruff lint clean
  • Wheel builds and installs in clean venv
  • CLI works from wheel install (devcard --help)
  • Tested on 8 real profiles (karpathy, torvalds, antirez, sindresorhus, chiruu12, Imbad0202, octocat, nonexistent user)
  • advise and compare commands verified

chiruu12 added 8 commits May 7, 2026 23:13
…ibutions

Found by running devcard validate on a fresh card — 3 validation errors:
- Activity: added longest_gap_days and active_days fields
- Collaboration: added org_contributions array with OrgContribution objects
- Root: added summary string field

devcard validate now passes on generated output.
- Fix me command missing --enrich/--model/--verbose params
- Add prominent rate limit warning for unauthenticated users
- Package mappings/schema into wheel via force-include
- Fix enrichment error message for pip users
- Reduce 202 retry to best-effort (1 retry, 2s)
- Add PyPI metadata (classifiers, keywords, URLs)
- Add CI workflow (pytest + ruff, Python 3.11-3.13)
- Add CONTRIBUTING.md
- Add py.typed marker
- Rewrite README for launch
Copilot AI review requested due to automatic review settings May 9, 2026 19:36
@chiruu12 chiruu12 merged commit c425e65 into main May 9, 2026
5 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Launch-prep changes to make DevCard ready for PyPI distribution and smoother first-run UX, while tightening a few extractor/advisor behaviors and adding CI coverage.

Changes:

  • Package non-code assets (mappings + JSON schema) into the wheel and update runtime path resolution for installed vs. dev mode.
  • Improve CLI/UX and robustness: me command options parity, unauthenticated rate-limit warning, best-effort contributor stats retry, and clearer enrichment install error.
  • Advisor/extractor correctness tweaks: treat missing extractor outputs as None, filter empty commit messages, and extend schema to cover new/optional fields.

Reviewed changes

Copilot reviewed 18 out of 20 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_extractors/test_commit_quality.py Updates expectations for filtering empty/missing commit messages.
tests/test_advisor_engine.py Adjusts context defaults to None on missing extractors; adds tests for None handling in rules + formatting.
src/devcard/validators/schema_validator.py Loads schema from installed wheel data directory with dev fallback.
src/devcard/renderers/terminal.py Improves “Lines Changed” rendering layout using Rich grouping.
src/devcard/py.typed Marks package as typed for consumers.
src/devcard/mappings.py Loads mappings from installed wheel data directory with dev fallback.
src/devcard/github/client.py Adds has_token and reduces 202 retry behavior for contributor stats.
src/devcard/extractors/lines.py Uses top repos list directly (repos already filtered upstream).
src/devcard/extractors/commit_quality.py Filters empty messages and simplifies head-ref fetch flow.
src/devcard/extractors/activity.py Avoids commit search endpoint unless authenticated (rate-limit friendly).
src/devcard/enrichment/provider.py Updates install guidance to pip install devcard[enrich].
src/devcard/cli.py Adds token warning, fixes me option parity for enrich/model/verbose.
src/devcard/advisor/engine.py Loads advisor rules from packaged data; formats None placeholders as N/A.
src/devcard/advisor/context.py Makes many extracted fields optional (None) to distinguish “missing” vs “0”.
schema/devcard.v1.schema.json Extends schema for summary + activity gap fields + org contribution breakdown.
README.md Rewrites README for PyPI launch and agent-oriented positioning; updates install/run instructions.
pyproject.toml Adds PyPI metadata, URLs, py.typed, and hatch wheel force-includes for data assets.
CONTRIBUTING.md Adds contribution guidelines and common workflows.
.github/workflows/ci.yml Adds CI workflow running ruff + pytest on Python 3.11–3.13.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 21 to 24
"""Extract lines added/deleted across a user's top repos."""
try:
non_fork_repos = [r for r in repos if not r.fork][:MAX_REPOS]
non_fork_repos = repos[:MAX_REPOS]

Comment on lines 321 to +324
table.add_row(rl.repo, f"+{rl.added:,}", f"-{rl.deleted:,}")
console.print(Panel("\n".join(lines), title="Lines Changed", border_style="bright_green"))
console.print(table)
from rich.console import Group
content = Group(summary, table)
console.print(Panel(content, title="Lines Changed", border_style="bright_green"))
@chiruu12 chiruu12 mentioned this pull request May 9, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants