Zhang Jiahao
|
fb7c0488bc
|
Relax Python requirement 3.11 → 3.10
Why:
- Ubuntu 22.04(广州云服务器 dev1 的发行版)自带 python3.10。之前要求 3.11
会让 uv 去下载独立 Python 解释器,从国内拉 Astral 的 python-build
release 很慢。放到 3.10 直接用系统 Python,sync 秒完成。
- 代码没有用任何 3.11+ 特性(用了 `from __future__ import annotations`
支持 PEP 604/585 在 3.10 上下文),降版本零代价。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-04-23 23:34:54 +08:00 |
|
Zhang Jiahao
|
c8d55a22eb
|
Add schema+file validator; pin down fs-web-stream as ad icons
Why:
- schema 必须能自动校验,否则后续放量无法防腐。现在 scripts/validate.py
对全部 metadata.json 做两层检查(schema + 本地文件 sha256),跑一次
即可对全量数据签收;10/10 项目已通过。
- docs/sources/oshwhub.md 之前把 fs-web-stream.jlc.com 标为"工程源待查",
排查后确认那些 URL 全部是嘉立创服务侧栏/推广图标,与项目无关。
image.lceda.cn/attachments/ 是项目附件的唯一入口,现在调研文档闭合。
What:
- scripts/validate.py: jsonschema 校验 + optional --check-files 核 sha256
- pyproject.toml: 加 jsonschema>=4.26 依赖
- docs/sources/oshwhub.md: fs-web-stream 归类为推广资源(已排除),附 context 证据
- log.md: 本次会话记录
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-04-23 19:40:55 +08:00 |
|
Zhang Jiahao
|
5ffa10f256
|
Phase 1 MVP: crawl 10 high-quality oshwhub projects into LFS
Why:
- Charles 指定:先爬 10 个高质量项目存 Gitea LFS,一个项目一个文件夹,
保留原文件和 URL。先以小批量验证 schema + LFS 流水线,放量前再拍板
存储规模。
What:
- crawlers/oshwhub: 列表 API (`/api/project?sort=hot`) + SSR HTML 解析,
一次性产出 metadata / description / cover / files / _urls
- schemas/project.schema.json: 跨源统一 schema
- docs/sources/oshwhub.md: API 入口 / 字段映射 / 陷阱调研
- pyproject.toml: httpx[http2] 单依赖
- .gitattributes: data/raw/**/files/** 一律走 LFS(规则写窄,避免误伤 schemas/*.json 等)
- .gitignore: 移除 data/raw/* 排除(改走 LFS 入库)
10 个项目覆盖:调试器 / 加热台 / 盖革计数器 / 数控电源 / 焊台 /
智能手表 / USB 测电流 / ZVS 感应加热 / AI 开发板 / 红外热成像。
共 52 附件 ≈ 524 MB 入 LFS,筛选判据 grade=4 & likes>=100 & 多样性。
Known gaps(见 plan.md § Phase 1.4):
- EasyEDA 源 JSON 需登录 (u.lceda.cn),v0.1 跳过
- fs-web-stream.jlc.com 的工程源下载未测
- scripts/validate.py 自动 schema 校验未实现
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-04-23 19:34:09 +08:00 |
|