Skip to content
P小二 edited this page Oct 4, 2026 · 3 revisions

FlyPython companion repository

This repository is the community-maintained source of truth for flypython.com's learning content: reviewed resource data, guides, playbooks, runnable examples, challenge courses, and learning paths. The website renders a pinned commit of this repository — it never copies content by hand.

中文:本仓库是 flypython.com 学习内容的社区维护源(资源数据、指南、 Playbook、示例、挑战课程、学习路径)。网站按固定提交消费本仓库。 从根目录的 README_cn.md 和每门课程的 *_cn.md 文件开始。

Where things live

Path Contents
catalog/ Reviewed resource data (catalog.yml, paths.yml, resources/, projects/) plus the generated browsable catalog/README*.md
guides/ First-party bilingual guides (<name>.md + <name>_cn.md)
playbooks/ First-party bilingual playbooks
examples/ Runnable code examples with tests
courses/ One folder per challenge course (see the contract below)
paths/ Learning paths and their module docs
tools/ Validation, export, and manifest scripts (standard library only)
tests/ The pytest suite every change must pass
docs/ Curation policy, consumer contract, historical plans
templates/ Starter files referenced by guides (AGENT_RULES, pyproject)

The course contract (short version)

Each courses/<slug>/ folder is a complete lesson an AI coding agent teaches from the files themselves: COURSE.md/COURSE_cn.md metadata and teaching contract, lessons/L01.md + L01_cn.md pairs, TASK.md/TASK_cn.md, starter/ and solution/ runnable pairs, tests, a self-contained verify.py that fails on starter and passes on solution, and REVIEW.md recording the maintainer run-through. Courses ship EN+ZH in the same change; tools/verify_courses.py enforces the shape. Full rules: AGENTS.md.

Working on content

  • Keep English and Chinese versions of every document aligned in the same change — the parity test fails otherwise.
  • After editing catalog/ sources, regenerate outputs: make export (catalog.json + radar.json), make render (README tables), make manifest (content-manifest.json).
  • Verify before committing: make check — the same command CI runs (ruff, pytest, catalog/export/render/manifest checks, examples, courses, paths). See CONTRIBUTING.md for setup.

Dependencies

  • pyproject.toml is the only hand-edited dependency declaration.
  • requirements.lock.txt and requirements-dev.lock.txt are generated: change pyproject.toml, then run make lock (needs uv). Existing pins are kept wherever they still satisfy the new constraints; CI runs make lock-check and fails on drift.
  • Course/path requirements.txt files must pin exactly the versions CI tests with — tests/test_dependency_pins.py enforces this, so learners install the same stack CI verified.
  • Dependabot opens one grouped PR per ecosystem monthly (1st of the month, Asia/Shanghai). pandas and matplotlib are ignored there because they are pinned per course and move only with a course re-review.

CI

  • Validate (every push to master and every PR): one make check job on the supported Python floor and latest release (currently 3.11 + 3.14), plus make lock-check. Nothing else.
  • Catalog link audit (weekly + manual): checks every catalog URL, uploads a JSON report, fails on actionable statuses only (403/429 are review-needed, not automatic breakage).
  • GitHub Pages is not used by this repository.

Releases and the website

  • Public tags are immutable (v0.1.1 → db85cdd); versions and compatibility mapping live in CHANGELOG.md.
  • The website consumes this repository through src/data/content-pin.json on the website side — a full commit SHA, never a branch. Shipping new content to the site is a deliberate pin bump: merge here, verify, then update the pin on the website and regenerate its content.
  • Releases are recorded separately: code → tests → remote commit → tag → production evidence.

Contributing

CONTRIBUTING.md covers resources, projects, course feedback, dead links, and security reports. Community courses are a planned but not yet approved track — see docs/repo-plan-0.1.x.md before proposing one.

Pages

Canonical documents

Document Purpose
AGENTS.md Repository rules, content contract, workflow
CONTRIBUTING.md Setup and contribution flows
docs/CURATION_POLICY.md Review criteria for catalog resources
docs/CONSUMING.md How consumers pin and verify exports
docs/REPO_TO_WEBSITE.md Repository ↔ website relationship
CHANGELOG.md Notable contract and maintenance changes