Skip to content

Commit 46ff1e4

Browse files
committed
docs: update codeboarding architecture documentation
## πŸ“š Architecture Documentation Update This commit contains updated documentation files fetched from the CodeBoarding service and copied to the architecture documentation section. ### πŸ“Š Summary - Documentation files created/updated: 7 - JSON files created/updated: 8 - Documentation directory: .codeboarding/ - JSON directory: .codeboarding/ - Output format: .md - Repository analyzed: https://github.com/CodeBoarding/friendli-python - Destination: docs/architecture/ The generated .md files have been automatically copied to the architecture documentation section and referenced in on_boarding.md. πŸ€– This commit was automatically generated by the CodeBoarding documentation update workflow.
1 parent b40eabd commit 46ff1e4

22 files changed

+287
-129
lines changed

β€Ž.codeboarding/Data_Models_Error_Handling.jsonβ€Ž

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
"reference_start_line": 1,
1212
"reference_end_line": 1
1313
}
14-
],
15-
"can_expand": true
14+
]
1615
},
1716
{
1817
"name": "Service Modules",
@@ -42,8 +41,7 @@
4241
"reference_start_line": null,
4342
"reference_end_line": null
4443
}
45-
],
46-
"can_expand": true
44+
]
4745
},
4846
{
4947
"name": "Data Models & Error Handling",
@@ -61,8 +59,7 @@
6159
"reference_start_line": 1,
6260
"reference_end_line": 1
6361
}
64-
],
65-
"can_expand": true
62+
]
6663
},
6764
{
6865
"name": "Utility Functions",
@@ -74,8 +71,7 @@
7471
"reference_start_line": 1,
7572
"reference_end_line": 1
7673
}
77-
],
78-
"can_expand": false
74+
]
7975
},
8076
{
8177
"name": "Examples and Documentation",
@@ -93,8 +89,7 @@
9389
"reference_start_line": 1,
9490
"reference_end_line": 1
9591
}
96-
],
97-
"can_expand": false
92+
]
9893
}
9994
],
10095
"components_relations": [

β€Ž.codeboarding/Data_Models_Error_Handling.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ graph LR
1313
Examples_and_Documentation -- "showcases usage of" --> Core_Client
1414
Examples_and_Documentation -- "showcases usage of" --> Service_Modules
1515
Examples_and_Documentation -- "relies on" --> Data_Models_Error_Handling
16-
click Service_Modules href "https://github.com/friendliai/friendli-python/blob/main/.codeboarding/Service_Modules.md" "Details"
17-
click Data_Models_Error_Handling href "https://github.com/friendliai/friendli-python/blob/main/.codeboarding/Data_Models_Error_Handling.md" "Details"
16+
click Service_Modules href "https://github.com/CodeBoarding/friendli-python/blob/main/.codeboarding/Service_Modules.md" "Details"
17+
click Data_Models_Error_Handling href "https://github.com/CodeBoarding/friendli-python/blob/main/.codeboarding/Data_Models_Error_Handling.md" "Details"
1818
```
1919

2020
[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org)

β€Ž.codeboarding/Friendli_Client_Public_API_.jsonβ€Ž

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
"reference_start_line": null,
1212
"reference_end_line": null
1313
}
14-
],
15-
"can_expand": true
14+
]
1615
},
1716
{
1817
"name": "Service Modules",
@@ -42,8 +41,7 @@
4241
"reference_start_line": null,
4342
"reference_end_line": null
4443
}
45-
],
46-
"can_expand": true
44+
]
4745
},
4846
{
4947
"name": "Data Models",
@@ -55,8 +53,7 @@
5553
"reference_start_line": 1,
5654
"reference_end_line": 1
5755
}
58-
],
59-
"can_expand": false
56+
]
6057
},
6158
{
6259
"name": "HTTP Client/Transport Layer",
@@ -68,8 +65,7 @@
6865
"reference_start_line": 1,
6966
"reference_end_line": 1
7067
}
71-
],
72-
"can_expand": true
68+
]
7369
},
7470
{
7571
"name": "Error Handling",
@@ -81,8 +77,7 @@
8177
"reference_start_line": 1,
8278
"reference_end_line": 1
8379
}
84-
],
85-
"can_expand": true
80+
]
8681
},
8782
{
8883
"name": "Configuration Management",
@@ -94,8 +89,7 @@
9489
"reference_start_line": 1,
9590
"reference_end_line": 1
9691
}
97-
],
98-
"can_expand": false
92+
]
9993
},
10094
{
10195
"name": "Utility Functions",
@@ -107,8 +101,7 @@
107101
"reference_start_line": 1,
108102
"reference_end_line": 1
109103
}
110-
],
111-
"can_expand": true
104+
]
112105
}
113106
],
114107
"components_relations": [

β€Ž.codeboarding/Friendli_Client_Public_API_.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ graph LR
1717
Service_Modules -- "uses" --> Utility_Functions
1818
HTTP_Client_Transport_Layer -- "uses" --> Configuration_Management
1919
HTTP_Client_Transport_Layer -- "uses" --> Error_Handling
20-
click Service_Modules href "https://github.com/friendliai/friendli-python/blob/main/.codeboarding/Service_Modules.md" "Details"
21-
click Error_Handling href "https://github.com/friendliai/friendli-python/blob/main/.codeboarding/Error_Handling.md" "Details"
20+
click Service_Modules href "https://github.com/CodeBoarding/friendli-python/blob/main/.codeboarding/Service_Modules.md" "Details"
21+
click Error_Handling href "https://github.com/CodeBoarding/friendli-python/blob/main/.codeboarding/Error_Handling.md" "Details"
2222
```
2323

2424
[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org)
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
{
2+
"description": "Offers an extensible mechanism for injecting custom logic at various stages of the request/response lifecycle, allowing for pre-processing, post-processing, and error handling customization.",
3+
"components": [
4+
{
5+
"name": "Hook Contexts (DTOs)",
6+
"description": "A set of specialized Data Transfer Objects (DTOs) that encapsulate and pass relevant data and state through different stages of the API request/response lifecycle. These contexts provide the necessary information for hooks to operate on.",
7+
"referenced_source_code": [
8+
{
9+
"qualified_name": "friendli_core._hooks.types.HookContext",
10+
"reference_file": "/mnt/e/StartUp/friendli-python/src/friendli_core/_hooks/types.py",
11+
"reference_start_line": 11,
12+
"reference_end_line": 30
13+
},
14+
{
15+
"qualified_name": "friendli_core._hooks.types.BeforeRequestContext",
16+
"reference_file": "/mnt/e/StartUp/friendli-python/src/friendli_core/_hooks/types.py",
17+
"reference_start_line": 33,
18+
"reference_end_line": 41
19+
},
20+
{
21+
"qualified_name": "friendli_core._hooks.types.AfterSuccessContext",
22+
"reference_file": "/mnt/e/StartUp/friendli-python/src/friendli_core/_hooks/types.py",
23+
"reference_start_line": 44,
24+
"reference_end_line": 52
25+
},
26+
{
27+
"qualified_name": "friendli_core._hooks.types.AfterErrorContext",
28+
"reference_file": "/mnt/e/StartUp/friendli-python/src/friendli_core/_hooks/types.py",
29+
"reference_start_line": 55,
30+
"reference_end_line": 63
31+
}
32+
],
33+
"can_expand": false
34+
},
35+
{
36+
"name": "Hook Interface",
37+
"description": "Defines the abstract interface or base class that custom hooks must implement. It establishes the contract for various hook methods (e.g., `before_request`, `after_success`, `after_error`), ensuring a consistent extensibility point for SDK users.",
38+
"referenced_source_code": [
39+
{
40+
"qualified_name": "friendli_core._hooks.types.Hooks",
41+
"reference_file": "/mnt/e/StartUp/friendli-python/src/friendli_core/_hooks/types.py",
42+
"reference_start_line": 99,
43+
"reference_end_line": 114
44+
}
45+
],
46+
"can_expand": false
47+
},
48+
{
49+
"name": "SDK Hooks Orchestrator",
50+
"description": "The central manager responsible for registering, storing, and orchestrating the execution of various custom hooks at the appropriate stages of the SDK's request/response lifecycle. It acts as a facade for the entire hooks mechanism.",
51+
"referenced_source_code": [
52+
{
53+
"qualified_name": "friendli_core._hooks.sdkhooks.SDKHooks",
54+
"reference_file": "/mnt/e/StartUp/friendli-python/src/friendli_core/_hooks/sdkhooks.py",
55+
"reference_start_line": 21,
56+
"reference_end_line": 78
57+
}
58+
],
59+
"can_expand": true
60+
}
61+
],
62+
"components_relations": [
63+
{
64+
"relation": "provides data to",
65+
"src_name": "Hook Contexts (DTOs)",
66+
"dst_name": "Hook Interface"
67+
},
68+
{
69+
"relation": "interacts with",
70+
"src_name": "SDK Hooks Orchestrator",
71+
"dst_name": "Hook Contexts (DTOs)"
72+
},
73+
{
74+
"relation": "orchestrates",
75+
"src_name": "SDK Hooks Orchestrator",
76+
"dst_name": "Hook Interface"
77+
},
78+
{
79+
"relation": "receives",
80+
"src_name": "Hook Interface",
81+
"dst_name": "Hook Contexts (DTOs)"
82+
}
83+
]
84+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
```mermaid
2+
graph LR
3+
Hook_Contexts_DTOs_["Hook Contexts (DTOs)"]
4+
Hook_Interface["Hook Interface"]
5+
SDK_Hooks_Orchestrator["SDK Hooks Orchestrator"]
6+
Hook_Contexts_DTOs_ -- "provides data to" --> Hook_Interface
7+
SDK_Hooks_Orchestrator -- "interacts with" --> Hook_Contexts_DTOs_
8+
SDK_Hooks_Orchestrator -- "orchestrates" --> Hook_Interface
9+
Hook_Interface -- "receives" --> Hook_Contexts_DTOs_
10+
```
11+
12+
[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org)
13+
14+
## Details
15+
16+
Offers an extensible mechanism for injecting custom logic at various stages of the request/response lifecycle, allowing for pre-processing, post-processing, and error handling customization.
17+
18+
### Hook Contexts (DTOs)
19+
A set of specialized Data Transfer Objects (DTOs) that encapsulate and pass relevant data and state through different stages of the API request/response lifecycle. These contexts provide the necessary information for hooks to operate on.
20+
21+
22+
**Related Classes/Methods**:
23+
24+
- <a href="https://github.com/CodeBoarding/friendli-python/blob/main/src/friendli_core/_hooks/types.py#L11-L30" target="_blank" rel="noopener noreferrer">`friendli_core._hooks.types.HookContext` (11:30)</a>
25+
- <a href="https://github.com/CodeBoarding/friendli-python/blob/main/src/friendli_core/_hooks/types.py#L33-L41" target="_blank" rel="noopener noreferrer">`friendli_core._hooks.types.BeforeRequestContext` (33:41)</a>
26+
- <a href="https://github.com/CodeBoarding/friendli-python/blob/main/src/friendli_core/_hooks/types.py#L44-L52" target="_blank" rel="noopener noreferrer">`friendli_core._hooks.types.AfterSuccessContext` (44:52)</a>
27+
- <a href="https://github.com/CodeBoarding/friendli-python/blob/main/src/friendli_core/_hooks/types.py#L55-L63" target="_blank" rel="noopener noreferrer">`friendli_core._hooks.types.AfterErrorContext` (55:63)</a>
28+
29+
30+
### Hook Interface
31+
Defines the abstract interface or base class that custom hooks must implement. It establishes the contract for various hook methods (e.g., `before_request`, `after_success`, `after_error`), ensuring a consistent extensibility point for SDK users.
32+
33+
34+
**Related Classes/Methods**:
35+
36+
- <a href="https://github.com/CodeBoarding/friendli-python/blob/main/src/friendli_core/_hooks/types.py#L99-L114" target="_blank" rel="noopener noreferrer">`friendli_core._hooks.types.Hooks` (99:114)</a>
37+
38+
39+
### SDK Hooks Orchestrator
40+
The central manager responsible for registering, storing, and orchestrating the execution of various custom hooks at the appropriate stages of the SDK's request/response lifecycle. It acts as a facade for the entire hooks mechanism.
41+
42+
43+
**Related Classes/Methods**:
44+
45+
- <a href="https://github.com/CodeBoarding/friendli-python/blob/main/src/friendli_core/_hooks/sdkhooks.py#L21-L78" target="_blank" rel="noopener noreferrer">`friendli_core._hooks.sdkhooks.SDKHooks` (21:78)</a>
46+
47+
48+
49+
50+
### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq)

β€Ž.codeboarding/Platform_Abstractions.jsonβ€Ž

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
"reference_start_line": 19,
1212
"reference_end_line": 106
1313
}
14-
],
15-
"can_expand": true
14+
]
1615
},
1716
{
1817
"name": "Dedicated Client",
@@ -36,8 +35,7 @@
3635
"reference_start_line": 52,
3736
"reference_end_line": 66
3837
}
39-
],
40-
"can_expand": true
38+
]
4139
},
4240
{
4341
"name": "Serverless Client",
@@ -61,8 +59,7 @@
6159
"reference_start_line": 52,
6260
"reference_end_line": 68
6361
}
64-
],
65-
"can_expand": true
62+
]
6663
}
6764
],
6865
"components_relations": [

β€Ž.codeboarding/Platform_Abstractions.mdβ€Ž

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ graph LR
55
Serverless_Client["Serverless Client"]
66
Dedicated_Client -- "implements" --> Platform_Abstractions
77
Serverless_Client -- "implements" --> Platform_Abstractions
8-
click Platform_Abstractions href "https://github.com/friendliai/friendli-python/blob/main/.codeboarding/Platform_Abstractions.md" "Details"
8+
click Platform_Abstractions href "https://github.com/CodeBoarding/friendli-python/blob/main/.codeboarding/Platform_Abstractions.md" "Details"
99
```
1010

1111
[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org)
@@ -20,7 +20,7 @@ Defines the foundational base structures and interfaces that enable the SDK to a
2020

2121
**Related Classes/Methods**:
2222

23-
- <a href="https://github.com/friendliai/friendli-python/blob/main/src/friendli_core/basesdk.py#L19-L106" target="_blank" rel="noopener noreferrer">`friendli_core.basesdk:BaseSDK` (19:106)</a>
23+
- <a href="https://github.com/CodeBoarding/friendli-python/blob/main/src/friendli_core/basesdk.py#L19-L106" target="_blank" rel="noopener noreferrer">`friendli_core.basesdk:BaseSDK` (19:106)</a>
2424

2525

2626
### Dedicated Client
@@ -29,9 +29,9 @@ A concrete implementation of the `Platform Abstractions` tailored specifically f
2929

3030
**Related Classes/Methods**:
3131

32-
- <a href="https://github.com/friendliai/friendli-python/blob/main/src/friendli_core/dedicated.py#L24-L32" target="_blank" rel="noopener noreferrer">`friendli_core.dedicated:BaseDedicated` (24:32)</a>
33-
- <a href="https://github.com/friendliai/friendli-python/blob/main/src/friendli_core/dedicated.py#L35-L49" target="_blank" rel="noopener noreferrer">`friendli_core.dedicated:SyncDedicated` (35:49)</a>
34-
- <a href="https://github.com/friendliai/friendli-python/blob/main/src/friendli_core/dedicated.py#L52-L66" target="_blank" rel="noopener noreferrer">`friendli_core.dedicated:AsyncDedicated` (52:66)</a>
32+
- <a href="https://github.com/CodeBoarding/friendli-python/blob/main/src/friendli_core/dedicated.py#L24-L32" target="_blank" rel="noopener noreferrer">`friendli_core.dedicated:BaseDedicated` (24:32)</a>
33+
- <a href="https://github.com/CodeBoarding/friendli-python/blob/main/src/friendli_core/dedicated.py#L35-L49" target="_blank" rel="noopener noreferrer">`friendli_core.dedicated:SyncDedicated` (35:49)</a>
34+
- <a href="https://github.com/CodeBoarding/friendli-python/blob/main/src/friendli_core/dedicated.py#L52-L66" target="_blank" rel="noopener noreferrer">`friendli_core.dedicated:AsyncDedicated` (52:66)</a>
3535

3636

3737
### Serverless Client
@@ -40,9 +40,9 @@ A concrete implementation of the `Platform Abstractions` designed for interactin
4040

4141
**Related Classes/Methods**:
4242

43-
- <a href="https://github.com/friendliai/friendli-python/blob/main/src/friendli_core/serverless.py#L24-L32" target="_blank" rel="noopener noreferrer">`friendli_core.serverless:BaseServerless` (24:32)</a>
44-
- <a href="https://github.com/friendliai/friendli-python/blob/main/src/friendli_core/serverless.py#L35-L49" target="_blank" rel="noopener noreferrer">`friendli_core.serverless:SyncServerless` (35:49)</a>
45-
- <a href="https://github.com/friendliai/friendli-python/blob/main/src/friendli_core/serverless.py#L52-L68" target="_blank" rel="noopener noreferrer">`friendli_core.serverless:AsyncServerless` (52:68)</a>
43+
- <a href="https://github.com/CodeBoarding/friendli-python/blob/main/src/friendli_core/serverless.py#L24-L32" target="_blank" rel="noopener noreferrer">`friendli_core.serverless:BaseServerless` (24:32)</a>
44+
- <a href="https://github.com/CodeBoarding/friendli-python/blob/main/src/friendli_core/serverless.py#L35-L49" target="_blank" rel="noopener noreferrer">`friendli_core.serverless:SyncServerless` (35:49)</a>
45+
- <a href="https://github.com/CodeBoarding/friendli-python/blob/main/src/friendli_core/serverless.py#L52-L68" target="_blank" rel="noopener noreferrer">`friendli_core.serverless:AsyncServerless` (52:68)</a>
4646

4747

4848

0 commit comments

Comments
Β (0)