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-releases.git


The following commit(s) were added to refs/heads/main by this push:
     new fc0667b  Prepare for a more consistent layout of blueprints
fc0667b is described below

commit fc0667b3392fd316b819c7d7de9a3ecb37e916df
Author: Sean B. Palmer <[email protected]>
AuthorDate: Sun Oct 26 16:31:12 2025 +0000

    Prepare for a more consistent layout of blueprints
---
 atr/{blueprints => bps}/__init__.py                            | 6 +++---
 atr/{blueprints => bps}/admin/__init__.py                      | 0
 atr/{blueprints => bps}/admin/admin.py                         | 2 +-
 atr/{blueprints => bps}/admin/templates/all-releases.html      | 0
 atr/{blueprints => bps}/admin/templates/browse-as.html         | 0
 atr/{blueprints => bps}/admin/templates/data-browser.html      | 0
 atr/{blueprints => bps}/admin/templates/delete-release.html    | 0
 atr/{blueprints => bps}/admin/templates/ldap-lookup.html       | 0
 atr/{blueprints => bps}/admin/templates/performance.html       | 0
 atr/{blueprints => bps}/admin/templates/tasks.html             | 0
 atr/{blueprints => bps}/admin/templates/toggle-admin-view.html | 0
 atr/{blueprints => bps}/admin/templates/update-keys.html       | 0
 atr/{blueprints => bps}/admin/templates/update-projects.html   | 0
 atr/{blueprints => bps}/admin/templates/validation.html        | 0
 atr/{blueprints => bps}/api/__init__.py                        | 0
 atr/{blueprints => bps}/api/api.py                             | 2 +-
 atr/{blueprints => bps}/icons.py                               | 0
 atr/docs/overview-of-the-code.html                             | 2 +-
 atr/docs/overview-of-the-code.md                               | 2 +-
 atr/docs/storage-interface.html                                | 2 +-
 atr/docs/storage-interface.md                                  | 2 +-
 atr/server.py                                                  | 4 ++--
 22 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/atr/blueprints/__init__.py b/atr/bps/__init__.py
similarity index 88%
rename from atr/blueprints/__init__.py
rename to atr/bps/__init__.py
index 27605a0..0264e98 100644
--- a/atr/blueprints/__init__.py
+++ b/atr/bps/__init__.py
@@ -19,9 +19,9 @@ import asfquart.base as base
 
 
 def register(app: base.QuartApp) -> None:
-    import atr.blueprints.admin.admin as admin
-    import atr.blueprints.api.api as api
-    import atr.blueprints.icons as icons
+    import atr.bps.admin.admin as admin
+    import atr.bps.api.api as api
+    import atr.bps.icons as icons
 
     app.register_blueprint(admin.admin.BLUEPRINT)
     app.register_blueprint(api.api.BLUEPRINT)
diff --git a/atr/blueprints/admin/__init__.py b/atr/bps/admin/__init__.py
similarity index 100%
rename from atr/blueprints/admin/__init__.py
rename to atr/bps/admin/__init__.py
diff --git a/atr/blueprints/admin/admin.py b/atr/bps/admin/admin.py
similarity index 99%
rename from atr/blueprints/admin/admin.py
rename to atr/bps/admin/admin.py
index e1ffa68..01972c1 100644
--- a/atr/blueprints/admin/admin.py
+++ b/atr/bps/admin/admin.py
@@ -34,7 +34,7 @@ import quart
 import sqlalchemy.orm as orm
 import werkzeug.wrappers.response as response
 
-import atr.blueprints.admin as admin
+import atr.bps.admin as admin
 import atr.config as config
 import atr.datasources.apache as apache
 import atr.db as db
