uforia 0.1.0.dev2__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 (303) hide show
  1. uforia-0.1.0.dev2/.dockerignore +19 -0
  2. uforia-0.1.0.dev2/.github/workflows/prod-deploy.yml +115 -0
  3. uforia-0.1.0.dev2/.github/workflows/terminal-release.yml +97 -0
  4. uforia-0.1.0.dev2/.gitignore +12 -0
  5. uforia-0.1.0.dev2/Cargo.lock +2880 -0
  6. uforia-0.1.0.dev2/Cargo.toml +41 -0
  7. uforia-0.1.0.dev2/Dockerfile.api +20 -0
  8. uforia-0.1.0.dev2/Dockerfile.microstructure-live +24 -0
  9. uforia-0.1.0.dev2/Dockerfile.web +28 -0
  10. uforia-0.1.0.dev2/Dockerfile.worker +23 -0
  11. uforia-0.1.0.dev2/PKG-INFO +237 -0
  12. uforia-0.1.0.dev2/README.md +198 -0
  13. uforia-0.1.0.dev2/apps/api/.env.example +5 -0
  14. uforia-0.1.0.dev2/apps/api/README.md +10 -0
  15. uforia-0.1.0.dev2/apps/api/asgi.py +4 -0
  16. uforia-0.1.0.dev2/apps/web/.env.local.example +2 -0
  17. uforia-0.1.0.dev2/apps/web/app/api/proxy/[...path]/route.ts +95 -0
  18. uforia-0.1.0.dev2/apps/web/app/api/stream/route.ts +50 -0
  19. uforia-0.1.0.dev2/apps/web/app/composite/[dashboardId]/page.tsx +28 -0
  20. uforia-0.1.0.dev2/apps/web/app/composite/page.tsx +9 -0
  21. uforia-0.1.0.dev2/apps/web/app/dashboards/page.tsx +24 -0
  22. uforia-0.1.0.dev2/apps/web/app/datasets/page.tsx +19 -0
  23. uforia-0.1.0.dev2/apps/web/app/engines/page.tsx +10 -0
  24. uforia-0.1.0.dev2/apps/web/app/error.tsx +33 -0
  25. uforia-0.1.0.dev2/apps/web/app/execution/[section]/page.tsx +39 -0
  26. uforia-0.1.0.dev2/apps/web/app/execution/page.tsx +5 -0
  27. uforia-0.1.0.dev2/apps/web/app/globals.css +761 -0
  28. uforia-0.1.0.dev2/apps/web/app/icon.svg +6 -0
  29. uforia-0.1.0.dev2/apps/web/app/layout.tsx +33 -0
  30. uforia-0.1.0.dev2/apps/web/app/loading.tsx +20 -0
  31. uforia-0.1.0.dev2/apps/web/app/microstructure/[section]/loading.tsx +22 -0
  32. uforia-0.1.0.dev2/apps/web/app/microstructure/[section]/page.tsx +23 -0
  33. uforia-0.1.0.dev2/apps/web/app/microstructure/loading.tsx +20 -0
  34. uforia-0.1.0.dev2/apps/web/app/microstructure/page.tsx +16 -0
  35. uforia-0.1.0.dev2/apps/web/app/options/[dashboardId]/page.tsx +37 -0
  36. uforia-0.1.0.dev2/apps/web/app/options/page.tsx +9 -0
  37. uforia-0.1.0.dev2/apps/web/app/page.tsx +5 -0
  38. uforia-0.1.0.dev2/apps/web/app/perps/[dashboardId]/page.tsx +25 -0
  39. uforia-0.1.0.dev2/apps/web/app/perps/page.tsx +9 -0
  40. uforia-0.1.0.dev2/apps/web/app/proxy/[...path]/route.ts +95 -0
  41. uforia-0.1.0.dev2/apps/web/app/runs/page.tsx +10 -0
  42. uforia-0.1.0.dev2/apps/web/app/signals/[signalId]/page.tsx +36 -0
  43. uforia-0.1.0.dev2/apps/web/app/signals/page.tsx +18 -0
  44. uforia-0.1.0.dev2/apps/web/components/candlestick-chart.tsx +299 -0
  45. uforia-0.1.0.dev2/apps/web/components/command-palette.tsx +113 -0
  46. uforia-0.1.0.dev2/apps/web/components/data-table.tsx +114 -0
  47. uforia-0.1.0.dev2/apps/web/components/line-chart.tsx +192 -0
  48. uforia-0.1.0.dev2/apps/web/components/live-dot.tsx +18 -0
  49. uforia-0.1.0.dev2/apps/web/components/metric-card.tsx +24 -0
  50. uforia-0.1.0.dev2/apps/web/components/rail-nav.tsx +55 -0
  51. uforia-0.1.0.dev2/apps/web/components/section-heading.tsx +16 -0
  52. uforia-0.1.0.dev2/apps/web/components/sparkline.tsx +38 -0
  53. uforia-0.1.0.dev2/apps/web/components/status-badge.tsx +23 -0
  54. uforia-0.1.0.dev2/apps/web/components/status-bar.tsx +31 -0
  55. uforia-0.1.0.dev2/apps/web/components/terminal-select.tsx +32 -0
  56. uforia-0.1.0.dev2/apps/web/features/composite/composite-config.ts +226 -0
  57. uforia-0.1.0.dev2/apps/web/features/composite/composite-list.tsx +82 -0
  58. uforia-0.1.0.dev2/apps/web/features/composite/composite-workspace.tsx +294 -0
  59. uforia-0.1.0.dev2/apps/web/features/dashboards/dashboard-workspace.tsx +705 -0
  60. uforia-0.1.0.dev2/apps/web/features/datasets/dataset-browser.tsx +55 -0
  61. uforia-0.1.0.dev2/apps/web/features/engines/engines-board.tsx +26 -0
  62. uforia-0.1.0.dev2/apps/web/features/execution/execution-config.ts +102 -0
  63. uforia-0.1.0.dev2/apps/web/features/execution/execution-list.tsx +130 -0
  64. uforia-0.1.0.dev2/apps/web/features/execution/execution-workspace.tsx +371 -0
  65. uforia-0.1.0.dev2/apps/web/features/microstructure/microstructure-config.ts +201 -0
  66. uforia-0.1.0.dev2/apps/web/features/microstructure/microstructure-list.tsx +100 -0
  67. uforia-0.1.0.dev2/apps/web/features/microstructure/microstructure-workspace.tsx +331 -0
  68. uforia-0.1.0.dev2/apps/web/features/options/options-config.ts +761 -0
  69. uforia-0.1.0.dev2/apps/web/features/options/options-list.tsx +327 -0
  70. uforia-0.1.0.dev2/apps/web/features/options/options-workspace.tsx +283 -0
  71. uforia-0.1.0.dev2/apps/web/features/overview/market-overview-shell.tsx +38 -0
  72. uforia-0.1.0.dev2/apps/web/features/overview/market-overview.tsx +433 -0
  73. uforia-0.1.0.dev2/apps/web/features/overview/overview-dashboard.tsx +506 -0
  74. uforia-0.1.0.dev2/apps/web/features/overview/signal-matrix-skeleton.tsx +50 -0
  75. uforia-0.1.0.dev2/apps/web/features/perps/perps-config.ts +282 -0
  76. uforia-0.1.0.dev2/apps/web/features/perps/perps-list.tsx +258 -0
  77. uforia-0.1.0.dev2/apps/web/features/perps/perps-workspace.tsx +242 -0
  78. uforia-0.1.0.dev2/apps/web/features/runs/runs-board.tsx +66 -0
  79. uforia-0.1.0.dev2/apps/web/features/signals/signal-list.tsx +175 -0
  80. uforia-0.1.0.dev2/apps/web/features/signals/signal-workspace.tsx +211 -0
  81. uforia-0.1.0.dev2/apps/web/lib/api/client.ts +585 -0
  82. uforia-0.1.0.dev2/apps/web/lib/api/types.ts +536 -0
  83. uforia-0.1.0.dev2/apps/web/lib/dashboards.ts +92 -0
  84. uforia-0.1.0.dev2/apps/web/lib/features.ts +7 -0
  85. uforia-0.1.0.dev2/apps/web/lib/format.ts +100 -0
  86. uforia-0.1.0.dev2/apps/web/lib/hooks/use-hotkey.ts +34 -0
  87. uforia-0.1.0.dev2/apps/web/lib/hooks/use-utc-clock.ts +22 -0
  88. uforia-0.1.0.dev2/apps/web/lib/nav.ts +32 -0
  89. uforia-0.1.0.dev2/apps/web/lib/ranges.ts +32 -0
  90. uforia-0.1.0.dev2/apps/web/lib/server/price-series.ts +42 -0
  91. uforia-0.1.0.dev2/apps/web/lib/ws/use-stream.ts +131 -0
  92. uforia-0.1.0.dev2/apps/web/next-env.d.ts +6 -0
  93. uforia-0.1.0.dev2/apps/web/next.config.ts +8 -0
  94. uforia-0.1.0.dev2/apps/web/package.json +32 -0
  95. uforia-0.1.0.dev2/apps/web/test/options-config.test.ts +40 -0
  96. uforia-0.1.0.dev2/apps/web/test/status-badge.test.tsx +13 -0
  97. uforia-0.1.0.dev2/apps/web/tsconfig.json +27 -0
  98. uforia-0.1.0.dev2/apps/web/vite.config.ts +17 -0
  99. uforia-0.1.0.dev2/apps/web/vitest.setup.ts +2 -0
  100. uforia-0.1.0.dev2/config/execution_accounts.example.json +81 -0
  101. uforia-0.1.0.dev2/docker-compose.timescale.yml +16 -0
  102. uforia-0.1.0.dev2/docs/btc-vvix-pipeline.md +48 -0
  103. uforia-0.1.0.dev2/docs/composite-index.md +42 -0
  104. uforia-0.1.0.dev2/docs/composite-methodology.md +111 -0
  105. uforia-0.1.0.dev2/docs/composite-regimes.md +50 -0
  106. uforia-0.1.0.dev2/docs/crypto-derivatives-alpha-canvas.md +53 -0
  107. uforia-0.1.0.dev2/docs/execution-layer.md +158 -0
  108. uforia-0.1.0.dev2/docs/local-development.md +238 -0
  109. uforia-0.1.0.dev2/docs/mac-mini-setup.md +453 -0
  110. uforia-0.1.0.dev2/docs/microstructure-system.md +298 -0
  111. uforia-0.1.0.dev2/docs/multi-asset-vol-suite.md +65 -0
  112. uforia-0.1.0.dev2/docs/options-adaptive-hedging.md +29 -0
  113. uforia-0.1.0.dev2/docs/options-btc-eth-dispersion.md +24 -0
  114. uforia-0.1.0.dev2/docs/options-carry-vrp.md +39 -0
  115. uforia-0.1.0.dev2/docs/options-dislocations.md +33 -0
  116. uforia-0.1.0.dev2/docs/options-expiry-flow-map.md +28 -0
  117. uforia-0.1.0.dev2/docs/options-funding-basis-skew-interactions.md +26 -0
  118. uforia-0.1.0.dev2/docs/options-funding-context.md +32 -0
  119. uforia-0.1.0.dev2/docs/options-gamma-exposure.md +29 -0
  120. uforia-0.1.0.dev2/docs/options-ml-carry-toxicity.md +28 -0
  121. uforia-0.1.0.dev2/docs/options-positioning.md +46 -0
  122. uforia-0.1.0.dev2/docs/options-relative-value.md +36 -0
  123. uforia-0.1.0.dev2/docs/options-sessionality-clocks.md +31 -0
  124. uforia-0.1.0.dev2/docs/options-signals.md +57 -0
  125. uforia-0.1.0.dev2/docs/options-skew.md +32 -0
  126. uforia-0.1.0.dev2/docs/options-straddle-breakeven.md +77 -0
  127. uforia-0.1.0.dev2/docs/options-surface-factor-rv.md +25 -0
  128. uforia-0.1.0.dev2/docs/options-surface.md +37 -0
  129. uforia-0.1.0.dev2/docs/options-term-structure-momentum.md +31 -0
  130. uforia-0.1.0.dev2/docs/options-vol-cone.md +33 -0
  131. uforia-0.1.0.dev2/docs/options-vol-regime-transitions.md +69 -0
  132. uforia-0.1.0.dev2/docs/overview.md +122 -0
  133. uforia-0.1.0.dev2/docs/perps-cross-venue-price-discovery.md +34 -0
  134. uforia-0.1.0.dev2/docs/perps-cum-delta-momentum.md +35 -0
  135. uforia-0.1.0.dev2/docs/perps-depth-resilience.md +37 -0
  136. uforia-0.1.0.dev2/docs/perps-funding-basis-carry.md +37 -0
  137. uforia-0.1.0.dev2/docs/perps-liquidation-cascade.md +41 -0
  138. uforia-0.1.0.dev2/docs/perps-oi-price-divergence.md +37 -0
  139. uforia-0.1.0.dev2/docs/perps-order-flow-toxicity.md +42 -0
  140. uforia-0.1.0.dev2/docs/perps-vol-microstructure.md +34 -0
  141. uforia-0.1.0.dev2/docs/storage-and-archiver.md +42 -0
  142. uforia-0.1.0.dev2/docs/terminal-client.md +239 -0
  143. uforia-0.1.0.dev2/docs/timescale-migration.md +136 -0
  144. uforia-0.1.0.dev2/docs/ui-platform.md +59 -0
  145. uforia-0.1.0.dev2/engines/execution/bebop-adapter/Cargo.toml +9 -0
  146. uforia-0.1.0.dev2/engines/execution/bebop-adapter/src/lib.rs +56 -0
  147. uforia-0.1.0.dev2/engines/execution/derive-adapter/Cargo.toml +9 -0
  148. uforia-0.1.0.dev2/engines/execution/derive-adapter/src/lib.rs +84 -0
  149. uforia-0.1.0.dev2/engines/execution/execution-app/Cargo.toml +20 -0
  150. uforia-0.1.0.dev2/engines/execution/execution-app/src/main.rs +234 -0
  151. uforia-0.1.0.dev2/engines/execution/execution-core/Cargo.toml +12 -0
  152. uforia-0.1.0.dev2/engines/execution/execution-core/src/lib.rs +230 -0
  153. uforia-0.1.0.dev2/engines/execution/hyperliquid-adapter/Cargo.toml +10 -0
  154. uforia-0.1.0.dev2/engines/execution/hyperliquid-adapter/src/lib.rs +71 -0
  155. uforia-0.1.0.dev2/engines/execution/lighter-adapter/Cargo.toml +9 -0
  156. uforia-0.1.0.dev2/engines/execution/lighter-adapter/src/lib.rs +74 -0
  157. uforia-0.1.0.dev2/engines/microstructure/app/Cargo.toml +24 -0
  158. uforia-0.1.0.dev2/engines/microstructure/app/src/main.rs +449 -0
  159. uforia-0.1.0.dev2/engines/microstructure/app/src/postgres_sink.rs +875 -0
  160. uforia-0.1.0.dev2/engines/microstructure/book/Cargo.toml +14 -0
  161. uforia-0.1.0.dev2/engines/microstructure/book/src/bbo_tracker.rs +243 -0
  162. uforia-0.1.0.dev2/engines/microstructure/book/src/book.rs +457 -0
  163. uforia-0.1.0.dev2/engines/microstructure/book/src/cross_venue.rs +237 -0
  164. uforia-0.1.0.dev2/engines/microstructure/book/src/lib.rs +7 -0
  165. uforia-0.1.0.dev2/engines/microstructure/config/Cargo.toml +11 -0
  166. uforia-0.1.0.dev2/engines/microstructure/config/default.toml +86 -0
  167. uforia-0.1.0.dev2/engines/microstructure/config/src/config.rs +674 -0
  168. uforia-0.1.0.dev2/engines/microstructure/config/src/lib.rs +15 -0
  169. uforia-0.1.0.dev2/engines/microstructure/feed/Cargo.toml +22 -0
  170. uforia-0.1.0.dev2/engines/microstructure/feed/src/binance_futures.rs +459 -0
  171. uforia-0.1.0.dev2/engines/microstructure/feed/src/binance_spot.rs +416 -0
  172. uforia-0.1.0.dev2/engines/microstructure/feed/src/bybit_perps.rs +636 -0
  173. uforia-0.1.0.dev2/engines/microstructure/feed/src/bybit_spot.rs +399 -0
  174. uforia-0.1.0.dev2/engines/microstructure/feed/src/deribit.rs +1388 -0
  175. uforia-0.1.0.dev2/engines/microstructure/feed/src/lib.rs +8 -0
  176. uforia-0.1.0.dev2/engines/microstructure/feed/src/manager.rs +310 -0
  177. uforia-0.1.0.dev2/engines/microstructure/feed/src/normalizer.rs +575 -0
  178. uforia-0.1.0.dev2/engines/microstructure/feed/src/reconnect.rs +146 -0
  179. uforia-0.1.0.dev2/engines/microstructure/model/Cargo.toml +10 -0
  180. uforia-0.1.0.dev2/engines/microstructure/model/src/lib.rs +25 -0
  181. uforia-0.1.0.dev2/engines/microstructure/types/Cargo.toml +12 -0
  182. uforia-0.1.0.dev2/engines/microstructure/types/src/error.rs +48 -0
  183. uforia-0.1.0.dev2/engines/microstructure/types/src/lib.rs +5 -0
  184. uforia-0.1.0.dev2/engines/microstructure/types/src/market.rs +629 -0
  185. uforia-0.1.0.dev2/launchd/com.uforia.api.plist +16 -0
  186. uforia-0.1.0.dev2/launchd/com.uforia.archiver.plist +16 -0
  187. uforia-0.1.0.dev2/launchd/com.uforia.db-backfill-maintenance.plist +20 -0
  188. uforia-0.1.0.dev2/launchd/com.uforia.db-sync-hot.plist +16 -0
  189. uforia-0.1.0.dev2/launchd/com.uforia.db-sync-raw-recent.plist +16 -0
  190. uforia-0.1.0.dev2/launchd/com.uforia.execution-engine.plist +16 -0
  191. uforia-0.1.0.dev2/launchd/com.uforia.execution-state-sync.plist +16 -0
  192. uforia-0.1.0.dev2/launchd/com.uforia.microstructure-inference.plist +16 -0
  193. uforia-0.1.0.dev2/launchd/com.uforia.microstructure-live.plist +16 -0
  194. uforia-0.1.0.dev2/launchd/com.uforia.microstructure-train.plist +20 -0
  195. uforia-0.1.0.dev2/launchd/com.uforia.refresh-hot.plist +16 -0
  196. uforia-0.1.0.dev2/launchd/com.uforia.refresh.plist +19 -0
  197. uforia-0.1.0.dev2/launchd/com.uforia.web.plist +16 -0
  198. uforia-0.1.0.dev2/ops/cleanup-legacy-partitions.sh +21 -0
  199. uforia-0.1.0.dev2/ops/install-launchd.sh +27 -0
  200. uforia-0.1.0.dev2/ops/run-api.sh +78 -0
  201. uforia-0.1.0.dev2/ops/run-archiver.sh +36 -0
  202. uforia-0.1.0.dev2/ops/run-db-maintenance.sh +10 -0
  203. uforia-0.1.0.dev2/ops/run-db.sh +35 -0
  204. uforia-0.1.0.dev2/ops/run-execution-engine.sh +11 -0
  205. uforia-0.1.0.dev2/ops/run-execution-reconcile.sh +13 -0
  206. uforia-0.1.0.dev2/ops/run-execution-state-sync.sh +16 -0
  207. uforia-0.1.0.dev2/ops/run-microstructure-backfill.sh +23 -0
  208. uforia-0.1.0.dev2/ops/run-microstructure-inference.sh +67 -0
  209. uforia-0.1.0.dev2/ops/run-microstructure-live.sh +49 -0
  210. uforia-0.1.0.dev2/ops/run-microstructure-train.sh +49 -0
  211. uforia-0.1.0.dev2/ops/run-refresh-hot.sh +107 -0
  212. uforia-0.1.0.dev2/ops/run-refresh.sh +94 -0
  213. uforia-0.1.0.dev2/ops/run-web.sh +51 -0
  214. uforia-0.1.0.dev2/ops/smoke-prod.mjs +53 -0
  215. uforia-0.1.0.dev2/ops/update_iac_uforia.py +52 -0
  216. uforia-0.1.0.dev2/package-lock.json +4522 -0
  217. uforia-0.1.0.dev2/package.json +19 -0
  218. uforia-0.1.0.dev2/presentation/index.html +1756 -0
  219. uforia-0.1.0.dev2/pyproject.toml +80 -0
  220. uforia-0.1.0.dev2/src/uforia/__init__.py +5 -0
  221. uforia-0.1.0.dev2/src/uforia/analytics/__init__.py +77 -0
  222. uforia-0.1.0.dev2/src/uforia/analytics/composite_family.py +1294 -0
  223. uforia-0.1.0.dev2/src/uforia/analytics/options_alpha.py +196 -0
  224. uforia-0.1.0.dev2/src/uforia/analytics/options_family.py +2168 -0
  225. uforia-0.1.0.dev2/src/uforia/analytics/perps_family.py +1175 -0
  226. uforia-0.1.0.dev2/src/uforia/analytics/surface.py +216 -0
  227. uforia-0.1.0.dev2/src/uforia/analytics/vol_index.py +235 -0
  228. uforia-0.1.0.dev2/src/uforia/api/__init__.py +15 -0
  229. uforia-0.1.0.dev2/src/uforia/api/app.py +829 -0
  230. uforia-0.1.0.dev2/src/uforia/api/models.py +547 -0
  231. uforia-0.1.0.dev2/src/uforia/api/providers/__init__.py +55 -0
  232. uforia-0.1.0.dev2/src/uforia/api/providers/base.py +276 -0
  233. uforia-0.1.0.dev2/src/uforia/api/providers/default.py +3260 -0
  234. uforia-0.1.0.dev2/src/uforia/api/server.py +20 -0
  235. uforia-0.1.0.dev2/src/uforia/api/settings.py +49 -0
  236. uforia-0.1.0.dev2/src/uforia/cli.py +1678 -0
  237. uforia-0.1.0.dev2/src/uforia/config.py +123 -0
  238. uforia-0.1.0.dev2/src/uforia/contracts.py +241 -0
  239. uforia-0.1.0.dev2/src/uforia/execution/__init__.py +27 -0
  240. uforia-0.1.0.dev2/src/uforia/execution/live.py +1261 -0
  241. uforia-0.1.0.dev2/src/uforia/execution/models.py +250 -0
  242. uforia-0.1.0.dev2/src/uforia/execution/service.py +1039 -0
  243. uforia-0.1.0.dev2/src/uforia/ingest/__init__.py +1 -0
  244. uforia-0.1.0.dev2/src/uforia/ingest/deribit/__init__.py +31 -0
  245. uforia-0.1.0.dev2/src/uforia/ingest/deribit/archiver.py +525 -0
  246. uforia-0.1.0.dev2/src/uforia/ingest/deribit/client.py +100 -0
  247. uforia-0.1.0.dev2/src/uforia/ingest/deribit/dvol.py +62 -0
  248. uforia-0.1.0.dev2/src/uforia/ingest/deribit/funding.py +43 -0
  249. uforia-0.1.0.dev2/src/uforia/ingest/deribit/options.py +200 -0
  250. uforia-0.1.0.dev2/src/uforia/microstructure/__init__.py +36 -0
  251. uforia-0.1.0.dev2/src/uforia/microstructure/builders.py +559 -0
  252. uforia-0.1.0.dev2/src/uforia/microstructure/common.py +66 -0
  253. uforia-0.1.0.dev2/src/uforia/microstructure/constants.py +7 -0
  254. uforia-0.1.0.dev2/src/uforia/microstructure/historical.py +17 -0
  255. uforia-0.1.0.dev2/src/uforia/microstructure/live.py +803 -0
  256. uforia-0.1.0.dev2/src/uforia/microstructure/training.py +1026 -0
  257. uforia-0.1.0.dev2/src/uforia/models/__init__.py +5 -0
  258. uforia-0.1.0.dev2/src/uforia/models/var.py +50 -0
  259. uforia-0.1.0.dev2/src/uforia/signals/__init__.py +12 -0
  260. uforia-0.1.0.dev2/src/uforia/signals/razor.py +442 -0
  261. uforia-0.1.0.dev2/src/uforia/signals/vvix.py +75 -0
  262. uforia-0.1.0.dev2/src/uforia/storage/__init__.py +17 -0
  263. uforia-0.1.0.dev2/src/uforia/storage/datasets.py +1555 -0
  264. uforia-0.1.0.dev2/src/uforia/storage/db.py +560 -0
  265. uforia-0.1.0.dev2/src/uforia/storage/store.py +283 -0
  266. uforia-0.1.0.dev2/src/uforia/terminal/__init__.py +3 -0
  267. uforia-0.1.0.dev2/src/uforia/terminal/app.py +36 -0
  268. uforia-0.1.0.dev2/src/uforia/terminal/client.py +398 -0
  269. uforia-0.1.0.dev2/src/uforia/terminal/commands.py +858 -0
  270. uforia-0.1.0.dev2/src/uforia/terminal/config.py +37 -0
  271. uforia-0.1.0.dev2/src/uforia/terminal/errors.py +7 -0
  272. uforia-0.1.0.dev2/src/uforia/terminal/output.py +98 -0
  273. uforia-0.1.0.dev2/src/uforia/terminal/render.py +74 -0
  274. uforia-0.1.0.dev2/src/uforia/terminal/serialize.py +21 -0
  275. uforia-0.1.0.dev2/src/uforia/terminal/state.py +15 -0
  276. uforia-0.1.0.dev2/src/uforia/validation.py +237 -0
  277. uforia-0.1.0.dev2/tests/__init__.py +1 -0
  278. uforia-0.1.0.dev2/tests/support.py +301 -0
  279. uforia-0.1.0.dev2/tests/test_api.py +734 -0
  280. uforia-0.1.0.dev2/tests/test_api_cors.py +20 -0
  281. uforia-0.1.0.dev2/tests/test_archiver.py +210 -0
  282. uforia-0.1.0.dev2/tests/test_bvix.py +72 -0
  283. uforia-0.1.0.dev2/tests/test_cli_alpha_canvas.py +80 -0
  284. uforia-0.1.0.dev2/tests/test_cli_vvix_merge.py +102 -0
  285. uforia-0.1.0.dev2/tests/test_composite_api.py +79 -0
  286. uforia-0.1.0.dev2/tests/test_composite_family.py +228 -0
  287. uforia-0.1.0.dev2/tests/test_dvol.py +37 -0
  288. uforia-0.1.0.dev2/tests/test_execution_api.py +390 -0
  289. uforia-0.1.0.dev2/tests/test_execution_bebop_live.py +210 -0
  290. uforia-0.1.0.dev2/tests/test_microstructure.py +747 -0
  291. uforia-0.1.0.dev2/tests/test_options_api.py +252 -0
  292. uforia-0.1.0.dev2/tests/test_options_family.py +528 -0
  293. uforia-0.1.0.dev2/tests/test_perps_api.py +210 -0
  294. uforia-0.1.0.dev2/tests/test_perps_family.py +294 -0
  295. uforia-0.1.0.dev2/tests/test_qvvix.py +61 -0
  296. uforia-0.1.0.dev2/tests/test_razor.py +103 -0
  297. uforia-0.1.0.dev2/tests/test_rvvix.py +28 -0
  298. uforia-0.1.0.dev2/tests/test_store.py +92 -0
  299. uforia-0.1.0.dev2/tests/test_store_compaction.py +142 -0
  300. uforia-0.1.0.dev2/tests/test_store_db.py +302 -0
  301. uforia-0.1.0.dev2/tests/test_terminal_client.py +478 -0
  302. uforia-0.1.0.dev2/tests/test_terminal_packaging.py +17 -0
  303. uforia-0.1.0.dev2/uv.lock +4780 -0
