[neon-notifications] Changes in repo-metadata

Neon CI noreply at kde.org
Tue Jun 4 19:46:31 BST 2024


commit 213a895ee5e8266fe2aa8364c84d0bb09ca65244
Author: Andrew Shark <ashark at linuxcomp.ru>
Date:   Mon Jun 3 19:14:06 2024 +0300

    Sort generated entries. Improve usage docstring.

diff --git a/dependencies/tools/regenerate_dependencies.py b/dependencies/tools/regenerate_dependencies.py
index 06910abe..58afe3af 100755
--- a/dependencies/tools/regenerate_dependencies.py
+++ b/dependencies/tools/regenerate_dependencies.py
@@ -1,15 +1,18 @@
 #!/usr/bin/env python3
 
-# This script is used to bring (update) the project's dependencies info from their .kde-ci.yaml files, so it is available to kde-builder.
+"""
+This script is used to bring (update) the project's dependencies info from their .kde-ci.yaml files, so it is available to kde-builder.
 
-# Usage:
-# export REPOS=/home/nico/kde/src
-# export REPO_METADATA=/home/nico/kde/src/sysadmin-repo-metadata
-#
-# regenerate-dependency-data --branch-group kf6-qt6
+Usage:
+    export REPOS=/home/username/kde/src
+    export REPO_METADATA=/home/username/.local/state/sysadmin-repo-metadata
 
-# `--branch-group` is a mandatory argument. Supported values: `kf6-qt6`, `stable-kf6-qt6`, `kf5-qt5`, `stable-kf5-qt5`.
-# Use `--list` to get a list of branches used for projects.
+    regenerate_dependencies.py --branch-group kf6-qt6
+
+Parameters:
+    `--branch-group`: Mandatory argument. Supported values: `kf6-qt6`, `stable-kf6-qt6`, `kf5-qt5`, `stable-kf5-qt5`.
+    `--list`: Get a list of branches used for projects.
+"""
 
 
 import sys
@@ -76,7 +79,8 @@ class RepoMetadata:
             with open(project, "r") as f:
                 content = yaml.safe_load(f)
             entries.append(MetaData(content["repopath"], content["projectpath"], content["repoactive"]))
-        self.projects = entries
+        sorted_entries = sorted(entries, key=lambda x: x.repopath)
+        self.projects = sorted_entries
 
     def logical_module_structure(self) -> dict[str, BranchGroups]:
         with open(f"{self.path}/dependencies/logical-module-structure.json", "r") as f:



More information about the neon-notifications mailing list