nexusx 2.0.0__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 (268) hide show
  1. nexusx-2.0.0/.github/workflows/ci.yml +37 -0
  2. nexusx-2.0.0/.github/workflows/gh-pages.yml +34 -0
  3. nexusx-2.0.0/.github/workflows/publish.yml +41 -0
  4. nexusx-2.0.0/.gitignore +51 -0
  5. nexusx-2.0.0/.python-version +1 -0
  6. nexusx-2.0.0/.skills/README.md +127 -0
  7. nexusx-2.0.0/.skills/release.md +73 -0
  8. nexusx-2.0.0/.skills/release.py +181 -0
  9. nexusx-2.0.0/.skills/release.sh +112 -0
  10. nexusx-2.0.0/CHANGELOG.md +534 -0
  11. nexusx-2.0.0/CLAUDE.md +187 -0
  12. nexusx-2.0.0/LICENSE +21 -0
  13. nexusx-2.0.0/PKG-INFO +686 -0
  14. nexusx-2.0.0/README.md +644 -0
  15. nexusx-2.0.0/demo/__init__.py +1 -0
  16. nexusx-2.0.0/demo/auth/__init__.py +1 -0
  17. nexusx-2.0.0/demo/auth/app.py +143 -0
  18. nexusx-2.0.0/demo/auth/auth.py +89 -0
  19. nexusx-2.0.0/demo/auth/mcp_server.py +76 -0
  20. nexusx-2.0.0/demo/auth/test_auth.sh +245 -0
  21. nexusx-2.0.0/demo/blog/README.md +117 -0
  22. nexusx-2.0.0/demo/blog/__init__.py +0 -0
  23. nexusx-2.0.0/demo/blog/app.py +108 -0
  24. nexusx-2.0.0/demo/blog/app_paginated.py +152 -0
  25. nexusx-2.0.0/demo/blog/database.py +155 -0
  26. nexusx-2.0.0/demo/blog/er_diagram_demo.py +42 -0
  27. nexusx-2.0.0/demo/blog/mcp_server.py +35 -0
  28. nexusx-2.0.0/demo/blog/mcp_server_simple.py +125 -0
  29. nexusx-2.0.0/demo/blog/models.py +360 -0
  30. nexusx-2.0.0/demo/core_api/__init__.py +0 -0
  31. nexusx-2.0.0/demo/core_api/app.py +166 -0
  32. nexusx-2.0.0/demo/core_api/database.py +158 -0
  33. nexusx-2.0.0/demo/core_api/dtos.py +176 -0
  34. nexusx-2.0.0/demo/core_api/models.py +196 -0
  35. nexusx-2.0.0/demo/multi_app/__init__.py +6 -0
  36. nexusx-2.0.0/demo/multi_app/database.py +142 -0
  37. nexusx-2.0.0/demo/multi_app/mcp_server.py +87 -0
  38. nexusx-2.0.0/demo/multi_app/models.py +280 -0
  39. nexusx-2.0.0/demo/use_case/__init__.py +0 -0
  40. nexusx-2.0.0/demo/use_case/fastapi.py +142 -0
  41. nexusx-2.0.0/demo/use_case/fastapi_auto.py +144 -0
  42. nexusx-2.0.0/demo/use_case/mcp_server.py +182 -0
  43. nexusx-2.0.0/demo/use_case/voyager_demo.py +120 -0
  44. nexusx-2.0.0/docs/advanced/mcp_service.md +84 -0
  45. nexusx-2.0.0/docs/advanced/mcp_service.zh.md +84 -0
  46. nexusx-2.0.0/docs/advanced/use_case_fastapi.md +89 -0
  47. nexusx-2.0.0/docs/advanced/use_case_fastapi.zh.md +89 -0
  48. nexusx-2.0.0/docs/advanced/use_case_service.md +88 -0
  49. nexusx-2.0.0/docs/advanced/use_case_service.zh.md +88 -0
  50. nexusx-2.0.0/docs/advanced/voyager.md +126 -0
  51. nexusx-2.0.0/docs/advanced/voyager.zh.md +126 -0
  52. nexusx-2.0.0/docs/api/api_core.md +124 -0
  53. nexusx-2.0.0/docs/api/api_core.zh.md +124 -0
  54. nexusx-2.0.0/docs/api/api_cross_layer.md +77 -0
  55. nexusx-2.0.0/docs/api/api_cross_layer.zh.md +77 -0
  56. nexusx-2.0.0/docs/api/api_graphql_handler.md +91 -0
  57. nexusx-2.0.0/docs/api/api_graphql_handler.zh.md +91 -0
  58. nexusx-2.0.0/docs/api/api_mcp.md +76 -0
  59. nexusx-2.0.0/docs/api/api_mcp.zh.md +76 -0
  60. nexusx-2.0.0/docs/api/api_relationship.md +78 -0
  61. nexusx-2.0.0/docs/api/api_relationship.zh.md +78 -0
  62. nexusx-2.0.0/docs/api/api_use_case.md +145 -0
  63. nexusx-2.0.0/docs/api/api_use_case.zh.md +145 -0
  64. nexusx-2.0.0/docs/guide/core_api.md +96 -0
  65. nexusx-2.0.0/docs/guide/core_api.zh.md +96 -0
  66. nexusx-2.0.0/docs/guide/core_api_advanced.md +137 -0
  67. nexusx-2.0.0/docs/guide/core_api_advanced.zh.md +137 -0
  68. nexusx-2.0.0/docs/guide/custom_relationship.md +92 -0
  69. nexusx-2.0.0/docs/guide/custom_relationship.zh.md +92 -0
  70. nexusx-2.0.0/docs/guide/er_diagram.md +105 -0
  71. nexusx-2.0.0/docs/guide/er_diagram.zh.md +105 -0
  72. nexusx-2.0.0/docs/guide/er_diagram_visual.md +119 -0
  73. nexusx-2.0.0/docs/guide/er_diagram_visual.zh.md +119 -0
  74. nexusx-2.0.0/docs/guide/graphql_auto_query.md +78 -0
  75. nexusx-2.0.0/docs/guide/graphql_auto_query.zh.md +78 -0
  76. nexusx-2.0.0/docs/guide/graphql_mode.md +118 -0
  77. nexusx-2.0.0/docs/guide/graphql_mode.zh.md +118 -0
  78. nexusx-2.0.0/docs/guide/graphql_pagination.md +102 -0
  79. nexusx-2.0.0/docs/guide/graphql_pagination.zh.md +102 -0
  80. nexusx-2.0.0/docs/guide/quick_start.md +103 -0
  81. nexusx-2.0.0/docs/guide/quick_start.zh.md +103 -0
  82. nexusx-2.0.0/docs/index.md +75 -0
  83. nexusx-2.0.0/docs/index.zh.md +75 -0
  84. nexusx-2.0.0/docs/reference/changelog.md +41 -0
  85. nexusx-2.0.0/docs/reference/changelog.zh.md +41 -0
  86. nexusx-2.0.0/docs/reference/migration.md +123 -0
  87. nexusx-2.0.0/docs/reference/migration.zh.md +105 -0
  88. nexusx-2.0.0/docs/stylesheets/extra.css +23 -0
  89. nexusx-2.0.0/docs/superpowers/plans/2026-03-12-simple-mcp-server.md +487 -0
  90. nexusx-2.0.0/docs/superpowers/specs/2026-03-12-simple-mcp-server-design.md +145 -0
  91. nexusx-2.0.0/docs/superpowers/specs/2026-04-29-audit.md +192 -0
  92. nexusx-2.0.0/how_it_works.md +501 -0
  93. nexusx-2.0.0/llms-full.txt +1229 -0
  94. nexusx-2.0.0/mkdocs.yml +135 -0
  95. nexusx-2.0.0/overrides/home.html +868 -0
  96. nexusx-2.0.0/pyproject.toml +84 -0
  97. nexusx-2.0.0/skill/SKILL.md +592 -0
  98. nexusx-2.0.0/skill/template/pyproject.toml +26 -0
  99. nexusx-2.0.0/skill/template/src/__init__.py +0 -0
  100. nexusx-2.0.0/skill/template/src/database.py +44 -0
  101. nexusx-2.0.0/skill/template/src/db.py +9 -0
  102. nexusx-2.0.0/skill/template/src/main.py +144 -0
  103. nexusx-2.0.0/skill/template/src/models.py +103 -0
  104. nexusx-2.0.0/skill/template/src/router/__init__.py +0 -0
  105. nexusx-2.0.0/skill/template/src/router/api.py +30 -0
  106. nexusx-2.0.0/skill/template/src/service/__init__.py +0 -0
  107. nexusx-2.0.0/skill/template/src/service/sprint/__init__.py +0 -0
  108. nexusx-2.0.0/skill/template/src/service/sprint/dtos.py +19 -0
  109. nexusx-2.0.0/skill/template/src/service/sprint/methods.py +28 -0
  110. nexusx-2.0.0/skill/template/src/service/sprint/service.py +40 -0
  111. nexusx-2.0.0/skill/template/src/service/sprint/spec.md +32 -0
  112. nexusx-2.0.0/skill/template/src/service/sprint/test.py +0 -0
  113. nexusx-2.0.0/skill/template/src/service/task/__init__.py +0 -0
  114. nexusx-2.0.0/skill/template/src/service/task/dtos.py +14 -0
  115. nexusx-2.0.0/skill/template/src/service/task/methods.py +31 -0
  116. nexusx-2.0.0/skill/template/src/service/task/service.py +43 -0
  117. nexusx-2.0.0/skill/template/src/service/task/spec.md +28 -0
  118. nexusx-2.0.0/skill/template/src/service/task/test.py +0 -0
  119. nexusx-2.0.0/skill/template/src/service/user/__init__.py +0 -0
  120. nexusx-2.0.0/skill/template/src/service/user/methods.py +22 -0
  121. nexusx-2.0.0/skill/template/src/service/user/spec.md +19 -0
  122. nexusx-2.0.0/skill/template/uv.lock +1594 -0
  123. nexusx-2.0.0/src/nexusx/__init__.py +117 -0
  124. nexusx-2.0.0/src/nexusx/context.py +212 -0
  125. nexusx-2.0.0/src/nexusx/decorator.py +102 -0
  126. nexusx-2.0.0/src/nexusx/discovery/__init__.py +5 -0
  127. nexusx-2.0.0/src/nexusx/discovery/entity_discovery.py +112 -0
  128. nexusx-2.0.0/src/nexusx/er_diagram.py +222 -0
  129. nexusx-2.0.0/src/nexusx/execution/__init__.py +6 -0
  130. nexusx-2.0.0/src/nexusx/execution/argument_builder.py +199 -0
  131. nexusx-2.0.0/src/nexusx/execution/field_tree_builder.py +37 -0
  132. nexusx-2.0.0/src/nexusx/execution/query_executor.py +486 -0
  133. nexusx-2.0.0/src/nexusx/graphiql.py +68 -0
  134. nexusx-2.0.0/src/nexusx/handler.py +183 -0
  135. nexusx-2.0.0/src/nexusx/introspection.py +805 -0
  136. nexusx-2.0.0/src/nexusx/loader/__init__.py +19 -0
  137. nexusx-2.0.0/src/nexusx/loader/factories.py +570 -0
  138. nexusx-2.0.0/src/nexusx/loader/pagination.py +107 -0
  139. nexusx-2.0.0/src/nexusx/loader/query_meta.py +162 -0
  140. nexusx-2.0.0/src/nexusx/loader/registry.py +513 -0
  141. nexusx-2.0.0/src/nexusx/mcp/__init__.py +56 -0
  142. nexusx-2.0.0/src/nexusx/mcp/builders/__init__.py +7 -0
  143. nexusx-2.0.0/src/nexusx/mcp/builders/schema_formatter.py +264 -0
  144. nexusx-2.0.0/src/nexusx/mcp/builders/type_tracer.py +163 -0
  145. nexusx-2.0.0/src/nexusx/mcp/managers/__init__.py +7 -0
  146. nexusx-2.0.0/src/nexusx/mcp/managers/app_resources.py +46 -0
  147. nexusx-2.0.0/src/nexusx/mcp/managers/multi_app_manager.py +129 -0
  148. nexusx-2.0.0/src/nexusx/mcp/managers/single_app_manager.py +82 -0
  149. nexusx-2.0.0/src/nexusx/mcp/server.py +213 -0
  150. nexusx-2.0.0/src/nexusx/mcp/tools/__init__.py +15 -0
  151. nexusx-2.0.0/src/nexusx/mcp/tools/get_operation_schema.py +202 -0
  152. nexusx-2.0.0/src/nexusx/mcp/tools/graphql_mutation.py +87 -0
  153. nexusx-2.0.0/src/nexusx/mcp/tools/graphql_query.py +88 -0
  154. nexusx-2.0.0/src/nexusx/mcp/tools/list_operations.py +89 -0
  155. nexusx-2.0.0/src/nexusx/mcp/tools/multi_app_tools.py +467 -0
  156. nexusx-2.0.0/src/nexusx/mcp/tools/simple_tools.py +190 -0
  157. nexusx-2.0.0/src/nexusx/mcp/types/__init__.py +15 -0
  158. nexusx-2.0.0/src/nexusx/mcp/types/app_config.py +29 -0
  159. nexusx-2.0.0/src/nexusx/mcp/types/errors.py +97 -0
  160. nexusx-2.0.0/src/nexusx/query_parser.py +150 -0
  161. nexusx-2.0.0/src/nexusx/relationship.py +98 -0
  162. nexusx-2.0.0/src/nexusx/resolver.py +735 -0
  163. nexusx-2.0.0/src/nexusx/response_builder.py +350 -0
  164. nexusx-2.0.0/src/nexusx/scanning/__init__.py +5 -0
  165. nexusx-2.0.0/src/nexusx/scanning/method_scanner.py +76 -0
  166. nexusx-2.0.0/src/nexusx/sdl_generator.py +706 -0
  167. nexusx-2.0.0/src/nexusx/standard_queries.py +237 -0
  168. nexusx-2.0.0/src/nexusx/subset.py +676 -0
  169. nexusx-2.0.0/src/nexusx/type_converter.py +163 -0
  170. nexusx-2.0.0/src/nexusx/use_case/__init__.py +19 -0
  171. nexusx-2.0.0/src/nexusx/use_case/business.py +129 -0
  172. nexusx-2.0.0/src/nexusx/use_case/context.py +30 -0
  173. nexusx-2.0.0/src/nexusx/use_case/introspector.py +566 -0
  174. nexusx-2.0.0/src/nexusx/use_case/manager.py +149 -0
  175. nexusx-2.0.0/src/nexusx/use_case/router.py +329 -0
  176. nexusx-2.0.0/src/nexusx/use_case/server.py +433 -0
  177. nexusx-2.0.0/src/nexusx/use_case/types.py +35 -0
  178. nexusx-2.0.0/src/nexusx/utils/__init__.py +5 -0
  179. nexusx-2.0.0/src/nexusx/utils/naming.py +57 -0
  180. nexusx-2.0.0/src/nexusx/utils/schema_helpers.py +131 -0
  181. nexusx-2.0.0/src/nexusx/utils/type_compat.py +112 -0
  182. nexusx-2.0.0/src/nexusx/utils/type_utils.py +72 -0
  183. nexusx-2.0.0/src/nexusx/voyager/__init__.py +8 -0
  184. nexusx-2.0.0/src/nexusx/voyager/create_voyager.py +189 -0
  185. nexusx-2.0.0/src/nexusx/voyager/er_diagram_dot.py +231 -0
  186. nexusx-2.0.0/src/nexusx/voyager/filter.py +275 -0
  187. nexusx-2.0.0/src/nexusx/voyager/module.py +98 -0
  188. nexusx-2.0.0/src/nexusx/voyager/render.py +581 -0
  189. nexusx-2.0.0/src/nexusx/voyager/render_style.py +112 -0
  190. nexusx-2.0.0/src/nexusx/voyager/templates/dot/cluster.j2 +10 -0
  191. nexusx-2.0.0/src/nexusx/voyager/templates/dot/cluster_container.j2 +9 -0
  192. nexusx-2.0.0/src/nexusx/voyager/templates/dot/digraph.j2 +25 -0
  193. nexusx-2.0.0/src/nexusx/voyager/templates/dot/er_diagram.j2 +29 -0
  194. nexusx-2.0.0/src/nexusx/voyager/templates/dot/link.j2 +1 -0
  195. nexusx-2.0.0/src/nexusx/voyager/templates/dot/route_node.j2 +5 -0
  196. nexusx-2.0.0/src/nexusx/voyager/templates/dot/schema_node.j2 +5 -0
  197. nexusx-2.0.0/src/nexusx/voyager/templates/dot/tag_node.j2 +5 -0
  198. nexusx-2.0.0/src/nexusx/voyager/templates/html/colored_text.j2 +1 -0
  199. nexusx-2.0.0/src/nexusx/voyager/templates/html/pydantic_meta.j2 +1 -0
  200. nexusx-2.0.0/src/nexusx/voyager/templates/html/schema_field_row.j2 +1 -0
  201. nexusx-2.0.0/src/nexusx/voyager/templates/html/schema_header.j2 +1 -0
  202. nexusx-2.0.0/src/nexusx/voyager/templates/html/schema_table.j2 +4 -0
  203. nexusx-2.0.0/src/nexusx/voyager/type.py +107 -0
  204. nexusx-2.0.0/src/nexusx/voyager/type_helper.py +324 -0
  205. nexusx-2.0.0/src/nexusx/voyager/use_case_voyager.py +344 -0
  206. nexusx-2.0.0/src/nexusx/voyager/voyager_context.py +282 -0
  207. nexusx-2.0.0/src/nexusx/voyager/web/component/demo.js +17 -0
  208. nexusx-2.0.0/src/nexusx/voyager/web/component/loader-code-display.js +135 -0
  209. nexusx-2.0.0/src/nexusx/voyager/web/component/render-graph.js +86 -0
  210. nexusx-2.0.0/src/nexusx/voyager/web/component/route-code-display.js +123 -0
  211. nexusx-2.0.0/src/nexusx/voyager/web/component/schema-code-display.js +203 -0
  212. nexusx-2.0.0/src/nexusx/voyager/web/graph-ui.js +467 -0
  213. nexusx-2.0.0/src/nexusx/voyager/web/graphviz.svg.css +64 -0
  214. nexusx-2.0.0/src/nexusx/voyager/web/graphviz.svg.js +638 -0
  215. nexusx-2.0.0/src/nexusx/voyager/web/icon/android-chrome-192x192.png +0 -0
  216. nexusx-2.0.0/src/nexusx/voyager/web/icon/android-chrome-512x512.png +0 -0
  217. nexusx-2.0.0/src/nexusx/voyager/web/icon/apple-touch-icon.png +0 -0
  218. nexusx-2.0.0/src/nexusx/voyager/web/icon/favicon-16x16.png +0 -0
  219. nexusx-2.0.0/src/nexusx/voyager/web/icon/favicon-32x32.png +0 -0
  220. nexusx-2.0.0/src/nexusx/voyager/web/icon/favicon.ico +0 -0
  221. nexusx-2.0.0/src/nexusx/voyager/web/icon/site.webmanifest +16 -0
  222. nexusx-2.0.0/src/nexusx/voyager/web/index.html +708 -0
  223. nexusx-2.0.0/src/nexusx/voyager/web/magnifying-glass.js +447 -0
  224. nexusx-2.0.0/src/nexusx/voyager/web/manifest.webmanifest +5 -0
  225. nexusx-2.0.0/src/nexusx/voyager/web/quasar.min.css +1 -0
  226. nexusx-2.0.0/src/nexusx/voyager/web/quasar.min.js +127 -0
  227. nexusx-2.0.0/src/nexusx/voyager/web/store.js +624 -0
  228. nexusx-2.0.0/src/nexusx/voyager/web/sw.js +142 -0
  229. nexusx-2.0.0/src/nexusx/voyager/web/vue-main.js +397 -0
  230. nexusx-2.0.0/start_all.sh +169 -0
  231. nexusx-2.0.0/tests/__init__.py +0 -0
  232. nexusx-2.0.0/tests/conftest.py +243 -0
  233. nexusx-2.0.0/tests/mcp/__init__.py +1 -0
  234. nexusx-2.0.0/tests/mcp/test_multi_app_manager.py +342 -0
  235. nexusx-2.0.0/tests/mcp/test_multi_app_tools.py +402 -0
  236. nexusx-2.0.0/tests/mcp/test_simple_mcp.py +409 -0
  237. nexusx-2.0.0/tests/test_argument_types.py +183 -0
  238. nexusx-2.0.0/tests/test_autoload.py +388 -0
  239. nexusx-2.0.0/tests/test_context.py +304 -0
  240. nexusx-2.0.0/tests/test_decorator.py +112 -0
  241. nexusx-2.0.0/tests/test_demo_final.py +27 -0
  242. nexusx-2.0.0/tests/test_demo_standard_queries.py +75 -0
  243. nexusx-2.0.0/tests/test_er_diagram.py +122 -0
  244. nexusx-2.0.0/tests/test_field_tree_builder.py +76 -0
  245. nexusx-2.0.0/tests/test_fixes.py +446 -0
  246. nexusx-2.0.0/tests/test_handler.py +461 -0
  247. nexusx-2.0.0/tests/test_input_types.py +237 -0
  248. nexusx-2.0.0/tests/test_introspection.py +732 -0
  249. nexusx-2.0.0/tests/test_loader_factories.py +289 -0
  250. nexusx-2.0.0/tests/test_loader_registry.py +225 -0
  251. nexusx-2.0.0/tests/test_mcp.py +560 -0
  252. nexusx-2.0.0/tests/test_mcp_schema_enhanced.py +154 -0
  253. nexusx-2.0.0/tests/test_query_executor.py +508 -0
  254. nexusx-2.0.0/tests/test_query_meta.py +375 -0
  255. nexusx-2.0.0/tests/test_query_parser.py +130 -0
  256. nexusx-2.0.0/tests/test_relationship.py +353 -0
  257. nexusx-2.0.0/tests/test_resolver.py +464 -0
  258. nexusx-2.0.0/tests/test_response_builder.py +140 -0
  259. nexusx-2.0.0/tests/test_sdl_generator.py +447 -0
  260. nexusx-2.0.0/tests/test_standard_queries.py +307 -0
  261. nexusx-2.0.0/tests/test_subset.py +964 -0
  262. nexusx-2.0.0/tests/test_type_converter.py +299 -0
  263. nexusx-2.0.0/tests/test_type_tracer.py +361 -0
  264. nexusx-2.0.0/tests/test_type_utils.py +167 -0
  265. nexusx-2.0.0/tests/test_use_case.py +939 -0
  266. nexusx-2.0.0/tests/test_use_case_router.py +349 -0
  267. nexusx-2.0.0/tests/test_voyager_selfref.py +45 -0
  268. nexusx-2.0.0/uv.lock +2081 -0
