Skip to content

Commit 49af8aa

Browse files
committed
docs: update codeboarding documentation
## 📚 Documentation Update This commit contains updated documentation files fetched from the CodeBoarding service. ### 📊 Summary - Documentation files created/updated: 7 - JSON files created/updated: 8 - Documentation directory: .codeboarding/ - JSON directory: .codeboarding/ - Output format: .rst - Repository analyzed: https://github.com/CodeBoarding/praw - Source branch: main - Target branch: main 🤖 This commit was automatically generated by the CodeBoarding documentation update workflow.
1 parent a0d46f0 commit 49af8aa

7 files changed

Lines changed: 235 additions & 22 deletions

File tree

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
{
2+
"description": "The PRAW configuration subsystem, centered around the `Config` component, is responsible for loading and managing application settings from various sources like `praw.ini` files and environment variables. This `Config` component provides essential parameters, such as API endpoints and client credentials, to the `Reddit` client for general API interactions and to the `Authenticator` for handling user authentication flows. This clear separation ensures that configuration concerns are centralized, allowing other core components to focus on their primary responsibilities while maintaining access to necessary operational settings.",
3+
"components": [
4+
{
5+
"name": "Config",
6+
"description": "The central component of the Configuration Manager. It is responsible for orchestrating the loading of configuration settings from various sources (e.g., `praw.ini` files, environment variables), managing default values, and providing a unified interface for other parts of PRAW to access these settings. It ensures that critical parameters like client ID, client secret, user agent, and Reddit API URLs are readily available.",
7+
"referenced_source_code": [
8+
{
9+
"qualified_name": "praw.config.Config",
10+
"reference_file": "praw/config.py",
11+
"reference_start_line": 52,
12+
"reference_end_line": 52
13+
},
14+
{
15+
"qualified_name": "praw.config.Config.__init__",
16+
"reference_file": "praw/config.py",
17+
"reference_start_line": 85,
18+
"reference_end_line": 95
19+
},
20+
{
21+
"qualified_name": "praw.config.Config._load_config",
22+
"reference_file": "praw/config.py",
23+
"reference_start_line": 44,
24+
"reference_end_line": 71
25+
},
26+
{
27+
"qualified_name": "praw.config.Config._fetch",
28+
"reference_file": "praw/config.py",
29+
"reference_start_line": 105,
30+
"reference_end_line": 108
31+
},
32+
{
33+
"qualified_name": "praw.config.Config._fetch_default",
34+
"reference_file": "praw/config.py",
35+
"reference_start_line": 110,
36+
"reference_end_line": 113
37+
},
38+
{
39+
"qualified_name": "praw.config.Config._fetch_or_not_set",
40+
"reference_file": "praw/config.py",
41+
"reference_start_line": 115,
42+
"reference_end_line": 123
43+
},
44+
{
45+
"qualified_name": "praw.config.Config._initialize_attributes",
46+
"reference_file": "praw/config.py",
47+
"reference_start_line": 125,
48+
"reference_end_line": 173
49+
}
50+
],
51+
"assigned_files": [
52+
"praw/config.py"
53+
],
54+
"can_expand": true
55+
},
56+
{
57+
"name": "Reddit",
58+
"description": "The core client for interacting with the Reddit API. It utilizes the `Config` component to retrieve necessary configuration settings such as API URLs, client credentials, and user agent. It acts as the primary entry point for making requests to Reddit and managing user sessions.",
59+
"referenced_source_code": [
60+
{
61+
"qualified_name": "praw.Reddit",
62+
"reference_file": "praw/reddit.py",
63+
"reference_start_line": null,
64+
"reference_end_line": null
65+
}
66+
],
67+
"assigned_files": [],
68+
"can_expand": true
69+
},
70+
{
71+
"name": "Authenticator",
72+
"description": "Handles the authentication process with Reddit, including OAuth flows and managing refresh tokens. It relies on the `Config` component to obtain authentication-related parameters like client ID, client secret, and redirect URI.",
73+
"referenced_source_code": [
74+
{
75+
"qualified_name": "praw.models.auth.Auth",
76+
"reference_file": "praw/models/auth.py",
77+
"reference_start_line": 11,
78+
"reference_end_line": 125
79+
}
80+
],
81+
"assigned_files": [],
82+
"can_expand": true
83+
},
84+
{
85+
"name": "Unclassified",
86+
"description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)",
87+
"referenced_source_code": [],
88+
"assigned_files": [],
89+
"can_expand": false
90+
}
91+
],
92+
"components_relations": [
93+
{
94+
"relation": "provides configuration to",
95+
"src_name": "Config",
96+
"dst_name": "Reddit"
97+
},
98+
{
99+
"relation": "provides authentication configuration to",
100+
"src_name": "Config",
101+
"dst_name": "Authenticator"
102+
}
103+
]
104+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
Configuration Manager
2+
=====================
3+
4+
.. mermaid::
5+
6+
graph LR
7+
Config["Config"]
8+
Reddit["Reddit"]
9+
Authenticator["Authenticator"]
10+
Unclassified["Unclassified"]
11+
Config -- "provides configuration to" --> Reddit
12+
Config -- "provides authentication configuration to" --> Authenticator
13+
14+
| |codeboarding-badge| |demo-badge| |contact-badge|
15+
16+
.. |codeboarding-badge| image:: https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square
17+
:target: https://github.com/CodeBoarding/CodeBoarding
18+
.. |demo-badge| image:: https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square
19+
:target: https://www.codeboarding.org/demo
20+
.. |contact-badge| image:: https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square
21+
:target: mailto:contact@codeboarding.org
22+
23+
Details
24+
-------
25+
26+
The PRAW configuration subsystem, centered around the `Config` component, is responsible for loading and managing application settings from various sources like `praw.ini` files and environment variables. This `Config` component provides essential parameters, such as API endpoints and client credentials, to the `Reddit` client for general API interactions and to the `Authenticator` for handling user authentication flows. This clear separation ensures that configuration concerns are centralized, allowing other core components to focus on their primary responsibilities while maintaining access to necessary operational settings.
27+
28+
Config
29+
^^^^^^
30+
31+
The central component of the Configuration Manager. It is responsible for orchestrating the loading of configuration settings from various sources (e.g., `praw.ini` files, environment variables), managing default values, and providing a unified interface for other parts of PRAW to access these settings. It ensures that critical parameters like client ID, client secret, user agent, and Reddit API URLs are readily available.
32+
33+
**Related Classes/Methods**:
34+
35+
* praw.config.Config
36+
* praw.config.Config.__init__:85-95
37+
* praw.config.Config._load_config:44-71
38+
* praw.config.Config._fetch:105-108
39+
* praw.config.Config._fetch_default:110-113
40+
* praw.config.Config._fetch_or_not_set:115-123
41+
* praw.config.Config._initialize_attributes:125-173
42+
43+
Reddit
44+
^^^^^^
45+
46+
The core client for interacting with the Reddit API. It utilizes the `Config` component to retrieve necessary configuration settings such as API URLs, client credentials, and user agent. It acts as the primary entry point for making requests to Reddit and managing user sessions.
47+
48+
**Related Classes/Methods**:
49+
50+
* praw.Reddit
51+
52+
Authenticator
53+
^^^^^^^^^^^^^
54+
55+
Handles the authentication process with Reddit, including OAuth flows and managing refresh tokens. It relies on the `Config` component to obtain authentication-related parameters like client ID, client secret, and redirect URI.
56+
57+
**Related Classes/Methods**:
58+
59+
* praw.models.auth.Auth:11-125
60+
61+
Unclassified
62+
^^^^^^^^^^^^
63+
64+
Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)
65+
66+
**Related Classes/Methods**: *None*