diff --git a/atr/blueprints/admin/templates/all-releases.html 
b/atr/bps/admin/templates/all-releases.html
similarity index 100%
rename from atr/blueprints/admin/templates/all-releases.html
rename to atr/bps/admin/templates/all-releases.html
diff --git a/atr/blueprints/admin/templates/browse-as.html 
b/atr/bps/admin/templates/browse-as.html
similarity index 100%
rename from atr/blueprints/admin/templates/browse-as.html
rename to atr/bps/admin/templates/browse-as.html
diff --git a/atr/blueprints/admin/templates/data-browser.html 
b/atr/bps/admin/templates/data-browser.html
similarity index 100%
rename from atr/blueprints/admin/templates/data-browser.html
rename to atr/bps/admin/templates/data-browser.html
diff --git a/atr/blueprints/admin/templates/delete-release.html 
b/atr/bps/admin/templates/delete-release.html
similarity index 100%
rename from atr/blueprints/admin/templates/delete-release.html
rename to atr/bps/admin/templates/delete-release.html
diff --git a/atr/blueprints/admin/templates/ldap-lookup.html 
b/atr/bps/admin/templates/ldap-lookup.html
similarity index 100%
rename from atr/blueprints/admin/templates/ldap-lookup.html
rename to atr/bps/admin/templates/ldap-lookup.html
diff --git a/atr/blueprints/admin/templates/performance.html 
b/atr/bps/admin/templates/performance.html
similarity index 100%
rename from atr/blueprints/admin/templates/performance.html
rename to atr/bps/admin/templates/performance.html
diff --git a/atr/blueprints/admin/templates/tasks.html 
b/atr/bps/admin/templates/tasks.html
similarity index 100%
rename from atr/blueprints/admin/templates/tasks.html
rename to atr/bps/admin/templates/tasks.html
diff --git a/atr/blueprints/admin/templates/toggle-admin-view.html 
b/atr/bps/admin/templates/toggle-admin-view.html
similarity index 100%
rename from atr/blueprints/admin/templates/toggle-admin-view.html
rename to atr/bps/admin/templates/toggle-admin-view.html
diff --git a/atr/blueprints/admin/templates/update-keys.html 
b/atr/bps/admin/templates/update-keys.html
similarity index 100%
rename from atr/blueprints/admin/templates/update-keys.html
rename to atr/bps/admin/templates/update-keys.html
diff --git a/atr/blueprints/admin/templates/update-projects.html 
b/atr/bps/admin/templates/update-projects.html
similarity index 100%
rename from atr/blueprints/admin/templates/update-projects.html
rename to atr/bps/admin/templates/update-projects.html
diff --git a/atr/blueprints/admin/templates/validation.html 
b/atr/bps/admin/templates/validation.html
similarity index 100%
rename from atr/blueprints/admin/templates/validation.html
rename to atr/bps/admin/templates/validation.html
diff --git a/atr/blueprints/api/__init__.py b/atr/bps/api/__init__.py
similarity index 100%
rename from atr/blueprints/api/__init__.py
rename to atr/bps/api/__init__.py
diff --git a/atr/blueprints/api/api.py b/atr/bps/api/api.py
similarity index 99%
rename from atr/blueprints/api/api.py
rename to atr/bps/api/api.py
index ca371f6..1d78cf8 100644
--- a/atr/blueprints/api/api.py
+++ b/atr/bps/api/api.py
@@ -29,7 +29,7 @@ import sqlalchemy
 import sqlmodel
 import werkzeug.exceptions as exceptions
 
-import atr.blueprints.api as api
+import atr.bps.api as api
 import atr.config as config
 import atr.db as db
 import atr.db.interaction as interaction
diff --git a/atr/blueprints/icons.py b/atr/bps/icons.py
similarity index 100%
rename from atr/blueprints/icons.py
rename to atr/bps/icons.py
diff --git a/atr/docs/overview-of-the-code.html 
b/atr/docs/overview-of-the-code.html
index 86b55db..2dfb08a 100644
--- a/atr/docs/overview-of-the-code.html
+++ b/atr/docs/overview-of-the-code.html
@@ -39,7 +39,7 @@
 <p>The ATR <a href="/ref/atr/worker.py"><code>worker</code></a> module 
implements the workers. Each worker process runs in a loop. It claims the 
oldest queued task from the database, executes it, records the result, and then 
claims the next task atomically using an <code>UPDATE ... WHERE</code> 
statement. After a worker has processed a fixed number of tasks, it exits 
voluntarily to help to avoid memory leaks. The manager then spawns a fresh 
worker to replace it. Task execution happens in [...]
 <p>Tasks themselves are defined in the ATR <a 
