fromscratch-pyscheduler 0.5.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 (389) hide show
  1. fromscratch_pyscheduler-0.5.0/.github/workflows/ci.yml +14 -0
  2. fromscratch_pyscheduler-0.5.0/.github/workflows/docs.yml +16 -0
  3. fromscratch_pyscheduler-0.5.0/.github/workflows/release.yml +58 -0
  4. fromscratch_pyscheduler-0.5.0/.gitignore +18 -0
  5. fromscratch_pyscheduler-0.5.0/.pre-commit-config.yaml +56 -0
  6. fromscratch_pyscheduler-0.5.0/CLAUDE.md +52 -0
  7. fromscratch_pyscheduler-0.5.0/CONTRIBUTING.md +190 -0
  8. fromscratch_pyscheduler-0.5.0/LICENSE +21 -0
  9. fromscratch_pyscheduler-0.5.0/PKG-INFO +299 -0
  10. fromscratch_pyscheduler-0.5.0/README.md +262 -0
  11. fromscratch_pyscheduler-0.5.0/conftest.py +21 -0
  12. fromscratch_pyscheduler-0.5.0/docs/concepts/alerts.md +181 -0
  13. fromscratch_pyscheduler-0.5.0/docs/concepts/calendars-and-run-dates.md +71 -0
  14. fromscratch_pyscheduler-0.5.0/docs/concepts/clocks-and-launchers.md +157 -0
  15. fromscratch_pyscheduler-0.5.0/docs/concepts/concurrency.md +119 -0
  16. fromscratch_pyscheduler-0.5.0/docs/concepts/config.md +98 -0
  17. fromscratch_pyscheduler-0.5.0/docs/concepts/cron.md +60 -0
  18. fromscratch_pyscheduler-0.5.0/docs/concepts/dependencies.md +75 -0
  19. fromscratch_pyscheduler-0.5.0/docs/concepts/file-watchers.md +169 -0
  20. fromscratch_pyscheduler-0.5.0/docs/concepts/forecast.md +67 -0
  21. fromscratch_pyscheduler-0.5.0/docs/concepts/graph-layout.md +64 -0
  22. fromscratch_pyscheduler-0.5.0/docs/concepts/group-commit.md +86 -0
  23. fromscratch_pyscheduler-0.5.0/docs/concepts/heartbeats.md +91 -0
  24. fromscratch_pyscheduler-0.5.0/docs/concepts/http-api.md +265 -0
  25. fromscratch_pyscheduler-0.5.0/docs/concepts/live-updates.md +113 -0
  26. fromscratch_pyscheduler-0.5.0/docs/concepts/notifiers.md +154 -0
  27. fromscratch_pyscheduler-0.5.0/docs/concepts/operator-actions.md +123 -0
  28. fromscratch_pyscheduler-0.5.0/docs/concepts/pools-and-limits.md +91 -0
  29. fromscratch_pyscheduler-0.5.0/docs/concepts/recovery-and-catch-up.md +203 -0
  30. fromscratch_pyscheduler-0.5.0/docs/concepts/remote-agents.md +153 -0
  31. fromscratch_pyscheduler-0.5.0/docs/concepts/retries-and-backoff.md +85 -0
  32. fromscratch_pyscheduler-0.5.0/docs/concepts/routing-alerts.md +160 -0
  33. fromscratch_pyscheduler-0.5.0/docs/concepts/runs-and-states.md +83 -0
  34. fromscratch_pyscheduler-0.5.0/docs/concepts/scheduler.md +140 -0
  35. fromscratch_pyscheduler-0.5.0/docs/concepts/signed-messages.md +87 -0
  36. fromscratch_pyscheduler-0.5.0/docs/concepts/templates.md +67 -0
  37. fromscratch_pyscheduler-0.5.0/docs/concepts/the-minder.md +120 -0
  38. fromscratch_pyscheduler-0.5.0/docs/concepts/the-service-and-cli.md +126 -0
  39. fromscratch_pyscheduler-0.5.0/docs/concepts/time-zones-and-dst.md +91 -0
  40. fromscratch_pyscheduler-0.5.0/docs/concepts/timelines.md +70 -0
  41. fromscratch_pyscheduler-0.5.0/docs/concepts/validation.md +130 -0
  42. fromscratch_pyscheduler-0.5.0/docs/concepts/web-ui.md +136 -0
  43. fromscratch_pyscheduler-0.5.0/docs/concepts/yaml.md +104 -0
  44. fromscratch_pyscheduler-0.5.0/docs/index.md +86 -0
  45. fromscratch_pyscheduler-0.5.0/docs/property-testing.md +156 -0
  46. fromscratch_pyscheduler-0.5.0/docs/superpowers/plans/2026-10-17-pyscheduler-core.md +900 -0
  47. fromscratch_pyscheduler-0.5.0/docs/superpowers/plans/2026-10-18-pyscheduler-alerts-watchers.md +655 -0
  48. fromscratch_pyscheduler-0.5.0/docs/superpowers/plans/2026-10-19-pyscheduler-web-ui.md +385 -0
  49. fromscratch_pyscheduler-0.5.0/docs/superpowers/plans/2026-10-20-pyscheduler-remote-agents.md +354 -0
  50. fromscratch_pyscheduler-0.5.0/docs/superpowers/specs/2026-10-17-pyscheduler-design.md +849 -0
  51. fromscratch_pyscheduler-0.5.0/examples/agents_demo.py +16 -0
  52. fromscratch_pyscheduler-0.5.0/examples/alerts.yaml +76 -0
  53. fromscratch_pyscheduler-0.5.0/examples/etl.yaml +70 -0
  54. fromscratch_pyscheduler-0.5.0/examples/inbox/.gitkeep +0 -0
  55. fromscratch_pyscheduler-0.5.0/examples/scripts/consume.sh +6 -0
  56. fromscratch_pyscheduler-0.5.0/examples/scripts/extract.sh +6 -0
  57. fromscratch_pyscheduler-0.5.0/examples/scripts/fail.sh +5 -0
  58. fromscratch_pyscheduler-0.5.0/examples/scripts/flaky.sh +16 -0
  59. fromscratch_pyscheduler-0.5.0/examples/scripts/load.sh +6 -0
  60. fromscratch_pyscheduler-0.5.0/examples/scripts/say-kind.sh +5 -0
  61. fromscratch_pyscheduler-0.5.0/examples/scripts/slow.sh +6 -0
  62. fromscratch_pyscheduler-0.5.0/examples/scripts/transform.sh +6 -0
  63. fromscratch_pyscheduler-0.5.0/examples/ui_demo.py +16 -0
  64. fromscratch_pyscheduler-0.5.0/mkdocs.yml +114 -0
  65. fromscratch_pyscheduler-0.5.0/overrides/main.html +7 -0
  66. fromscratch_pyscheduler-0.5.0/pyproject.toml +185 -0
  67. fromscratch_pyscheduler-0.5.0/src/pyscheduler/__init__.py +6 -0
  68. fromscratch_pyscheduler-0.5.0/src/pyscheduler/__main__.py +8 -0
  69. fromscratch_pyscheduler-0.5.0/src/pyscheduler/_version.py +24 -0
  70. fromscratch_pyscheduler-0.5.0/src/pyscheduler/agents/__init__.py +25 -0
  71. fromscratch_pyscheduler-0.5.0/src/pyscheduler/agents/book.py +210 -0
  72. fromscratch_pyscheduler-0.5.0/src/pyscheduler/agents/cli.py +207 -0
  73. fromscratch_pyscheduler-0.5.0/src/pyscheduler/agents/hub.py +399 -0
  74. fromscratch_pyscheduler-0.5.0/src/pyscheduler/agents/hub_link.py +279 -0
  75. fromscratch_pyscheduler-0.5.0/src/pyscheduler/agents/journal.py +231 -0
  76. fromscratch_pyscheduler-0.5.0/src/pyscheduler/agents/log_messages.py +158 -0
  77. fromscratch_pyscheduler-0.5.0/src/pyscheduler/agents/logsource.py +296 -0
  78. fromscratch_pyscheduler-0.5.0/src/pyscheduler/agents/messages.py +358 -0
  79. fromscratch_pyscheduler-0.5.0/src/pyscheduler/agents/orphans.py +93 -0
  80. fromscratch_pyscheduler-0.5.0/src/pyscheduler/agents/placement.py +96 -0
  81. fromscratch_pyscheduler-0.5.0/src/pyscheduler/agents/remote_handle.py +107 -0
  82. fromscratch_pyscheduler-0.5.0/src/pyscheduler/agents/signing.py +200 -0
  83. fromscratch_pyscheduler-0.5.0/src/pyscheduler/agents/worker.py +342 -0
  84. fromscratch_pyscheduler-0.5.0/src/pyscheduler/agents/worker_files.py +101 -0
  85. fromscratch_pyscheduler-0.5.0/src/pyscheduler/agents/worker_reports.py +144 -0
  86. fromscratch_pyscheduler-0.5.0/src/pyscheduler/alerts/__init__.py +5 -0
  87. fromscratch_pyscheduler-0.5.0/src/pyscheduler/alerts/deadlines.py +133 -0
  88. fromscratch_pyscheduler-0.5.0/src/pyscheduler/alerts/delivery.py +285 -0
  89. fromscratch_pyscheduler-0.5.0/src/pyscheduler/alerts/dispatch.py +274 -0
  90. fromscratch_pyscheduler-0.5.0/src/pyscheduler/alerts/model.py +62 -0
  91. fromscratch_pyscheduler-0.5.0/src/pyscheduler/alerts/monitor.py +322 -0
  92. fromscratch_pyscheduler-0.5.0/src/pyscheduler/alerts/raising.py +137 -0
  93. fromscratch_pyscheduler-0.5.0/src/pyscheduler/alerts/routing.py +54 -0
  94. fromscratch_pyscheduler-0.5.0/src/pyscheduler/api/__init__.py +27 -0
  95. fromscratch_pyscheduler-0.5.0/src/pyscheduler/api/access.py +247 -0
  96. fromscratch_pyscheduler-0.5.0/src/pyscheduler/api/admin.py +239 -0
  97. fromscratch_pyscheduler-0.5.0/src/pyscheduler/api/agents.py +55 -0
  98. fromscratch_pyscheduler-0.5.0/src/pyscheduler/api/alerts.py +162 -0
  99. fromscratch_pyscheduler-0.5.0/src/pyscheduler/api/app.py +118 -0
  100. fromscratch_pyscheduler-0.5.0/src/pyscheduler/api/auth.py +267 -0
  101. fromscratch_pyscheduler-0.5.0/src/pyscheduler/api/jobs.py +208 -0
  102. fromscratch_pyscheduler-0.5.0/src/pyscheduler/api/runs.py +270 -0
  103. fromscratch_pyscheduler-0.5.0/src/pyscheduler/api/serialize.py +360 -0
  104. fromscratch_pyscheduler-0.5.0/src/pyscheduler/api/session_key.py +78 -0
  105. fromscratch_pyscheduler-0.5.0/src/pyscheduler/api/support.py +217 -0
  106. fromscratch_pyscheduler-0.5.0/src/pyscheduler/api/users.py +169 -0
  107. fromscratch_pyscheduler-0.5.0/src/pyscheduler/calendars.py +108 -0
  108. fromscratch_pyscheduler-0.5.0/src/pyscheduler/cli.py +259 -0
  109. fromscratch_pyscheduler-0.5.0/src/pyscheduler/cli_alerts.py +87 -0
  110. fromscratch_pyscheduler-0.5.0/src/pyscheduler/cli_commands.py +316 -0
  111. fromscratch_pyscheduler-0.5.0/src/pyscheduler/cli_format.py +115 -0
  112. fromscratch_pyscheduler-0.5.0/src/pyscheduler/client.py +329 -0
  113. fromscratch_pyscheduler-0.5.0/src/pyscheduler/config/__init__.py +50 -0
  114. fromscratch_pyscheduler-0.5.0/src/pyscheduler/config/agent_fields.py +94 -0
  115. fromscratch_pyscheduler-0.5.0/src/pyscheduler/config/agent_secrets.py +110 -0
  116. fromscratch_pyscheduler-0.5.0/src/pyscheduler/config/agents_model.py +34 -0
  117. fromscratch_pyscheduler-0.5.0/src/pyscheduler/config/alert_fields.py +248 -0
  118. fromscratch_pyscheduler-0.5.0/src/pyscheduler/config/calendar_fields.py +86 -0
  119. fromscratch_pyscheduler-0.5.0/src/pyscheduler/config/calendar_inheritance.py +79 -0
  120. fromscratch_pyscheduler-0.5.0/src/pyscheduler/config/fields.py +319 -0
  121. fromscratch_pyscheduler-0.5.0/src/pyscheduler/config/job_fields.py +365 -0
  122. fromscratch_pyscheduler-0.5.0/src/pyscheduler/config/loader.py +343 -0
  123. fromscratch_pyscheduler-0.5.0/src/pyscheduler/config/model.py +396 -0
  124. fromscratch_pyscheduler-0.5.0/src/pyscheduler/config/redaction.py +64 -0
  125. fromscratch_pyscheduler-0.5.0/src/pyscheduler/config/run_dates.py +197 -0
  126. fromscratch_pyscheduler-0.5.0/src/pyscheduler/config/schedule_fields.py +172 -0
  127. fromscratch_pyscheduler-0.5.0/src/pyscheduler/config/settings_fields.py +96 -0
  128. fromscratch_pyscheduler-0.5.0/src/pyscheduler/config/source_ref.py +13 -0
  129. fromscratch_pyscheduler-0.5.0/src/pyscheduler/config/validate.py +368 -0
  130. fromscratch_pyscheduler-0.5.0/src/pyscheduler/config/validate_agents.py +77 -0
  131. fromscratch_pyscheduler-0.5.0/src/pyscheduler/config/validate_alerts.py +53 -0
  132. fromscratch_pyscheduler-0.5.0/src/pyscheduler/config/validate_templates.py +68 -0
  133. fromscratch_pyscheduler-0.5.0/src/pyscheduler/config/watch_fields.py +94 -0
  134. fromscratch_pyscheduler-0.5.0/src/pyscheduler/demo.py +308 -0
  135. fromscratch_pyscheduler-0.5.0/src/pyscheduler/demo_agents.py +293 -0
  136. fromscratch_pyscheduler-0.5.0/src/pyscheduler/demo_config.py +153 -0
  137. fromscratch_pyscheduler-0.5.0/src/pyscheduler/engine/__init__.py +6 -0
  138. fromscratch_pyscheduler-0.5.0/src/pyscheduler/engine/action_support.py +285 -0
  139. fromscratch_pyscheduler-0.5.0/src/pyscheduler/engine/actions.py +321 -0
  140. fromscratch_pyscheduler-0.5.0/src/pyscheduler/engine/admission.py +233 -0
  141. fromscratch_pyscheduler-0.5.0/src/pyscheduler/engine/adopted.py +297 -0
  142. fromscratch_pyscheduler-0.5.0/src/pyscheduler/engine/attempts.py +350 -0
  143. fromscratch_pyscheduler-0.5.0/src/pyscheduler/engine/base.py +399 -0
  144. fromscratch_pyscheduler-0.5.0/src/pyscheduler/engine/clock.py +253 -0
  145. fromscratch_pyscheduler-0.5.0/src/pyscheduler/engine/core.py +377 -0
  146. fromscratch_pyscheduler-0.5.0/src/pyscheduler/engine/creation.py +242 -0
  147. fromscratch_pyscheduler-0.5.0/src/pyscheduler/engine/deps.py +101 -0
  148. fromscratch_pyscheduler-0.5.0/src/pyscheduler/engine/hooks.py +129 -0
  149. fromscratch_pyscheduler-0.5.0/src/pyscheduler/engine/launcher.py +361 -0
  150. fromscratch_pyscheduler-0.5.0/src/pyscheduler/engine/locks.py +103 -0
  151. fromscratch_pyscheduler-0.5.0/src/pyscheduler/engine/model.py +189 -0
  152. fromscratch_pyscheduler-0.5.0/src/pyscheduler/engine/outcomes.py +80 -0
  153. fromscratch_pyscheduler-0.5.0/src/pyscheduler/engine/recovery.py +375 -0
  154. fromscratch_pyscheduler-0.5.0/src/pyscheduler/engine/reload.py +230 -0
  155. fromscratch_pyscheduler-0.5.0/src/pyscheduler/engine/remote.py +389 -0
  156. fromscratch_pyscheduler-0.5.0/src/pyscheduler/engine/retention.py +158 -0
  157. fromscratch_pyscheduler-0.5.0/src/pyscheduler/engine/runbook.py +274 -0
  158. fromscratch_pyscheduler-0.5.0/src/pyscheduler/engine/status_note.py +127 -0
  159. fromscratch_pyscheduler-0.5.0/src/pyscheduler/engine/watch_runs.py +163 -0
  160. fromscratch_pyscheduler-0.5.0/src/pyscheduler/engine/watcher.py +235 -0
  161. fromscratch_pyscheduler-0.5.0/src/pyscheduler/fake_hub.py +353 -0
  162. fromscratch_pyscheduler-0.5.0/src/pyscheduler/minder.py +368 -0
  163. fromscratch_pyscheduler-0.5.0/src/pyscheduler/notifiers/__init__.py +11 -0
  164. fromscratch_pyscheduler-0.5.0/src/pyscheduler/notifiers/base.py +134 -0
  165. fromscratch_pyscheduler-0.5.0/src/pyscheduler/notifiers/email.py +144 -0
  166. fromscratch_pyscheduler-0.5.0/src/pyscheduler/notifiers/local.py +139 -0
  167. fromscratch_pyscheduler-0.5.0/src/pyscheduler/notifiers/threads.py +78 -0
  168. fromscratch_pyscheduler-0.5.0/src/pyscheduler/notifiers/web.py +194 -0
  169. fromscratch_pyscheduler-0.5.0/src/pyscheduler/py.typed +0 -0
  170. fromscratch_pyscheduler-0.5.0/src/pyscheduler/schedule/__init__.py +1 -0
  171. fromscratch_pyscheduler-0.5.0/src/pyscheduler/schedule/cron.py +233 -0
  172. fromscratch_pyscheduler-0.5.0/src/pyscheduler/schedule/firings.py +264 -0
  173. fromscratch_pyscheduler-0.5.0/src/pyscheduler/schedule/forecast.py +174 -0
  174. fromscratch_pyscheduler-0.5.0/src/pyscheduler/schedule/local.py +46 -0
  175. fromscratch_pyscheduler-0.5.0/src/pyscheduler/schedule/specs.py +203 -0
  176. fromscratch_pyscheduler-0.5.0/src/pyscheduler/service.py +398 -0
  177. fromscratch_pyscheduler-0.5.0/src/pyscheduler/service_agents.py +88 -0
  178. fromscratch_pyscheduler-0.5.0/src/pyscheduler/service_parts.py +150 -0
  179. fromscratch_pyscheduler-0.5.0/src/pyscheduler/store/__init__.py +11 -0
  180. fromscratch_pyscheduler-0.5.0/src/pyscheduler/store/alert_store.py +261 -0
  181. fromscratch_pyscheduler-0.5.0/src/pyscheduler/store/attempt_reads.py +36 -0
  182. fromscratch_pyscheduler-0.5.0/src/pyscheduler/store/config_reads.py +51 -0
  183. fromscratch_pyscheduler-0.5.0/src/pyscheduler/store/duration_reads.py +82 -0
  184. fromscratch_pyscheduler-0.5.0/src/pyscheduler/store/schema.py +396 -0
  185. fromscratch_pyscheduler-0.5.0/src/pyscheduler/store/staging.py +40 -0
  186. fromscratch_pyscheduler-0.5.0/src/pyscheduler/store/store.py +368 -0
  187. fromscratch_pyscheduler-0.5.0/src/pyscheduler/store/writer.py +173 -0
  188. fromscratch_pyscheduler-0.5.0/src/pyscheduler/templates.py +109 -0
  189. fromscratch_pyscheduler-0.5.0/src/pyscheduler/testing.py +146 -0
  190. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/__init__.py +70 -0
  191. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/admin.py +237 -0
  192. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/agents_page.py +102 -0
  193. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/board.py +167 -0
  194. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/board_view.py +362 -0
  195. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/config_diff.py +100 -0
  196. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/dates.py +42 -0
  197. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/detail.py +149 -0
  198. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/detail_view.py +389 -0
  199. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/forecast_page.py +100 -0
  200. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/graph.py +350 -0
  201. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/graph_layout.py +208 -0
  202. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/html.py +134 -0
  203. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/layout.py +159 -0
  204. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/live.py +292 -0
  205. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/login.py +105 -0
  206. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/logtail.py +235 -0
  207. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/sparkline.py +58 -0
  208. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/static/actions.js +127 -0
  209. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/static/admin.js +97 -0
  210. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/static/agents.js +57 -0
  211. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/static/app.css +271 -0
  212. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/static/app.js +20 -0
  213. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/static/board.js +192 -0
  214. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/static/common.js +200 -0
  215. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/static/log.js +159 -0
  216. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/templates/login.html +17 -0
  217. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/templates/page.html +22 -0
  218. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/timeline.py +350 -0
  219. fromscratch_pyscheduler-0.5.0/src/pyscheduler/ui/timeline_window.py +119 -0
  220. fromscratch_pyscheduler-0.5.0/src/pyscheduler/values.py +100 -0
  221. fromscratch_pyscheduler-0.5.0/src/pyscheduler/yamlish/__init__.py +9 -0
  222. fromscratch_pyscheduler-0.5.0/src/pyscheduler/yamlish/_scalars.py +291 -0
  223. fromscratch_pyscheduler-0.5.0/src/pyscheduler/yamlish/nodes.py +50 -0
  224. fromscratch_pyscheduler-0.5.0/src/pyscheduler/yamlish/parser.py +313 -0
  225. fromscratch_pyscheduler-0.5.0/tests/agents/agent_helpers.py +214 -0
  226. fromscratch_pyscheduler-0.5.0/tests/agents/hub_helpers.py +226 -0
  227. fromscratch_pyscheduler-0.5.0/tests/agents/service_agent_helpers.py +202 -0
  228. fromscratch_pyscheduler-0.5.0/tests/agents/test_agent_cli.py +160 -0
  229. fromscratch_pyscheduler-0.5.0/tests/agents/test_book.py +323 -0
  230. fromscratch_pyscheduler-0.5.0/tests/agents/test_hub.py +365 -0
  231. fromscratch_pyscheduler-0.5.0/tests/agents/test_hub_edges.py +160 -0
  232. fromscratch_pyscheduler-0.5.0/tests/agents/test_hub_reports.py +174 -0
  233. fromscratch_pyscheduler-0.5.0/tests/agents/test_hub_restart.py +133 -0
  234. fromscratch_pyscheduler-0.5.0/tests/agents/test_journal.py +90 -0
  235. fromscratch_pyscheduler-0.5.0/tests/agents/test_logsource.py +139 -0
  236. fromscratch_pyscheduler-0.5.0/tests/agents/test_payloads.py +183 -0
  237. fromscratch_pyscheduler-0.5.0/tests/agents/test_placement.py +87 -0
  238. fromscratch_pyscheduler-0.5.0/tests/agents/test_service_agents.py +123 -0
  239. fromscratch_pyscheduler-0.5.0/tests/agents/test_service_restart.py +169 -0
  240. fromscratch_pyscheduler-0.5.0/tests/agents/test_signing.py +233 -0
  241. fromscratch_pyscheduler-0.5.0/tests/agents/test_worker.py +342 -0
  242. fromscratch_pyscheduler-0.5.0/tests/agents/test_worker_edges.py +308 -0
  243. fromscratch_pyscheduler-0.5.0/tests/alerts/alert_helpers.py +224 -0
  244. fromscratch_pyscheduler-0.5.0/tests/alerts/monitor_helpers.py +90 -0
  245. fromscratch_pyscheduler-0.5.0/tests/alerts/test_dispatch.py +223 -0
  246. fromscratch_pyscheduler-0.5.0/tests/alerts/test_dispatch_recovery.py +352 -0
  247. fromscratch_pyscheduler-0.5.0/tests/alerts/test_monitor.py +438 -0
  248. fromscratch_pyscheduler-0.5.0/tests/alerts/test_monitor_deadlines.py +110 -0
  249. fromscratch_pyscheduler-0.5.0/tests/alerts/test_monitor_raising.py +124 -0
  250. fromscratch_pyscheduler-0.5.0/tests/alerts/test_monitor_reload.py +246 -0
  251. fromscratch_pyscheduler-0.5.0/tests/alerts/test_monitor_shutdown.py +104 -0
  252. fromscratch_pyscheduler-0.5.0/tests/alerts/test_routing.py +78 -0
  253. fromscratch_pyscheduler-0.5.0/tests/api/api_fixtures.py +74 -0
  254. fromscratch_pyscheduler-0.5.0/tests/api/api_helpers.py +238 -0
  255. fromscratch_pyscheduler-0.5.0/tests/api/conftest.py +5 -0
  256. fromscratch_pyscheduler-0.5.0/tests/api/test_access.py +393 -0
  257. fromscratch_pyscheduler-0.5.0/tests/api/test_agents_api.py +175 -0
  258. fromscratch_pyscheduler-0.5.0/tests/api/test_alert_routes.py +318 -0
  259. fromscratch_pyscheduler-0.5.0/tests/api/test_api_admin.py +199 -0
  260. fromscratch_pyscheduler-0.5.0/tests/api/test_api_jobs.py +255 -0
  261. fromscratch_pyscheduler-0.5.0/tests/api/test_app.py +312 -0
  262. fromscratch_pyscheduler-0.5.0/tests/api/test_auth.py +154 -0
  263. fromscratch_pyscheduler-0.5.0/tests/api/test_remote_log.py +97 -0
  264. fromscratch_pyscheduler-0.5.0/tests/api/test_request_guard.py +107 -0
  265. fromscratch_pyscheduler-0.5.0/tests/api/test_serialize.py +118 -0
  266. fromscratch_pyscheduler-0.5.0/tests/api/test_token_reload.py +76 -0
  267. fromscratch_pyscheduler-0.5.0/tests/api/test_users.py +118 -0
  268. fromscratch_pyscheduler-0.5.0/tests/config/conftest.py +23 -0
  269. fromscratch_pyscheduler-0.5.0/tests/config/test_agent_config.py +251 -0
  270. fromscratch_pyscheduler-0.5.0/tests/config/test_alert_config.py +199 -0
  271. fromscratch_pyscheduler-0.5.0/tests/config/test_calendar_includes.py +51 -0
  272. fromscratch_pyscheduler-0.5.0/tests/config/test_config_forms.py +153 -0
  273. fromscratch_pyscheduler-0.5.0/tests/config/test_config_model.py +43 -0
  274. fromscratch_pyscheduler-0.5.0/tests/config/test_config_robustness.py +162 -0
  275. fromscratch_pyscheduler-0.5.0/tests/config/test_expansion_braces.py +107 -0
  276. fromscratch_pyscheduler-0.5.0/tests/config/test_expansions.py +49 -0
  277. fromscratch_pyscheduler-0.5.0/tests/config/test_loader.py +379 -0
  278. fromscratch_pyscheduler-0.5.0/tests/config/test_validate_dependencies.py +287 -0
  279. fromscratch_pyscheduler-0.5.0/tests/config/test_validate_jobs.py +327 -0
  280. fromscratch_pyscheduler-0.5.0/tests/config/test_validate_limits.py +62 -0
  281. fromscratch_pyscheduler-0.5.0/tests/config/test_validate_speed.py +74 -0
  282. fromscratch_pyscheduler-0.5.0/tests/config/test_validate_warnings.py +204 -0
  283. fromscratch_pyscheduler-0.5.0/tests/config/test_watcher_config.py +199 -0
  284. fromscratch_pyscheduler-0.5.0/tests/config/validate_helpers.py +71 -0
  285. fromscratch_pyscheduler-0.5.0/tests/engine/_crash_child.py +76 -0
  286. fromscratch_pyscheduler-0.5.0/tests/engine/action_helpers.py +105 -0
  287. fromscratch_pyscheduler-0.5.0/tests/engine/conftest.py +37 -0
  288. fromscratch_pyscheduler-0.5.0/tests/engine/engine_helpers.py +104 -0
  289. fromscratch_pyscheduler-0.5.0/tests/engine/recovery_helpers.py +131 -0
  290. fromscratch_pyscheduler-0.5.0/tests/engine/remote_helpers.py +86 -0
  291. fromscratch_pyscheduler-0.5.0/tests/engine/test_actions.py +248 -0
  292. fromscratch_pyscheduler-0.5.0/tests/engine/test_actions_create.py +257 -0
  293. fromscratch_pyscheduler-0.5.0/tests/engine/test_actions_dates.py +143 -0
  294. fromscratch_pyscheduler-0.5.0/tests/engine/test_actions_end.py +214 -0
  295. fromscratch_pyscheduler-0.5.0/tests/engine/test_actions_races.py +285 -0
  296. fromscratch_pyscheduler-0.5.0/tests/engine/test_admission.py +236 -0
  297. fromscratch_pyscheduler-0.5.0/tests/engine/test_adopted.py +278 -0
  298. fromscratch_pyscheduler-0.5.0/tests/engine/test_attempt_hooks.py +106 -0
  299. fromscratch_pyscheduler-0.5.0/tests/engine/test_attempts.py +293 -0
  300. fromscratch_pyscheduler-0.5.0/tests/engine/test_catch_up.py +188 -0
  301. fromscratch_pyscheduler-0.5.0/tests/engine/test_clock.py +306 -0
  302. fromscratch_pyscheduler-0.5.0/tests/engine/test_crash.py +149 -0
  303. fromscratch_pyscheduler-0.5.0/tests/engine/test_dependency_audit.py +48 -0
  304. fromscratch_pyscheduler-0.5.0/tests/engine/test_deps.py +210 -0
  305. fromscratch_pyscheduler-0.5.0/tests/engine/test_engine_core.py +572 -0
  306. fromscratch_pyscheduler-0.5.0/tests/engine/test_engine_failure.py +193 -0
  307. fromscratch_pyscheduler-0.5.0/tests/engine/test_launch_closing.py +172 -0
  308. fromscratch_pyscheduler-0.5.0/tests/engine/test_launch_threads.py +83 -0
  309. fromscratch_pyscheduler-0.5.0/tests/engine/test_launcher.py +295 -0
  310. fromscratch_pyscheduler-0.5.0/tests/engine/test_locks.py +55 -0
  311. fromscratch_pyscheduler-0.5.0/tests/engine/test_memory_reach.py +75 -0
  312. fromscratch_pyscheduler-0.5.0/tests/engine/test_model.py +94 -0
  313. fromscratch_pyscheduler-0.5.0/tests/engine/test_prune_races.py +70 -0
  314. fromscratch_pyscheduler-0.5.0/tests/engine/test_pump.py +55 -0
  315. fromscratch_pyscheduler-0.5.0/tests/engine/test_recovery.py +376 -0
  316. fromscratch_pyscheduler-0.5.0/tests/engine/test_reload.py +269 -0
  317. fromscratch_pyscheduler-0.5.0/tests/engine/test_remote.py +334 -0
  318. fromscratch_pyscheduler-0.5.0/tests/engine/test_remote_restart.py +128 -0
  319. fromscratch_pyscheduler-0.5.0/tests/engine/test_retention.py +163 -0
  320. fromscratch_pyscheduler-0.5.0/tests/engine/test_retention_alerts.py +69 -0
  321. fromscratch_pyscheduler-0.5.0/tests/engine/test_runbook.py +273 -0
  322. fromscratch_pyscheduler-0.5.0/tests/engine/test_trigger_dates.py +51 -0
  323. fromscratch_pyscheduler-0.5.0/tests/engine/test_watcher.py +420 -0
  324. fromscratch_pyscheduler-0.5.0/tests/engine/test_watcher_engine.py +309 -0
  325. fromscratch_pyscheduler-0.5.0/tests/engine/test_watcher_fixes.py +259 -0
  326. fromscratch_pyscheduler-0.5.0/tests/engine/watcher_helpers.py +50 -0
  327. fromscratch_pyscheduler-0.5.0/tests/notifiers/test_email.py +150 -0
  328. fromscratch_pyscheduler-0.5.0/tests/notifiers/test_local.py +139 -0
  329. fromscratch_pyscheduler-0.5.0/tests/notifiers/test_registry.py +167 -0
  330. fromscratch_pyscheduler-0.5.0/tests/notifiers/test_web.py +294 -0
  331. fromscratch_pyscheduler-0.5.0/tests/schedule/test_cron.py +124 -0
  332. fromscratch_pyscheduler-0.5.0/tests/schedule/test_firings.py +329 -0
  333. fromscratch_pyscheduler-0.5.0/tests/schedule/test_forecast.py +264 -0
  334. fromscratch_pyscheduler-0.5.0/tests/schedule/test_forecast_offsets.py +57 -0
  335. fromscratch_pyscheduler-0.5.0/tests/schedule/test_run_date_on.py +84 -0
  336. fromscratch_pyscheduler-0.5.0/tests/schedule/test_specs.py +129 -0
  337. fromscratch_pyscheduler-0.5.0/tests/service_helpers.py +148 -0
  338. fromscratch_pyscheduler-0.5.0/tests/store/store_helpers.py +61 -0
  339. fromscratch_pyscheduler-0.5.0/tests/store/test_alert_store.py +160 -0
  340. fromscratch_pyscheduler-0.5.0/tests/store/test_attempt_reads.py +69 -0
  341. fromscratch_pyscheduler-0.5.0/tests/store/test_config_reads.py +61 -0
  342. fromscratch_pyscheduler-0.5.0/tests/store/test_duration_reads.py +103 -0
  343. fromscratch_pyscheduler-0.5.0/tests/store/test_store.py +340 -0
  344. fromscratch_pyscheduler-0.5.0/tests/store/test_writer.py +313 -0
  345. fromscratch_pyscheduler-0.5.0/tests/test_agents_demo.py +34 -0
  346. fromscratch_pyscheduler-0.5.0/tests/test_calendars.py +94 -0
  347. fromscratch_pyscheduler-0.5.0/tests/test_cli.py +240 -0
  348. fromscratch_pyscheduler-0.5.0/tests/test_cli_alerts.py +98 -0
  349. fromscratch_pyscheduler-0.5.0/tests/test_cli_format.py +85 -0
  350. fromscratch_pyscheduler-0.5.0/tests/test_client.py +159 -0
  351. fromscratch_pyscheduler-0.5.0/tests/test_concurrency.py +236 -0
  352. fromscratch_pyscheduler-0.5.0/tests/test_demo_seed.py +202 -0
  353. fromscratch_pyscheduler-0.5.0/tests/test_doc_snippets.py +62 -0
  354. fromscratch_pyscheduler-0.5.0/tests/test_examples.py +129 -0
  355. fromscratch_pyscheduler-0.5.0/tests/test_minder.py +262 -0
  356. fromscratch_pyscheduler-0.5.0/tests/test_minder_args.py +119 -0
  357. fromscratch_pyscheduler-0.5.0/tests/test_package.py +11 -0
  358. fromscratch_pyscheduler-0.5.0/tests/test_properties.py +120 -0
  359. fromscratch_pyscheduler-0.5.0/tests/test_service.py +237 -0
  360. fromscratch_pyscheduler-0.5.0/tests/test_service_alerts.py +79 -0
  361. fromscratch_pyscheduler-0.5.0/tests/test_service_cookies.py +127 -0
  362. fromscratch_pyscheduler-0.5.0/tests/test_service_failures.py +128 -0
  363. fromscratch_pyscheduler-0.5.0/tests/test_templates.py +81 -0
  364. fromscratch_pyscheduler-0.5.0/tests/test_testing.py +168 -0
  365. fromscratch_pyscheduler-0.5.0/tests/test_ui_demo.py +145 -0
  366. fromscratch_pyscheduler-0.5.0/tests/test_values.py +92 -0
  367. fromscratch_pyscheduler-0.5.0/tests/test_watcher_integration.py +56 -0
  368. fromscratch_pyscheduler-0.5.0/tests/ui/conftest.py +5 -0
  369. fromscratch_pyscheduler-0.5.0/tests/ui/js_harness.mjs +252 -0
  370. fromscratch_pyscheduler-0.5.0/tests/ui/test_admin.py +276 -0
  371. fromscratch_pyscheduler-0.5.0/tests/ui/test_agents_page.py +165 -0
  372. fromscratch_pyscheduler-0.5.0/tests/ui/test_board.py +337 -0
  373. fromscratch_pyscheduler-0.5.0/tests/ui/test_detail.py +303 -0
  374. fromscratch_pyscheduler-0.5.0/tests/ui/test_extreme_dates.py +113 -0
  375. fromscratch_pyscheduler-0.5.0/tests/ui/test_forecast_page.py +82 -0
  376. fromscratch_pyscheduler-0.5.0/tests/ui/test_graph.py +210 -0
  377. fromscratch_pyscheduler-0.5.0/tests/ui/test_graph_layout.py +151 -0
  378. fromscratch_pyscheduler-0.5.0/tests/ui/test_hardening.py +207 -0
  379. fromscratch_pyscheduler-0.5.0/tests/ui/test_live.py +292 -0
  380. fromscratch_pyscheduler-0.5.0/tests/ui/test_logtail.py +288 -0
  381. fromscratch_pyscheduler-0.5.0/tests/ui/test_remote_logtail.py +109 -0
  382. fromscratch_pyscheduler-0.5.0/tests/ui/test_shell.py +419 -0
  383. fromscratch_pyscheduler-0.5.0/tests/ui/test_static_modules.py +173 -0
  384. fromscratch_pyscheduler-0.5.0/tests/ui/test_stream_cutoff.py +206 -0
  385. fromscratch_pyscheduler-0.5.0/tests/ui/test_timeline.py +243 -0
  386. fromscratch_pyscheduler-0.5.0/tests/ui/test_timeline_reach.py +148 -0
  387. fromscratch_pyscheduler-0.5.0/tests/ui/ui_helpers.py +194 -0
  388. fromscratch_pyscheduler-0.5.0/tests/yamlish/test_parser.py +229 -0
  389. fromscratch_pyscheduler-0.5.0/uv.lock +1194 -0