.codeboarding/analysis.json

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
}
1414
],
1515
"assigned_files": [
16-
"praw/reddit.py"
16+
"praw/__init__.py",
17+
"praw/reddit.py",
18+
"praw/endpoints.py"
1719
],
1820
"can_expand": true
1921
},
@@ -31,7 +33,7 @@
3133
"assigned_files": [
3234
"praw/config.py"
3335
],
34-
"can_expand": false
36+
"can_expand": true
3537
},
3638
{
3739
"name": "Low-Level API Connector",
@@ -78,6 +80,7 @@
7880
"praw/models/__init__.py",
7981
"praw/models/mod_note.py",
8082
"praw/models/base.py",
83+
"praw/models/util.py",
8184
"praw/models/front.py",
8285
"praw/models/preferences.py",
8386
"praw/models/redditors.py",
@@ -86,6 +89,7 @@
8689
"praw/models/comment_forest.py",
8790
"praw/models/mod_notes.py",
8891
"praw/models/trophy.py",
92+
"praw/models/helpers.py",
8993
"praw/models/inbox.py",
9094
"praw/models/subreddits.py",
9195
"praw/models/stylesheet.py",
@@ -172,15 +176,11 @@
172176
"docs/conf.py",
173177
"docs/examples/obtain_refresh_token.py",
174178
"docs/examples/lmgtfy_bot.py",
175-
"praw/__init__.py",
176179
"praw/const.py",
177-
"praw/endpoints.py",
178180
"praw/exceptions.py",
179181
"praw/util/__init__.py",
180182
"praw/util/cache.py",
181-
"praw/util/snake.py",
182-
"praw/models/util.py",
183-
"praw/models/helpers.py"
183+
"praw/util/snake.py"
184184
],
185185
"can_expand": false
186186
},
@@ -226,6 +226,13 @@
226226
"assigned_files": [],
227227
"can_expand": false
228228
},
229+
{
230+
"name": "Unclassified",
231+
"description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)",
232+
"referenced_source_code": [],
233+
"assigned_files": [],
234+
"can_expand": false
235+
},
229236
{
230237
"name": "Unclassified",
231238
"description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"commit_hash": "c595221bd4e1eee10beca3646b04b0133dbf02ca",
2+
"commit_hash": "a0d46f08a35124e3e7220fdcd3dc1f4654cca016",
33
"code_boarding_version": "0.2.0"
44
}

