Add Pyproject.toml - #63
Conversation
There was a problem hiding this comment.
Pull request overview
Refactors the repository into an installable Python package (src/repo_exporter) and introduces a CLI entry point to export GitHub or Hugging Face org/repo metadata into Google Sheets, aligning with Issue #46’s “pyprojectify” goal.
Changes:
- Adds a shared
BaseExporterwith common Google Sheets write/format utilities and run orchestration. - Introduces platform-specific exporters for GitHub and Hugging Face under
src/repo_exporter/. - Adds a package CLI (
python -m repo_exporter/ console script) and apyproject.tomlfor packaging.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/repo_exporter/base.py | New abstract base class + shared Sheets utilities + common run() orchestration. |
| src/repo_exporter/github.py | New GitHub exporter implementation for metadata extraction + Sheets update. |
| src/repo_exporter/huggingface.py | New Hugging Face exporter implementation for metadata extraction + Sheets update. |
| src/repo_exporter/main.py | New CLI entrypoint to run either exporter based on CLI args/env. |
| src/repo_exporter/init.py | Exposes package exports (__version__, exporters). |
| src/repo_exporter/about.py | Defines package version. |
| pyproject.toml | Defines build system, dependencies, versioning, and console scripts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| try: | ||
| if repo.get_readme(): | ||
| return "Yes" | ||
| except GithubException: | ||
| return "No" | ||
|
|
There was a problem hiding this comment.
Though I'd probably put return "No" before the except line (similarly for the license check).
| try: | ||
| if repo.get_license(): | ||
| return "Yes" | ||
| except GithubException: | ||
| return "No" | ||
|
|
| try: | ||
| for key in keys: | ||
| value = repo.card_data.get(key, "") | ||
| if value: | ||
| if isinstance(value, list): | ||
| return ", ".join(str(v) for v in value) | ||
| return str(value) | ||
| except Exception: | ||
| return "N/A" | ||
|
|
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
| try: | ||
| if repo.get_readme(): | ||
| return "Yes" | ||
| except GithubException: | ||
| return "No" | ||
|
|
There was a problem hiding this comment.
Though I'd probably put return "No" before the except line (similarly for the license check).
Co-authored-by: Elizabeth Campolongo <38985481+egrace479@users.noreply.github.com>
|
Changes incorporated into #62. |
#46