Files
MathorCup2026-B/COLLAB.md
T
mathorcup ac3e481e11 初始化协作仓库:赛题材料、初步试解与协作说明
- 大文件(附件原始包、data/)由 files.ddwsgood.top 承载,不入库
- 新增 .gitignore/.gitattributes/COLLAB.md
2026-10-23 22:28:34 +08:00

79 lines
3.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 协作说明(Gitea + copyparty)
比赛期间(2026-10-23 → 10-30)的版本管理与大文件交换方案。三个服务都在这台腾讯云美国节点上,由 Caddy 统一提供 HTTPS。
| 用途 | 地址 | 说明 |
|---|---|---|
| 代码与文档(git) | https://git.ddwsgood.top/mathorcup/MathorCup2026-B | **公开仓库,clone 免登录**;推送需要 token |
| 大文件(网页/WebDAV) | https://files.ddwsgood.top/ | 可匿名读写;账号 `lyx`、`zzh` 另有管理权限 |
| 本仓库 | — | 只放代码、文档、论文、小体积结果 |
## 一、账号
三个账号:`mathorcup`(管理员)、`lyx`、`zzh`。密码和 git token 不写入仓库,由队长私下分发(服务器上另存一份)。
## 二、git 用法
```bash
# 首次:匿名克隆,无需任何凭据
git clone https://git.ddwsgood.top/mathorcup/MathorCup2026-B.git
cd MathorCup2026-B
# 配置自己的推送凭据(把 TOKEN 换成私发的 token)
git remote set-url origin https://lyx:TOKEN@git.ddwsgood.top/mathorcup/MathorCup2026-B.git
git config user.name "lyx"
git config user.email "lyx@git.ddwsgood.top"
# 日常:先拉再推,避免分叉
git pull --rebase
git add -A && git commit -m "Q2: 危险性指标计算"
git push
```
- token 存在 `.git/config` 里,之后 `git push` 不再询问任何密码。
- 若换机器或 token 泄露:网页 → 设置 → 应用 → 删除并重建 token。
- 网页也能看代码、改文件、上传文件、看提交历史:`https://git.ddwsgood.top/mathorcup/MathorCup2026-B`。
## 三、大文件(附件、data/、中间结果)
**不要往 git 里放数据**:仓库已用 `.gitignore` 排除 `data/`、`附件/` 和所有大二进制格式。数据统一走 `files.ddwsgood.top`。
### 网页
打开 https://files.ddwsgood.top/ → 进入 `附件/` 或 `data/` → 下载。支持断点续传、目录打包下载。
### 命令行
```bash
curl -O https://files.ddwsgood.top/附件/1.csv
```
### 映射成 Windows 盘符(免安装,WebDAV)
1. 资源管理器 → 右键「此电脑」→ 映射网络驱动器
2. 文件夹填:`https://files.ddwsgood.top/`
3. 勾选「使用其他凭据」,账号 `lyx` / `zzh` + 私发密码(匿名也可读写,但带账号可删除和管理)
之后就是拖拽复制,和本地磁盘一样。
## 四、目录约定
| 路径 | 内容 | 是否进 git |
|---|---|---|
| `附件/` | 赛题原始数据 8 项 | 否(仅 8 个 csv/xlsx 进 git) |
| `data/raw/` `data/processed/` `data/external/` | 解压与派生数据 | 否 |
| `2026_初步评估/` | 试解代码与结论 | 是 |
| 各题 `solve*.py`、`结果/` | 求解代码与小结果 | 是 |
| 论文(md/docx/pdf) | 论文与提交材料 | 是(PDF/docx 单文件 <20 MB) |
## 五、提交约定
1. 每个子问题一个分支或至少一次独立提交:`git commit -m "Q1: 地形能量判据"`。
2. 推之前先 `git pull --rebase`;冲突优先保留双方,不要强推(`--force`)。
3. 不提交 `__pycache__`、临时可视化、几百 MB 的中间矩阵——那些放 copyparty。
4. 论文最终稿单独打 tag:`git tag paper-final && git push --tags`。
## 六、服务限制(实测)
- 服务器 2 vCPU / 1.9 GB 内存 / 40 GB 盘(可用约 26 GB),不要跑重型服务。
- 带宽上限 200 Mbps;从国内上传实测约 3 MB/s,下载约 10 MB/s。
- 首次拉全部数据约 1.2 GB:下载约 3–5 分钟。
- 数据盘不是备份:重要产出请 `git push` 或另存一份到网盘。