.codeboarding/overview.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Overview
1818
Unclassified["Unclassified"]
1919
Unclassified["Unclassified"]
2020
Unclassified["Unclassified"]
21+
Unclassified["Unclassified"]
2122
Reddit_Client -- "loads settings from" --> Configuration_Manager
2223
Reddit_Client -- "delegates requests to" --> Low_Level_API_Connector
2324
Low_Level_API_Connector -- "returns raw response to" --> Reddit_Client
@@ -27,6 +28,7 @@ Overview
2728
Listing_Streaming -- "fetches data via" --> Reddit_Client
2829
Listing_Streaming -- "generates" --> Reddit_Data_Models
2930
click Reddit_Client href "https://github.com/CodeBoarding/praw/blob/main/.codeboarding/Reddit_Client.html" "Details"
31+
click Configuration_Manager href "https://github.com/CodeBoarding/praw/blob/main/.codeboarding/Configuration_Manager.html" "Details"
3032
click Low_Level_API_Connector href "https://github.com/CodeBoarding/praw/blob/main/.codeboarding/Low_Level_API_Connector.html" "Details"
3133
click Object_Transformer href "https://github.com/CodeBoarding/praw/blob/main/.codeboarding/Object_Transformer.html" "Details"
3234
click Reddit_Data_Models href "https://github.com/CodeBoarding/praw/blob/main/.codeboarding/Reddit_Data_Models.html" "Details"
@@ -60,6 +62,8 @@ The primary interface for interacting with the Reddit API, managing authenticati
6062
Configuration Manager
6163
^^^^^^^^^^^^^^^^^^^^^
6264

65+
:ref:`Expand <Configuration_Manager>`
66+
6367
Manages loading and accessing PRAW's configuration settings.
6468

6569
**Related Classes/Methods**:
@@ -165,3 +169,10 @@ Unclassified
165169
Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)
166170

167171
**Related Classes/Methods**: *None*
172+
173+
Unclassified
174+
^^^^^^^^^^^^
175+
176+
Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)
177+
178+
**Related Classes/Methods**: *None*

docs/architecture_overview/Configuration_Manager.rst

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ Configuration Manager
44
.. mermaid::
55

66
graph LR
7-
Configuration_Manager["Configuration Manager"]
8-
Reddit_API_Client["Reddit API Client"]
7+
Config["Config"]
8+
Reddit["Reddit"]
9+
Authenticator["Authenticator"]
910
Unclassified["Unclassified"]
10-
Configuration_Manager -- "provides configuration to" --> Reddit_API_Client
11-
click Configuration_Manager href "https://github.com/CodeBoarding/praw/blob/main/.codeboarding/Configuration_Manager.html" "Details"
11+
Config -- "provides configuration to" --> Reddit
12+
Config -- "provides authentication configuration to" --> Authenticator
1213

1314
| |codeboarding-badge| |demo-badge| |contact-badge|
1415
@@ -22,27 +23,40 @@ Configuration Manager
2223
Details
2324
-------
2425

25-
The PRAW library's core architecture is centered around two main components: the Configuration Manager and the Reddit API Client. The Configuration Manager, implemented by the praw.config.Config class, is responsible for abstracting and providing all necessary configuration settings, such as API credentials and user agent information, which can be sourced from praw.ini files or environment variables. This ensures a flexible and centralized approach to managing application settings. The Reddit API Client, represented by the praw.Reddit.Reddit class, serves as the primary interface for interacting with the Reddit API. It critically depends on the Configuration Manager to obtain its initialization parameters, enabling it to establish authenticated sessions and facilitate all subsequent API requests. This clear separation of concerns allows for robust configuration handling and a streamlined API interaction experience.
26+
The PRAW configuration subsystem, centered around the `Config` component, is responsible for loading and managing application settings from various sources like `praw.ini` files and environment variables. This `Config` component provides essential parameters, such as API endpoints and client credentials, to the `Reddit` client for general API interactions and to the `Authenticator` for handling user authentication flows. This clear separation ensures that configuration concerns are centralized, allowing other core components to focus on their primary responsibilities while maintaining access to necessary operational settings.
2627

