lionagi 0.12.1__tar.gz → 0.12.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. {lionagi-0.12.1 → lionagi-0.12.2}/.gitignore +1 -10
  2. {lionagi-0.12.1 → lionagi-0.12.2}/PKG-INFO +4 -4
  3. {lionagi-0.12.1 → lionagi-0.12.2}/README.md +1 -1
  4. lionagi-0.12.2/lionagi/version.py +1 -0
  5. {lionagi-0.12.1 → lionagi-0.12.2}/pyproject.toml +3 -2
  6. {lionagi-0.12.1 → lionagi-0.12.2}/uv.lock +1 -1
  7. lionagi-0.12.1/dev_tools/count_code_base_lines.py +0 -113
  8. lionagi-0.12.1/lionagi/version.py +0 -1
  9. lionagi-0.12.1/prompts/doc_style.md +0 -228
  10. lionagi-0.12.1/reports/ips/IP-601.md +0 -257
  11. lionagi-0.12.1/reports/ips/IP-602.md +0 -272
  12. lionagi-0.12.1/reports/ips/IP-603.md +0 -144
  13. lionagi-0.12.1/reports/ips/IP-604.md +0 -199
  14. lionagi-0.12.1/reports/tis/TI-601.md +0 -233
  15. lionagi-0.12.1/reports/tis/TI-602.md +0 -627
  16. lionagi-0.12.1/reports/tis/TI-603.md +0 -141
  17. lionagi-0.12.1/reports/tis/TI-604.md +0 -223
  18. {lionagi-0.12.1 → lionagi-0.12.2}/.coveragerc +0 -0
  19. {lionagi-0.12.1 → lionagi-0.12.2}/.env.example +0 -0
  20. {lionagi-0.12.1 → lionagi-0.12.2}/.github/dependabot.yml +0 -0
  21. {lionagi-0.12.1 → lionagi-0.12.2}/.github/workflows/ci.yml +0 -0
  22. {lionagi-0.12.1 → lionagi-0.12.2}/.github/workflows/codeql.yml +0 -0
  23. {lionagi-0.12.1 → lionagi-0.12.2}/.github/workflows/docs.yml +0 -0
  24. {lionagi-0.12.1 → lionagi-0.12.2}/.github/workflows/release.yml +0 -0
  25. {lionagi-0.12.1 → lionagi-0.12.2}/.pre-commit-config.yaml +0 -0
  26. {lionagi-0.12.1 → lionagi-0.12.2}/CODE_OF_CONDUCT.md +0 -0
  27. {lionagi-0.12.1 → lionagi-0.12.2}/CONTRIBUTING.md +0 -0
  28. {lionagi-0.12.1 → lionagi-0.12.2}/LICENSE +0 -0
  29. {lionagi-0.12.1 → lionagi-0.12.2}/cookbooks/ch01_get_started.md +0 -0
  30. {lionagi-0.12.1 → lionagi-0.12.2}/cookbooks/ch02_concepts.md +0 -0
  31. {lionagi-0.12.1 → lionagi-0.12.2}/docs/Makefile +0 -0
  32. {lionagi-0.12.1 → lionagi-0.12.2}/docs/_static/custom.css +0 -0
  33. {lionagi-0.12.1 → lionagi-0.12.2}/docs/_templates/layout.html +0 -0
  34. {lionagi-0.12.1 → lionagi-0.12.2}/docs/conf.py +0 -0
  35. {lionagi-0.12.1 → lionagi-0.12.2}/docs/index.rst +0 -0
  36. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/action.rst +0 -0
  37. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/adapter.rst +0 -0
  38. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/branch.rst +0 -0
  39. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/branch_operations.rst +0 -0
  40. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/concepts.rst +0 -0
  41. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/element_id.rst +0 -0
  42. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/event.rst +0 -0
  43. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/form.rst +0 -0
  44. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/graph.rst +0 -0
  45. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/index.rst +0 -0
  46. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/instruct.rst +0 -0
  47. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/lib_file.rst +0 -0
  48. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/lib_nested.rst +0 -0
  49. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/lib_package.rst +0 -0
  50. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/lib_schema.rst +0 -0
  51. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/lib_validate.rst +0 -0
  52. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/log.rst +0 -0
  53. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/mail.rst +0 -0
  54. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/message.rst +0 -0
  55. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/models.rst +0 -0
  56. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/operative_step.rst +0 -0
  57. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/pile.rst +0 -0
  58. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/processor.rst +0 -0
  59. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/progression.rst +0 -0
  60. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/service.rst +0 -0
  61. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/session.rst +0 -0
  62. {lionagi-0.12.1 → lionagi-0.12.2}/docs/modules/utils.rst +0 -0
  63. {lionagi-0.12.1 → lionagi-0.12.2}/docs/tutorials/get_started.rst +0 -0
  64. {lionagi-0.12.1 → lionagi-0.12.2}/docs/tutorials/get_started_pt2.rst +0 -0
  65. {lionagi-0.12.1 → lionagi-0.12.2}/docs/tutorials/get_started_pt3.rst +0 -0
  66. {lionagi-0.12.1 → lionagi-0.12.2}/docs/tutorials/index.rst +0 -0
  67. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/__init__.py +0 -0
  68. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/_class_registry.py +0 -0
  69. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/_errors.py +0 -0
  70. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/_types.py +0 -0
  71. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/adapters/__init__.py +0 -0
  72. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/adapters/adapter.py +0 -0
  73. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/adapters/json_adapter.py +0 -0
  74. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/adapters/pandas_/__init__.py +0 -0
  75. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/adapters/pandas_/csv_adapter.py +0 -0
  76. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/adapters/pandas_/excel_adapter.py +0 -0
  77. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/adapters/pandas_/pd_dataframe_adapter.py +0 -0
  78. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/adapters/pandas_/pd_series_adapter.py +0 -0
  79. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/adapters/toml_adapter.py +0 -0
  80. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/adapters/types.py +0 -0
  81. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/fields/__init__.py +0 -0
  82. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/fields/action.py +0 -0
  83. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/fields/base.py +0 -0
  84. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/fields/code.py +0 -0
  85. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/fields/file.py +0 -0
  86. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/fields/instruct.py +0 -0
  87. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/fields/reason.py +0 -0
  88. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/fields/research.py +0 -0
  89. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/__init__.py +0 -0
  90. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/file/__init__.py +0 -0
  91. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/file/chunk.py +0 -0
  92. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/file/concat.py +0 -0
  93. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/file/concat_files.py +0 -0
  94. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/file/create_path.py +0 -0
  95. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/file/file_ops.py +0 -0
  96. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/file/file_util.py +0 -0
  97. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/file/params.py +0 -0
  98. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/file/process.py +0 -0
  99. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/file/save.py +0 -0
  100. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/nested/__init__.py +0 -0
  101. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/nested/flatten.py +0 -0
  102. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/nested/nfilter.py +0 -0
  103. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/nested/nget.py +0 -0
  104. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/nested/ninsert.py +0 -0
  105. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/nested/nmerge.py +0 -0
  106. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/nested/npop.py +0 -0
  107. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/nested/nset.py +0 -0
  108. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/nested/unflatten.py +0 -0
  109. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/nested/utils.py +0 -0
  110. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/package/__init__.py +0 -0
  111. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/package/imports.py +0 -0
  112. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/package/management.py +0 -0
  113. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/package/params.py +0 -0
  114. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/package/system.py +0 -0
  115. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/parse/__init__.py +0 -0
  116. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/parse/fuzzy_parse_json.py +0 -0
  117. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/parse/to_dict.py +0 -0
  118. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/parse/to_json.py +0 -0
  119. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/parse/to_num.py +0 -0
  120. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/parse/to_xml.py +0 -0
  121. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/parse/xml_parser.py +0 -0
  122. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/schema/__init__.py +0 -0
  123. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/schema/as_readable.py +0 -0
  124. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/schema/breakdown_pydantic_annotation.py +0 -0
  125. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/schema/extract_code_block.py +0 -0
  126. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/schema/extract_docstring.py +0 -0
  127. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/schema/function_to_schema.py +0 -0
  128. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/schema/json_schema.py +0 -0
  129. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/token_transform/__init__.py +0 -0
  130. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/token_transform/base.py +0 -0
  131. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/token_transform/llmlingua.py +0 -0
  132. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/token_transform/perplexity.py +0 -0
  133. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/token_transform/symbolic_compress_context.py +0 -0
  134. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/token_transform/synthlang.py +0 -0
  135. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/token_transform/synthlang_/base.py +0 -0
  136. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/token_transform/synthlang_/resources/frameworks/abstract_algebra.toml +0 -0
  137. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/token_transform/synthlang_/resources/frameworks/category_theory.toml +0 -0
  138. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/token_transform/synthlang_/resources/frameworks/complex_analysis.toml +0 -0
  139. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/token_transform/synthlang_/resources/frameworks/framework_options.json +0 -0
  140. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/token_transform/synthlang_/resources/frameworks/group_theory.toml +0 -0
  141. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/token_transform/synthlang_/resources/frameworks/math_logic.toml +0 -0
  142. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/token_transform/synthlang_/resources/frameworks/reflective_patterns.toml +0 -0
  143. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/token_transform/synthlang_/resources/frameworks/set_theory.toml +0 -0
  144. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/token_transform/synthlang_/resources/frameworks/topology_fundamentals.toml +0 -0
  145. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/token_transform/synthlang_/resources/mapping/lion_emoji_mapping.toml +0 -0
  146. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/token_transform/synthlang_/resources/mapping/python_math_mapping.toml +0 -0
  147. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/token_transform/synthlang_/resources/mapping/rust_chinese_mapping.toml +0 -0
  148. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/token_transform/synthlang_/resources/utility/base_synthlang_system_prompt.toml +0 -0
  149. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/token_transform/synthlang_/translate_to_synthlang.py +0 -0
  150. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/token_transform/types.py +0 -0
  151. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/validate/__init__.py +0 -0
  152. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/validate/common_field_validators.py +0 -0
  153. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/validate/fuzzy_match_keys.py +0 -0
  154. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/validate/fuzzy_validate_mapping.py +0 -0
  155. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/validate/string_similarity.py +0 -0
  156. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/libs/validate/validate_boolean.py +0 -0
  157. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/models/__init__.py +0 -0
  158. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/models/field_model.py +0 -0
  159. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/models/hashable_model.py +0 -0
  160. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/models/model_params.py +0 -0
  161. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/models/note.py +0 -0
  162. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/models/operable_model.py +0 -0
  163. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/models/schema_model.py +0 -0
  164. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/ReAct/ReAct.py +0 -0
  165. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/ReAct/__init__.py +0 -0
  166. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/ReAct/utils.py +0 -0
  167. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/__init__.py +0 -0
  168. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/_act/__init__.py +0 -0
  169. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/_act/act.py +0 -0
  170. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/brainstorm/__init__.py +0 -0
  171. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/brainstorm/brainstorm.py +0 -0
  172. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/brainstorm/prompt.py +0 -0
  173. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/chat/__init__.py +0 -0
  174. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/chat/chat.py +0 -0
  175. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/communicate/__init__.py +0 -0
  176. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/communicate/communicate.py +0 -0
  177. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/instruct/__init__.py +0 -0
  178. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/instruct/instruct.py +0 -0
  179. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/interpret/__init__.py +0 -0
  180. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/interpret/interpret.py +0 -0
  181. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/manager.py +0 -0
  182. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/operate/__init__.py +0 -0
  183. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/operate/operate.py +0 -0
  184. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/parse/__init__.py +0 -0
  185. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/parse/parse.py +0 -0
  186. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/plan/__init__.py +0 -0
  187. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/plan/plan.py +0 -0
  188. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/plan/prompt.py +0 -0
  189. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/select/__init__.py +0 -0
  190. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/select/select.py +0 -0
  191. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/select/utils.py +0 -0
  192. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/translate/__init__.py +0 -0
  193. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/translate/translate.py +0 -0
  194. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/types.py +0 -0
  195. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/operations/utils.py +0 -0
  196. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/__init__.py +0 -0
  197. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/_concepts.py +0 -0
  198. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/action/__init__.py +0 -0
  199. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/action/function_calling.py +0 -0
  200. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/action/manager.py +0 -0
  201. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/action/tool.py +0 -0
  202. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/forms/__init__.py +0 -0
  203. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/forms/base.py +0 -0
  204. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/forms/flow.py +0 -0
  205. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/forms/form.py +0 -0
  206. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/forms/report.py +0 -0
  207. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/generic/__init__.py +0 -0
  208. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/generic/element.py +0 -0
  209. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/generic/event.py +0 -0
  210. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/generic/log.py +0 -0
  211. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/generic/pile.py +0 -0
  212. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/generic/processor.py +0 -0
  213. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/generic/progression.py +0 -0
  214. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/graph/__init__.py +0 -0
  215. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/graph/edge.py +0 -0
  216. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/graph/graph.py +0 -0
  217. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/graph/node.py +0 -0
  218. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/mail/__init__.py +0 -0
  219. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/mail/exchange.py +0 -0
  220. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/mail/mail.py +0 -0
  221. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/mail/mailbox.py +0 -0
  222. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/mail/manager.py +0 -0
  223. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/mail/package.py +0 -0
  224. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/messages/__init__.py +0 -0
  225. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/messages/action_request.py +0 -0
  226. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/messages/action_response.py +0 -0
  227. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/messages/assistant_response.py +0 -0
  228. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/messages/base.py +0 -0
  229. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/messages/instruction.py +0 -0
  230. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/messages/manager.py +0 -0
  231. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/messages/message.py +0 -0
  232. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/messages/system.py +0 -0
  233. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/messages/templates/README.md +0 -0
  234. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/messages/templates/action_request.jinja2 +0 -0
  235. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/messages/templates/action_response.jinja2 +0 -0
  236. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/messages/templates/assistant_response.jinja2 +0 -0
  237. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/messages/templates/instruction_message.jinja2 +0 -0
  238. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/messages/templates/system_message.jinja2 +0 -0
  239. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/messages/templates/tool_schemas.jinja2 +0 -0
  240. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/operatives/__init__.py +0 -0
  241. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/operatives/operative.py +0 -0
  242. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/operatives/step.py +0 -0
  243. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/protocols/types.py +0 -0
  244. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/__init__.py +0 -0
  245. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/endpoints/__init__.py +0 -0
  246. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/endpoints/base.py +0 -0
  247. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/endpoints/chat_completion.py +0 -0
  248. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/endpoints/match_endpoint.py +0 -0
  249. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/endpoints/rate_limited_processor.py +0 -0
  250. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/endpoints/token_calculator.py +0 -0
  251. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/imodel.py +0 -0
  252. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/manager.py +0 -0
  253. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/providers/__init__.py +0 -0
  254. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/providers/anthropic_/__init__.py +0 -0
  255. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/providers/anthropic_/messages.py +0 -0
  256. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/providers/exa_/__init__.py +0 -0
  257. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/providers/exa_/models.py +0 -0
  258. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/providers/exa_/search.py +0 -0
  259. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/providers/exa_/types.py +0 -0
  260. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/providers/groq_/__init__.py +0 -0
  261. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/providers/groq_/chat_completions.py +0 -0
  262. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/providers/ollama_/__init__.py +0 -0
  263. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/providers/ollama_/chat_completions.py +0 -0
  264. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/providers/openai_/__init__.py +0 -0
  265. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/providers/openai_/chat_completions.py +0 -0
  266. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/providers/openai_/spec.py +0 -0
  267. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/providers/openrouter_/__init__.py +0 -0
  268. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/providers/openrouter_/chat_completions.py +0 -0
  269. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/providers/perplexity_/__init__.py +0 -0
  270. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/providers/perplexity_/chat_completions.py +0 -0
  271. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/providers/perplexity_/models.py +0 -0
  272. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/providers/types.py +0 -0
  273. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/service/types.py +0 -0
  274. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/session/__init__.py +0 -0
  275. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/session/branch.py +0 -0
  276. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/session/prompts.py +0 -0
  277. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/session/session.py +0 -0
  278. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/settings.py +0 -0
  279. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/tools/__init__.py +0 -0
  280. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/tools/base.py +0 -0
  281. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/tools/file/__init__.py +0 -0
  282. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/tools/file/reader.py +0 -0
  283. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/tools/types.py +0 -0
  284. {lionagi-0.12.1 → lionagi-0.12.2}/lionagi/utils.py +0 -0
