refactor docs
This commit is contained in:
@@ -12,26 +12,26 @@ sequenceDiagram
|
||||
Server->>Server: Create Signup Session
|
||||
Note over User,Server: Set nKode
|
||||
Server-->>-Client: signup_session_id, set_keypad, icons
|
||||
Note left of Server: signup_session_id:<br/>e029138e-fb64-49ea-a6bc-b6b5affbf263
|
||||
Note left of Server: set_keypad:<br/>Key 0: [18 7 20 22 23]<br/>Key 1: [12 13 8 28 29]<br/>Key 2: [24 25 26 16 5]<br/>Key 3: [ 6 19 2 10 11]<br/>Key 4: [ 0 1 14 4 17]<br/>
|
||||
Note left of Server: signup_session_id:<br/>d7e50a75-d3ff-482a-b0e7-ce99c3838c1a
|
||||
Note left of Server: set_keypad:<br/>Key 0: [12 13 20 21 16]<br/>Key 1: [ 6 1 14 9 4]<br/>Key 2: [ 0 7 26 15 28]<br/>Key 3: [24 19 2 27 10]<br/>Key 4: [18 25 8 3 22]<br/>
|
||||
Note left of Server: Icons:<br/>[😀,😂,🥳,😍,🤓<br/>😎,🥺,😡,😱,🤯<br/>🥰,😴,🤔,🙃,😇<br/>🤖,👽,👾,🐱,🐶<br/>🦁,🐻,🐸,🐙,🦄<br/>🌟,⚡,🔥,🍕,🎉]
|
||||
Client->>Client: Order Icons by keypad
|
||||
Client->>User: Display Keypad
|
||||
Note left of Client: Key 0: ['🐱' '😡' '🦁' '🐸' '🐙']<br/>Key 1: ['🤔' '🙃' '😱' '🍕' '🎉']<br/>Key 2: ['🦄' '🌟' '⚡' '👽' '😎']<br/>Key 3: ['🥺' '🐶' '🥳' '🥰' '😴']<br/>Key 4: ['😀' '😂' '😇' '🤓' '👾']<br/>
|
||||
Note left of User: User icons: ['🐱' '🥳' '🐶' '⚡']
|
||||
User->>Client: Set Key Selection: [0, 3, 3, 2]
|
||||
Client->>+Server: Set nKode:<br/>e029138e-fb64-49ea-a6bc-b6b5affbf263<br/>[0, 3, 3, 2]
|
||||
Note left of Client: Key 0: ['🤔' '🙃' '🦁' '🐻' '👽']<br/>Key 1: ['🥺' '😂' '😇' '🤯' '🤓']<br/>Key 2: ['😀' '😡' '⚡' '🤖' '🍕']<br/>Key 3: ['🦄' '🐶' '🥳' '🔥' '🥰']<br/>Key 4: ['🐱' '🌟' '😱' '😍' '🐸']<br/>
|
||||
Note left of User: User icons: ['🤓' '🐶' '🦄' '👽']
|
||||
User->>Client: Set Key Selection: [1, 3, 3, 0]
|
||||
Client->>+Server: Set nKode:<br/>d7e50a75-d3ff-482a-b0e7-ce99c3838c1a<br/>[1, 3, 3, 0]
|
||||
Server->>Server: Disperse Set Keypad
|
||||
Note over User,Server: Confirm nKode
|
||||
Server-->>-Client: signup_session_id, confirm_keypad, icons
|
||||
Note left of Server: signup_session_id:<br/>e029138e-fb64-49ea-a6bc-b6b5affbf263
|
||||
Note left of Server: confirm_keypad:<br/>Key 0: [ 6 7 8 16 17]<br/>Key 1: [ 0 13 2 22 5]<br/>Key 2: [24 19 14 28 23]<br/>Key 3: [18 1 26 10 29]<br/>Key 4: [12 25 20 4 11]<br/>
|
||||
Note left of Server: signup_session_id:<br/>d7e50a75-d3ff-482a-b0e7-ce99c3838c1a
|
||||
Note left of Server: confirm_keypad:<br/>Key 0: [ 6 13 8 15 10]<br/>Key 1: [24 7 14 3 16]<br/>Key 2: [12 25 2 9 28]<br/>Key 3: [ 0 1 20 27 22]<br/>Key 4: [18 19 26 21 4]<br/>
|
||||
Client->>Client: Order Icons by keypad
|
||||
Client->>User: Display Keypad
|
||||
Note left of Client: Key 0: ['🥺' '😡' '😱' '👽' '👾']<br/>Key 1: ['😀' '🙃' '🥳' '🐸' '😎']<br/>Key 2: ['🦄' '🐶' '😇' '🍕' '🐙']<br/>Key 3: ['🐱' '😂' '⚡' '🥰' '🎉']<br/>Key 4: ['🤔' '🌟' '🦁' '🤓' '😴']<br/>
|
||||
Note left of User: User icons: ['🐱' '🥳' '🐶' '⚡']
|
||||
User->>Client: Key Selection: [3, 1, 2, 3]
|
||||
Client->>+Server: Confirm nKode:<br/>e029138e-fb64-49ea-a6bc-b6b5affbf263<br/>[3, 1, 2, 3]
|
||||
Note left of Client: Key 0: ['🥺' '🙃' '😱' '🤖' '🥰']<br/>Key 1: ['🦄' '😡' '😇' '😍' '👽']<br/>Key 2: ['🤔' '🌟' '🥳' '🤯' '🍕']<br/>Key 3: ['😀' '😂' '🦁' '🔥' '🐸']<br/>Key 4: ['🐱' '🐶' '⚡' '🐻' '🤓']<br/>
|
||||
Note left of User: User icons: ['🤓' '🐶' '🦄' '👽']
|
||||
User->>Client: Key Selection: [4, 4, 1, 1]
|
||||
Client->>+Server: Confirm nKode:<br/>d7e50a75-d3ff-482a-b0e7-ce99c3838c1a<br/>[4, 4, 1, 1]
|
||||
Server->>Server: Create User
|
||||
Server-->>-Client: Success
|
||||
```
|
||||
@@ -10,13 +10,13 @@ sequenceDiagram
|
||||
Note left of User: email: user@example.com
|
||||
User->>Server: Submit Email
|
||||
Server->>Client: login_keypad, icons
|
||||
Note left of Server: Login Keypad:<br/>Key 0: [18 7 20 27 22 23]<br/>Key 1: [12 13 8 3 28 29]<br/>Key 2: [24 25 26 9 16 5]<br/>Key 3: [ 6 19 2 21 10 11]<br/>Key 4: [ 0 1 14 15 4 17]<br/>
|
||||
Note left of Server: Login Keypad:<br/>Key 0: [12 13 20 21 16 23]<br/>Key 1: [ 6 1 14 9 4 29]<br/>Key 2: [ 0 7 26 15 28 11]<br/>Key 3: [24 19 2 27 10 5]<br/>Key 4: [18 25 8 3 22 17]<br/>
|
||||
Note left of Server: Icons:<br/>[😀,😂,🥳,😍,🤓<br/>😎,🥺,😡,😱,🤯<br/>🥰,😴,🤔,🙃,😇<br/>🤖,👽,👾,🐱,🐶<br/>🦁,🐻,🐸,🐙,🦄<br/>🌟,⚡,🔥,🍕,🎉]
|
||||
Client->>Client: Order Icons
|
||||
Client->>User: Display Keypad
|
||||
Note left of Client: Key 0: ['🐱' '😡' '🦁' '🔥' '🐸' '🐙']<br/>Key 1: ['🤔' '🙃' '😱' '😍' '🍕' '🎉']<br/>Key 2: ['🦄' '🌟' '⚡' '🤯' '👽' '😎']<br/>Key 3: ['🥺' '🐶' '🥳' '🐻' '🥰' '😴']<br/>Key 4: ['😀' '😂' '😇' '🤖' '🤓' '👾']<br/>
|
||||
Note left of User: User passcode icons: ['🐱' '🥳' '🐶' '⚡']
|
||||
User->>Client: Selected Keys<br/>[0, 3, 3, 2]
|
||||
Client->>Server: Login:<br/>email: user@example.com<br/>selected_keys: [0, 3, 3, 2]
|
||||
Note left of Client: Key 0: ['🤔' '🙃' '🦁' '🐻' '👽' '🐙']<br/>Key 1: ['🥺' '😂' '😇' '🤯' '🤓' '🎉']<br/>Key 2: ['😀' '😡' '⚡' '🤖' '🍕' '😴']<br/>Key 3: ['🦄' '🐶' '🥳' '🔥' '🥰' '😎']<br/>Key 4: ['🐱' '🌟' '😱' '😍' '🐸' '👾']<br/>
|
||||
Note left of User: User passcode icons: ['🤓' '🐶' '🦄' '👽']
|
||||
User->>Client: Selected Keys<br/>[1, 3, 3, 0]
|
||||
Client->>Server: Login:<br/>email: user@example.com<br/>selected_keys: [1, 3, 3, 0]
|
||||
Server-->>Client: Success
|
||||
```
|
||||
@@ -11,14 +11,6 @@ from src.utils import select_keys_with_passcode_values
|
||||
|
||||
|
||||
def render_markdown_template(template_path, output_path, context):
|
||||
"""
|
||||
Render a Jinja2 markdown template with the given context and save to output_path.
|
||||
|
||||
Args:
|
||||
template_path (Path): Path to the template file
|
||||
output_path (Path): Path where the rendered file will be saved
|
||||
context (dict): Template variables
|
||||
"""
|
||||
template_dir = template_path.parent
|
||||
template_file = template_path.name
|
||||
|
||||
@@ -102,7 +94,7 @@ if __name__ == "__main__":
|
||||
"confirm_ordered_keypad": display_icons_keypad(ordered_confirm_icons.reshape(-1, keypad_size.numb_of_keys), keypad_size.numb_of_keys),
|
||||
"confirm_key_selection": selected_keys_confirm
|
||||
}
|
||||
render_markdown_template(Path("./enrollment_diagram.template.md"), Path("./enrollment_diagram.md"), context)
|
||||
render_markdown_template(Path("../templates/enrollment_diagram.template.md"), Path("../enrollment_diagram.md"), context)
|
||||
login_keypad = api.get_login_keypad(username, customer_id)
|
||||
selected_keys_login = select_keys_with_passcode_values(passcode_property_indices, login_keypad,
|
||||
keypad_size.props_per_key)
|
||||
@@ -116,4 +108,4 @@ if __name__ == "__main__":
|
||||
"selected_keys_login": str(selected_keys_login)
|
||||
}
|
||||
api.login(customer_id, username, selected_keys_login)
|
||||
render_markdown_template(Path("./login_diagram.template.md"), Path("./login_diagram.md"), context)
|
||||
render_markdown_template(Path("../templates/login_diagram.template.md"), Path("../login_diagram.md"), context)
|
||||
@@ -1,4 +1,5 @@
|
||||
bcrypt~=4.1.3
|
||||
numpy~=2.0.0
|
||||
pytest~=8.2.2
|
||||
ipython~=8.25.0
|
||||
ipython~=8.25.0
|
||||
jinja2~=3.1.4
|
||||
Reference in New Issue
Block a user