This is an automated email from the ASF dual-hosted git repository.
tn 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 df5d1b6 indicate if projects are retired
df5d1b6 is described below
commit df5d1b6ca2aee79bb35dbae6c251b1ac30fe82b4
Author: Thomas Neidhart <[email protected]>
AuthorDate: Fri Mar 21 17:20:21 2025 +0100
indicate if projects are retired
---
atr/blueprints/admin/admin.py | 5 +++++
atr/db/models.py | 1 +
atr/routes/projects.py | 2 +-
atr/templates/project-directory.html | 2 +-
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/atr/blueprints/admin/admin.py b/atr/blueprints/admin/admin.py
index 1f839e5..9bf3ac9 100644
--- a/atr/blueprints/admin/admin.py
+++ b/atr/blueprints/admin/admin.py
@@ -295,6 +295,11 @@ async def _update_committees() -> tuple[int, int]: #
noqa: C901
project_model.description = project_status.description
project_model.programming_languages =
project_status.programming_language
+ # TODO: find a better way to declare a project retired
+ # right now we assume that a project is retired if its
assigned to the attic PMC
+ # maybe make that information configurable
+ project_model.is_retired = pmc.name == "attic"
+
# Add special entry for Tooling PMC
# Not clear why, but it's not in the Whimsy data
tooling_committee = await data.committee(name="tooling").get()
diff --git a/atr/db/models.py b/atr/db/models.py
index 6ce9d97..93261e8 100644
--- a/atr/db/models.py
+++ b/atr/db/models.py
@@ -127,6 +127,7 @@ class Project(sqlmodel.SQLModel, table=True):
# True if this a podling project
# TODO: We should have this on Committee too, or instead
is_podling: bool = sqlmodel.Field(default=False)
+ is_retired: bool = sqlmodel.Field(default=False)
description: str | None = sqlmodel.Field(default=None)
category: str | None = sqlmodel.Field(default=None)
diff --git a/atr/routes/projects.py b/atr/routes/projects.py
index 07b369d..f9862f8 100644
--- a/atr/routes/projects.py
+++ b/atr/routes/projects.py
@@ -81,7 +81,7 @@ async def add_voting_policy(session: session.ClientSession,
form: CreateVotePoli
async def root_project_directory() -> str:
"""Main project directory page."""
async with db.session() as data:
- projects = await
data.project(_committee=True).order_by(models.Project.name).all()
+ projects = await
data.project(_committee=True).order_by(models.Project.full_name).all()
return await quart.render_template("project-directory.html",
projects=projects)
diff --git a/atr/templates/project-directory.html
b/atr/templates/project-directory.html
index ea25618..2b1fdd5 100644
--- a/atr/templates/project-directory.html
+++ b/atr/templates/project-directory.html
@@ -26,7 +26,7 @@
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 g-4">
{% for project in projects %}
<div class="col">
- <div class="card h-100 shadow-sm atr-cursor-pointer hover-lift
project-card"
+ <div class="card h-100 shadow-sm atr-cursor-pointer hover-lift
project-card {{ 'bg-body-secondary' if project.is_retired else '' }}"
data-project-url="{{ url_for('root_project_view',
name=project.name) }}">
<div class="card-body">
<h3 class="card-title fs-4 mb-3">{{ project.display_name }}</h3>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]