@@ -165,18 +165,9 @@ cython_debug/
165
165
  #.idea/
166
166
 
167
167
  # Generated files
168
- lionagi/adapter_map.json
169
168
  # Exclude setup.py and pyproject.toml from version control
170
- setup.py
171
- pyproject.toml
172
- .idea/
173
- .data/
174
- notebooks/.lock
175
- notebooks/meta.json
176
- logs/
177
- temp_logs/
178
- dev/
179
169
  *.DS_Store
180
170
  .roomodes
181
171
  .khive/
182
172
  .roo/
173
+ data/logs/
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lionagi
3
- Version: 0.12.1
3
+ Version: 0.12.2
4
4
  Summary: An Intelligence Operating System.
5
- Author-email: HaiyangLi <quantocean.li@gmail.com>
5
+ Author-email: HaiyangLi <quantocean.li@gmail.com>, Liangbingyan Luo <llby_luo@outlook.com>
6
6
  License: Apache License
7
7
  Version 2.0, January 2004
8
8
  http://www.apache.org/licenses/
@@ -220,7 +220,7 @@ Classifier: Programming Language :: Python :: 3.12
220
220
  Classifier: Programming Language :: Python :: 3.13
221
221
  Requires-Python: >=3.10
222
222
  Requires-Dist: jinja2>=3.0.0
