Merge pull request #1920 from YunoHost/graveyard_and_drafts

Graveyard and drafts
This commit is contained in:
Alexandre Aubin 2023-12-26 15:22:33 +01:00 committed by GitHub
commit 82f2209633
2 changed files with 21 additions and 3 deletions

View file

@ -67,3 +67,8 @@ App packagers should *not* manually set their apps' level. The levels of all the
Applications with no recent activity and no active sign from maintainer may be flagged in `apps.toml` with the `package-not-maintained` antifeature tag to signify that the app is inactive and may slowly become outdated with respect to the upstream, or with respect to good packaging practices. It does **not** mean that the app is not working anymore.
Feel free to contact the app group if you feel like taking over the maintenance of a currently unmaintained app!
### `graveyard.toml`
This file is for apps that are long-term not-working and unlikely to be ever revived

View file

@ -37,6 +37,12 @@ def get_wishlist() -> Dict[str, Dict[str, str]]:
return toml.load(wishlist_path)
@cache
def get_graveyard() -> Dict[str, Dict[str, str]]:
wishlist_path = APPS_ROOT / "graveyard.toml"
return toml.load(wishlist_path)
def validate_schema() -> Generator[str, None, None]:
with open(APPS_ROOT / "schemas" / "apps.toml.schema.json", encoding="utf-8") as file:
apps_catalog_schema = json.load(file)
@ -50,9 +56,6 @@ def check_app(app: str, infos: Dict[str, Any]) -> Generator[Tuple[str, bool], No
yield "state is missing", True
return
if infos["state"] != "working":
return
# validate that the app is not (anymore?) in the wishlist
# we use fuzzy matching because the id in catalog may not be the same exact id as in the wishlist
# some entries are ignore-hard-coded, because e.g. radarr an readarr are really different apps...
@ -66,6 +69,16 @@ def check_app(app: str, infos: Dict[str, Any]) -> Generator[Tuple[str, bool], No
if wishlist_matches:
yield f"app seems to be listed in wishlist: {wishlist_matches}", True
ignored_graveyard_entries = ["mailman"]
graveyard_matches = [
grave
for grave in get_graveyard()
if grave not in ignored_graveyard_entries
and SequenceMatcher(None, app, grave).ratio() > 0.9
]
if graveyard_matches:
yield f"app seems to be listed in graveyard: {graveyard_matches}", True
repo_name = infos.get("url", "").split("/")[-1]
if repo_name != f"{app}_ynh":
yield f"repo name should be {app}_ynh, not in {repo_name}", True