algocode-agent 0.1.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 (257) hide show
  1. algocode_agent-0.1.0/.github/workflows/publish.yml +69 -0
  2. algocode_agent-0.1.0/.github/workflows/python-publish.yml +70 -0
  3. algocode_agent-0.1.0/.gitignore +15 -0
  4. algocode_agent-0.1.0/LICENSE +21 -0
  5. algocode_agent-0.1.0/PKG-INFO +678 -0
  6. algocode_agent-0.1.0/README.md +643 -0
  7. algocode_agent-0.1.0/create_outline_icon.py +227 -0
  8. algocode_agent-0.1.0/docker/sandbox.Dockerfile +11 -0
  9. algocode_agent-0.1.0/docs/picture/algocode_icon.jpg +0 -0
  10. algocode_agent-0.1.0/mian.py +0 -0
  11. algocode_agent-0.1.0/process_icon.py +75 -0
  12. algocode_agent-0.1.0/pyproject.toml +78 -0
  13. algocode_agent-0.1.0/src/algocode/__init__.py +5 -0
  14. algocode_agent-0.1.0/src/algocode/__main__.py +4 -0
  15. algocode_agent-0.1.0/src/algocode/acceptance/__init__.py +12 -0
  16. algocode_agent-0.1.0/src/algocode/acceptance/matrix.py +69 -0
  17. algocode_agent-0.1.0/src/algocode/acceptance/probe.py +206 -0
  18. algocode_agent-0.1.0/src/algocode/acceptance/service.py +244 -0
  19. algocode_agent-0.1.0/src/algocode/acceptance/types.py +58 -0
  20. algocode_agent-0.1.0/src/algocode/application/__init__.py +1 -0
  21. algocode_agent-0.1.0/src/algocode/application/services/__init__.py +25 -0
  22. algocode_agent-0.1.0/src/algocode/application/services/apply_service.py +177 -0
  23. algocode_agent-0.1.0/src/algocode/application/services/baseline_service.py +243 -0
  24. algocode_agent-0.1.0/src/algocode/application/services/benchmark_service.py +628 -0
  25. algocode_agent-0.1.0/src/algocode/application/services/candidate_service.py +169 -0
  26. algocode_agent-0.1.0/src/algocode/application/services/contract_service.py +619 -0
  27. algocode_agent-0.1.0/src/algocode/application/services/correctness_service.py +387 -0
  28. algocode_agent-0.1.0/src/algocode/application/services/decision_service.py +228 -0
  29. algocode_agent-0.1.0/src/algocode/application/services/project_bootstrap_service.py +891 -0
  30. algocode_agent-0.1.0/src/algocode/application/services/project_service.py +125 -0
  31. algocode_agent-0.1.0/src/algocode/application/services/project_state.py +219 -0
  32. algocode_agent-0.1.0/src/algocode/application/services/report_service.py +323 -0
  33. algocode_agent-0.1.0/src/algocode/application/services/task_service.py +77 -0
  34. algocode_agent-0.1.0/src/algocode/approval/service.py +77 -0
  35. algocode_agent-0.1.0/src/algocode/approval/types.py +29 -0
  36. algocode_agent-0.1.0/src/algocode/benchmark/__init__.py +17 -0
  37. algocode_agent-0.1.0/src/algocode/benchmark/engine.py +214 -0
  38. algocode_agent-0.1.0/src/algocode/benchmark/environment.py +105 -0
  39. algocode_agent-0.1.0/src/algocode/benchmark/spec.py +85 -0
  40. algocode_agent-0.1.0/src/algocode/benchmark/types.py +128 -0
  41. algocode_agent-0.1.0/src/algocode/bootstrap.py +268 -0
  42. algocode_agent-0.1.0/src/algocode/cli/__init__.py +1 -0
  43. algocode_agent-0.1.0/src/algocode/cli/commands/__init__.py +1 -0
  44. algocode_agent-0.1.0/src/algocode/cli/commands/accept.py +72 -0
  45. algocode_agent-0.1.0/src/algocode/cli/commands/api.py +220 -0
  46. algocode_agent-0.1.0/src/algocode/cli/commands/apply.py +94 -0
  47. algocode_agent-0.1.0/src/algocode/cli/commands/baseline.py +100 -0
  48. algocode_agent-0.1.0/src/algocode/cli/commands/benchmark.py +227 -0
  49. algocode_agent-0.1.0/src/algocode/cli/commands/candidate.py +155 -0
  50. algocode_agent-0.1.0/src/algocode/cli/commands/correctness.py +197 -0
  51. algocode_agent-0.1.0/src/algocode/cli/commands/diff.py +73 -0
  52. algocode_agent-0.1.0/src/algocode/cli/commands/doctor.py +149 -0
  53. algocode_agent-0.1.0/src/algocode/cli/commands/eval.py +115 -0
  54. algocode_agent-0.1.0/src/algocode/cli/commands/experiment.py +151 -0
  55. algocode_agent-0.1.0/src/algocode/cli/commands/gate.py +61 -0
  56. algocode_agent-0.1.0/src/algocode/cli/commands/init.py +133 -0
  57. algocode_agent-0.1.0/src/algocode/cli/commands/model.py +115 -0
  58. algocode_agent-0.1.0/src/algocode/cli/commands/optimize.py +252 -0
  59. algocode_agent-0.1.0/src/algocode/cli/commands/provider_test.py +90 -0
  60. algocode_agent-0.1.0/src/algocode/cli/commands/report.py +59 -0
  61. algocode_agent-0.1.0/src/algocode/cli/commands/retry.py +107 -0
  62. algocode_agent-0.1.0/src/algocode/cli/commands/review.py +154 -0
  63. algocode_agent-0.1.0/src/algocode/cli/commands/status.py +136 -0
  64. algocode_agent-0.1.0/src/algocode/cli/commands/task.py +146 -0
  65. algocode_agent-0.1.0/src/algocode/cli/context.py +86 -0
  66. algocode_agent-0.1.0/src/algocode/cli/main.py +79 -0
  67. algocode_agent-0.1.0/src/algocode/cli/output.py +70 -0
  68. algocode_agent-0.1.0/src/algocode/config/__init__.py +6 -0
  69. algocode_agent-0.1.0/src/algocode/config/global_file.py +54 -0
  70. algocode_agent-0.1.0/src/algocode/config/loader.py +181 -0
  71. algocode_agent-0.1.0/src/algocode/config/model.py +193 -0
  72. algocode_agent-0.1.0/src/algocode/context/__init__.py +1 -0
  73. algocode_agent-0.1.0/src/algocode/context/builder.py +410 -0
  74. algocode_agent-0.1.0/src/algocode/context/estimator.py +25 -0
  75. algocode_agent-0.1.0/src/algocode/context/facts.py +37 -0
  76. algocode_agent-0.1.0/src/algocode/context/types.py +158 -0
  77. algocode_agent-0.1.0/src/algocode/correctness/__init__.py +6 -0
  78. algocode_agent-0.1.0/src/algocode/correctness/engine.py +452 -0
  79. algocode_agent-0.1.0/src/algocode/correctness/protected.py +47 -0
  80. algocode_agent-0.1.0/src/algocode/correctness/spec.py +108 -0
  81. algocode_agent-0.1.0/src/algocode/correctness/types.py +45 -0
  82. algocode_agent-0.1.0/src/algocode/domain/__init__.py +1 -0
  83. algocode_agent-0.1.0/src/algocode/domain/commands/__init__.py +19 -0
  84. algocode_agent-0.1.0/src/algocode/domain/errors/__init__.py +70 -0
  85. algocode_agent-0.1.0/src/algocode/domain/events/__init__.py +5 -0
  86. algocode_agent-0.1.0/src/algocode/domain/events/envelope.py +67 -0
  87. algocode_agent-0.1.0/src/algocode/domain/model/__init__.py +76 -0
  88. algocode_agent-0.1.0/src/algocode/domain/model/entities.py +151 -0
  89. algocode_agent-0.1.0/src/algocode/domain/model/enums.py +119 -0
  90. algocode_agent-0.1.0/src/algocode/domain/model/ids.py +36 -0
  91. algocode_agent-0.1.0/src/algocode/domain/model/values.py +18 -0
  92. algocode_agent-0.1.0/src/algocode/eval/__init__.py +1 -0
  93. algocode_agent-0.1.0/src/algocode/eval/harness.py +377 -0
  94. algocode_agent-0.1.0/src/algocode/eval/provider.py +135 -0
  95. algocode_agent-0.1.0/src/algocode/eval/service.py +209 -0
  96. algocode_agent-0.1.0/src/algocode/eval/suites.py +121 -0
  97. algocode_agent-0.1.0/src/algocode/eval/types.py +76 -0
  98. algocode_agent-0.1.0/src/algocode/languages/__init__.py +7 -0
  99. algocode_agent-0.1.0/src/algocode/languages/cpp.py +288 -0
  100. algocode_agent-0.1.0/src/algocode/languages/discovery.py +29 -0
  101. algocode_agent-0.1.0/src/algocode/languages/python.py +94 -0
  102. algocode_agent-0.1.0/src/algocode/languages/registry.py +60 -0
  103. algocode_agent-0.1.0/src/algocode/languages/runner.py +68 -0
  104. algocode_agent-0.1.0/src/algocode/languages/types.py +88 -0
  105. algocode_agent-0.1.0/src/algocode/observability/__init__.py +1 -0
  106. algocode_agent-0.1.0/src/algocode/policy/__init__.py +1 -0
  107. algocode_agent-0.1.0/src/algocode/policy/engine.py +111 -0
  108. algocode_agent-0.1.0/src/algocode/policy/types.py +44 -0
  109. algocode_agent-0.1.0/src/algocode/ports/__init__.py +22 -0
  110. algocode_agent-0.1.0/src/algocode/ports/artifact_store.py +22 -0
  111. algocode_agent-0.1.0/src/algocode/ports/clock.py +12 -0
  112. algocode_agent-0.1.0/src/algocode/ports/event_store.py +23 -0
  113. algocode_agent-0.1.0/src/algocode/ports/language.py +30 -0
  114. algocode_agent-0.1.0/src/algocode/ports/policy.py +7 -0
  115. algocode_agent-0.1.0/src/algocode/ports/provider.py +12 -0
  116. algocode_agent-0.1.0/src/algocode/ports/resource.py +7 -0
  117. algocode_agent-0.1.0/src/algocode/ports/workspace.py +19 -0
  118. algocode_agent-0.1.0/src/algocode/project_layout.py +135 -0
  119. algocode_agent-0.1.0/src/algocode/providers/__init__.py +36 -0
  120. algocode_agent-0.1.0/src/algocode/providers/anthropic.py +264 -0
  121. algocode_agent-0.1.0/src/algocode/providers/errors.py +58 -0
  122. algocode_agent-0.1.0/src/algocode/providers/factory.py +86 -0
  123. algocode_agent-0.1.0/src/algocode/providers/fake.py +148 -0
  124. algocode_agent-0.1.0/src/algocode/providers/openai_compatible.py +353 -0
  125. algocode_agent-0.1.0/src/algocode/providers/types.py +101 -0
  126. algocode_agent-0.1.0/src/algocode/report/__init__.py +1 -0
  127. algocode_agent-0.1.0/src/algocode/resources/__init__.py +6 -0
  128. algocode_agent-0.1.0/src/algocode/resources/local.py +235 -0
  129. algocode_agent-0.1.0/src/algocode/resources/types.py +35 -0
  130. algocode_agent-0.1.0/src/algocode/runtime/__init__.py +1 -0
  131. algocode_agent-0.1.0/src/algocode/runtime/agent.py +2238 -0
  132. algocode_agent-0.1.0/src/algocode/runtime/analysis.py +187 -0
  133. algocode_agent-0.1.0/src/algocode/runtime/gates.py +69 -0
  134. algocode_agent-0.1.0/src/algocode/runtime/locks.py +61 -0
  135. algocode_agent-0.1.0/src/algocode/runtime/model_log.py +265 -0
  136. algocode_agent-0.1.0/src/algocode/runtime/optimization_record.py +332 -0
  137. algocode_agent-0.1.0/src/algocode/runtime/planning.py +73 -0
  138. algocode_agent-0.1.0/src/algocode/runtime/repair_memory.py +195 -0
  139. algocode_agent-0.1.0/src/algocode/runtime/task_lock.py +61 -0
  140. algocode_agent-0.1.0/src/algocode/sandbox/local.py +71 -0
  141. algocode_agent-0.1.0/src/algocode/sandbox/runner.py +393 -0
  142. algocode_agent-0.1.0/src/algocode/security/__init__.py +6 -0
  143. algocode_agent-0.1.0/src/algocode/security/credentials.py +75 -0
  144. algocode_agent-0.1.0/src/algocode/security/redaction.py +83 -0
  145. algocode_agent-0.1.0/src/algocode/storage/__init__.py +1 -0
  146. algocode_agent-0.1.0/src/algocode/storage/artifacts/__init__.py +5 -0
  147. algocode_agent-0.1.0/src/algocode/storage/artifacts/file_artifact_store.py +90 -0
  148. algocode_agent-0.1.0/src/algocode/storage/events/__init__.py +5 -0
  149. algocode_agent-0.1.0/src/algocode/storage/events/sqlite_event_store.py +135 -0
  150. algocode_agent-0.1.0/src/algocode/storage/paths.py +27 -0
  151. algocode_agent-0.1.0/src/algocode/storage/sqlite/__init__.py +5 -0
  152. algocode_agent-0.1.0/src/algocode/storage/sqlite/approval_store.py +65 -0
  153. algocode_agent-0.1.0/src/algocode/storage/sqlite/database.py +51 -0
  154. algocode_agent-0.1.0/src/algocode/storage/sqlite/migrations.py +298 -0
  155. algocode_agent-0.1.0/src/algocode/storage/sqlite/projections/__init__.py +12 -0
  156. algocode_agent-0.1.0/src/algocode/storage/sqlite/projections/baseline_projection.py +137 -0
  157. algocode_agent-0.1.0/src/algocode/storage/sqlite/projections/benchmark_projection.py +210 -0
  158. algocode_agent-0.1.0/src/algocode/storage/sqlite/projections/candidate_projection.py +177 -0
  159. algocode_agent-0.1.0/src/algocode/storage/sqlite/projections/correctness_projection.py +148 -0
  160. algocode_agent-0.1.0/src/algocode/storage/sqlite/projections/decision_projection.py +95 -0
  161. algocode_agent-0.1.0/src/algocode/storage/sqlite/projections/project_projection.py +84 -0
  162. algocode_agent-0.1.0/src/algocode/storage/sqlite/projections/task_projection.py +194 -0
  163. algocode_agent-0.1.0/src/algocode/structured_output.py +153 -0
  164. algocode_agent-0.1.0/src/algocode/tools/__init__.py +26 -0
  165. algocode_agent-0.1.0/src/algocode/tools/builtins/__init__.py +1 -0
  166. algocode_agent-0.1.0/src/algocode/tools/builtins/actions.py +707 -0
  167. algocode_agent-0.1.0/src/algocode/tools/builtins/filesystem.py +459 -0
  168. algocode_agent-0.1.0/src/algocode/tools/registry.py +201 -0
  169. algocode_agent-0.1.0/src/algocode/tools/types.py +57 -0
  170. algocode_agent-0.1.0/src/algocode/workspace/__init__.py +12 -0
  171. algocode_agent-0.1.0/src/algocode/workspace/git.py +470 -0
  172. algocode_agent-0.1.0/src/algocode/workspace/types.py +31 -0
  173. algocode_agent-0.1.0/tests/__init__.py +1 -0
  174. algocode_agent-0.1.0/tests/contract/__init__.py +1 -0
  175. algocode_agent-0.1.0/tests/contract/test_artifact_store.py +42 -0
  176. algocode_agent-0.1.0/tests/contract/test_event_store.py +81 -0
  177. algocode_agent-0.1.0/tests/integration/__init__.py +1 -0
  178. algocode_agent-0.1.0/tests/integration/test_acceptance_gate.py +32 -0
  179. algocode_agent-0.1.0/tests/integration/test_agent_runtime.py +1038 -0
  180. algocode_agent-0.1.0/tests/integration/test_baseline_service.py +76 -0
  181. algocode_agent-0.1.0/tests/integration/test_benchmark_service.py +129 -0
  182. algocode_agent-0.1.0/tests/integration/test_cli_api_model.py +131 -0
  183. algocode_agent-0.1.0/tests/integration/test_cli_benchmark.py +129 -0
  184. algocode_agent-0.1.0/tests/integration/test_cli_contract.py +46 -0
  185. algocode_agent-0.1.0/tests/integration/test_cli_doctor.py +30 -0
  186. algocode_agent-0.1.0/tests/integration/test_cli_eval.py +36 -0
  187. algocode_agent-0.1.0/tests/integration/test_cli_experiment.py +92 -0
  188. algocode_agent-0.1.0/tests/integration/test_cli_init_baseline.py +162 -0
  189. algocode_agent-0.1.0/tests/integration/test_cli_optimize.py +162 -0
  190. algocode_agent-0.1.0/tests/integration/test_cli_report_apply.py +230 -0
  191. algocode_agent-0.1.0/tests/integration/test_cli_task.py +141 -0
  192. algocode_agent-0.1.0/tests/integration/test_correctness_service.py +107 -0
  193. algocode_agent-0.1.0/tests/integration/test_docker_sandbox.py +82 -0
  194. algocode_agent-0.1.0/tests/integration/test_e2e_full.py +311 -0
  195. algocode_agent-0.1.0/tests/integration/test_eval_service.py +45 -0
  196. algocode_agent-0.1.0/tests/integration/test_git_workspace.py +84 -0
  197. algocode_agent-0.1.0/tests/integration/test_project_bootstrap.py +231 -0
  198. algocode_agent-0.1.0/tests/integration/test_report_apply.py +127 -0
  199. algocode_agent-0.1.0/tests/integration/test_report_failure_evidence.py +77 -0
  200. algocode_agent-0.1.0/tests/integration/test_secret_redaction.py +85 -0
  201. algocode_agent-0.1.0/tests/integration/test_tool_actions.py +191 -0
  202. algocode_agent-0.1.0/tests/integration/test_tool_security.py +105 -0
  203. algocode_agent-0.1.0/tests/support/__init__.py +1 -0
  204. algocode_agent-0.1.0/tests/support/git.py +33 -0
  205. algocode_agent-0.1.0/tests/support/mock_openai.py +102 -0
  206. algocode_agent-0.1.0/tests/unit/__init__.py +1 -0
  207. algocode_agent-0.1.0/tests/unit/acceptance/__init__.py +1 -0
  208. algocode_agent-0.1.0/tests/unit/acceptance/test_matrix.py +23 -0
  209. algocode_agent-0.1.0/tests/unit/application/__init__.py +1 -0
  210. algocode_agent-0.1.0/tests/unit/application/test_decision_policy.py +62 -0
  211. algocode_agent-0.1.0/tests/unit/approval/__init__.py +1 -0
  212. algocode_agent-0.1.0/tests/unit/approval/test_service.py +66 -0
  213. algocode_agent-0.1.0/tests/unit/benchmark/__init__.py +1 -0
  214. algocode_agent-0.1.0/tests/unit/benchmark/test_engine.py +79 -0
  215. algocode_agent-0.1.0/tests/unit/benchmark/test_environment.py +25 -0
  216. algocode_agent-0.1.0/tests/unit/benchmark/test_locks.py +31 -0
  217. algocode_agent-0.1.0/tests/unit/benchmark/test_spec.py +63 -0
  218. algocode_agent-0.1.0/tests/unit/config/__init__.py +1 -0
  219. algocode_agent-0.1.0/tests/unit/config/test_loader.py +222 -0
  220. algocode_agent-0.1.0/tests/unit/context/__init__.py +1 -0
  221. algocode_agent-0.1.0/tests/unit/context/test_builder.py +135 -0
  222. algocode_agent-0.1.0/tests/unit/correctness/__init__.py +1 -0
  223. algocode_agent-0.1.0/tests/unit/correctness/test_engine.py +151 -0
  224. algocode_agent-0.1.0/tests/unit/correctness/test_protected.py +25 -0
  225. algocode_agent-0.1.0/tests/unit/correctness/test_spec.py +57 -0
  226. algocode_agent-0.1.0/tests/unit/domain/__init__.py +1 -0
  227. algocode_agent-0.1.0/tests/unit/domain/test_ids.py +28 -0
  228. algocode_agent-0.1.0/tests/unit/domain/test_models.py +35 -0
  229. algocode_agent-0.1.0/tests/unit/languages/__init__.py +1 -0
  230. algocode_agent-0.1.0/tests/unit/languages/test_adapters.py +54 -0
  231. algocode_agent-0.1.0/tests/unit/policy/__init__.py +1 -0
  232. algocode_agent-0.1.0/tests/unit/policy/test_engine.py +51 -0
  233. algocode_agent-0.1.0/tests/unit/providers/__init__.py +1 -0
  234. algocode_agent-0.1.0/tests/unit/providers/test_anthropic.py +93 -0
  235. algocode_agent-0.1.0/tests/unit/providers/test_fake.py +73 -0
  236. algocode_agent-0.1.0/tests/unit/providers/test_openai_compatible.py +254 -0
  237. algocode_agent-0.1.0/tests/unit/resources/__init__.py +1 -0
  238. algocode_agent-0.1.0/tests/unit/resources/test_local.py +106 -0
  239. algocode_agent-0.1.0/tests/unit/runtime/__init__.py +1 -0
  240. algocode_agent-0.1.0/tests/unit/runtime/test_analysis.py +56 -0
  241. algocode_agent-0.1.0/tests/unit/runtime/test_contract_service.py +85 -0
  242. algocode_agent-0.1.0/tests/unit/runtime/test_gates.py +144 -0
  243. algocode_agent-0.1.0/tests/unit/runtime/test_model_log.py +83 -0
  244. algocode_agent-0.1.0/tests/unit/runtime/test_optimization_record.py +61 -0
  245. algocode_agent-0.1.0/tests/unit/runtime/test_planning.py +69 -0
  246. algocode_agent-0.1.0/tests/unit/runtime/test_structured_output.py +46 -0
  247. algocode_agent-0.1.0/tests/unit/runtime/test_task_lock.py +27 -0
  248. algocode_agent-0.1.0/tests/unit/sandbox/__init__.py +1 -0
  249. algocode_agent-0.1.0/tests/unit/sandbox/test_local.py +39 -0
  250. algocode_agent-0.1.0/tests/unit/sandbox/test_runner.py +69 -0
  251. algocode_agent-0.1.0/tests/unit/security/test_credentials.py +26 -0
  252. algocode_agent-0.1.0/tests/unit/test_doctor.py +32 -0
  253. algocode_agent-0.1.0/tests/unit/test_paths.py +39 -0
  254. algocode_agent-0.1.0/tests/unit/test_project_service.py +52 -0
  255. algocode_agent-0.1.0/tests/unit/test_task_service.py +72 -0
  256. algocode_agent-0.1.0/tests/unit/tools/__init__.py +1 -0
  257. algocode_agent-0.1.0/tests/unit/tools/test_registry.py +182 -0