27-
Configuration Manager
28-
^^^^^^^^^^^^^^^^^^^^^
29-
30-
:ref:`Expand <Configuration_Manager>`
28+
Config
29+
^^^^^^
3130

32-
This component is responsible for centralizing the loading, parsing, and provision of PRAW's configuration settings. It abstracts the underlying storage mechanisms (e.g., praw.ini file, environment variables) and offers a unified interface for retrieving critical API access parameters such as client ID, client secret, user agent, and redirect URI. These parameters are fundamental for establishing a connection and authenticating with the Reddit API.
31+
The central component of the Configuration Manager. It is responsible for orchestrating the loading of configuration settings from various sources (e.g., `praw.ini` files, environment variables), managing default values, and providing a unified interface for other parts of PRAW to access these settings. It ensures that critical parameters like client ID, client secret, user agent, and Reddit API URLs are readily available.
3332

3433
**Related Classes/Methods**:
3534

3635
* praw.config.Config
36+
* praw.config.Config.__init__:85-95
37+
* praw.config.Config._load_config:44-71
38+
* praw.config.Config._fetch:105-108
39+
* praw.config.Config._fetch_default:110-113
40+
* praw.config.Config._fetch_or_not_set:115-123
41+
* praw.config.Config._initialize_attributes:125-173
42+
43+
Reddit
44+
^^^^^^
45+
46+
The core client for interacting with the Reddit API. It utilizes the `Config` component to retrieve necessary configuration settings such as API URLs, client credentials, and user agent. It acts as the primary entry point for making requests to Reddit and managing user sessions.
47+
48+
**Related Classes/Methods**:
49+
50+
* praw.Reddit
3751

38-
Reddit API Client
39-
^^^^^^^^^^^^^^^^^
52+
Authenticator
53+
^^^^^^^^^^^^^
4054

41-
As the main API client, this component serves as the primary interface for all interactions with the Reddit API. It requires the configuration parameters managed by the Configuration Manager to initialize itself, authenticate, and make requests. It acts as the entry point for developers to access various Reddit resources and functionalities.
55+
Handles the authentication process with Reddit, including OAuth flows and managing refresh tokens. It relies on the `Config` component to obtain authentication-related parameters like client ID, client secret, and redirect URI.
4256

4357
**Related Classes/Methods**:
4458

45-
* praw.Reddit.Reddit:57-901
59+
* praw.models.auth.Auth:11-125
4660

4761
Unclassified
4862
^^^^^^^^^^^^

docs/architecture_overview/overview.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Overview
1818
Unclassified["Unclassified"]
1919
Unclassified["Unclassified"]
2020
Unclassified["Unclassified"]
21+
Unclassified["Unclassified"]
2122
Reddit_Client -- "loads settings from" --> Configuration_Manager
2223
Reddit_Client -- "delegates requests to" --> Low_Level_API_Connector
2324
Low_Level_API_Connector -- "returns raw response to" --> Reddit_Client
@@ -27,6 +28,7 @@ Overview
2728
Listing_Streaming -- "fetches data via" --> Reddit_Client
2829
Listing_Streaming -- "generates" --> Reddit_Data_Models
2930
click Reddit_Client href "https://github.com/CodeBoarding/praw/blob/main/.codeboarding/Reddit_Client.html" "Details"
31+
click Configuration_Manager href "https://github.com/CodeBoarding/praw/blob/main/.codeboarding/Configuration_Manager.html" "Details"
3032
click Low_Level_API_Connector href "https://github.com/CodeBoarding/praw/blob/main/.codeboarding/Low_Level_API_Connector.html" "Details"
3133
click Object_Transformer href "https://github.com/CodeBoarding/praw/blob/main/.codeboarding/Object_Transformer.html" "Details"
3234
click Reddit_Data_Models href "https://github.com/CodeBoarding/praw/blob/main/.codeboarding/Reddit_Data_Models.html" "Details"
@@ -60,6 +62,8 @@ The primary interface for interacting with the Reddit API, managing authenticati
6062
Configuration Manager
6163
^^^^^^^^^^^^^^^^^^^^^
6264

65+
:ref:`Expand <Configuration_Manager>`
66+
6367
Manages loading and accessing PRAW's configuration settings.
6468

6569
**Related Classes/Methods**:
@@ -165,3 +169,10 @@ Unclassified
165169
Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)
166170

167171
**Related Classes/Methods**: *None*
172+
173+
Unclassified
174+
^^^^^^^^^^^^
175+
176+
Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)
177+
178+
**Related Classes/Methods**: *None*

0 commit comments

Comments
 (0)