Skip to content

Commit a5b0b12

Browse files
committed
Refresh project
1 parent 12f7ff3 commit a5b0b12

7 files changed

Lines changed: 1280 additions & 96 deletions

File tree

.github/workflows/refresh.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Refresh site from GitHub API
2+
3+
on:
4+
# Run daily at 06:13 UTC to pick up new repos / changed metadata.
5+
schedule:
6+
- cron: "13 6 * * *"
7+
# Run on demand from the Actions tab.
8+
workflow_dispatch:
9+
# Run whenever site.json changes (manual curation).
10+
push:
11+
paths:
12+
- "site.json"
13+
- "templates/**"
14+
- "scripts/**"
15+
16+
permissions:
17+
contents: write
18+
19+
jobs:
20+
refresh:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Set up Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: "3.12"
29+
30+
- name: Build index.html
31+
env:
32+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
run: python scripts/build.py
34+
35+
- name: Check for changes
36+
id: diff
37+
run: |
38+
if git diff --quiet index.html; then
39+
echo "changed=false" >> "$GITHUB_OUTPUT"
40+
else
41+
echo "changed=true" >> "$GITHUB_OUTPUT"
42+
fi
43+
44+
- name: Commit refreshed index.html
45+
if: steps.diff.outputs.changed == 'true'
46+
run: |
47+
git config user.name "github-actions[bot]"
48+
git config user.email "github-actions[bot]@users.noreply.github.com"
49+
git add index.html
50+
git commit -m "chore: refresh index.html from GitHub API"
51+
git push

.gitignore

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1-
# Empty now
1+
# Python
2+
__pycache__/
3+
*.pyc
4+
*.pyo
5+
*.egg-info/
6+
7+
# Mock data used only by `python scripts/build.py --mock`
8+
scripts/_mock_repos.json
9+
10+
# Local dev scratch
11+
*.tmp
12+
_test_out.html