@@ -0,0 +1,69 @@
1
+ name: Publish
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ release:
8
+ types: [published]
9
+ workflow_dispatch:
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ concurrency:
15
+ group: pypi-publish
16
+ cancel-in-progress: false
17
+
18
+ jobs:
19
+ build:
20
+ name: Build distributions
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - name: Check out repository
24
+ uses: actions/checkout@v4
25
+
26
+ - name: Set up Python
27
+ uses: actions/setup-python@v5
28
+ with:
29
+ python-version: "3.11"
30
+
31
+ - name: Install build tooling
32
+ run: |
33
+ python -m pip install --upgrade pip
34
+ python -m pip install "build>=1.2,<2" "twine>=6,<7"
35
+
36
+ - name: Build sdist and wheel
37
+ run: python -m build
38
+
39
+ - name: Validate distribution metadata
40
+ run: python -m twine check dist/*
41
+
42
+ - name: Upload distributions
43
+ uses: actions/upload-artifact@v4
44
+ with:
45
+ name: python-distributions
46
+ path: dist/*
47
+ if-no-files-found: error
48
+
49
+ publish:
50
+ name: Publish to PyPI
51
+ needs: build
52
+ runs-on: ubuntu-latest
53
+ environment:
54
+ name: pypi
55
+ url: https://pypi.org/p/algocode-agent
56
+ permissions:
57
+ id-token: write
58
+ contents: read
59
+ steps:
60
+ - name: Download distributions
61
+ uses: actions/download-artifact@v4
62
+ with:
63
+ name: python-distributions
64
+ path: dist
65
+
66
+ - name: Publish distributions to PyPI
67
+ uses: pypa/gh-action-pypi-publish@release/v1
68
+ with:
69
+ packages-dir: dist
@@ -0,0 +1,70 @@
1
+ # This workflow will upload a Python Package to PyPI when a release is created
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3
+
4
+ # This workflow uses actions that are not certified by GitHub.
5
+ # They are provided by a third-party and are governed by
6
+ # separate terms of service, privacy policy, and support
7
+ # documentation.
8
+
9
+ name: Upload Python Package
10
+
11
+ on:
12
+ release:
13
+ types: [published]
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ jobs:
19
+ release-build:
20
+ runs-on: ubuntu-latest
21
+
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+
25
+ - uses: actions/setup-python@v5
26
+ with:
27
+ python-version: "3.x"
28
+
29
+ - name: Build release distributions
30
+ run: |
31
+ # NOTE: put your own distribution build steps here.
32
+ python -m pip install build
33
+ python -m build
34
+
35
+ - name: Upload distributions
36
+ uses: actions/upload-artifact@v4
37
+ with:
38
+ name: release-dists
39
+ path: dist/
40
+
41
+ pypi-publish:
42
+ runs-on: ubuntu-latest
43
+ needs:
44
+ - release-build
45
+ permissions:
46
+ # IMPORTANT: this permission is mandatory for trusted publishing
47
+ id-token: write
48
+
49
+ # Dedicated environments with protections for publishing are strongly recommended.
50
+ # For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
51
+ environment:
52
+ name: pypi
53
+ # OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
54
+ # url: https://pypi.org/p/YOURPROJECT
55
+ #
56
+ # ALTERNATIVE: if your GitHub Release name is the PyPI project version string
57
+ # ALTERNATIVE: exactly, uncomment the following line instead:
58
+ # url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}
59
+
60
+ steps:
61
+ - name: Retrieve release distributions
62
+ uses: actions/download-artifact@v4
63
+ with:
64
+ name: release-dists
65
+ path: dist/
66
+
67
+ - name: Publish release distributions to PyPI
68
+ uses: pypa/gh-action-pypi-publish@release/v1
69
+ with:
70
+ packages-dir: dist/
@@ -0,0 +1,15 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ .idea/
6
+ .pytest_cache/
7
+ .ruff_cache/
8
+ .mypy_cache/
9
+ .pyright/
10
+ .coverage
11
+ htmlcov/
12
+ build/
13
+ dist/
14
+ dist-check/
15
+ .algocode/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Algocode Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.