@@ -0,0 +1,19 @@
1
+ .git
2
+ .github
3
+ .venv
4
+ .pytest_cache
5
+ .mypy_cache
6
+ .ruff_cache
7
+ node_modules
8
+ apps/web/node_modules
9
+ apps/web/.next
10
+ target
11
+ data
12
+ presentation
13
+ docs
14
+ tests
15
+ __pycache__
16
+ *.pyc
17
+ *.pyo
18
+ *.pyd
19
+ *.log
@@ -0,0 +1,115 @@
1
+ name: Uforia Prod Deploy
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ - main
8
+ workflow_dispatch:
9
+
10
+ env:
11
+ GCP_REGION: europe-north1
12
+ GCP_PROJECT_ID: polynomial-uforia
13
+ IMAGE_TAG: main-${{ github.sha }}
14
+ IAC_CONFIG_REPO: Polynomial-Protocol/iac-config
15
+ UFORIA_BASE_URL: http://uforia.polynomial.fi
16
+ UFORIA_RESOLVE_IP: 34.54.59.248
17
+
18
+ jobs:
19
+ test:
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+ - uses: actions/setup-node@v4
24
+ with:
25
+ node-version: "22"
26
+ - uses: astral-sh/setup-uv@v6
27
+ - run: uv sync --frozen --extra dev
28
+ - run: npm ci
29
+ - run: uv run pytest -q
30
+ - run: npm run typecheck:web
31
+ - run: npm run test:web
32
+
33
+ build-and-push:
34
+ runs-on: ubuntu-latest
35
+ needs: test
36
+ permissions:
37
+ contents: read
38
+ id-token: write
39
+ steps:
40
+ - uses: actions/checkout@v4
41
+ - uses: docker/setup-buildx-action@v3
42
+ - uses: google-github-actions/auth@v2
43
+ with:
44
+ workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
45
+ service_account: ${{ secrets.GCP_ARTIFACT_PUSH_SA }}
46
+ - uses: google-github-actions/setup-gcloud@v2
47
+ - run: gcloud auth configure-docker "${GCP_REGION}-docker.pkg.dev" --quiet
48
+ - shell: bash
49
+ run: |
50
+ set -euo pipefail
51
+
52
+ build_and_push() {
53
+ local name="$1"
54
+ local dockerfile="$2"
55
+ local repository="${GCP_REGION}-docker.pkg.dev/${GCP_PROJECT_ID}/uforia/${name}"
56
+ local image="${repository}:${IMAGE_TAG}"
57
+
58
+ if gcloud artifacts docker tags list "${repository}" \
59
+ --filter="tag:${IMAGE_TAG}" \
60
+ --format="value(tag)" \
61
+ --limit=1 | grep -qx "${IMAGE_TAG}"; then
62
+ echo "Image already exists, skipping push: ${image}"
63
+ return 0
64
+ fi
65
+
66
+ docker buildx build \
67
+ --platform linux/amd64 \
68
+ -f "${dockerfile}" \
69
+ -t "${image}" \
70
+ --push \
71
+ .
72
+ }
73
+
74
+ build_and_push web Dockerfile.web
75
+ build_and_push api Dockerfile.api
76
+ build_and_push python Dockerfile.worker
77
+
78
+ update-iac:
79
+ runs-on: ubuntu-latest
80
+ needs: build-and-push
81
+ steps:
82
+ - uses: actions/checkout@v4
83
+ - uses: actions/checkout@v4
84
+ with:
85
+ repository: ${{ env.IAC_CONFIG_REPO }}
86
+ path: iac-config
87
+ token: ${{ secrets.IAC_CONFIG_PUSH_TOKEN || secrets.GH_PAT }}
88
+ - run: python3 ops/update_iac_uforia.py --iac-root iac-config --tag ${IMAGE_TAG}
89
+ - run: |
90
+ cd iac-config
91
+ git config user.name "uforia-bot"
92
+ git config user.email "uforia-bot@polynomial.fi"
93
+ git add services/uforia/prod/kustomization.yaml
94
+ git commit -m "Deploy uforia ${IMAGE_TAG}" || exit 0
95
+ git push
96
+
97
+ smoke:
98
+ runs-on: ubuntu-latest
99
+ needs: update-iac
100
+ env:
101
+ SLACK_DEPLOY_WEBHOOK: ${{ secrets.SLACK_DEPLOY_WEBHOOK }}
102
+ steps:
103
+ - uses: actions/checkout@v4
104
+ - uses: actions/setup-node@v4
105
+ with:
106
+ node-version: "22"
107
+ - run: npm install --no-save playwright@1.54.1
108
+ - run: npx playwright install --with-deps chromium
109
+ - run: node ops/smoke-prod.mjs
110
+ - if: failure() && env.SLACK_DEPLOY_WEBHOOK != ''
111
+ run: |
112
+ MESSAGE="{\"text\":\"Uforia prod deploy smoke test failed for ${IMAGE_TAG}\"}"
113
+ curl -X POST -H 'Content-type: application/json' \
114
+ --data "${MESSAGE}" \
115
+ "${SLACK_DEPLOY_WEBHOOK}"
@@ -0,0 +1,97 @@
1
+ name: Uforia Terminal Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - master
8
+ tags:
9
+ - "v*"
10
+ workflow_dispatch:
11
+
12
+ jobs:
13
+ test-and-build:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ - uses: actions/setup-python@v5
18
+ with:
19
+ python-version: "3.11"
20
+ - uses: astral-sh/setup-uv@v6
21
+ - name: Stamp package version
22
+ shell: bash
23
+ run: |
24
+ python - <<'PY'
25
+ import pathlib
26
+ import re
27
+ import os
28
+
29
+ path = pathlib.Path("pyproject.toml")
30
+ text = path.read_text()
31
+ match = re.search(r'^version = "([^"]+)"$', text, re.MULTILINE)
32
+ if not match:
33
+ raise SystemExit("Could not find static version in pyproject.toml")
34
+
35
+ base = match.group(1)
36
+ ref = os.environ["GITHUB_REF"]
37
+ if ref.startswith("refs/tags/v"):
38
+ version = ref.removeprefix("refs/tags/v")
39
+ else:
40
+ run_number = os.environ["GITHUB_RUN_NUMBER"]
41
+ version = f"{base}.dev{run_number}"
42
+
43
+ path.write_text(
44
+ re.sub(r'^version = "[^"]+"$', f'version = "{version}"', text, count=1, flags=re.MULTILINE)
45
+ )
46
+ print(f"Stamped version: {version}")
47
+ PY
48
+ - run: uv sync --frozen --extra dev
49
+ - run: uv run pytest -q
50
+ - run: uv build
51
+ - run: |
52
+ python -m venv /tmp/uforia-terminal-release-venv
53
+ source /tmp/uforia-terminal-release-venv/bin/activate
54
+ pip install dist/*.whl
55
+ uforia --help
56
+ uforia-admin --help
57
+ publish:
58
+ if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
59
+ needs: test-and-build
60
+ runs-on: ubuntu-latest
61
+ permissions:
62
+ contents: read
63
+ id-token: write
64
+ environment:
65
+ name: pypi
66
+ steps:
67
+ - uses: actions/checkout@v4
68
+ - uses: astral-sh/setup-uv@v6
69
+ - name: Stamp package version
70
+ shell: bash
71
+ run: |
72
+ python - <<'PY'
73
+ import pathlib
74
+ import re
75
+ import os
76
+
77
+ path = pathlib.Path("pyproject.toml")
78
+ text = path.read_text()
79
+ match = re.search(r'^version = "([^"]+)"$', text, re.MULTILINE)
80
+ if not match:
81
+ raise SystemExit("Could not find static version in pyproject.toml")
82
+
83
+ base = match.group(1)
84
+ ref = os.environ["GITHUB_REF"]
85
+ if ref.startswith("refs/tags/v"):
86
+ version = ref.removeprefix("refs/tags/v")
87
+ else:
88
+ run_number = os.environ["GITHUB_RUN_NUMBER"]
89
+ version = f"{base}.dev{run_number}"
90
+
91
+ path.write_text(
92
+ re.sub(r'^version = "[^"]+"$', f'version = "{version}"', text, count=1, flags=re.MULTILINE)
93
+ )
94
+ print(f"Stamped version: {version}")
95
+ PY
96
+ - run: uv build
97
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,12 @@
1
+ .DS_Store
2
+ .mypy_cache/
3
+ .pytest_cache/
4
+ .ruff_cache/
5
+ .venv/
6
+ __pycache__/
7
+ data/
8
+ apps/web/.next/
9
+ apps/web/node_modules/
10
+ apps/web/tsconfig.tsbuildinfo
11
+ node_modules/
12
+ target/