README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# pythonbackport website
2+
3+
Static landing page for the [pythonbackport](https://github.com/pythonbackport) GitHub org.
4+
5+
The page is **fully data-driven**. Every repository card on the site comes
6+
directly from the live GitHub API at build time. There is no on-disk cache
7+
of repository metadata anywhere in this repo.
8+
9+
## How it works
10+
11+
```
12+
GitHub API ──► scripts/build.py ──► index.html
13+
14+
15+
site.json (display rules + org config)
16+
templates/index.template.html (HTML shell with {{projects}})
17+
```
18+
19+
| File | Role | Edit it? |
20+
| --- | --- | --- |
21+
| `site.json` | Categories, keywords, excluded repos, copy. **Zero repo metadata.** | yes |
22+
| `templates/index.template.html` | Static HTML shell. Contains `{{projects}}` placeholder. | yes |
23+
| `scripts/build.py` | Fetches repos + renders HTML. | rarely |
24+
| `scripts/_mock_repos.json` | Local fixtures for `--mock` mode. Ignored by git. | n/a |
25+
| `index.html` | **Generated. Do not edit by hand.** | no |
26+
27+
## Local development
28+
29+
```bash
30+
# Render using mock data (no network, fast iteration on templates)
31+
python scripts/build.py --mock
32+
33+
# Render against the live GitHub API (rate-limited to 60/h without token)
34+
python scripts/build.py
35+
36+
# Fail if index.html is stale (useful in CI before deploying)
37+
python scripts/build.py --check
38+
```
39+
40+
`GH_TOKEN` (or `GITHUB_TOKEN`) raises the API limit to 5,000/h.
41+
42+
## Automatic refresh
43+
44+
`.github/workflows/refresh.yml` runs daily at 06:13 UTC and rebuilds
45+
`index.html` from the live GitHub API. If anything changed, it commits the
46+
updated file back to the `master` branch. The Pages deploy workflow
47+
(`.github/workflows/static.yml`) then publishes the new build.
48+
49+
## Customising the layout
50+
51+
* **Add a category** — edit `site.json``categories` with a `keywords`
52+
list and an optional `order`. Repos that match those keywords land there.
53+
* **Pin a repo** — add its name to a category's `order` array.
54+
* **Force a repo into a category** — add its name to that category's
55+
`always_include_names` array.
56+
* **Hide a repo** — add its name to `display.exclude_repos`.
57+
58+
No code changes are needed for any of the above.
59+
60+
## License
61+
62+
MIT — see [LICENSE](LICENSE).

index.html

Lines changed: 18 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -576,107 +576,30 @@ <h3>Community-first</h3>
576576
</div>
577577
</section>
578578

579-
<section id="projects" style="background: var(--bg-soft); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft);">
579+
580+
<section id="core" style="background: var(--bg-soft); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft);">
580581
<div class="container">
581582
<div class="section-head reveal">
582-
<span class="section-eyebrow">Repositories</span>
583-
<h2 class="section-title">Featured projects</h2>
584-
<p class="section-desc">A curated collection of the libraries and tools we maintain.</p>
583+
<h2 class="section-title">Core backports</h2>
584+
<p class="section-desc">Libraries that reimplement or backport features of modern CPython.</p>
585585
</div>
586586
<div class="projects-grid">
587-
588-
<a href="https://github.com/pythonbackport/profiling" target="_blank" rel="noopener" class="project-card reveal">
589-
<div class="project-head">
590-
<div class="project-title">
591-
<span class="icon ic-blue">📊</span>
592-
<span>profiling</span>
593-
</div>
594-
<span class="project-tag">3.15 → 3.14</span>
595-
</div>
596-
<div class="project-desc">
597-
Deterministic tracing profiler and a low-overhead statistical sampling profiler named <strong>Tachyon</strong>, backported from CPython 3.15 to 3.14. Exports flame graphs, pstats, Gecko profiles, JSONL and more.
598-
</div>
599-
<div class="project-meta">
600-
<span>📈 sampling · tracing</span>
601-
<span>MIT</span>
602-
</div>
603-
</a>
604-
605-
<a href="https://github.com/pythonbackport/frozendict" target="_blank" rel="noopener" class="project-card reveal">
606-
<div class="project-head">
607-
<div class="project-title">
608-
<span class="icon ic-yellow">❄️</span>
609-
<span>frozendict</span>
610-
</div>
611-
<span class="project-tag">stdlib-port</span>
612-
</div>
613-
<div class="project-desc">
614-
A fully hashable, immutable mapping type — the <code>frozendict</code> proposed for the standard library, available today on every supported Python version.
615-
</div>
616-
<div class="project-meta">
617-
<span>🧊 immutable · hashable</span>
618-
<span>MIT</span>
619-
</div>
620-
</a>
621-
622-
<a href="https://github.com/pythonbackport/lazyimports" target="_blank" rel="noopener" class="project-card reveal">
623-
<div class="project-head">
624-
<div class="project-title">
625-
<span class="icon ic-purple">💤</span>
626-
<span>lazyimports</span>
627-
</div>
628-
<span class="project-tag">PEP 690</span>
629-
</div>
630-
<div class="project-desc">
631-
Implementation of <strong>PEP 690</strong> — Lazy Imports. Defer module imports until first use to slash startup time and memory footprint of large applications.
632-
</div>
633-
<div class="project-meta">
634-
<span>⚡ startup · memory</span>
635-
<span>MIT</span>
636-
</div>
637-
</a>
638-
639-
<a href="https://github.com/pythonbackport/sentinel" target="_blank" rel="noopener" class="project-card reveal">
640-
<div class="project-head">
641-
<div class="project-title">
642-
<span class="icon ic-red">🚧</span>
643-
<span>sentinel</span>
644-
</div>
645-
<span class="project-tag">PEP 769</span>
646-
</div>
647-
<div class="project-desc">
648-
Backport of <strong>PEP 769</strong> — a standardized sentinel object for default arguments. Replace <code>None</code>, <code>object()</code> and bespoke sentinels with a clean, well-typed API.
649-
</div>
650-
<div class="project-meta">
651-
<span>🛡 defaults · typing</span>
652-
<span>MIT</span>
653-
</div>
654-
</a>
655-
656-
<a href="https://github.com/pythonbackport/community" target="_blank" rel="noopener" class="project-card reveal">
657-
<div class="project-head">
658-
<div class="project-title">
659-
<span class="icon ic-green">💬</span>
660-
<span>community</span>
661-
</div>
662-
<span class="project-tag">discussions</span>
663-
</div>
664-
<div class="project-desc">
665-
The home of public discussions, Q&amp;A, roadmaps and proposals. Bring your ideas, ask questions, or help triage compatibility issues across the whole org.
666-
</div>
667-
<div class="project-meta">
668-
<span>🗣️ forum · RFCs</span>
669-
<span>MIT</span>
670-
</div>
671-
</a>
672-
587+
<a href="https://github.com/pythonbackport/profiling" target="_blank" rel="noopener" class="project-card reveal"><div class="project-head"><div class="project-title"><span>profiling</span></div></div><div class="project-desc">Deterministic tracing profiler and a low-overhead statistical sampling profiler named Tachyon, backported from CPython 3.15 to 3.14. Exports flame graphs, pstats, Gecko profiles, JSONL and more.</div><div class="project-meta"><span>★ 12</span><span>python · profiling · sampling</span><span>MIT</span></div></a>
588+
<a href="https://github.com/pythonbackport/frozendict" target="_blank" rel="noopener" class="project-card reveal"><div class="project-head"><div class="project-title"><span>frozendict</span></div></div><div class="project-desc">A fully hashable, immutable mapping type — the frozendict proposed for the standard library, available today on every supported Python version.</div><div class="project-meta"><span>★ 7</span><span>python · immutable · hashable</span><span>MIT</span></div></a>
589+
<a href="https://github.com/pythonbackport/lazyimports" target="_blank" rel="noopener" class="project-card reveal"><div class="project-head"><div class="project-title"><span>lazyimports</span></div><span class="project-tag">PEP-690</span></div><div class="project-desc">Implementation of PEP 690 — Lazy Imports. Defer module imports until first use to slash startup time and memory footprint of large applications.</div><div class="project-meta"><span>★ 4</span><span>python · pep-690 · lazy-import</span><span>MIT</span></div></a>
590+
<a href="https://github.com/pythonbackport/sentinel" target="_blank" rel="noopener" class="project-card reveal"><div class="project-head"><div class="project-title"><span>sentinel</span></div><span class="project-tag">PEP-769</span></div><div class="project-desc">Backport of PEP 769 — a standardized sentinel object for default arguments. Replace None, object() and bespoke sentinels with a clean, well-typed API.</div><div class="project-meta"><span>★ 2</span><span>python · pep-769 · typing</span><span>MIT</span></div></a>
673591
</div>
592+
</div>
593+
</section>
674594

675-
<div style="text-align: center; margin-top: 36px;" class="reveal">
676-
<a href="https://github.com/orgs/pythonbackport/repositories" target="_blank" rel="noopener" class="btn btn-ghost">
677-
<span>View all repositories</span>
678-
<span></span>
679-
</a>
595+
<section id="community" style="background: var(--bg-soft); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft);">
596+
<div class="container">
597+
<div class="section-head reveal">
598+
<h2 class="section-title">Community</h2>
599+
<p class="section-desc">Discussion hubs, RFCs and meta-repositories for the org.</p>
600+
</div>
601+
<div class="projects-grid">
602+
<a href="https://github.com/pythonbackport/community" target="_blank" rel="noopener" class="project-card reveal"><div class="project-head"><div class="project-title"><span>community</span></div></div><div class="project-desc">The home of public discussions, Q&amp;A, roadmaps and proposals for the pythonbackport organization.</div><div class="project-meta"><span>★ 1</span><span>discussions · community · forum</span><span>MIT</span></div></a>
680603
</div>
681604
</div>
682605
</section>

0 commit comments

Comments
 (0)