Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ repos:
- --if-source-changed
- --keep-source-digest
- --convert-fragments-to-markdown
manual: true
stages: [manual]
- id: oca-gen-external-dependencies
manual: true
stages: [manual]
- id: oca-gen-addons-table
- repo: https://github.com/OCA/odoo-pre-commit-hooks
rev: v0.1.7
Expand Down
25 changes: 22 additions & 3 deletions scripts/detect_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from pathlib import Path

# Critical modules that should always be tested on PRs
CRITICAL_MODULES = {"spp_security", "spp_registry", "spp_programs", "spp_base_common"}
CRITICAL_MODULES = {"spp_security", "spp_registry", "spp_programs", "spp_base_common", "spp_demo"}


def parse_manifest(manifest_path: Path) -> dict:
Expand Down Expand Up @@ -107,12 +107,31 @@ def get_impacted_modules(
return impacted


def is_code_relevant(file_path: str) -> bool:
"""Check if a changed file is relevant for testing (not just docs/static)."""
p = Path(file_path)
parts = p.parts
# Skip top-level README (auto-generated)
if p.name == "README.rst":
return False
# Skip readme fragments directory
if len(parts) > 1 and parts[1] == "readme":
return False
# Skip static/description (auto-generated index.html, icons, etc.)
if len(parts) > 2 and parts[1] == "static" and parts[2] == "description":
return False
return True


def extract_modules_from_files(changed_files: list[str], all_modules: set[str]) -> set[str]:
"""Extract module names from changed file paths."""
"""Extract module names from changed file paths.

Only considers code-relevant files (ignores READMEs, static descriptions).
"""
modules: set[str] = set()
for file_path in changed_files:
parts = Path(file_path).parts
if parts and parts[0] in all_modules:
if parts and parts[0] in all_modules and is_code_relevant(file_path):
modules.add(parts[0])
return modules

Expand Down
18 changes: 9 additions & 9 deletions spp_alerts/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ Key Capabilities
Key Models
~~~~~~~~~~

+--------------------+-------------------------------------------------+
| Model | Description |
+====================+=================================================+
| ``spp.alert`` | Alert instance with state tracking and |
| | resolution workflow |
+--------------------+-------------------------------------------------+
| ``spp.alert.rule`` | Rule configuration for monitoring criteria and |
| | thresholds |
+--------------------+-------------------------------------------------+
+--------------------+------------------------------------------------+
| Model | Description |
+====================+================================================+
| ``spp.alert`` | Alert instance with state tracking and |
| | resolution workflow |
+--------------------+------------------------------------------------+
| ``spp.alert.rule`` | Rule configuration for monitoring criteria and |
| | thresholds |
+--------------------+------------------------------------------------+

Configuration
~~~~~~~~~~~~~
Expand Down
64 changes: 32 additions & 32 deletions spp_api_v2/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,24 @@ Key Capabilities
Key Models
----------

+---------------------------+------------------------------------------+
| Model | Description |
+===========================+==========================================+
| ``spp.api.client`` | OAuth 2.0 credentials, organization |
| | verification |
+---------------------------+------------------------------------------+
| ``spp.api.client.scope`` | Resource/action permissions |
+---------------------------+------------------------------------------+
| ``spp.api.path`` | Endpoint configuration and filters |
+---------------------------+------------------------------------------+
| ``spp.api.path.filter`` | Field-level filter configurations |
+---------------------------+------------------------------------------+
| ``spp.api.filter.preset`` | Saved filter combinations |
+---------------------------+------------------------------------------+
| ``spp.api.extension`` | Domain field registry |
+---------------------------+------------------------------------------+
| ``spp.consent.scope`` | Resource types per consent |
+---------------------------+------------------------------------------+
+---------------------------+-----------------------------------------+
| Model | Description |
+===========================+=========================================+
| ``spp.api.client`` | OAuth 2.0 credentials, organization |
| | verification |
+---------------------------+-----------------------------------------+
| ``spp.api.client.scope`` | Resource/action permissions |
+---------------------------+-----------------------------------------+
| ``spp.api.path`` | Endpoint configuration and filters |
+---------------------------+-----------------------------------------+
| ``spp.api.path.filter`` | Field-level filter configurations |
+---------------------------+-----------------------------------------+
| ``spp.api.filter.preset`` | Saved filter combinations |
+---------------------------+-----------------------------------------+
| ``spp.api.extension`` | Domain field registry |
+---------------------------+-----------------------------------------+
| ``spp.consent.scope`` | Resource types per consent |
+---------------------------+-----------------------------------------+

UI Location
-----------
Expand Down Expand Up @@ -110,20 +110,20 @@ API endpoints available at ``/api/v2/`` (token endpoint:
Security
--------

+--------------------------+-------------------------------------------+
| Group | Access |
+==========================+===========================================+
| ``group_api_v2_viewer`` | Read-only: all API configuration and |
| | consent |
+--------------------------+-------------------------------------------+
| ``group_api_v2_officer`` | Read/Write: all models (no |
| | create/delete), full CRUD on consent |
| | scopes |
+--------------------------+-------------------------------------------+
| ``group_api_v2_manager`` | Full CRUD: clients, scopes, paths, |
| | filters, presets, extensions; |
| | Read/Write/Create on consent (no delete) |
+--------------------------+-------------------------------------------+
+--------------------------+------------------------------------------+
| Group | Access |
+==========================+==========================================+
| ``group_api_v2_viewer`` | Read-only: all API configuration and |
| | consent |
+--------------------------+------------------------------------------+
| ``group_api_v2_officer`` | Read/Write: all models (no |
| | create/delete), full CRUD on consent |
| | scopes |
+--------------------------+------------------------------------------+
| ``group_api_v2_manager`` | Full CRUD: clients, scopes, paths, |
| | filters, presets, extensions; |
| | Read/Write/Create on consent (no delete) |
+--------------------------+------------------------------------------+

Extension Points
----------------
Expand Down
4 changes: 2 additions & 2 deletions spp_api_v2/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ <h1>Key Capabilities</h1>
<h1>Key Models</h1>
<table border="1" class="docutils">
<colgroup>
<col width="39%" />
<col width="61%" />
<col width="40%" />
<col width="60%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Model</th>
Expand Down
26 changes: 13 additions & 13 deletions spp_api_v2_change_request/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@ Key Models

This module extends existing models and does not define new ones.

+-----------------------------+----------------------------------------+
| Model | Usage |
+=============================+========================================+
| ``fastapi.endpoint`` | Extended to register ChangeRequest |
| | router with API V2 |
+-----------------------------+----------------------------------------+
| ``spp.change.request`` | CRUD operations via REST API |
+-----------------------------+----------------------------------------+
| ``spp.change.request.type`` | Looked up by code in create requests |
+-----------------------------+----------------------------------------+
| ``spp.registry.id`` | Used to resolve registrant identifiers |
| | (system|value) |
+-----------------------------+----------------------------------------+
+-----------------------------+---------------------------------------+
| Model | Usage |
+=============================+=======================================+
| ``fastapi.endpoint`` | Extended to register ChangeRequest |
| | router with API V2 |
+-----------------------------+---------------------------------------+
| ``spp.change.request`` | CRUD operations via REST API |
+-----------------------------+---------------------------------------+
| ``spp.change.request.type`` | Looked up by code in create requests |
+-----------------------------+---------------------------------------+
| ``spp.registry.id`` | Used to resolve registrant |
| | identifiers (system|value) |
+-----------------------------+---------------------------------------+

Configuration
~~~~~~~~~~~~~
Expand Down
8 changes: 4 additions & 4 deletions spp_api_v2_change_request/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ <h1>Key Models</h1>
<p>This module extends existing models and does not define new ones.</p>
<table border="1" class="docutils">
<colgroup>
<col width="42%" />
<col width="58%" />
<col width="43%" />
<col width="57%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Model</th>
Expand All @@ -415,8 +415,8 @@ <h1>Key Models</h1>
<td>Looked up by code in create requests</td>
</tr>
<tr><td><tt class="docutils literal">spp.registry.id</tt></td>
<td>Used to resolve registrant identifiers
(system|value)</td>
<td>Used to resolve registrant
identifiers (system|value)</td>
</tr>
</tbody>
</table>
Expand Down
18 changes: 9 additions & 9 deletions spp_api_v2_entitlements/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ Key Capabilities
Key Models
~~~~~~~~~~

+--------------------------+-------------------------------------------+
| Model | Description |
+==========================+===========================================+
| ``spp.api.client.scope`` | Extended to add ``entitlement`` as |
| | resource type |
+--------------------------+-------------------------------------------+
| ``fastapi.endpoint`` | Extended to register entitlement router |
| | for ``api_v2`` app |
+--------------------------+-------------------------------------------+
+--------------------------+------------------------------------------+
| Model | Description |
+==========================+==========================================+
| ``spp.api.client.scope`` | Extended to add ``entitlement`` as |
| | resource type |
+--------------------------+------------------------------------------+
| ``fastapi.endpoint`` | Extended to register entitlement router |
| | for ``api_v2`` app |
+--------------------------+------------------------------------------+

Configuration
~~~~~~~~~~~~~
Expand Down
18 changes: 9 additions & 9 deletions spp_api_v2_products/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ Key Models

This module extends existing models rather than introducing new ones:

+--------------------------+-------------------------------------------+
| Model | Extension |
+==========================+===========================================+
| ``spp.api.client.scope`` | Adds "product" resource type for scope |
| | management |
+--------------------------+-------------------------------------------+
| ``fastapi.endpoint`` | Registers Product, ProductCategory, UoM |
| | routers |
+--------------------------+-------------------------------------------+
+--------------------------+------------------------------------------+
| Model | Extension |
+==========================+==========================================+
| ``spp.api.client.scope`` | Adds "product" resource type for scope |
| | management |
+--------------------------+------------------------------------------+
| ``fastapi.endpoint`` | Registers Product, ProductCategory, UoM |
| | routers |
+--------------------------+------------------------------------------+

Configuration
~~~~~~~~~~~~~
Expand Down
18 changes: 9 additions & 9 deletions spp_api_v2_service_points/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ Extended Models

This module extends existing models from dependencies:

+--------------------------+-------------------------------------------+
| Model | Description |
+==========================+===========================================+
| ``spp.api.client.scope`` | Extended to add "service_point" resource |
| | type for OAuth scopes |
+--------------------------+-------------------------------------------+
| ``fastapi.endpoint`` | Extended to register Service Point router |
| | in API V2 app |
+--------------------------+-------------------------------------------+
+--------------------------+------------------------------------------+
| Model | Description |
+==========================+==========================================+
| ``spp.api.client.scope`` | Extended to add "service_point" resource |
| | type for OAuth scopes |
+--------------------------+------------------------------------------+
| ``fastapi.endpoint`` | Extended to register Service Point |
| | router in API V2 app |
+--------------------------+------------------------------------------+

Configuration
~~~~~~~~~~~~~
Expand Down
4 changes: 2 additions & 2 deletions spp_api_v2_service_points/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,8 @@ <h1>Extended Models</h1>
type for OAuth scopes</td>
</tr>
<tr><td><tt class="docutils literal">fastapi.endpoint</tt></td>
<td>Extended to register Service Point router
in API V2 app</td>
<td>Extended to register Service Point
router in API V2 app</td>
</tr>
</tbody>
</table>
Expand Down
28 changes: 14 additions & 14 deletions spp_api_v2_vocabulary/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,20 @@ Key Capabilities
Key Models
~~~~~~~~~~

+--------------------------+-------------------------------------------+
| Model | Description |
+==========================+===========================================+
| ``spp.vocabulary`` | Vocabulary definitions exposed via GET |
| | endpoints |
+--------------------------+-------------------------------------------+
| ``spp.vocabulary.code`` | Individual codes within vocabularies |
+--------------------------+-------------------------------------------+
| ``spp.api.client.scope`` | Extended to add "vocabulary" resource |
| | type for OAuth |
+--------------------------+-------------------------------------------+
| ``fastapi.endpoint`` | Extended to register Vocabulary router in |
| | API V2 |
+--------------------------+-------------------------------------------+
+--------------------------+------------------------------------------+
| Model | Description |
+==========================+==========================================+
| ``spp.vocabulary`` | Vocabulary definitions exposed via GET |
| | endpoints |
+--------------------------+------------------------------------------+
| ``spp.vocabulary.code`` | Individual codes within vocabularies |
+--------------------------+------------------------------------------+
| ``spp.api.client.scope`` | Extended to add "vocabulary" resource |
| | type for OAuth |
+--------------------------+------------------------------------------+
| ``fastapi.endpoint`` | Extended to register Vocabulary router |
| | in API V2 |
+--------------------------+------------------------------------------+

API Endpoints
~~~~~~~~~~~~~
Expand Down
4 changes: 2 additions & 2 deletions spp_api_v2_vocabulary/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,8 @@ <h1>Key Models</h1>
type for OAuth</td>
</tr>
<tr><td><tt class="docutils literal">fastapi.endpoint</tt></td>
<td>Extended to register Vocabulary router in
API V2</td>
<td>Extended to register Vocabulary router
in API V2</td>
</tr>
</tbody>
</table>
Expand Down
Loading
Loading