@@ -0,0 +1,37 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ paths:
6
+ - 'src/nexusx/**'
7
+ - 'tests/**'
8
+ - 'pyproject.toml'
9
+
10
+ jobs:
11
+ test:
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ python-version: ["3.10", "3.11", "3.12"]
16
+
17
+ steps:
18
+ - uses: actions/checkout@v5
19
+
20
+ - name: Set up Python ${{ matrix.python-version }}
21
+ uses: actions/setup-python@v6
22
+ with:
23
+ python-version: ${{ matrix.python-version }}
24
+
25
+ - name: Set up uv
26
+ uses: astral-sh/setup-uv@v7
27
+ with:
28
+ enable-cache: true
29
+
30
+ - name: Install dependencies
31
+ run: uv sync --all-extras
32
+
33
+ - name: Run linter
34
+ run: uv run ruff check src/
35
+
36
+ - name: Test with pytest
37
+ run: uv run pytest tests/ -v
@@ -0,0 +1,34 @@
1
+ name: GH Pages Deploy
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ paths:
8
+ - 'docs/**'
9
+ - 'mkdocs.yml'
10
+
11
+ permissions:
12
+ contents: write
13
+
14
+ jobs:
15
+ deploy:
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - name: Configure Git Credentials
20
+ run: |
21
+ git config user.name github-actions[bot]
22
+ git config user.email 41898282+github-actions[bot]@users.noreply.github.com
23
+ - uses: actions/setup-python@v5
24
+ with:
25
+ python-version: 3.x
26
+ - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
27
+ - uses: actions/cache@v4
28
+ with:
29
+ key: mkdocs-material-${{ env.cache_id }}
30
+ path: .cache
31
+ restore-keys: |
32
+ mkdocs-material-
33
+ - run: pip install mkdocs-material mkdocs-static-i18n
34
+ - run: mkdocs gh-deploy --force
@@ -0,0 +1,41 @@
1
+ name: Publish to PyPI via uv
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ tags:
7
+ - "v*"
8
+
9
+ jobs:
10
+ publish:
11
+ runs-on: ubuntu-latest
12
+
13
+ permissions:
14
+ contents: write
15
+
16
+ steps:
17
+ - name: Checkout repository
18
+ uses: actions/checkout@v5
19
+
20
+ - name: Set up uv
21
+ uses: astral-sh/setup-uv@v7
22
+
23
+ - name: Set up Python
24
+ uses: actions/setup-python@v6
25
+ with:
26
+ python-version: "3.12"
27
+
28
+ - name: Build the package
29
+ run: uv build
30
+
31
+ - name: Publish to PyPI
32
+ run: uv publish --token ${{ secrets.PYPI_PUBLISHER }}
33
+
34
+ - name: Create GitHub Release
35
+ uses: softprops/action-gh-release@v2
36
+ with:
37
+ body: See [CHANGELOG](https://github.com/allmonday/nexusx/blob/master/CHANGELOG.md) for details.
38
+ generate_release_notes: true
39
+ files: |
40
+ dist/*.tar.gz
41
+ dist/*.whl
@@ -0,0 +1,51 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+ *.egg
9
+
10
+ # Virtual environments
11
+ .venv
12
+ venv/
13
+ env/
14
+ ENV/
15
+
16
+ # Database files
17
+ *.db
18
+ *.sqlite
19
+ *.sqlite3
20
+
21
+ # IDE
22
+ .vscode/
23
+ .idea/
24
+ *.swp
25
+ *.swo
26
+ *~
27
+
28
+ # Testing
29
+ .pytest_cache/
30
+ .coverage
31
+ htmlcov/
32
+ .tox/
33
+
34
+ # MyPy
35
+ .mypy_cache/
36
+ .dmypy.json
37
+ dmypy.json
38
+
39
+ # Ruff
40
+ .ruff_cache/
41
+
42
+ # OS
43
+ .DS_Store
44
+ Thumbs.db
45
+
46
+ # Distribution
47
+ *.manifest
48
+ *.spec
49
+ .claude
50
+
51
+ site
@@ -0,0 +1 @@
1
+ 3.12
@@ -0,0 +1,127 @@
1
+ # Skills ็›ฎๅฝ•
2
+
3
+ ่ฟ™ไธช็›ฎๅฝ•ๅŒ…ๅซไบ†ๅฏๅค็”จ็š„่‡ชๅŠจๅŒ–่„šๆœฌ๏ผˆskills๏ผ‰๏ผŒ็”จไบŽ็ฎ€ๅŒ–ๅธธ่งไปปๅŠกใ€‚
4
+
5
+ ## ๅฏ็”จ็š„ Skills
6
+
7
+ ### ๐Ÿ“ฆ release - ็‰ˆๆœฌๅ‘ๅธƒ
8
+
9
+ ่‡ชๅŠจๅŒ–ๆ‰ง่กŒ็‰ˆๆœฌๅ‘ๅธƒ็š„ๆ ‡ๅ‡†ๆต็จ‹ใ€‚
10
+
11
+ #### ไฝฟ็”จๆ–นๆณ•
12
+
13
+ **Shell ็‰ˆๆœฌ๏ผˆๆŽจ่๏ผ‰๏ผš**
14
+ ```bash
15
+ ./.skills/release.sh <version>
16
+ ```
17
+
18
+ **Python ็‰ˆๆœฌ๏ผš**
19
+ ```bash
20
+ python .skills/release.py <version>
21
+ ```
22
+
23
+ **็คบไพ‹๏ผš**
24
+ ```bash
25
+ ./.skills/release.sh 0.8.2
26
+ ```
27
+
28
+ #### ๆ‰ง่กŒๆญฅ้ชค
29
+
30
+ 1. โœ… ้ชŒ่ฏ็‰ˆๆœฌๅทๆ ผๅผ๏ผˆSemVer๏ผ‰
31
+ 2. โœ… ๆฃ€ๆŸฅๅทฅไฝœๅŒบๆ˜ฏๅฆๅนฒๅ‡€
32
+ 3. โœ… ๆ›ดๆ–ฐ `pyproject.toml` ไธญ็š„็‰ˆๆœฌๅท
33
+ 4. โœ… ่ฟ่กŒๅฎŒๆ•ดๆต‹่ฏ•ๅฅ—ไปถ
34
+ 5. โœ… ๅˆ›ๅปบ commit: "bump ver"
35
+ 6. โœ… ๅˆ›ๅปบ tag: `v{version}`
36
+ 7. โœ… Push tag ๅˆฐ origin
37
+
38
+ #### ๅ‰็ฝฎ่ฆๆฑ‚
39
+
40
+ - Git ๅทฅไฝœๅŒบๅฟ…้กปๅนฒๅ‡€๏ผˆๆฒกๆœ‰ๆœชๆไบค็š„ๆ›ดๆ”น๏ผ‰
41
+ - ๅทฒๅฎ‰่ฃ… `uv` ๅทฅๅ…ท
42
+ - ๆœ‰ push ๅˆฐ่ฟœ็จ‹ไป“ๅบ“็š„ๆƒ้™
43
+
44
+ #### ้”™่ฏฏๅค„็†
45
+
46
+ - ๅฆ‚ๆžœๅทฅไฝœๅŒบไธๅนฒๅ‡€๏ผŒ่„šๆœฌไผšไธญๆญขๅนถๆ็คบ
47
+ - ๅฆ‚ๆžœๆต‹่ฏ•ๅคฑ่ดฅ๏ผŒ่„šๆœฌไผšไธญๆญขๅนถๅ›žๆปš็‰ˆๆœฌๅทๆ›ดๆ”น
48
+ - ๅฆ‚ๆžœ tag ๅทฒๅญ˜ๅœจ๏ผŒ่„šๆœฌไผšๆ็คบไฝฟ็”จไธๅŒ็š„็‰ˆๆœฌๅท
49
+ - ๅฆ‚ๆžœ push ๅคฑ่ดฅ๏ผŒ่„šๆœฌไผšๆไพ›ๆŽ’ๆŸฅๅปบ่ฎฎ
50
+
51
+ #### ็คบไพ‹่พ“ๅ‡บ
52
+
53
+ ```
54
+ ============================================================
55
+ ๐Ÿ“ฆ Release Version: v0.8.2
56
+ ============================================================
57
+
58
+ ๐Ÿ” Checking working directory...
59
+ โœ… Working directory is clean
60
+
61
+ ๐Ÿ“ Updating version to 0.8.2...
62
+ โœ… Updated pyproject.toml to version 0.8.2
63
+
64
+ ๐Ÿงช Running tests...
65
+ โœ… All tests passed
66
+
67
+ ๐Ÿ“ Creating commit...
68
+ โœ… Created commit: abc1234
69
+
70
+ ๐Ÿท๏ธ Creating tag...
71
+ โœ… Created tag: v0.8.2
72
+
73
+ ๐Ÿš€ Pushing tag v0.8.2 to origin...
74
+ โœ… Tag v0.8.2 pushed to origin
75
+
76
+ ============================================================
77
+ โœ… Release completed successfully!
78
+ ============================================================
79
+
80
+ ๐Ÿ“ฆ Version: v0.8.2
81
+ ๐Ÿ“ Commit: abc1234
82
+ ๐Ÿท๏ธ Tag: v0.8.2
83
+ ๐Ÿš€ Pushed to: origin/v0.8.2
84
+
85
+ ๐Ÿ“‹ Recent commits included in this release:
86
+ abc1234 feat: add new feature
87
+ def5678 fix: correct bug
88
+ ghi9012 docs: update documentation
89
+
90
+ ๐ŸŽ‰ Done!
91
+ ```
92
+
93
+ ## ๆทปๅŠ ๆ–ฐ็š„ Skill
94
+
95
+ ่ฆๆทปๅŠ ๆ–ฐ็š„ skill๏ผŒ่ฏท้ตๅพชไปฅไธ‹็ป“ๆž„๏ผš
96
+
97
+ ```
98
+ .skills/
99
+ โ”œโ”€โ”€ README.md # ่ฟ™ไธชๆ–‡ไปถ
100
+ โ”œโ”€โ”€ skill-name.md # Skill ๆ–‡ๆกฃ
101
+ โ”œโ”€โ”€ skill-name.sh # Shell ๅฎž็Žฐ
102
+ โ””โ”€โ”€ skill-name.py # Python ๅฎž็Žฐ๏ผˆๅฏ้€‰๏ผ‰
103
+ ```
104
+
105
+ ### Skill ๅ‘ฝๅ่ง„่Œƒ
106
+
107
+ - ไฝฟ็”จๅฐๅ†™ๅญ—ๆฏๅ’Œ่ฟžๅญ—็ฌฆ
108
+ - ไฝฟ็”จๅŠจ่ฏๆˆ–ๅŠจไฝœๅ็งฐ๏ผˆๅฆ‚ `release`, `deploy`, `test`๏ผ‰
109
+ - ้ฟๅ…ไฝฟ็”จ็ฉบๆ ผๅ’Œ็‰นๆฎŠๅญ—็ฌฆ
110
+
111
+ ### ๆœ€ไฝณๅฎž่ทต
112
+
113
+ 1. **ๆไพ›ๆธ…ๆ™ฐ็š„ๆ–‡ๆกฃ**๏ผšๅœจ `.md` ๆ–‡ไปถไธญ่ฏดๆ˜Ž็”จๆณ•ๅ’Œๅ‚ๆ•ฐ
114
+ 2. **้”™่ฏฏๅค„็†**๏ผš้ชŒ่ฏ่พ“ๅ…ฅๅนถๆไพ›ๆœ‰็”จ็š„้”™่ฏฏๆถˆๆฏ
115
+ 3. **ๅ›žๆปšๆœบๅˆถ**๏ผšๅฆ‚ๆžœๆ“ไฝœๅคฑ่ดฅ๏ผŒๅฐ่ฏ•ๅ›žๆปšๆ›ดๆ”น
116
+ 4. **ๅฝฉ่‰ฒ่พ“ๅ‡บ**๏ผšไฝฟ็”จ้ขœ่‰ฒๆ้ซ˜ๅฏ่ฏปๆ€ง
117
+ 5. **่ฏฆ็ป†ๆ—ฅๅฟ—**๏ผšๆ˜พ็คบๆญฃๅœจๆ‰ง่กŒ็š„ๆญฅ้ชค
118
+
119
+ ## ๅœจ Claude Code ไธญไฝฟ็”จ
120
+
121
+ ไฝ ๅฏไปฅ่ฆๆฑ‚ Claude Code ๆ‰ง่กŒ่ฟ™ไบ› skills๏ผš
122
+
123
+ ```
124
+ ่ฏทๆ‰ง่กŒ็‰ˆๆœฌๅ‘ๅธƒ๏ผŒ็‰ˆๆœฌๅทไธบ 0.8.3
125
+ ```
126
+
127
+ Claude Code ไผš่‡ชๅŠจ่ฏ†ๅˆซๅนถๆ‰ง่กŒ็›ธๅบ”็š„ skill ่„šๆœฌใ€‚
@@ -0,0 +1,73 @@
1
+ # Release Version Skill
2
+
3
+ ๅ‘ๅธƒๆ–ฐ็‰ˆๆœฌ็š„ๆ ‡ๅ‡†ๅŒ–ๆต็จ‹ใ€‚
4
+
5
+ ## ไฝฟ็”จๆ–นๆณ•
6
+
7
+ ```bash
8
+ # ๅ‘ๅธƒๆ–ฐ็‰ˆๆœฌ
9
+ /skill release <version>
10
+ ```
11
+
12
+ ไพ‹ๅฆ‚๏ผš
13
+ ```bash
14
+ /skill release 0.8.2
15
+ ```
16
+
17
+ ## ๆ‰ง่กŒๆญฅ้ชค
18
+
19
+ ๅฝ“็”จๆˆท่ฏทๆฑ‚ๅ‘ๅธƒๆ–ฐ็‰ˆๆœฌๆ—ถ๏ผŒๆ‰ง่กŒไปฅไธ‹ๆญฅ้ชค๏ผš
20
+
21
+ ### 1. ้ชŒ่ฏ็‰ˆๆœฌๅท
22
+ - ็กฎ่ฎค็‰ˆๆœฌๅทๆ ผๅผๆญฃ็กฎ๏ผˆๅฆ‚ 0.8.2, 1.0.0๏ผ‰
23
+ - ๆฃ€ๆŸฅๆ˜ฏๅฆๅคงไบŽๅฝ“ๅ‰็‰ˆๆœฌ
24
+
25
+ ### 2. ๆ›ดๆ–ฐ็‰ˆๆœฌๅท
26
+ - ไฟฎๆ”น `pyproject.toml` ไธญ็š„ `version` ๅญ—ๆฎต
27
+ - ไฝฟ็”จ Edit tool ๆ›ดๆ–ฐๆ–‡ไปถ
28
+
29
+ ### 3. ่ฟ่กŒๆต‹่ฏ•
30
+ ```bash
31
+ uv run pytest
32
+ ```
33
+ - ็กฎไฟๆ‰€ๆœ‰ๆต‹่ฏ•้€š่ฟ‡
34
+ - ๅฆ‚ๆžœๆต‹่ฏ•ๅคฑ่ดฅ๏ผŒๅœๆญขๅ‘ๅธƒๆต็จ‹ๅนถๆŠฅๅ‘Š้”™่ฏฏ
35
+
36
+ ### 4. ๅˆ›ๅปบ Git Commit
37
+ ```bash
38
+ git add pyproject.toml
39
+ git commit -m "bump ver"
40
+ ```
41
+
42
+ ### 5. ๅˆ›ๅปบๅนถๆŽจ้€ Tag
43
+ ```bash
44
+ git tag v<version>
45
+ git push origin v<version>
46
+ ```
47
+
48
+ ### 6. ็กฎ่ฎคๅ‘ๅธƒ
49
+ - ๆ˜พ็คบๅ‘ๅธƒๆˆๅŠŸ็š„ๆถˆๆฏ
50
+ - ๅˆ—ๅ‡บๆœฌๆฌกๅ‘ๅธƒๅŒ…ๅซ็š„ไธป่ฆๅ˜ๆ›ด๏ผˆไปŽๆœ€่ฟ‘็š„ commits๏ผ‰
51
+
52
+ ## ๆณจๆ„ไบ‹้กน
53
+
54
+ - ็กฎไฟๅทฅไฝœๅŒบๅนฒๅ‡€๏ผˆๆฒกๆœ‰ๆœชๆไบค็š„ๆ›ดๆ”น๏ผ‰
55
+ - ็กฎไฟ pyproject.toml ๆ–‡ไปถๅญ˜ๅœจ
56
+ - ็‰ˆๆœฌๅทๅบ”่ฏฅ้ตๅพช่ฏญไน‰ๅŒ–็‰ˆๆœฌ่ง„่Œƒ๏ผˆSemVer๏ผ‰
57
+ - ๅฆ‚ๆžœ push ๅคฑ่ดฅ๏ผŒๆฃ€ๆŸฅๆ˜ฏๅฆๆœ‰ๆƒ้™ๆˆ–็ฝ‘็ปœ้—ฎ้ข˜
58
+
59
+ ## ็คบไพ‹่พ“ๅ‡บ
60
+
61
+ ```
62
+ โœ… ็‰ˆๆœฌๆ›ดๆ–ฐๆˆๅŠŸ
63
+
64
+ ๐Ÿ“ฆ ็‰ˆๆœฌ: v0.8.2
65
+ ๐Ÿ“ Commit: abc1234
66
+ ๐Ÿท๏ธ Tag: v0.8.2
67
+ ๐Ÿš€ ๅทฒๆŽจ้€ๅˆฐ่ฟœ็จ‹ไป“ๅบ“
68
+
69
+ ๐Ÿ“‹ ๆœฌๆฌกๅ‘ๅธƒๅŒ…ๅซ:
70
+ - feat: add new feature
71
+ - fix: correct bug
72
+ - docs: update documentation
73
+ ```
@@ -0,0 +1,181 @@
1
+ #!/usr/bin/env python3
2
+ """Release version skill implementation."""
3
+
4
+ import re
5
+ import subprocess
6
+ import sys
7
+ from pathlib import Path
8
+
9
+
10
+ def run_command(cmd, check=True, capture_output=True):
11
+ """Run a shell command and return the result."""
12
+ result = subprocess.run(
13
+ cmd,
14
+ shell=True,
15
+ capture_output=capture_output,
16
+ text=True
17
+ )
18
+ if check and result.returncode != 0:
19
+ print(f"โŒ Error executing: {cmd}")
20
+ print(f" {result.stderr}")
21
+ sys.exit(1)
22
+ return result
23
+
24
+
25
+ def validate_version(version):
26
+ """Validate semantic version format."""
27
+ pattern = r'^\d+\.\d+\.\d+$'
28
+ if not re.match(pattern, version):
29
+ print(f"โŒ Invalid version format: {version}")
30
+ print(" Version must follow SemVer (e.g., 0.8.2, 1.0.0)")
31
+ sys.exit(1)
32
+ return True
33
+
34
+
35
+ def check_working_directory():
36
+ """Check if working directory is clean."""
37
+ result = run_command("git status --porcelain")
38
+ if result.stdout.strip():
39
+ print("โŒ Working directory is not clean")
40
+ print(" Please commit or stash your changes first")
41
+ print("\nUncommitted changes:")
42
+ print(result.stdout)
43
+ sys.exit(1)
44
+
45
+
46
+ def update_pyproject_version(new_version):
47
+ """Update version in pyproject.toml."""
48
+ pyproject_path = Path("pyproject.toml")
49
+ if not pyproject_path.exists():
50
+ print("โŒ pyproject.toml not found")
51
+ sys.exit(1)
52
+
53
+ content = pyproject_path.read_text()
54
+
55
+ # Update version line
56
+ updated = re.sub(
57
+ r'version\s*=\s*["\']([^"\']+)["\']',
58
+ f'version = "{new_version}"',
59
+ content
60
+ )
61
+
62
+ if updated == content:
63
+ print("โŒ Failed to update version in pyproject.toml")
64
+ sys.exit(1)
65
+
66
+ pyproject_path.write_text(updated)
67
+ print(f"โœ… Updated pyproject.toml to version {new_version}")
68
+
69
+
70
+ def run_tests():
71
+ """Run the full test suite."""
72
+ print("\n๐Ÿงช Running tests...")
73
+ result = run_command("uv run pytest", check=False)
74
+ if result.returncode != 0:
75
+ print("โŒ Tests failed")
76
+ print(result.stdout)
77
+ sys.exit(1)
78
+ print("โœ… All tests passed")
79
+
80
+
81
+ def create_commit(version):
82
+ """Create a commit for version bump."""
83
+ run_command("git add pyproject.toml uv.lock")
84
+ run_command('git commit -m "bump ver"')
85
+ result = run_command("git rev-parse --short HEAD")
86
+ commit_hash = result.stdout.strip()
87
+ print(f"โœ… Created commit: {commit_hash}")
88
+ return commit_hash
89
+
90
+
91
+ def create_tag(version):
92
+ """Create a git tag."""
93
+ tag_name = f"v{version}"
94
+ result = run_command(f"git tag {tag_name}", check=False)
95
+ if result.returncode != 0:
96
+ if "already exists" in result.stderr:
97
+ print(f"โŒ Tag {tag_name} already exists")
98
+ sys.exit(1)
99
+ print(f"โŒ Failed to create tag: {result.stderr}")
100
+ sys.exit(1)
101
+ print(f"โœ… Created tag: {tag_name}")
102
+ return tag_name
103
+
104
+
105
+ def push_tag(tag_name):
106
+ """Push tag to origin."""
107
+ print(f"\n๐Ÿš€ Pushing tag {tag_name} to origin...")
108
+ result = run_command(f"git push origin {tag_name}", check=False)
109
+ if result.returncode != 0:
110
+ print("โŒ Failed to push tag")
111
+ print(f" {result.stderr}")
112
+ print("\n๐Ÿ’ก Tips:")
113
+ print(" - Check your network connection")
114
+ print(" - Verify you have push permissions")
115
+ print(f" - Try: git push origin {tag_name}")
116
+ sys.exit(1)
117
+ print(f"โœ… Tag {tag_name} pushed to origin")
118
+
119
+
120
+ def get_recent_commits(count=5):
121
+ """Get recent commit messages."""
122
+ result = run_command(f"git log --oneline -{count}")
123
+ return result.stdout.strip().split('\n')
124
+
125
+
126
+ def main():
127
+ if len(sys.argv) < 2:
128
+ print("Usage: release <version>")
129
+ print("Example: release 0.8.2")
130
+ sys.exit(1)
131
+
132
+ version = sys.argv[1]
133
+
134
+ print(f"\n{'='*60}")
135
+ print(f"๐Ÿ“ฆ Release Version: v{version}")
136
+ print(f"{'='*60}\n")
137
+
138
+ # Step 1: Validate version
139
+ validate_version(version)
140
+
141
+ # Step 2: Check working directory
142
+ print("๐Ÿ” Checking working directory...")
143
+ check_working_directory()
144
+ print("โœ… Working directory is clean\n")
145
+
146
+ # Step 3: Update version in pyproject.toml
147
+ print(f"๐Ÿ“ Updating version to {version}...")
148
+ update_pyproject_version(version)
149
+
150
+ # Step 4: Run tests
151
+ run_tests()
152
+
153
+ # Step 5: Create commit
154
+ print("\n๐Ÿ“ Creating commit...")
155
+ commit_hash = create_commit(version)
156
+
157
+ # Step 6: Create tag
158
+ print("\n๐Ÿท๏ธ Creating tag...")
159
+ tag_name = create_tag(version)
160
+
161
+ # Step 7: Push tag
162
+ push_tag(tag_name)
163
+
164
+ # Step 8: Show summary
165
+ print(f"\n{'='*60}")
166
+ print("โœ… Release completed successfully!")
167
+ print(f"{'='*60}")
168
+ print(f"\n๐Ÿ“ฆ Version: {tag_name}")
169
+ print(f"๐Ÿ“ Commit: {commit_hash}")
170
+ print(f"๐Ÿท๏ธ Tag: {tag_name}")
171
+ print(f"๐Ÿš€ Pushed to: origin/{tag_name}")
172
+
173
+ print("\n๐Ÿ“‹ Recent commits included in this release:")
174
+ for commit in get_recent_commits(3):
175
+ print(f" {commit}")
176
+
177
+ print("\n๐ŸŽ‰ Done!")
178
+
179
+
180
+ if __name__ == "__main__":
181
+ main()
@@ -0,0 +1,112 @@
1
+ #!/bin/bash
2
+ # Release version skill - Shell implementation
3
+
4
+ set -e
5
+
6
+ # Colors
7
+ GREEN='\033[0;32m'
8
+ RED='\033[0;31m'
9
+ BLUE='\033[0;34m'
10
+ NC='\033[0m' # No Color
11
+
12
+ # Check if version is provided
13
+ if [ -z "$1" ]; then
14
+ echo -e "${RED}Usage: ./release.sh <version>${NC}"
15
+ echo "Example: ./release.sh 0.8.2"
16
+ exit 1
17
+ fi
18
+
19
+ VERSION=$1
20
+ TAG="v$VERSION"
21
+
22
+ # Validate version format
23
+ if ! [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
24
+ echo -e "${RED}โŒ Invalid version format: $VERSION${NC}"
25
+ echo " Version must follow SemVer (e.g., 0.8.2, 1.0.0)"
26
+ exit 1
27
+ fi
28
+
29
+ echo ""
30
+ echo "============================================================"
31
+ echo -e "${BLUE}๐Ÿ“ฆ Release Version: ${TAG}${NC}"
32
+ echo "============================================================"
33
+ echo ""
34
+
35
+ # Check working directory
36
+ echo "๐Ÿ” Checking working directory..."
37
+ if ! git diff-index --quiet HEAD --; then
38
+ echo -e "${RED}โŒ Working directory is not clean${NC}"
39
+ echo " Please commit or stash your changes first"
40
+ git status --short
41
+ exit 1
42
+ fi
43
+ echo -e "${GREEN}โœ… Working directory is clean${NC}"
44
+ echo ""
45
+
46
+ # Update version in pyproject.toml
47
+ echo "๐Ÿ“ Updating version to $VERSION..."
48
+ if [ ! -f "pyproject.toml" ]; then
49
+ echo -e "${RED}โŒ pyproject.toml not found${NC}"
50
+ exit 1
51
+ fi
52
+
53
+ sed -i.bak "s/^version = .*/version = \"$VERSION\"/" pyproject.toml
54
+ rm -f pyproject.toml.bak
55
+ echo -e "${GREEN}โœ… Updated pyproject.toml to version $VERSION${NC}"
56
+ echo ""
57
+
58
+ # Run tests
59
+ echo "๐Ÿงช Running tests..."
60
+ if ! uv run pytest; then
61
+ echo -e "${RED}โŒ Tests failed${NC}"
62
+ git checkout pyproject.toml
63
+ exit 1
64
+ fi
65
+ echo -e "${GREEN}โœ… All tests passed${NC}"
66
+ echo ""
67
+
68
+ # Create commit
69
+ echo "๐Ÿ“ Creating commit..."
70
+ git add pyproject.toml uv.lock
71
+ git commit -m "bump ver"
72
+ COMMIT=$(git rev-parse --short HEAD)
73
+ echo -e "${GREEN}โœ… Created commit: $COMMIT${NC}"
74
+ echo ""
75
+
76
+ # Create tag
77
+ echo "๐Ÿท๏ธ Creating tag..."
78
+ if git tag $TAG 2>&1 | grep -q "already exists"; then
79
+ echo -e "${RED}โŒ Tag $TAG already exists${NC}"
80
+ exit 1
81
+ fi
82
+ echo -e "${GREEN}โœ… Created tag: $TAG${NC}"
83
+ echo ""
84
+
85
+ # Push tag
86
+ echo "๐Ÿš€ Pushing tag $TAG to origin..."
87
+ if ! git push origin $TAG; then
88
+ echo -e "${RED}โŒ Failed to push tag${NC}"
89
+ echo ""
90
+ echo "๐Ÿ’ก Tips:"
91
+ echo " - Check your network connection"
92
+ echo " - Verify you have push permissions"
93
+ echo " - Try: git push origin $TAG"
94
+ exit 1
95
+ fi
96
+ echo -e "${GREEN}โœ… Tag $TAG pushed to origin${NC}"
97
+ echo ""
98
+
99
+ # Show summary
100
+ echo "============================================================"
101
+ echo -e "${GREEN}โœ… Release completed successfully!${NC}"
102
+ echo "============================================================"
103
+ echo ""
104
+ echo "๐Ÿ“ฆ Version: $TAG"
105
+ echo "๐Ÿ“ Commit: $COMMIT"
106
+ echo "๐Ÿท๏ธ Tag: $TAG"
107
+ echo "๐Ÿš€ Pushed to: origin/$TAG"
108
+ echo ""
109
+ echo "๐Ÿ“‹ Recent commits included in this release:"
110
+ git log --oneline -3 | sed 's/^/ /'
111
+ echo ""
112
+ echo -e "${GREEN}๐ŸŽ‰ Done!${NC}"