Skip to content

Instantly share code, notes, and snippets.

@lmmx
Created September 4, 2025 21:29
Show Gist options
  • Save lmmx/6d73458c47c911581a4f93030c4993ff to your computer and use it in GitHub Desktop.
Save lmmx/6d73458c47c911581a4f93030c4993ff to your computer and use it in GitHub Desktop.
One of the nicer ways to display function call stack with parameters (albeit only for one parameter set per call)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lmmx
Copy link
Author

lmmx commented Sep 4, 2025

Screenshot from 2025-09-04 22-29-42

Put the parameters in a 'key'

@lmmx
Copy link
Author

lmmx commented Sep 4, 2025

Parameter keys not in a subgraph

(Becomes taller)

flowchart TB

%% --- Function call chain ---
F1["convert_jsons_to_avro()"]:::func
F2["jsons_to_avro()"]:::func
F3["process_definition()"]:::func
F4["json_schema_object_to_avro_record()"]:::func
F5["handle_additional_properties()"]:::func
F6["handle_pattern_properties()"]:::func

F1 --> F2 --> F3 --> F4 --> F5
F4 --> F6

%% --- Parameter 'keys' alongside ---

  PK1["convert_jsons_to_avro(params):  
  • json_schema_file_path = tests/.../string_format_email.json  
  • avro_schema_path = /tmp/out.avsc  
  • namespace = None  
  • utility_namespace = None  
  • _root_class_name = None  
  • split_top_level_records = false"]:::data

  PK2["jsons_to_avro(params):  
  • json_schema = {...}  
  • namespace = string_format_email  
  • utility_namespace = string_format_email.utility  
  • base_uri = tests/.../string_format_email.json  
  • split_top_level = false"]:::data

  PK3["process_definition(params):  
  • json_schema = {...}  
  • namespace = string_format_email  
  • utility_namespace = string_format_email.utility  
  • base_uri = tests/.../string_format_email.json  
  • avro_schema = []  
  • record_stack = []  
  • schema_name = document  
  • schema = {...}  
  • is_root = true"]:::data

  PK4["json_schema_object_to_avro_record(params):  
  • name = document  
  • json_object = {...}  
  • namespace = string_format_email  
  • utility_namespace = string_format_email.utility  
  • json_schema = {...}  
  • base_uri = tests/.../string_format_email.json  
  • avro_schema = []  
  • record_stack = []"]:::data

  PK5["handle_additional_properties(params):  
  • json_object = {...}  
  • record_name = document  
  • namespace = string_format_email  
  • utility_namespace = string_format_email.utility  
  • base_uri = tests/.../string_format_email.json  
  • avro_schema = []  
  • record_stack = [document]  
  • dependencies = []"]:::data

  PK6["handle_pattern_properties(params):  
  • json_object = {...}  
  • record_name = document  
  • namespace = string_format_email  
  • utility_namespace = string_format_email.utility  
  • base_uri = tests/.../string_format_email.json  
  • avro_schema = []  
  • record_stack = [document]  
  • dependencies = []"]:::data

%% --- Optional: align visually (dotted reference lines) ---
F1 -.-> PK1
F2 -.-> PK2
F3 -.-> PK3
F4 -.-> PK4
F5 -.-> PK5
F6 -.-> PK6

classDef func fill:#c6f6d5,stroke:#2f855a,stroke-width:2px,color:#22543d;
classDef data fill:#fefcbf,stroke:#975a16,stroke-width:1.5px,color:#744210;
Loading
Screenshot from 2025-09-04 22-37-52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment