Coverage report: 62%

Files Functions Classes

coverage.py v7.6.2, created at 2024-10-09 22:54 +0800

File function statements missing excluded branches partial coverage
promplate/__init__.py (no function) 2 0 0 0 0 100%
promplate/chain/__init__.py (no function) 2 0 0 0 0 100%
promplate/chain/callback.py BaseCallback.pre_process 1 0 0 2 0 100%
promplate/chain/callback.py BaseCallback.mid_process 1 0 0 2 0 100%
promplate/chain/callback.py BaseCallback.end_process 1 0 0 2 0 100%
promplate/chain/callback.py BaseCallback.on_enter 1 0 0 0 0 100%
promplate/chain/callback.py BaseCallback.on_leave 1 0 0 0 0 100%
promplate/chain/callback.py Callback.__init__ 5 0 0 0 0 100%
promplate/chain/callback.py Callback.pre_process 2 0 0 2 0 100%
promplate/chain/callback.py Callback.mid_process 2 0 0 2 0 100%
promplate/chain/callback.py Callback.end_process 2 0 0 2 0 100%
promplate/chain/callback.py Callback.on_enter 3 1 0 2 1 60%
promplate/chain/callback.py Callback.on_leave 3 1 0 2 1 60%
promplate/chain/callback.py (no function) 14 1 0 2 1 88%
promplate/chain/node.py ChainContext.__new__ 1 0 0 2 1 67%
promplate/chain/node.py ChainContext.__new__ 1 0 0 2 1 67%
promplate/chain/node.py ChainContext.__new__ 1 0 0 2 1 67%
promplate/chain/node.py ChainContext.__init__ 1 0 0 0 0 100%
promplate/chain/node.py ChainContext.__new__ 7 0 0 2 0 100%
promplate/chain/node.py ChainContext.ensure 1 0 0 0 0 100%
promplate/chain/node.py ChainContext.result 1 0 0 0 0 100%
promplate/chain/node.py ChainContext.result 1 0 0 0 0 100%
promplate/chain/node.py ChainContext.result 1 0 0 0 0 100%
promplate/chain/node.py ChainContext.__str__ 1 1 0 0 0 0%
promplate/chain/node.py AbstractNode.invoke 0 0 0 0 0 100%
promplate/chain/node.py AbstractNode.ainvoke 0 0 0 0 0 100%
promplate/chain/node.py AbstractNode.stream 0 0 0 0 0 100%
promplate/chain/node.py AbstractNode.astream 0 0 0 0 0 100%
promplate/chain/node.py AbstractNode._get_chain_type 1 0 0 0 0 100%
promplate/chain/node.py AbstractNode.__add__ 3 1 0 2 1 60%
promplate/chain/node.py ensure_callbacks 1 0 0 0 0 100%
promplate/chain/node.py Interruptable._invoke 0 0 0 0 0 100%
promplate/chain/node.py Interruptable._ainvoke 0 0 0 0 0 100%
promplate/chain/node.py Interruptable._stream 0 0 0 0 0 100%
promplate/chain/node.py Interruptable._astream 0 0 0 0 0 100%
promplate/chain/node.py Interruptable.enter 4 0 0 2 0 100%
promplate/chain/node.py Interruptable.leave 3 0 0 2 0 100%
promplate/chain/node.py Interruptable.add_pre_processes 2 2 0 0 0 0%
promplate/chain/node.py Interruptable.add_mid_processes 2 0 0 0 0 100%
promplate/chain/node.py Interruptable.add_end_processes 2 0 0 0 0 100%
promplate/chain/node.py Interruptable.add_callbacks 2 0 0 0 0 100%
promplate/chain/node.py Interruptable.pre_process 2 2 0 0 0 0%
promplate/chain/node.py Interruptable.mid_process 2 0 0 0 0 100%
promplate/chain/node.py Interruptable.end_process 2 0 0 0 0 100%
promplate/chain/node.py Interruptable.callback 2 0 0 0 0 100%
promplate/chain/node.py Interruptable._apply_pre_processes 2 0 0 2 0 100%
promplate/chain/node.py Interruptable._apply_mid_processes 2 0 0 2 0 100%
promplate/chain/node.py Interruptable._apply_end_processes 2 0 0 2 0 100%
promplate/chain/node.py Interruptable._apply_async_pre_processes 2 1 0 2 1 50%
promplate/chain/node.py Interruptable._apply_async_mid_processes 2 1 0 2 1 50%
promplate/chain/node.py Interruptable._apply_async_end_processes 2 1 0 2 1 50%
promplate/chain/node.py Interruptable.invoke 12 1 0 4 1 88%
promplate/chain/node.py Interruptable.ainvoke 12 6 0 4 0 38%
promplate/chain/node.py Interruptable.stream 12 6 0 6 0 44%
promplate/chain/node.py Interruptable.astream 13 7 0 8 0 38%
promplate/chain/node.py Interruptable.context 3 0 0 2 0 100%
promplate/chain/node.py Interruptable.context 1 1 0 0 0 0%
promplate/chain/node.py Interruptable.context 1 1 0 0 0 0%
promplate/chain/node.py Node.__init__ 5 0 0 0 0 100%
promplate/chain/node.py Node._invoke 6 0 0 0 0 100%
promplate/chain/node.py Node._stream 8 0 0 2 0 100%
promplate/chain/node.py Node._ainvoke 6 0 0 0 0 100%
promplate/chain/node.py Node._astream 8 0 0 2 0 100%
promplate/chain/node.py Node.render 5 0 0 2 0 100%
promplate/chain/node.py Node.arender 5 1 0 2 1 71%
promplate/chain/node.py Node.__str__ 1 1 0 0 0 0%
promplate/chain/node.py Loop.__init__ 3 0 0 0 0 100%
promplate/chain/node.py Loop._invoke 5 0 0 0 0 100%
promplate/chain/node.py Loop._ainvoke 5 5 0 0 0 0%
promplate/chain/node.py Loop._stream 6 6 0 2 0 0%
promplate/chain/node.py Loop._astream 6 6 0 2 0 0%
promplate/chain/node.py Chain.__init__ 3 0 0 0 0 100%
promplate/chain/node.py Chain._get_chain_type 1 0 0 0 0 100%
promplate/chain/node.py Chain.__iadd__ 2 0 0 0 0 100%
promplate/chain/node.py Chain.__iter__ 1 1 0 0 0 0%
promplate/chain/node.py Chain._invoke 5 0 0 2 0 100%
promplate/chain/node.py Chain._ainvoke 5 5 0 2 0 0%
promplate/chain/node.py Chain._stream 6 1 0 4 1 80%
promplate/chain/node.py Chain._astream 6 6 0 4 0 0%
promplate/chain/node.py Chain.__repr__ 1 1 0 0 0 0%
promplate/chain/node.py Jump.__init__ 2 0 0 0 0 100%
promplate/chain/node.py Jump.__str__ 1 1 0 0 0 0%
promplate/chain/node.py (no function) 102 0 0 16 8 93%
promplate/chain/utils.py appender 2 2 0 0 0 0%
promplate/chain/utils.py appender.append_processer 2 2 0 0 0 0%
promplate/chain/utils.py is_positional_parameter 1 1 0 0 0 0%
promplate/chain/utils.py count_position_parameters 1 1 0 0 0 0%
promplate/chain/utils.py resolve 3 0 0 2 0 100%
promplate/chain/utils.py async_accumulate 4 0 0 2 0 100%
promplate/chain/utils.py accumulate_any 4 0 0 2 0 100%
promplate/chain/utils.py accumulate_any._ 2 0 0 2 0 100%
promplate/chain/utils.py (no function) 10 0 0 0 0 100%
promplate/llm/__init__.py (no function) 0 0 0 0 0 100%
promplate/llm/base.py Configurable.__init__ 2 2 0 2 0 0%
promplate/llm/base.py Configurable._config 1 1 0 0 0 0%
promplate/llm/base.py Complete.__call__ 1 0 0 2 1 67%
promplate/llm/base.py Generate.__call__ 1 0 0 2 1 67%
promplate/llm/base.py AsyncComplete.__call__ 1 0 0 2 1 67%
promplate/llm/base.py AsyncGenerate.__call__ 1 0 0 2 1 67%
promplate/llm/base.py LLM.complete 1 0 0 2 1 67%
promplate/llm/base.py LLM.generate 1 0 0 2 1 67%
promplate/llm/base.py (no function) 13 0 0 0 0 100%
promplate/llm/openai/__init__.py (no function) 4 4 0 2 0 0%
promplate/llm/openai/v0.py Config.__init__ 9 9 0 2 0 0%
promplate/llm/openai/v0.py Config.__setattr__ 1 1 0 2 0 0%
promplate/llm/openai/v0.py Config.__getattr__ 1 1 0 2 0 0%
promplate/llm/openai/v0.py TextComplete.__call__ 3 3 0 0 0 0%
promplate/llm/openai/v0.py AsyncTextComplete.__call__ 3 3 0 0 0 0%
promplate/llm/openai/v0.py TextGenerate.__call__ 4 4 0 2 0 0%
promplate/llm/openai/v0.py AsyncTextGenerate.__call__ 4 4 0 2 0 0%
promplate/llm/openai/v0.py ChatComplete.__call__ 4 4 0 0 0 0%
promplate/llm/openai/v0.py AsyncChatComplete.__call__ 4 4 0 0 0 0%
promplate/llm/openai/v0.py ChatGenerate.__call__ 6 6 0 2 0 0%
promplate/llm/openai/v0.py AsyncChatGenerate.__call__ 6 6 0 2 0 0%
promplate/llm/openai/v0.py (no function) 30 30 0 4 0 0%
promplate/llm/openai/v1.py Config.__init__ 2 2 0 0 0 0%
promplate/llm/openai/v1.py Config.bind 3 3 0 0 0 0%
promplate/llm/openai/v1.py Config._user_agent 2 2 0 0 0 0%
promplate/llm/openai/v1.py Config._config 4 4 0 0 0 0%
promplate/llm/openai/v1.py Config._client 3 3 0 2 0 0%
promplate/llm/openai/v1.py Config._aclient 3 3 0 2 0 0%
promplate/llm/openai/v1.py same_params_as 1 1 0 2 0 0%
promplate/llm/openai/v1.py ClientConfig.__init__ 1 1 0 2 0 0%
promplate/llm/openai/v1.py AsyncClientConfig.__init__ 1 1 0 2 0 0%
promplate/llm/openai/v1.py TextComplete.__call__ 3 3 0 0 0 0%
promplate/llm/openai/v1.py AsyncTextComplete.__call__ 3 3 0 0 0 0%
promplate/llm/openai/v1.py TextGenerate.__call__ 7 7 0 2 0 0%
promplate/llm/openai/v1.py AsyncTextGenerate.__call__ 7 7 0 2 0 0%
promplate/llm/openai/v1.py ChatComplete.__call__ 4 4 0 0 0 0%
promplate/llm/openai/v1.py AsyncChatComplete.__call__ 4 4 0 0 0 0%
promplate/llm/openai/v1.py ChatGenerate.__call__ 8 8 0 2 0 0%
promplate/llm/openai/v1.py AsyncChatGenerate.__call__ 8 8 0 2 0 0%
promplate/llm/openai/v1.py (no function) 56 56 0 2 0 0%
promplate/prompt/__init__.py (no function) 2 0 0 0 0 100%
promplate/prompt/builder.py CodeBuilder.__init__ 3 0 0 0 0 100%
promplate/prompt/builder.py CodeBuilder.__str__ 1 0 0 0 0 100%
promplate/prompt/builder.py CodeBuilder.add_line 2 0 0 0 0 100%
promplate/prompt/builder.py CodeBuilder.add_section 3 3 0 0 0 0%
promplate/prompt/builder.py CodeBuilder.indent 2 0 0 0 0 100%
promplate/prompt/builder.py CodeBuilder.dedent 2 0 0 0 0 100%
promplate/prompt/builder.py CodeBuilder.get_render_function 5 0 0 0 0 100%
promplate/prompt/builder.py get_base_builder 1 0 0 0 0 100%
promplate/prompt/builder.py (no function) 10 0 0 0 0 100%
promplate/prompt/chat.py MessageBuilder.__init__ 3 0 0 0 0 100%
promplate/prompt/chat.py MessageBuilder.__repr__ 3 3 0 2 0 0%
promplate/prompt/chat.py MessageBuilder.__getitem__ 1 1 0 0 0 0%
promplate/prompt/chat.py MessageBuilder.__setitem__ 1 1 0 0 0 0%
promplate/prompt/chat.py MessageBuilder.__setattr__ 4 0 0 2 0 100%
promplate/prompt/chat.py MessageBuilder.__matmul__ 2 0 0 0 0 100%
promplate/prompt/chat.py MessageBuilder.dict 3 3 0 2 0 0%
promplate/prompt/chat.py MessageBuilder.__gt__ 4 0 0 2 0 100%
promplate/prompt/chat.py ensure 1 1 0 0 0 0%
promplate/prompt/chat.py parse_chat_markup 24 1 0 16 1 95%
promplate/prompt/chat.py (no function) 32 5 0 2 1 82%
promplate/prompt/template.py Component.render 1 0 0 2 1 67%
promplate/prompt/template.py Component.arender 1 0 0 2 1 67%
promplate/prompt/template.py TemplateCore.__init__ 1 0 0 0 0 100%
promplate/prompt/template.py TemplateCore._flush 3 0 0 2 0 100%
promplate/prompt/template.py TemplateCore._unwrap_token 1 0 0 0 0 100%
promplate/prompt/template.py TemplateCore._on_literal_token 1 0 0 0 0 100%
promplate/prompt/template.py TemplateCore._on_eval_token 9 0 0 2 0 100%
promplate/prompt/template.py TemplateCore._on_exec_token 1 0 0 0 0 100%
promplate/prompt/template.py TemplateCore._on_special_token 21 1 0 8 1 93%
promplate/prompt/template.py TemplateCore._make_context 3 1 0 2 1 60%
promplate/prompt/template.py TemplateCore.compile 19 0 0 12 0 100%
promplate/prompt/template.py TemplateCore._patch_for_error_handling 6 0 0 4 0 100%
promplate/prompt/template.py TemplateCore._render_code 2 0 0 0 0 100%
promplate/prompt/template.py TemplateCore.render 5 0 0 0 0 100%
promplate/prompt/template.py TemplateCore._arender_code 2 0 0 0 0 100%
promplate/prompt/template.py TemplateCore.arender 5 3 0 0 0 40%
promplate/prompt/template.py TemplateCore.get_script 2 0 0 0 0 100%
promplate/prompt/template.py Loader.read 4 4 0 0 0 0%
promplate/prompt/template.py Loader.aread 7 7 0 0 0 0%
promplate/prompt/template.py Loader._patch_kwargs 1 1 0 0 0 0%
promplate/prompt/template.py Loader._join_url 4 4 0 2 0 0%
promplate/prompt/template.py Loader.fetch 5 5 0 0 0 0%
promplate/prompt/template.py Loader.afetch 5 5 0 0 0 0%
promplate/prompt/template.py Template.__init__ 2 0 0 0 0 100%
promplate/prompt/template.py Template.render 4 0 0 2 0 100%
promplate/prompt/template.py Template.arender 4 0 0 2 0 100%
promplate/prompt/template.py (no function) 57 5 0 4 1 87%
promplate/prompt/utils.py is_not_valid 1 1 0 0 0 0%
promplate/prompt/utils.py ensure_valid 2 2 0 2 0 0%
promplate/prompt/utils.py AutoNaming.__new__ 3 0 0 0 0 100%
promplate/prompt/utils.py AutoNaming._bind_frame 1 0 0 0 0 100%
promplate/prompt/utils.py AutoNaming._name 5 0 0 6 1 91%
promplate/prompt/utils.py AutoNaming.class_name 1 0 0 0 0 100%
promplate/prompt/utils.py AutoNaming.name 1 0 0 0 0 100%
promplate/prompt/utils.py AutoNaming.name 2 2 0 0 0 0%
promplate/prompt/utils.py AutoNaming.name 1 1 0 0 0 0%
promplate/prompt/utils.py AutoNaming.__repr__ 3 3 0 2 0 0%
promplate/prompt/utils.py AutoNaming.__str__ 1 1 0 0 0 0%
promplate/prompt/utils.py cache_once 4 0 0 0 0 100%
promplate/prompt/utils.py cache_once.wrapper 3 0 0 2 0 100%
promplate/prompt/utils.py get_builtins 1 0 0 0 0 100%
promplate/prompt/utils.py version 5 5 0 0 0 0%
promplate/prompt/utils.py get_user_agent 2 2 0 0 0 0%
promplate/prompt/utils.py _is_http2_available 5 5 0 0 0 0%
promplate/prompt/utils.py _get_client 2 2 0 0 0 0%
promplate/prompt/utils.py _get_aclient 2 2 0 0 0 0%
promplate/prompt/utils.py add_linecache 2 0 0 0 0 100%
promplate/prompt/utils.py save_tempfile 10 3 0 4 1 71%
promplate/prompt/utils.py save_tempfile._ 2 2 0 0 0 0%
promplate/prompt/utils.py (no function) 43 0 0 0 0 100%
Total   991 361 0 256 36 62%

No items found using the specified filter.