Refactor repository structure for easier maintenance
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 重构
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 领域
- tooling
调研方向
首先阅读现有的 index.yml 以及类别目录下各个应用程序的清单,然后检查 Bottles 客户端当前的清单扫描行为。将提议的 meta.yml、从文件名派生的名称和类别,以及 Icon、Event 和 Hidden 字段与当前格式进行比较。完成的标准是迁移 repository 结构和客户端行为,同时不会导致过时的客户端失败。
由索引模型根据 Issue 内容生成。
描述
As discussed in #413:
Problem:
The index.yml is very often forgotten by people (even core contributors). Some people edit the manifest, some people edit the index, but 50% of the time one of them is forgotten. There's lots of metadata repetition, leading to maintainer and contributor mistakes.
Proposal:
- Delete:
index.yml(almost all of its fields are copy-pasted duplicates of the per-app manifests, causing a maintenance burden) - Add:
meta.ymlwith the following contents, to tell Bottles which sub-directories to scan for*.ymlmanifests:
categories:
- Games
- Software
- Modify
<app name>.ymlformat as follows:Name: Change this to be the "pretty display name" that used to only exist in the index, such as "GOG Galaxy". This field used to be redundant in the manifest and was always the same name as the manifest file minus the.ymlextension (so for example,epicgamestore.ymlhad aName: epicgamestorewhich is pointless and a source of potential typos). So let's instead track that internal "name" via the actual.ymlfilename, and use theNamefield to carry the UI display name.Category: Do not add this to the manifest. Instead, automatically detect it based on the name of the directory the manifest is inside, such as "Games" or "Software". That's one less source of typos.Icon: Add this to the manifest. It's the filename of the icon to display during installation.Event: If it's useful, add it to the manifest. I don't know the purpose. Only a few entries in the index currently have this value, and it's always a filename pointing at an installer file. It may be possible to just remove this entirely. Edit: Include it, I found its purpose and it looks like a great idea: https://github.com/bottlesdevs/programs/issues/414#issuecomment-3061658624Hidden: Add this optional field. If missing, assumefalse. Otherwise allow the manifest to containtrue/falsehere. If hidden istrue, do not display this manifest in the UI. The purpose is to allow an easy way to hide broken manifests without having to manually move them out of the auto-scanned manifest directories.
The scanning process for the client to index all manifests is then as follows:
for category in categories: # "categories" comes from meta.yml
category_dir = programs_dir / category # assumes pathlib.Path
for manifest_yml in category_dir.glob("*.yml"):
name = manifest_yml.stem
# We have now automatically derived the category and manifest name:
# category: Games
# name: epicgamestore
# Now read the manifest YAML file, and immediately skip the manifest
# if `Hidden` exists and is `true`. Do that check before any other parsing,
# to avoid trying to parse other possibly-outdated manifest structures.
With this repo structure, maintenance is only a matter of editing/moving a single .yml file per application.
Target: Bottles-Next, or possibly even the current public release. If targeting the current release, a simple migration solution is to put up a dummy index.yml file which is empty, so that outdated Bottles clients won't have any fatal errors and simply don't display any programs at all until the user has updated Bottles.
- 主要语言
- 没有语言数据
- 星标
- 121
- 派生
- 95
- 平均合并
- 20 小时 27 分钟
- 30 天内合并 PR
- 2
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
bottlesdevs/programs 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
bottlesdevs/programs#498 ·
-
难度 1/5 1 小时以内 新手友好度 82/100
bottlesdevs/programs#490 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
bottlesdevs/programs#429 · 27 条评论 ·
-
难度 3/5 1-2 天 新手友好度 48/100
bottlesdevs/programs#503 ·
-
难度 5/5 一周以上 新手友好度 20/100
bottlesdevs/programs#500 · 156 条评论 · 56 个 reaction ·
查看 bottlesdevs/programs 的全部 Issue
相似的 Issue
-
automation models
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
agent-ready area: config area: skills type: chore upstream: brain-kit
难度 1/5 1 小时以内 新手友好度 95/100
-
dev experience frontend good first issue
难度 2/5 1-3 小时 新手友好度 78/100
cuttle-cards/cuttle#1403 ·
维护者通常 1 天内回复
-
N: AdGuard Browser Extension P4: Low T: Incorrect Blocking
难度 2/5 1-3 小时 新手友好度 68/100
AdguardTeam/AdguardFilters#243532 ·
维护者通常 1 天内回复
-
agent:Windows bug MEDIUM performance tooling
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复