href="/ref/atr/tasks/"><code>tasks</code></a> directory. The <a 
href="/ref/atr/tasks/__init__.py"><code>tasks</code></a> module contains 
functions for queueing tasks and resolving task types to their handler 
functions. Task types include operations such as importing keys, generating 
SBOMs, sending messages, and importing files from SVN. The most common category 
of task is automated checks on release artifacts. These checks are implemented 
in  [...]
 <h2 id="api">API</h2>
-<p>The ATR API provides programmatic access to most ATR functionality. API 
endpoints are defined in <a 
href="/ref/atr/blueprints/api/api.py"><code>blueprints.api.api</code></a>, and 
their URL paths are prefixed with <code>/api/</code>. The API uses <a 
href="https://www.openapis.org/";>OpenAPI</a> for documentation, which is 
automatically generated from the endpoint definitions and served at 
<code>/api/docs</code>. Users send requests with a <a 
href="https://en.wikipedia.org/wiki/JSON_Web_ [...]
+<p>The ATR API provides programmatic access to most ATR functionality. API 
endpoints are defined in <a 
href="/ref/atr/bps/api/api.py"><code>bps.api.api</code></a>, and their URL 
paths are prefixed with <code>/api/</code>. The API uses <a 
href="https://www.openapis.org/";>OpenAPI</a> for documentation, which is 
automatically generated from the endpoint definitions and served at 
<code>/api/docs</code>. Users send requests with a <a 
href="https://en.wikipedia.org/wiki/JSON_Web_Token";>JWT</a> [...]
 <p>API request and response models are defined in <a 
href="/ref/atr/models/api.py"><code>models.api</code></a> using Pydantic. Each 
endpoint has an associated request model that validates incoming data, and a 
response model that validates outgoing data. The API returns JSON in all cases, 
with appropriate HTTP status codes.</p>
 <h2 id="other-important-interfaces">Other important interfaces</h2>
 <p>ATR uses ASF OAuth for user login, and then determines what actions each 
user can perform based on their committee memberships. The ATR <a 
href="/ref/atr/principal.py"><code>principal</code></a> module handles 
authorization by checking whether users are members of relevant committees. It 
queries and caches LDAP to get committee membership information. The <a 
href="/ref/atr/principal.py:Authorisation"><code>Authorisation</code></a> class 
provides methods to check whether a user is a me [...]
diff --git a/atr/docs/overview-of-the-code.md b/atr/docs/overview-of-the-code.md
index 3b93c71..b8b9718 100644
--- a/atr/docs/overview-of-the-code.md
+++ b/atr/docs/overview-of-the-code.md
@@ -70,7 +70,7 @@ Tasks themselves are defined in the ATR 
[`tasks`](/ref/atr/tasks/) directory. Th
 
 ## API
 
