Commit graph

19 commits

Author SHA1 Message Date
Vinta Chen
06aa4675c9
fix: stop fetch_github_stars from falling back to the gh CLI token
Some checks are pending
CI / test (push) Waiting to run
Deploy Website / deploy (push) Waiting to run
The recipe fell back to the gh CLI OAuth token (repo, workflow, gist, read:org scopes) for a job that reads only public data, and a missing GITHUB_TOKEN silently escalated to it.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-01 09:48:24 +08:00
Vinta Chen
ea593a813e fix: fall back to gh auth token in fetch_github_stars
Local runs of make fetch_github_stars required a GITHUB_TOKEN in .env even when gh was already logged in.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-31 22:13:53 +08:00
Vinta Chen
cc804b1de2
feat: add Downloads/Month column to website table
Sourced from website/data/pypi_downloads.tsv the same way
github_stars.json feeds the stars column. The new sortable column
sits between GitHub Stars and Last Commit on the homepage and
category pages, formatted with thousands separators like stars, with
an em dash when no PyPI data exists. Rows are matched by normalized
README display name; Built-in entries never show counts since
same-named PyPI packages are stdlib backports (e.g. the asyncio
package).

Below 960px the column hides and the count moves into the expand
row, mirroring the existing Last Commit treatment. main.js gains the
downloads sort branch and URL param.

The deploy workflow fetches the TSV via the new
make fetch_pypi_downloads target with a daily actions/cache
fallback, mirroring the stars fetch, but non-fatal: the column
degrades to dashes when the fetch fails, unlike stars which the
build requires.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-16 17:52:04 +08:00
Vinta Chen
24d6c2896b build: upgrade project to Python 3.14
watchdog 6.0.0 (last release 2024-11-01) ships no cp314 macOS wheel,
and uv has no per-package build allowlist under no-build = true, so
the preview file watcher moves to watchfiles, which ships cp314
wheels. watchfiles now lives in its own preview dependency group.
UV_PYTHON=3.13 is no longer needed on machines that only have 3.14.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-16 16:58:34 +08:00
Vinta Chen
432a1f4b71
build: add lint, format, typecheck make targets and ty dependency
Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-03 12:23:37 +08:00
Vinta Chen
0bf9522e5d
chore: add uv supply-chain hardening and enforce locked installs
- Set exclude-newer to 3 days and only-binary/:all: in pyproject.toml to
  limit dependency freshness window and block source builds
- Switch uv sync to --locked in Makefile, ci.yml, and deploy-website.yml
  to enforce the lockfile rather than re-resolving on each install
- Regenerate uv.lock with exclude-newer snapshot recorded

Co-Authored-By: Claude <noreply@anthropic.com>
2026-04-22 02:21:48 +08:00
Vinta Chen
f27b7c80fb
feat(website): add social proof line to hero with star count and build date
Display the awesome-python repo's star count (formatted as '230k+') and
the last data refresh date below the hero CTA. Fetches the self-repo
star count by always including vinta/awesome-python in the stars fetch.
Also removes the footer date stamp, which is now surfaced in the hero.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-23 01:56:15 +08:00
Vinta Chen
d65c6ccd64
refactor: rename fetch_stats target and remove cache age gating
Rename the Makefile target from fetch_stats to fetch_github_stars to
match the script name. Remove CACHE_MAX_AGE_DAYS and the staleness
check so every run fetches all repos unconditionally.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-18 22:08:35 +08:00
Vinta Chen
280f250ce0
feat: migrate README parser to markdown-it-py and refresh website
Switch readme_parser.py from regex-based parsing to markdown-it-py for
more robust and maintainable Markdown AST traversal. Update build pipeline,
templates, styles, and JS to support the new parser output. Refresh GitHub
stars data and update tests to match new parser behavior.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-18 20:33:36 +08:00
Vinta Chen
45391b84e9
build: simplify Makefile targets and add live-reload preview
Rename site_* targets to bare names (install, fetch_stats, build,
preview). Replace the static preview target with a watchmedo-driven
live-reload loop so file changes trigger automatic rebuilds. Make
the output directory creation idempotent (exist_ok=True) and static
copy incremental (dirs_exist_ok=True) so repeated builds don't wipe
output on each run.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-18 18:28:27 +08:00
Vinta Chen
87a16f47ea
build: load .env in Makefile and rename fetch_stars to site_fetch_stats
Adds -include .env with export so environment variables (e.g. GitHub
token) are available to uv commands without manual export. Renames the
target to match the site_ prefix convention used by the other targets.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-18 13:57:32 +08:00
Vinta Chen
177183d9bd
add custom website build system
Replaces MkDocs with a bespoke Python site generator using Jinja2 templates
and Markdown. Adds uv for dependency management, GitHub Actions workflow for
deployment, and Makefile targets for local development (fetch_stars, build,
preview, deploy).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-18 13:48:49 +08:00
Vinta
97dd41712a update Makefile 2019-03-03 00:06:09 +08:00
Vinta
21ab061232 update mkdocs config 2018-04-11 02:11:11 +08:00
Vinta
02a72b1ffb pip install mkdocs-material specifictly 2017-11-23 01:51:46 +08:00
Vinta
ca9220cee7 fancy theme: mkdocs-material
https://github.com/squidfunk/mkdocs-material
2017-10-27 04:13:31 +08:00
Vinta
0d3f958760 update Makefile 2017-04-24 21:16:43 +08:00
Vinta
4f55f2da5a fix Makefile 2015-06-09 19:19:41 +08:00
Vinta
65ef34f2d2 use MkDocs to generate a static website 2015-06-07 03:36:52 +08:00