This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git
The following commit(s) were added to refs/heads/main by this push:
new b7d58f8 Sort paths in files views
b7d58f8 is described below
commit b7d58f81d4fa52c6e921056cd6a8106cbdeaaae2
Author: Sean B. Palmer <[email protected]>
AuthorDate: Thu May 22 15:07:20 2025 +0100
Sort paths in files views
---
atr/routes/candidate.py | 2 ++
atr/routes/draft.py | 2 ++
atr/routes/preview.py | 2 ++
atr/routes/release.py | 2 ++
4 files changed, 8 insertions(+)
diff --git a/atr/routes/candidate.py b/atr/routes/candidate.py
index d91d693..de5ef6c 100644
--- a/atr/routes/candidate.py
+++ b/atr/routes/candidate.py
@@ -58,6 +58,8 @@ async def view(session: routes.CommitterSession,
project_name: str, version_name
util.get_unfinished_dir(), project_name, version_name,
release.unwrap_revision_number
)
]
+ # Sort the files by FileStat.path
+ file_stats.sort(key=lambda fs: fs.path)
logging.debug(f"File stats: {file_stats}")
return await quart.render_template(
diff --git a/atr/routes/draft.py b/atr/routes/draft.py
index de196f2..f75104d 100644
--- a/atr/routes/draft.py
+++ b/atr/routes/draft.py
@@ -449,6 +449,8 @@ async def view(session: routes.CommitterSession,
project_name: str, version_name
util.get_unfinished_dir(), project_name, version_name,
release.unwrap_revision_number
)
]
+ # Sort the files by FileStat.path
+ file_stats.sort(key=lambda fs: fs.path)
return await quart.render_template(
# TODO: Move to somewhere appropriate
diff --git a/atr/routes/preview.py b/atr/routes/preview.py
index 73d94f5..9e3d6b2 100644
--- a/atr/routes/preview.py
+++ b/atr/routes/preview.py
@@ -155,6 +155,8 @@ async def view(session: routes.CommitterSession,
project_name: str, version_name
util.get_unfinished_dir(), project_name, version_name,
release.unwrap_revision_number
)
]
+ # Sort the files by FileStat.path
+ file_stats.sort(key=lambda fs: fs.path)
return await quart.render_template(
# TODO: Move to somewhere appropriate
diff --git a/atr/routes/release.py b/atr/routes/release.py
index 85f045e..69b1020 100644
--- a/atr/routes/release.py
+++ b/atr/routes/release.py
@@ -146,6 +146,8 @@ async def view(project_name: str, version_name: str) ->
response.Response | str:
# Convert async generator to list
file_stats = [stat async for stat in
util.content_list(util.get_finished_dir(), project_name, version_name)]
+ # Sort the files by FileStat.path
+ file_stats.sort(key=lambda fs: fs.path)
return await quart.render_template(
# TODO: Move to somewhere appropriate
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]