-The ATR API provides programmatic access to most ATR functionality. API 
endpoints are defined in 
[`blueprints.api.api`](/ref/atr/blueprints/api/api.py), and their URL paths are 
prefixed with `/api/`. The API uses [OpenAPI](https://www.openapis.org/) for 
documentation, which is automatically generated from the endpoint definitions 
and served at `/api/docs`. Users send requests with a 
[JWT](https://en.wikipedia.org/wiki/JSON_Web_Token) created from a 
[PAT](https://en.wikipedia.org/wiki/Per [...]
+The ATR API provides programmatic access to most ATR functionality. API 
endpoints are defined in [`bps.api.api`](/ref/atr/bps/api/api.py), and their 
URL paths are prefixed with `/api/`. The API uses 
[OpenAPI](https://www.openapis.org/) for documentation, which is automatically 
generated from the endpoint definitions and served at `/api/docs`. Users send 
requests with a [JWT](https://en.wikipedia.org/wiki/JSON_Web_Token) created 
from a [PAT](https://en.wikipedia.org/wiki/Personal_access_t [...]
 
 API request and response models are defined in 
[`models.api`](/ref/atr/models/api.py) using Pydantic. Each endpoint has an 
associated request model that validates incoming data, and a response model 
that validates outgoing data. The API returns JSON in all cases, with 
appropriate HTTP status codes.
 
diff --git a/atr/docs/storage-interface.html b/atr/docs/storage-interface.html
index 26792a5..539ccd5 100644
--- a/atr/docs/storage-interface.html
+++ b/atr/docs/storage-interface.html
@@ -26,7 +26,7 @@
 <p>The <code>wacp</code> object, short for <code>w</code>rite <code>a</code>s 
<code>c</code>ommittee <code>p</code>articipant, provides access to 
domain-specific writers: <code>announce</code>, <code>checks</code>, 
<code>distributions</code>, <code>keys</code>, <code>policy</code>, 
<code>project</code>, <code>release</code>, <code>sbom</code>, 
<code>ssh</code>, <code>tokens</code>, and <code>vote</code>.</p>
 <p>The write session takes an optional <a 
href="/ref/atr/route.py:CommitterSession"><code>CommitterSession</code></a> or 
ASF UID, typically <code>session.uid</code> from the logged-in user. If you 
omit the UID, the session determines it automatically from the current request 
context. The write object checks LDAP memberships and raises <a 
href="/ref/atr/storage/__init__.py:AccessError"><code>storage.AccessError</code></a>
 if the user is not authorized for the requested permission level.</p>
 <p>Because projects belong to committees, we provide <a 
href="/ref/atr/storage/__init__.py:as_project_committee_member"><code>write.as_project_committee_member(project_name)</code></a>
 and <a 
href="/ref/atr/storage/__init__.py:as_project_committee_participant"><code>write.as_project_committee_participant(project_name)</code></a>,
 which look up the project's committee and authenticate the user as a member or 
participant of that committee. This is convenient when, for example, the URL 
prov [...]
-<p>Here is a more complete example from <a 
href="/ref/atr/blueprints/api/api.py"><code>blueprints/api/api.py</code></a> 
that shows the classic three step pattern:</p>
+<p>Here is a more complete example from <a 
href="/ref/atr/bps/api/api.py"><code>bps/api/api.py</code></a> that shows the 
classic three step pattern:</p>
 <pre><code class="language-python">async with storage.write(asf_uid) as write:
     # 1. Request permissions
     wafc = write.as_foundation_committer()
diff --git a/atr/docs/storage-interface.md b/atr/docs/storage-interface.md
index d2def41..675b876 100644
--- a/atr/docs/storage-interface.md
+++ b/atr/docs/storage-interface.md
@@ -43,7 +43,7 @@ The write session takes an optional 
[`CommitterSession`](/ref/atr/route.py:Commi
 
 Because projects belong to committees, we provide 
[`write.as_project_committee_member(project_name)`](/ref/atr/storage/__init__.py:as_project_committee_member)
 and 
[`write.as_project_committee_participant(project_name)`](/ref/atr/storage/__init__.py:as_project_committee_participant),
 which look up the project's committee and authenticate the user as a member or 
participant of that committee. This is convenient when, for example, the URL 
provides a project name.
 
-Here is a more complete example from 
[`blueprints/api/api.py`](/ref/atr/blueprints/api/api.py) that shows the 
classic three step pattern:
+Here is a more complete example from 
[`bps/api/api.py`](/ref/atr/bps/api/api.py) that shows the classic three step 
pattern:
 
 ```python
 async with storage.write(asf_uid) as write:
diff --git a/atr/server.py b/atr/server.py
index fb20bab..eba1715 100644
--- a/atr/server.py
+++ b/atr/server.py
@@ -38,7 +38,7 @@ import rich.logging as rich_logging
 import werkzeug.routing as routing
 
 import atr
-import atr.blueprints as blueprints
+import atr.bps as bps
 import atr.config as config
 import atr.db as db
 import atr.db.interaction as interaction
@@ -290,7 +290,7 @@ def create_app(app_config: type[config.AppConfig]) -> 
base.QuartApp:
     quart_wtf.CSRFProtect(app)
     db.init_database(app)
     register_routes(app)
-    blueprints.register(app)
+    bps.register(app)
     filters.register_filters(app)
     app_setup_context(app)
     app_setup_lifecycle(app)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to