@@ -0,0 +1,14 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ ci:
14
+ uses: robcox2910/robcox2910.github.io/.github/workflows/python-ci.yml@v1
@@ -0,0 +1,16 @@
1
+ name: Deploy Docs
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ workflow_dispatch: {}
7
+
8
+ jobs:
9
+ docs:
10
+ uses: robcox2910/robcox2910.github.io/.github/workflows/docs.yml@v1
11
+ permissions:
12
+ contents: read
13
+ pages: write
14
+ id-token: write
15
+ with:
16
+ coverage-report: false
@@ -0,0 +1,58 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*.*.*"
7
+
8
+ permissions:
9
+ contents: write
10
+ id-token: write
11
+
12
+ jobs:
13
+ build:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v7
17
+ with:
18
+ fetch-depth: 0
19
+
20
+ - name: Install uv
21
+ uses: astral-sh/setup-uv@v7
22
+ with:
23
+ version: "latest"
24
+
25
+ - name: Set up Python
26
+ run: uv python install 3.14
27
+
28
+ - name: Build distributions
29
+ run: uv build
30
+
31
+ - name: Upload build artifacts
32
+ uses: actions/upload-artifact@v7
33
+ with:
34
+ name: dist
35
+ path: dist/
36
+
37
+ - name: Upload to GitHub Release
38
+ uses: softprops/action-gh-release@v3
39
+ with:
40
+ files: dist/*
41
+
42
+ publish:
43
+ needs: build
44
+ runs-on: ubuntu-latest
45
+ environment:
46
+ name: pypi
47
+ url: https://pypi.org/project/fromscratch-pyscheduler/
48
+ permissions:
49
+ id-token: write
50
+ steps:
51
+ - name: Download build artifacts
52
+ uses: actions/download-artifact@v8
53
+ with:
54
+ name: dist
55
+ path: dist/
56
+
57
+ - name: Publish to PyPI
58
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,18 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ dist/
5
+ build/
6
+ .venv/
7
+ .pytest_cache/
8
+ htmlcov/
9
+ .coverage
10
+ .pyright/
11
+ .DS_Store
12
+ src/pyscheduler/_version.py
13
+ site/
14
+ .superpowers/
15
+ examples/state/
16
+ examples/logs/
17
+ examples/inbox/*
18
+ !examples/inbox/.gitkeep
@@ -0,0 +1,56 @@
1
+ default_language_version:
2
+ python: python3.14
3
+
4
+ repos:
5
+ - repo: https://github.com/pre-commit/pre-commit-hooks
6
+ rev: v5.0.0
7
+ hooks:
8
+ # Pages paste real pytest output, trailing spaces included.
9
+ - id: trailing-whitespace
10
+ exclude: ^docs/property-testing\.md$
11
+ - id: end-of-file-fixer
12
+ exclude: ^docs/property-testing\.md$
13
+ - id: check-yaml
14
+ args: ['--unsafe']
15
+ - id: check-added-large-files
16
+ - id: check-json
17
+ - id: check-toml
18
+ - id: check-merge-conflict
19
+ - id: debug-statements
20
+
21
+ - repo: https://github.com/astral-sh/ruff-pre-commit
22
+ rev: v0.15.4
23
+ hooks:
24
+ - id: ruff
25
+ args: [--fix, --exit-non-zero-on-fix]
26
+ - id: ruff-format
27
+
28
+ - repo: https://github.com/RobertCraigie/pyright-python
29
+ rev: v1.1.408
30
+ hooks:
31
+ - id: pyright
32
+
33
+ - repo: local
34
+ hooks:
35
+ - id: pip-audit
36
+ name: pip-audit
37
+ language: system
38
+ pass_filenames: false
39
+ files: ^(pyproject\.toml|uv\.lock)$
40
+ entry: >-
41
+ bash -c 'f=$(mktemp) &&
42
+ uv export --frozen --no-emit-project --all-extras --no-hashes -o "$f" >/dev/null &&
43
+ uvx pip-audit==2.10.0 -r "$f" --disable-pip --no-deps;
44
+ status=$?; rm -f "$f"; exit $status'
45
+
46
+ - repo: https://github.com/rhysd/actionlint
47
+ rev: v1.7.7
48
+ hooks:
49
+ - id: actionlint
50
+
51
+ - repo: https://github.com/commitizen-tools/commitizen
52
+ rev: v4.13.8
53
+ hooks:
54
+ - id: commitizen
55
+ stages: [commit-msg]
56
+ additional_dependencies: [typing_extensions]
@@ -0,0 +1,52 @@
1
+ # Claude Code Instructions
2
+
3
+ <!-- standard:start -->
4
+ ## Code Style
5
+
6
+ - All public functions, methods, classes, and modules **must** have a docstring
7
+ - Use imperative mood: "Return the result." not "Returns the result."
8
+ - One-line docstrings for simple functions; multi-line with summary + details for complex ones
9
+ - Follow the Google docstring convention (D211, D212 selected via ruff)
10
+
11
+ ## Linting
12
+
13
+ - Ruff enforces a comprehensive rule set -- run `uv run ruff check .` before committing
14
+ - Pyright runs in strict mode -- run `uv run pyright src tests` before committing
15
+ - All violations must be fixed, not ignored. Exceptions are the repo-owned `ignore` and `per-file-ignores` lists in `pyproject.toml`, which belong to this repo; the series sync never edits them
16
+
17
+ ## Testing
18
+
19
+ - TDD workflow: Red-Green-Refactor
20
+ - Coverage is enforced by pytest-cov; the floor in `pyproject.toml` is repo-owned
21
+ - Test classes and methods also require docstrings
22
+ - Use named constants instead of magic values (PLR2004)
23
+ - Run `uv run pytest` before committing
24
+ - Property-based tests (Hypothesis) live in `tests/test_properties.py` and `tests/test_model.py`; the shared profiles are in the root `conftest.py` (owned by `series sync`). Run `uv run pytest --hypothesis-profile=thorough` before a release.
25
+
26
+ ## Commits
27
+
28
+ - Use conventional commits: `feat:`, `fix:`, `refactor:`, `test:`, `docs:`, `ci:`, `chore:`
29
+ - All changes go via PR from a feature branch (main is protected); merge when CI is green
30
+
31
+ ## Dependencies
32
+
33
+ - Package manager: uv
34
+ - Run `uv sync --all-extras` after modifying dependencies
35
+ - `uv.lock` is committed; CI and pre-commit audit it with pip-audit through `uvx`, so pip-audit is not a project dependency
36
+ - Sibling projects, where used, are pinned release tags in `[tool.uv.sources]` (git + tag); never use `path` sources
37
+
38
+ ## Releasing
39
+
40
+ - A release is a `vX.Y.Z` tag on main after the PR is merged
41
+ - Docs-only and tooling-only changes do not get a release tag
42
+ - Docs are built with `mkdocs build --strict` and deployed to GitHub Pages by the docs workflow
43
+ <!-- standard:end -->
44
+
45
+ ## Project notes
46
+
47
+ - Pyright in strict mode -- run `uv run pyright src tests` before committing
48
+ - All violations must be fixed, not ignored (except D203/D213 incompatible pair)
49
+ - Minimum 80% coverage enforced by pytest-cov
50
+ - Use conventional commits (enforced by commitizen): `feat:`, `fix:`, `refactor:`, `test:`, `docs:`, `ci:`, `chore:`
51
+ - All changes go via PR from a feature branch (main is protected)
52
+ - Add production deps to `[project.dependencies]`
@@ -0,0 +1,190 @@
1
+ # Contributing to PyScheduler
2
+
3
+ Thanks for your interest in contributing! This guide covers everything you need
4
+ to get started.
5
+
6
+ ## Prerequisites
7
+
8
+ | Tool | Version | Install |
9
+ |------|---------|---------|
10
+ | Python | 3.14+ | [python.org](https://www.python.org/downloads/) |
11
+ | uv | latest | `curl -LsSf https://astral.sh/uv/install.sh \| sh` |
12
+ | git | 2.x+ | [git-scm.com](https://git-scm.com/) |
13
+
14
+ ## Setup
15
+
16
+ ```bash
17
+ # Clone the repo
18
+ git clone https://github.com/robcox2910/pyscheduler.git
19
+ cd pyscheduler
20
+
21
+ # Install all dependencies (including dev tools)
22
+ uv sync --all-extras
23
+
24
+ # Install pre-commit hooks (linting + commit message validation)
25
+ uv run pre-commit install
26
+ uv run pre-commit install --hook-type commit-msg
27
+ ```
28
+
29
+ Verify everything works:
30
+
31
+ ```bash
32
+ uv run pytest --cov # tests pass, >= 80% coverage
33
+ uv run ruff check src/ tests/ # no lint errors
34
+ uv run pyright src tests # no type errors
35
+ ```
36
+
37
+ ## TDD Workflow
38
+
39
+ We follow **Red-Green-Refactor** for every code change:
40
+
41
+ 1. **Red** -- Write a failing test that describes the behaviour you want.
42
+ 2. **Green** -- Write the simplest code that makes the test pass.
43
+ 3. **Refactor** -- Clean up while keeping all tests green.
44
+
45
+ Never skip the red step. If you can't write a failing test first, take a moment
46
+ to think about what the code should actually do.
47
+
48
+ ## Branch Naming
49
+
50
+ Create a branch from `main` using one of these prefixes:
51
+
52
+ | Prefix | When to use |
53
+ |--------|-------------|
54
+ | `feat/` | New message queue feature or pattern |
55
+ | `fix/` | Bug fix |
56
+ | `refactor/` | Restructuring without behaviour change |
57
+ | `test/` | Test-only changes |
58
+ | `docs/` | Documentation updates |
59
+ | `ci/` | CI/CD workflow changes |
60
+ | `chore/` | Dependency bumps, config tweaks |
61
+
62
+ Example: `feat/delayed-messages`, `fix/priority-ordering`
63
+
64
+ ## Conventional Commits
65
+
66
+ Every commit message must follow [Conventional Commits](https://www.conventionalcommits.org/):
67
+
68
+ ```
69
+ <type>: <short description in imperative mood>
70
+
71
+ Optional longer explanation.
72
+ ```
73
+
74
+ Types match the branch prefixes: `feat:`, `fix:`, `refactor:`, `test:`,
75
+ `docs:`, `ci:`, `chore:`.
76
+
77
+ Good examples:
78
+
79
+ ```
80
+ feat: add priority message queue
81
+ fix: resolve dead-letter requeue ordering
82
+ docs: add pub/sub concept page
83
+ ```
84
+
85
+ Bad examples:
86
+
87
+ ```
88
+ updated stuff # no type, vague description
89
+ feat: adds queuing # not imperative mood ("adds" -> "add")
90
+ ```
91
+
92
+ ## Code Style
93
+
94
+ ### Modern Python
95
+
96
+ Use Python 3.14 idioms everywhere:
97
+
98
+ - `X | Y` for union types (not `Union[X, Y]` or `Optional[X]`)
99
+ - `StrEnum` for string enumerations
100
+ - `match/case` instead of if/elif chains where appropriate
101
+ - Direct imports: `from enum import StrEnum` not `import enum`
102
+
103
+ ### Docstrings
104
+
105
+ Every public function, method, class, and module needs a docstring:
106
+
107
+ - Use **imperative mood**: "Return the record." not "Returns the record."
108
+ - One-liner for simple functions, multi-line (Google style) for complex ones.
109
+
110
+ ```python
111
+ def put(self, body: str) -> Message:
112
+ """Create a message and add it to the queue."""
113
+
114
+
115
+ def reject(self, msg: Message) -> None:
116
+ """Reject an in-flight message, requeuing or dead-lettering it.
117
+
118
+ Args:
119
+ msg: The message to reject.
120
+ """
121
+ ```
122
+
123
+ ### Named Constants
124
+
125
+ Use named constants instead of magic numbers in tests and source code. Ruff
126
+ rule PLR2004 enforces this.
127
+
128
+ ```python
129
+ # Good
130
+ DEFAULT_MAX_RETRIES = 3
131
+ assert msg.retries == DEFAULT_MAX_RETRIES
132
+
133
+ # Bad
134
+ assert msg.retries == 3
135
+ ```
136
+
137
+ ## Linting and Type Checking
138
+
139
+ Run these before every commit (pre-commit hooks enforce them automatically):
140
+
141
+ ```bash
142
+ uv run ruff check src/ tests/ # lint
143
+ uv run ruff format src/ tests/ # format (or --check to verify)
144
+ uv run pyright src tests # type check (strict mode)
145
+ ```
146
+
147
+ Fix all violations. Inline `# noqa:` is acceptable only when tools genuinely
148
+ conflict (e.g., ARG002 vs pyright protocol parameter names).
149
+
150
+ ## Testing
151
+
152
+ ```bash
153
+ uv run pytest # run all tests
154
+ uv run pytest --cov # with coverage report
155
+ uv run pytest tests/test_x.py # run a specific file
156
+ uv run pytest -k "test_name" # run tests matching a pattern
157
+ ```
158
+
159
+ - Minimum **80% coverage** is enforced.
160
+ - Test classes and methods need docstrings too.
161
+ - Use `pytest.raises` as a context manager for exception testing.
162
+
163
+ ## Documentation Style
164
+
165
+ Our docs target a **12-year-old with an interest in computing**. Keep language
166
+ simple, use analogies, and avoid jargon without explanation.
167
+
168
+ Good:
169
+
170
+ > A message queue is like a bakery counter: the baker puts loaves on the
171
+ > counter, and customers take them one at a time. The baker doesn't wait.
172
+
173
+ Bad:
174
+
175
+ > A message queue is an asynchronous inter-process communication mechanism
176
+ > implementing the producer-consumer pattern with at-least-once delivery.
177
+
178
+ ## Pull Request Process
179
+
180
+ 1. Create a feature branch from `main`.
181
+ 2. Make your changes following TDD.
182
+ 3. Ensure all checks pass: `uv run ruff check .`, `uv run pyright src tests`,
183
+ `uv run pytest --cov`.
184
+ 4. Push your branch and open a PR against `main`.
185
+ 5. PRs are squash-merged to keep history clean.
186
+
187
+ ## Questions?
188
+
189
+ Open an issue on [GitHub](https://github.com/robcox2910/pyscheduler/issues) --
190
+ we're happy to help!
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Rob Cox
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.