223
- Requires-Dist: khive>=0.2.6
223
+ Requires-Dist: khive>=0.2.7
224
224
  Requires-Dist: pandas>=2.0.0
225
225
  Requires-Dist: tiktoken>=0.8.0
226
226
  Provides-Extra: all
@@ -391,7 +391,7 @@ We welcome issues, ideas, and pull requests:
391
391
 
392
392
  ```
393
393
  @software{Li_LionAGI_2023,
394
- author = {Haiyang Li},
394
+ author = {Haiyang Li, Liangbingyan Luo},
395
395
  month = {12},
396
396
  year = {2023},
397
397
  title = {LionAGI: Towards Automated General Intelligence},
@@ -155,7 +155,7 @@ We welcome issues, ideas, and pull requests:
155
155
 
156
156
  ```
157
157
  @software{Li_LionAGI_2023,
158
- author = {Haiyang Li},
158
+ author = {Haiyang Li, Liangbingyan Luo},
159
159
  month = {12},
160
160
  year = {2023},
161
161
  title = {LionAGI: Towards Automated General Intelligence},
@@ -0,0 +1 @@
1
+ __version__ = "0.12.2"
@@ -1,15 +1,16 @@
1
1
  [project]
2
2
  name = "lionagi"
3
- version = "0.12.1"
3
+ version = "0.12.2"
4
4
  description = "An Intelligence Operating System."
5
5
  authors = [
6
6
  { name = "HaiyangLi", email = "quantocean.li@gmail.com" },
7
+ { name = "Liangbingyan Luo", email = "llby_luo@outlook.com" }
7
8
  ]
8
9
  readme = "README.md"
9
10
  requires-python = ">=3.10"
10
11
  dependencies = [
11
12
  "jinja2>=3.0.0",
12
- "khive>=0.2.6",
13
+ "khive>=0.2.7",
13
14
  "pandas>=2.0.0",
14
15
  "tiktoken>=0.8.0",
15
16
  ]
@@ -1378,7 +1378,7 @@ wheels = [
1378
1378
 
1379
1379
  [[package]]
1380
1380
  name = "lionagi"
1381
- version = "0.12.1"
1381
+ version = "0.12.2"
1382
1382
  source = { editable = "." }
1383
1383
  dependencies = [
1384
1384
  { name = "jinja2" },
@@ -1,113 +0,0 @@
1
- import os
2
- from collections import defaultdict
3
-
4
-
5
- def analyze_file(file_path):
6
- with open(file_path, encoding="utf-8") as file:
7
- lines = file.readlines()
8
-
9
- stats = {
10
- "total_lines": len(lines),
11
- "code_lines": 0,
12
- "comment_lines": 0,
13
- "blank_lines": 0,
14
- "docstring_lines": 0,
15
- }
16
-
17
- in_docstring = False
18
- docstring_delimiter = None
19
-
20
- for line in lines:
21
- stripped = line.strip()
22
-
23
- if not stripped:
24
- stats["blank_lines"] += 1
25
- continue
26
-
27
- if in_docstring:
28
- stats["docstring_lines"] += 1
29
- if stripped.endswith(docstring_delimiter):
30
- in_docstring = False
31
- continue
32
-
33
- if stripped.startswith("'''") or stripped.startswith('"""'):
34
- stats["docstring_lines"] += 1
35
- in_docstring = True
36
- docstring_delimiter = stripped[0] * 3
37
- if stripped.endswith(docstring_delimiter) and len(stripped) > 3:
38
- in_docstring = False
39
- continue
40
-
41
- if stripped.startswith("#"):
42
- stats["comment_lines"] += 1
43
- else:
44
- stats["code_lines"] += 1
45
-
46
- return stats
47
-
48
-
49
- def analyze_package(package_path):
50
- total_stats = defaultdict(lambda: defaultdict(int))
51
- file_stats = {}
52
-
53
- for root, _, files in os.walk(package_path):
54
- for file in files:
55
- if file.endswith((".py", ".pyx", ".pyd")):
56
- file_path = os.path.join(root, file)
57
- relative_path = os.path.relpath(file_path, package_path)
58
- stats = analyze_file(file_path)
59
- file_stats[relative_path] = stats
60
-
61
- file_type = "Python"
62
- if file.endswith(".pyx"):
63
- file_type = "Cython"
64
- elif file.endswith(".pyd"):
65
- file_type = "Python DLL"
66
-
67
- for key, value in stats.items():
68
- total_stats[file_type][key] += value
69
-
70
- return total_stats, file_stats
71
-
72
-
73
- def print_analysis(total_stats, file_stats):
74
- print("Package Analysis:")
75
- print("=================")
76
-
77
- grand_total = defaultdict(int)
78
- for file_type, stats in total_stats.items():
79
- print(f"\n{file_type} Files:")
80
- print(f" Total Lines: {stats['total_lines']}")
81
- print(f" Code Lines: {stats['code_lines']}")
82
- print(f" Comment Lines: {stats['comment_lines']}")
83
- print(f" Docstring Lines: {stats['docstring_lines']}")
84
- print(f" Blank Lines: {stats['blank_lines']}")
85
-
86
- for key, value in stats.items():
87
- grand_total[key] += value
88
-
89
- print("\nGrand Total:")
90
- print(f" Total Lines: {grand_total['total_lines']}")
91
- print(f" Code Lines: {grand_total['code_lines']}")
92
- print(f" Comment Lines: {grand_total['comment_lines']}")
93
- print(f" Docstring Lines: {grand_total['docstring_lines']}")
94
- print(f" Blank Lines: {grand_total['blank_lines']}")
95
-
96
- print("\nTop 10 Files by Code Lines:")
97
- sorted_files = sorted(
98
- file_stats.items(), key=lambda x: x[1]["code_lines"], reverse=True
99
- )
100
- for file, stats in sorted_files[:10]:
101
- print(f" {file}: {stats['code_lines']} code lines")
102
-
103
-
104
- if __name__ == "__main__":
105
- print("Lion Analysis")
106
- package_path = "./lionagi" # Replace with your package path
107
- total_stats, file_stats = analyze_package(package_path)
108
- print_analysis(total_stats, file_stats)
109
-
110
- print("\nDev Tool Analysis")
111
- package_path = "./tests" # Replace with your package path
112
- total_stats, file_stats = analyze_package(package_path)
113
- print_analysis(total_stats, file_stats)
@@ -1 +0,0 @@
1
- __version__ = "0.12.1"
@@ -1,228 +0,0 @@
1
- Use this as the single source of truth for any project contributor writing or
2
- updating documentation.
3
-
4
- Table of Contents 1. General Principles 2. Tone & Wording 3. Documentation
5
- Format & Organization 4. Docstring Conventions • 4.1. High-Level Python
6
- Docstring Standards • 4.2. NumPy/Pandas Style Docstring Format • 4.3. Examples
7
- of Method & Class Docstrings 5. Cross-References & Linking 6. Styling & Layout
8
- • 6.1. Page Layout & Margins • 6.2. Fonts & Color • 6.3. Headings & Hierarchy
9
- 7. Content Structure • 7.1. Module-Level Documentation • 7.2. Class & Function
10
- Documentation • 7.3. Inline Explanations & Code Blocks 8. Consistent Language &
11
- Terminology 9. Handling Errors, Exceptions, & Edge Cases 10. Examples & Sample
12
- Outputs 11. Release Notes & Changelog 12. Concluding Notes
13
-
14
- 1. General Principles
15
- 1. Consistency: All documentation (docstrings, reST files, Markdown guides)
16
- should follow the conventions in this guide. This ensures that docs are
17
- easy to navigate and maintain.
18
- 2. Clarity: Prioritize clarity over brevity. Write in plain, understandable
19
- English, especially for public-facing references.
20
- 3. Accuracy: Keep descriptions accurate and up to date with code changes.
21
- Avoid speculation or unverified examples.
22
- 4. Conciseness: Although clarity is important, docstrings and references
23
- should not be overly wordy. Avoid duplicating content unnecessarily;
24
- cross-reference instead.
25
- 5. Professional Tone: Use a neutral, instructional, and professional voice.
26
- Avoid slang or overly informal language.
27
-
28
- 2. Tone & Wording • Tone: • Aim for a direct and guiding tone, as if you are
29
- instructing a fellow engineer or data scientist. • Avoid casual phrases like
30
- “just do X.” Instead, use more precise language such as “use the X function
31
- to achieve …”. • Wording: • Use active voice whenever possible (e.g., “Call
32
- validate() to check input” rather than “validate() is called to check
33
- input”). • Prefer short sentences. Complex constructs can be broken up to
34
- improve readability. • Avoid ambiguous pronouns (“it,” “this,” “that”)
35
- without clear references. • Jargon: • Introduce specialized terms or acronyms
36
- only if necessary. • Provide a succinct definition the first time a new term
37
- appears.
38
-
39
- 3. Documentation Format & Organization
40
-
41
- We rely on reStructuredText (reST) for Sphinx-generated documentation. Some
42
- sections (like READMEs or tutorials) may use Markdown. • Module Docs: Each
43
- module should have a top-level docstring or an accompanying .rst file explaining
44
- its purpose, main classes/functions, and usage context. • Class Docs: Each class
45
- should have a docstring describing its purpose, attributes, and how it typically
46
- interacts with other classes. • Function/Method Docs: Each should explain the
47
- parameters, return values, raised exceptions, and usage examples where relevant.
48
-
49
- To keep these consistent, we use Google style docstrings for functions and
50
- classes.
51
-
52
- 4. Docstring Conventions
53
-
54
- 4.1. High-Level Python Docstring Standards • Adhere to PEP 257 (Python Docstring
55
- Conventions). • Triple quotes (""") for docstring blocks, with a one-line
56
- summary followed by a blank line, then more detail if needed. • Use Google style
57
- for function and class docstrings.
58
-
59
- Example minimal docstring:
60
-
61
- def my_function(arg1, arg2): """One-line summary of what my_function does.
62
-
63
- More descriptive text that covers details such as usage, side effects,
64
- or other clarifications. If not needed, keep docstring minimal.
65
-
66
- Args:
67
- arg1: Description of arg1
68
- arg2: Description of arg2
69
-
70
- Returns:
71
- Description of return value
72
- """
73
- pass
74
-
75
- 4.2. Google Style Docstring Format
76
-
77
- For all functions and classes, we use Google style docstrings. The key sections
78
- are: 1. Short Summary 2. Extended Summary (optional) 3. Args 4. Returns or
79
- Yields 5. Raises 6. Note (optional) 7. Examples (optional)
80
-
81
- Example:
82
-
83
- def compute_stats(data, axis=0): """Compute descriptive statistics for the input
84
- data.
85
-
86
- This function calculates mean, standard deviation, and optionally
87
- other metrics across the specified axis.
88
-
89
- Args:
90
- data: Input dataset.
91
- axis: Axis along which the statistics are computed. Defaults to 0.
92
-
93
- Returns:
94
- Dictionary containing keys 'mean' and 'std', each mapped to floats
95
- or arrays of floats (depending on input shape).
96
-
97
- Raises:
98
- ValueError: If `data` cannot be converted to a numeric array.
99
-
100
- Examples:
101
- >>> import numpy as np
102
- >>> arr = np.array([[1, 2], [3, 4]])
103
- >>> compute_stats(arr, axis=1)
104
- {'mean': array([1.5, 3.5]), 'std': array([0.5, 0.5])}
105
- """
106
- pass
107
-
108
- 4.3. Examples of Method & Class Docstrings
109
-
110
- For classes, include: • Short description of the class's purpose. • Attributes:
111
- List them in a NumPy-style “Attributes” section or mention in constructor
112
- docstring. • Public methods can each follow the format above with “Parameters,”
113
- “Returns,” “Raises,” etc.
114
-
115
- class DataContainer: """ Stores dataset in memory with lazy-loaded metadata.
116
-
117
- Attributes
118
- ----------
119
- data : array-like
120
- Main dataset array.
121
- metadata : dict
122
- Dictionary storing metadata such as column names or data source info.
123
-
124
- Methods
125
- -------
126
- load_data(source):
127
- Reads data from a given source into memory.
128
- """
129
-
130
- def __init__(self, data, metadata=None):
131
- """
132
- Initialize the DataContainer with data and optional metadata.
133
-
134
- Parameters
135
- ----------
136
- data : array-like
137
- The data array to store.
138
- metadata : dict, optional
139
- A dictionary providing details about the data.
140
- """
141
- self.data = data
142
- self.metadata = metadata or {}
143
-
144
- 5. Cross-References & Linking • Use inline cross-references sparingly. For
145
- example, in reST:
146
-
147
- See also :class:`lionagi.protocols.generic.pile.Pile` for a concurrency-safe
148
- collection.
149
-
150
- • Cross-reference key concepts from other modules or major classes. Avoid linking every mention of a class to avoid clutter. The rule of thumb: link the first mention in a section.
151
- • For configuration references, link to relevant sections. For instance, “See Configuration Options_ for advanced usage.”
152
-
153
- 6. Styling & Layout
154
-
155
- 6.1. Page Layout & Margins • In Sphinx output: • The default theme margins (Read
156
- the Docs or Sphinx default) are sufficient. We do not apply custom margins for
157
- standard reST references. • For PDF output, use the default LaTeX margins unless
158
- the design team specifies otherwise.
159
-
160
- 6.2. Fonts & Color • Fonts: Rely on the Sphinx theme defaults (e.g., standard
161
- sans-serif for headings, monospace for code blocks). Avoid custom fonts for the
162
- official docs. • Colors: Use standard Python/syntax highlighting from Pygments
163
- or the theme's built-in styles. Avoid custom color coding in docstrings or
164
- references unless absolutely necessary (e.g., emphasis in a table).
165
-
166
- 6.3. Headings & Hierarchy • Maintain a consistent heading hierarchy in .rst
167
- files: • # with overline for the top-level doc title • = characters for major
168
- sections • - characters for subsections • ~ or ^ for sub-subsections
169
-
170
- Example:
171
-
172
- # ====================================== Major Title
173
-
174
- ## Subsection
175
-
176
- Sub-subsection ^^^^^^^^^^^^^^
177
-
178
- 7. Content Structure
179
-
180
- 7.1. Module-Level Documentation • At the top of each module's .rst or docstring,
181
- explain the purpose of the module, key classes or functions, and a simple usage
182
- note. • Provide references to deeper classes or method docs below or
183
- cross-reference them.
184
-
185
- 7.2. Class & Function Documentation • Classes generally get an overview
186
- docstring plus separate docstrings on each public method. • Private or
187
- “internal” methods (like _helper_function) can have shorter docstrings or remain
188
- undocumented if not user-facing.
189
-
190
- 7.3. Inline Explanations & Code Blocks • Use code blocks for usage samples or
191
- short code snippets. • Keep them minimal yet illustrative; do not show massive
192
- code if a 3-line snippet suffices.
193
-
194
- 8. Consistent Language & Terminology • Use the same terms for the same concepts
195
- throughout the project. For example: • “metadata,” “configuration,”
196
- “manager,” “observer,” etc. • Document these terms in a glossary if needed.
197
- • For concurrency or async references, remain consistent with “asynchronous,”
198
- “async,” “await,” etc.
199
-
200
- 9. Handling Errors, Exceptions, & Edge Cases • Document known exceptions in the
201
- Raises section of the docstring. • For complex error-handling logic, add a
202
- note or short example clarifying the scenario (only if it's highly relevant
203
- and can be shown succinctly).
204
-
205
- 10. Examples & Sample Outputs • Keep examples factual and testable. Avoid
206
- showing code that doesn't exist or cannot be inferred from the current
207
- context. • If the function is easily tested in a Python shell, provide a
208
- short >>> example. • For classes, show minimal usage, focusing on the
209
- constructor or key methods.
210
-
211
- 11. Release Notes & Changelog • Use a separate file such as CHANGELOG.rst or
212
- docs/source/release_notes.rst to outline new features, bug fixes, and
213
- version changes. • Keep the style consistent with the rest of the docs.
214
- • Reference relevant modules or classes using cross-links when describing
215
- changes.
216
-
217
- 12. Concluding Notes • This style guide must be reviewed periodically,
218
- especially if new doc generators or new theming options are introduced.
219
- • Any major additions to the codebase (e.g., a new “Manager” or “Observer”
220
- type) should include docstrings, reST references, and examples consistent
221
- with these guidelines. • Contributors should be encouraged to update the
222
- docs alongside code changes, ensuring everything stays in sync.
223
-
224
- Final Checklist 1. Docstrings match the NumPy style (or, if simpler, PEP 257
225
- minimal style). 2. Links to relevant classes or modules are included but not
226
- overused. 3. Examples are valid, minimal, and show typical usage. 4. Styling
227
- adheres to standard Sphinx theming for consistency (no excessive custom color,
228
- fonts, or margin changes). 5. Language is clear, direct, and unambiguous.