mountaineer 0.3.2.dev2__tar.gz → 0.3.2.dev4__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 (259) hide show
  1. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/.github/pyproject.toml +1 -1
  2. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/Cargo.lock +1 -1
  3. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/Cargo.toml +1 -1
  4. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/PKG-INFO +1 -1
  5. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/deploy.md +5 -6
  6. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/client_builder/test_build_actions.py +10 -1
  7. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/js_compiler/test_source_maps.py +1 -1
  8. mountaineer-0.3.2.dev4/mountaineer/__tests__/test_logging.py +55 -0
  9. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/app.py +5 -1
  10. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/client_builder/build_actions.py +8 -2
  11. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/client_builder/openapi.py +2 -0
  12. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/config.py +6 -1
  13. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/js_compiler/javascript.py +2 -0
  14. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/logging.py +1 -0
  15. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/test_utilities.py +53 -22
  16. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/poetry.lock +13 -4
  17. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/pyproject.toml +2 -1
  18. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/.git-blame-ignore-revs +0 -0
  19. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/.gitattributes +0 -0
  20. /mountaineer-0.3.2.dev2/.github/README.md → /mountaineer-0.3.2.dev4/.github/README_SCRIPTS.md +0 -0
  21. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/.github/poetry.lock +0 -0
  22. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/.github/scripts/__init__.py +0 -0
  23. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/.github/scripts/__tests__/test_update_version.py +0 -0
  24. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/.github/scripts/check_dependencies.py +0 -0
  25. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/.github/scripts/update_version.py +0 -0
  26. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/.github/workflows/publish_docs.yml +0 -0
  27. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/.github/workflows/test.yml +0 -0
  28. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/.github/workflows/validate.yml +0 -0
  29. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/.gitignore +0 -0
  30. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/Dockerfile +0 -0
  31. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/LICENSE +0 -0
  32. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/Makefile +0 -0
  33. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/README.md +0 -0
  34. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/benchmarking/README.md +0 -0
  35. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/benchmarking/benchmarking/__init__.py +0 -0
  36. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/benchmarking/benchmarking/simple_render.py +0 -0
  37. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/benchmarking/poetry.lock +0 -0
  38. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/benchmarking/pyproject.toml +0 -0
  39. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/ci_webapp/README.md +0 -0
  40. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/ci_webapp/ci_webapp/__init__.py +0 -0
  41. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/ci_webapp/ci_webapp/app.py +0 -0
  42. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/ci_webapp/ci_webapp/cli.py +0 -0
  43. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/ci_webapp/ci_webapp/config.py +0 -0
  44. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/ci_webapp/ci_webapp/controllers/__init__.py +0 -0
  45. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/ci_webapp/ci_webapp/controllers/complex.py +0 -0
  46. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/ci_webapp/ci_webapp/controllers/detail.py +0 -0
  47. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/ci_webapp/ci_webapp/controllers/home.py +0 -0
  48. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/ci_webapp/ci_webapp/controllers/stream.py +0 -0
  49. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/ci_webapp/ci_webapp/main.py +0 -0
  50. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/ci_webapp/ci_webapp/views/__init__.py +0 -0
  51. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/ci_webapp/ci_webapp/views/app/complex/page.tsx +0 -0
  52. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/ci_webapp/ci_webapp/views/app/detail/page.tsx +0 -0
  53. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/ci_webapp/ci_webapp/views/app/home/page.tsx +0 -0
  54. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/ci_webapp/ci_webapp/views/app/main.css +0 -0
  55. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/ci_webapp/ci_webapp/views/app/stream/page.tsx +0 -0
  56. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/ci_webapp/ci_webapp/views/package-lock.json +0 -0
  57. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/ci_webapp/ci_webapp/views/package.json +0 -0
  58. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/ci_webapp/ci_webapp/views/postcss.config.js +0 -0
  59. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/ci_webapp/ci_webapp/views/tailwind.config.js +0 -0
  60. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/ci_webapp/poetry.lock +0 -0
  61. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/ci_webapp/pyproject.toml +0 -0
  62. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/README.md +0 -0
  63. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/__init__.py +0 -0
  64. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/__tests__/__init__.py +0 -0
  65. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/__tests__/common.py +0 -0
  66. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/__tests__/test_builder.py +0 -0
  67. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/__tests__/test_cli.py +0 -0
  68. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/__tests__/test_generation.py +0 -0
  69. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/builder.py +0 -0
  70. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/cli.py +0 -0
  71. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/environments/__init__.py +0 -0
  72. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/environments/base.py +0 -0
  73. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/environments/poetry.py +0 -0
  74. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/environments/venv.py +0 -0
  75. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/external.py +0 -0
  76. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/generation.py +0 -0
  77. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/io.py +0 -0
  78. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/.zed/settings.json +0 -0
  79. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/__init__.py +0 -0
  80. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/editor_configs/vim/.vimrc +0 -0
  81. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/editor_configs/vscode/.vscode/settings.json +0 -0
  82. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/editor_configs/zed/pyrightconfig.json +0 -0
  83. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/project/.env +0 -0
  84. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/project/.gitignore +0 -0
  85. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/project/README.md +0 -0
  86. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/__init__.py +0 -0
  87. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/app.py +0 -0
  88. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/cli.py +0 -0
  89. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/config.py +0 -0
  90. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/controllers/__init__.py +0 -0
  91. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/controllers/detail.py +0 -0
  92. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/controllers/home.py +0 -0
  93. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/main.py +0 -0
  94. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/models/__init__.py +0 -0
  95. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/models/detail.py +0 -0
  96. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/views/__init__.py +0 -0
  97. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/views/app/detail/page.tsx +0 -0
  98. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/views/app/home/page.tsx +0 -0
  99. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/views/app/main.css +0 -0
  100. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/views/package.json +0 -0
  101. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/views/postcss.config.js +0 -0
  102. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/views/tailwind.config.js +0 -0
  103. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/project/docker-compose.yml +0 -0
  104. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/create_mountaineer_app/templates/project/pyproject.toml +0 -0
  105. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/poetry.lock +0 -0
  106. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/create_mountaineer_app/pyproject.toml +0 -0
  107. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/.zed/settings.json +0 -0
  108. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/README.md +0 -0
  109. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/CNAME +0 -0
  110. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/api/actions.md +0 -0
  111. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/api/api_exception.md +0 -0
  112. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/api/app-controller.md +0 -0
  113. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/api/build_plugins/base.md +0 -0
  114. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/api/build_plugins/javascript.md +0 -0
  115. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/api/build_plugins/postcss.md +0 -0
  116. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/api/cli.md +0 -0
  117. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/api/config.md +0 -0
  118. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/api/controller.md +0 -0
  119. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/api/core_dependencies.md +0 -0
  120. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/api/database/config.md +0 -0
  121. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/api/database/dependencies.md +0 -0
  122. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/api/logging.md +0 -0
  123. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/api/render.md +0 -0
  124. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/api/ssr.md +0 -0
  125. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/api/watch_server.md +0 -0
  126. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/client_actions.md +0 -0
  127. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/cma.md +0 -0
  128. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/database.md +0 -0
  129. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/error_handling.md +0 -0
  130. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/index.md +0 -0
  131. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/internal/core_library.md +0 -0
  132. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/links.md +0 -0
  133. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/media/final_todo_list.png +0 -0
  134. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/media/ide_typehints.png +0 -0
  135. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/media/network_debug.png +0 -0
  136. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/media/server_side_rendering.png +0 -0
  137. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/metadata.md +0 -0
  138. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/postcss.md +0 -0
  139. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/quickstart.md +0 -0
  140. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/static_analysis.md +0 -0
  141. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/structure.md +0 -0
  142. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/stylesheets/extra.css +0 -0
  143. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/docs/views.md +0 -0
  144. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/mkdocs.yml +0 -0
  145. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/overrides/partials/footer.html +0 -0
  146. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/poetry.lock +0 -0
  147. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/docs_website/pyproject.toml +0 -0
  148. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/media/header.png +0 -0
  149. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__init__.py +0 -0
  150. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/__init__.py +0 -0
  151. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/actions/__init__.py +0 -0
  152. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/actions/test_fields.py +0 -0
  153. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/actions/test_passthrough.py +0 -0
  154. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/actions/test_sideeffect.py +0 -0
  155. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/client_builder/__init__.py +0 -0
  156. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/client_builder/test_build_links.py +0 -0
  157. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/client_builder/test_build_schemas.py +0 -0
  158. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/client_builder/test_builder.py +0 -0
  159. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/client_builder/test_typescript.py +0 -0
  160. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/common.py +0 -0
  161. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/conftest.py +0 -0
  162. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/database/__init__.py +0 -0
  163. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/database/dependencies/__init__.py +0 -0
  164. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/database/dependencies/conftest.py +0 -0
  165. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/database/dependencies/test_core.py +0 -0
  166. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/database/test_config.py +0 -0
  167. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/database/test_sqlmodel.py +0 -0
  168. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/dependencies/__init__.py +0 -0
  169. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/dependencies/test_base.py +0 -0
  170. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/fixtures/__init__.py +0 -0
  171. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/fixtures/complex_controller_ssr_with_react.js +0 -0
  172. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/fixtures/home_controller_source_map.js.map +0 -0
  173. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/fixtures/home_controller_ssr_with_react.js +0 -0
  174. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/js_compiler/__init__.py +0 -0
  175. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/js_compiler/test_javascript.py +0 -0
  176. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/js_compiler/test_postcss.py +0 -0
  177. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/test_annotation_helpers.py +0 -0
  178. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/test_app.py +0 -0
  179. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/test_cache.py +0 -0
  180. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/test_cli.py +0 -0
  181. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/test_config.py +0 -0
  182. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/test_controller.py +0 -0
  183. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/test_cropper.py +0 -0
  184. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/test_exceptions.py +0 -0
  185. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/test_paths.py +0 -0
  186. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/test_ssr.py +0 -0
  187. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/__tests__/test_watch.py +0 -0
  188. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/actions/__init__.py +0 -0
  189. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/actions/fields.py +0 -0
  190. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/actions/passthrough.py +0 -0
  191. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/actions/sideeffect.py +0 -0
  192. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/annotation_helpers.py +0 -0
  193. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/cache.py +0 -0
  194. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/cli.py +0 -0
  195. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/client_builder/build_links.py +0 -0
  196. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/client_builder/build_schemas.py +0 -0
  197. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/client_builder/builder.py +0 -0
  198. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/client_builder/typescript.py +0 -0
  199. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/constants.py +0 -0
  200. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/controller.py +0 -0
  201. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/controllers/__init__.py +0 -0
  202. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/controllers/exception_controller.py +0 -0
  203. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/cropper.py +0 -0
  204. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/database/__init__.py +0 -0
  205. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/database/cli.py +0 -0
  206. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/database/config.py +0 -0
  207. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/database/dependencies/__init__.py +0 -0
  208. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/database/dependencies/core.py +0 -0
  209. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/database/sqlmodel.py +0 -0
  210. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/database/validator.py +0 -0
  211. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/dependencies/__init__.py +0 -0
  212. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/dependencies/base.py +0 -0
  213. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/dependencies/core/__init__.py +0 -0
  214. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/dependencies/core/core.py +0 -0
  215. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/exceptions.py +0 -0
  216. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/io.py +0 -0
  217. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/js_compiler/__init__.py +0 -0
  218. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/js_compiler/base.py +0 -0
  219. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/js_compiler/exceptions.py +0 -0
  220. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/js_compiler/postcss.py +0 -0
  221. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/js_compiler/source_maps.py +0 -0
  222. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/paths.py +0 -0
  223. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/py.typed +0 -0
  224. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/render.py +0 -0
  225. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/ssr.py +0 -0
  226. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/static/__init__.py +0 -0
  227. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/static/api.ts +0 -0
  228. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/static/live_reload.ts +0 -0
  229. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/static/ssr_polyfills.js +0 -0
  230. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/views/__init__.py +0 -0
  231. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/views/core/exception/page.tsx +0 -0
  232. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/views/core/layout.tsx +0 -0
  233. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/views/core/main.css +0 -0
  234. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/views/package-lock.json +0 -0
  235. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/views/package.json +0 -0
  236. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/views/postcss.config.js +0 -0
  237. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/views/tailwind.config.js +0 -0
  238. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/watch.py +0 -0
  239. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/watch_server.py +0 -0
  240. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/mountaineer/webservice.py +0 -0
  241. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/src/benches/fixtures/complex_sourcemap_mapping.txt +0 -0
  242. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/src/benches/fixtures/home_controller_ssr_with_react.js +0 -0
  243. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/src/benches/fixtures/ssr_polyfill_archive.js +0 -0
  244. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/src/benches/lexers_benchmark.rs +0 -0
  245. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/src/benches/source_map_benchmark.rs +0 -0
  246. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/src/benches/ssr_benchmark.rs +0 -0
  247. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/src/errors.rs +0 -0
  248. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/src/lexers.rs +0 -0
  249. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/src/lib.rs +0 -0
  250. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/src/logging.rs +0 -0
  251. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/src/source_map.rs +0 -0
  252. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/src/ssr.rs +0 -0
  253. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/src/timeout.rs +0 -0
  254. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/src_go/Cargo.toml +0 -0
  255. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/src_go/build.rs +0 -0
  256. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/src_go/go/js_build.go +0 -0
  257. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/src_go/go.mod +0 -0
  258. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/src_go/go.sum +0 -0
  259. {mountaineer-0.3.2.dev2 → mountaineer-0.3.2.dev4}/src_go/src/lib.rs +0 -0
@@ -3,7 +3,7 @@ name = "scripts"
3
3
  version = "0.1.0"
4
4
  description = ""
5
5
  authors = ["Pierce Freeman <pierce@freeman.vc>"]
6
- readme = "README.md"
6
+ readme = "README_SCRIPTS.md"
7
7
 
8
8
  [tool.poetry.dependencies]
9
9
  python = "^3.11"
@@ -535,7 +535,7 @@ dependencies = [
535
535
 
536
536
  [[package]]
537
537
  name = "mountaineer"
538
- version = "0.3.2-dev2"
538
+ version = "0.3.2-dev4"
539
539
  dependencies = [
540
540
  "criterion",
541
541
  "deno_core_icudata",
@@ -15,7 +15,7 @@ harness = false
15
15
 
16
16
  [package]
17
17
  name = "mountaineer"
18
- version = "0.3.2-dev2"
18
+ version = "0.3.2-dev4"
19
19
  edition = "2021"
20
20
 
21
21
  [dependencies]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: mountaineer
3
- Version: 0.3.2.dev2
3
+ Version: 0.3.2.dev4
4
4
  Requires-Dist: pydantic
5
5
  Requires-Dist: fastapi
6
6
  Requires-Dist: inflection
@@ -7,10 +7,10 @@ This page contains a reasonable default configuration to get you started. We mak
7
7
  First, add the following to your `.dockerignore` file. This will prevent Docker from trying to copy over heavy artifacts that aren't needed for the build.
8
8
 
9
9
  ```title=".dockerignore"
10
- node_modules
11
- _server
12
- _ssr
13
- _static
10
+ **/node_modules
11
+ **/_server
12
+ **/_ssr
13
+ **/_static
14
14
  ```
15
15
 
16
16
  ### Image 1: Frontend Dependencies
@@ -103,8 +103,7 @@ ENV PATH="/venv/bin:$PATH"
103
103
  WORKDIR /usr/src/app
104
104
 
105
105
  COPY --from=venv-dependencies /venv /venv
106
- COPY {my_webapp} ./{my_webapp}
107
- COPY --from=server-hooks-builder /usr/src/app/{my_webapp}/views/_* ./{my_webapp}/views/
106
+ COPY --from=server-hooks-builder /usr/src/app/{my_webapp}/views /venv/lib/python3.11/site-packages/{my_webapp}/views
108
107
 
109
108
  # Run the application
110
109
  CMD ["/venv/bin/uvicorn", "{my_webapp}.main:app", "--host", "0.0.0.0", "--port", "3000"]
@@ -158,7 +158,7 @@ EXAMPLE_RESPONSE_400 = ContentBodyDefinition(
158
158
  in_location=ParameterLocationType.QUERY,
159
159
  required=True,
160
160
  ),
161
- # Cookies should be skipped
161
+ # Cookies and headers should be skipped
162
162
  URLParameterDefinition.from_meta(
163
163
  name="auth_cookie",
164
164
  schema_ref=OpenAPIProperty.from_meta(
@@ -168,6 +168,15 @@ EXAMPLE_RESPONSE_400 = ContentBodyDefinition(
168
168
  in_location=ParameterLocationType.COOKIE,
169
169
  required=True,
170
170
  ),
171
+ URLParameterDefinition.from_meta(
172
+ name="auth_header",
173
+ schema_ref=OpenAPIProperty.from_meta(
174
+ title="",
175
+ variable_type=OpenAPISchemaType.STRING,
176
+ ),
177
+ in_location=ParameterLocationType.HEADER,
178
+ required=True,
179
+ ),
171
180
  # Optional query parameter
172
181
  URLParameterDefinition.from_meta(
173
182
  name="query_param_optional_id",
@@ -13,7 +13,7 @@ from mountaineer.test_utilities import benchmark_function
13
13
 
14
14
 
15
15
  @pytest.mark.asyncio
16
- @benchmark_function(0.2)
16
+ @benchmark_function(0.2, time_budget_seconds=10)
17
17
  async def test_parse_source_map_parse(
18
18
  start_timing,
19
19
  end_timing,
@@ -0,0 +1,55 @@
1
+ import json
2
+ import logging
3
+ from contextlib import contextmanager, redirect_stderr, redirect_stdout
4
+ from io import StringIO
5
+
6
+ from mountaineer.logging import setup_logger
7
+
8
+
9
+ @contextmanager
10
+ def capture_logger_output(logger_func, *args, **kwargs):
11
+ new_stdout, new_stderr = StringIO(), StringIO()
12
+ with redirect_stdout(new_stdout), redirect_stderr(new_stderr):
13
+ logger = logger_func(*args, **kwargs)
14
+ yield logger, new_stdout, new_stderr
15
+
16
+
17
+ def test_setup_logger_name_and_level():
18
+ logger_name = "test_logger"
19
+ log_level = logging.DEBUG
20
+ with capture_logger_output(setup_logger, logger_name, log_level) as (logger, _, _):
21
+ assert logger.name == logger_name
22
+ assert logger.level == log_level
23
+
24
+
25
+ def test_log_message_output():
26
+ log_message = "Test message"
27
+ logger_name = "output_logger"
28
+ with capture_logger_output(setup_logger, logger_name) as (logger, stdout, _):
29
+ logger.info(log_message)
30
+ output = stdout.getvalue()
31
+ # Since actual output includes ANSI escape codes for colors, we validate the presence of the message and level
32
+ assert log_message in output
33
+ assert "INFO" in output
34
+
35
+
36
+ def test_timestamp():
37
+ logger_name = "format_logger"
38
+ with capture_logger_output(setup_logger, logger_name) as (logger, stdout, _):
39
+ logger.warning("Warning test")
40
+ output = stdout.getvalue()
41
+ log_output = json.loads(output.strip())
42
+ assert "timestamp" in log_output
43
+
44
+
45
+ def test_exception_logging():
46
+ logger_name = "exception_logger"
47
+ with capture_logger_output(setup_logger, logger_name) as (logger, stdout, _):
48
+ try:
49
+ raise ValueError("Test exception")
50
+ except ValueError:
51
+ logger.exception("This is an exception")
52
+ output = stdout.getvalue()
53
+ log_output = json.loads(output.strip())
54
+ assert "exception" in log_output
55
+ assert "Test exception" in log_output["exception"]
@@ -93,7 +93,11 @@ class AppController:
93
93
  self.global_metadata = global_metadata
94
94
  self.builders = [
95
95
  # Default builders
96
- JavascriptBundler(),
96
+ JavascriptBundler(
97
+ environment=(
98
+ config.ENVIRONMENT if config is not None else "development"
99
+ )
100
+ ),
97
101
  # Custom builders
98
102
  *(custom_builders if custom_builders else []),
99
103
  ]
@@ -134,7 +134,10 @@ class OpenAPIToTypescriptActionConverter:
134
134
 
135
135
  for parameter in action.parameters:
136
136
  typehint_key, typehint_value = get_typehint_for_parameter(parameter)
137
- if parameter.in_location == ParameterLocationType.COOKIE:
137
+ if parameter.in_location in {
138
+ ParameterLocationType.COOKIE,
139
+ ParameterLocationType.HEADER,
140
+ }:
138
141
  continue
139
142
  parameters_dict[parameter.name] = TSLiteral(parameter.name)
140
143
  typehint_dict[typehint_key] = typehint_value
@@ -182,7 +185,10 @@ class OpenAPIToTypescriptActionConverter:
182
185
  common_params["path"][parameter.name] = TSLiteral(parameter.name)
183
186
  elif parameter.in_location == ParameterLocationType.QUERY:
184
187
  common_params["query"][parameter.name] = TSLiteral(parameter.name)
185
- elif parameter.in_location == ParameterLocationType.COOKIE:
188
+ elif parameter.in_location in {
189
+ ParameterLocationType.COOKIE,
190
+ ParameterLocationType.HEADER,
191
+ }:
186
192
  # No-op, cookies will be sent automatically by fetch()
187
193
  continue
188
194
  else:
@@ -21,11 +21,13 @@ class OpenAPISchemaType(StrEnum):
21
21
 
22
22
 
23
23
  class ParameterLocationType(StrEnum):
24
+ # https://swagger.io/specification: Parameter Object
24
25
  PATH = "path"
25
26
  QUERY = "query"
26
27
 
27
28
  # https://swagger.io/docs/specification/authentication/cookie-authentication/
28
29
  COOKIE = "cookie"
30
+ HEADER = "header"
29
31
 
30
32
 
31
33
  class ActionType(StrEnum):
@@ -27,9 +27,14 @@ class ConfigBase(BaseSettings, metaclass=ConfigMeta):
27
27
 
28
28
  """
29
29
 
30
- # Name of the python package
30
+ # Name of the python package. Will be used to sniff for the installed
31
+ # codebase in the current virtualenv.
31
32
  PACKAGE: str | None = None
32
33
 
34
+ # Environment flag. Set to anything you want. Only if set to "development" will
35
+ # we include frontend artifacts for the hot-reloading server.
36
+ ENVIRONMENT: str = "development"
37
+
33
38
  model_config = {"frozen": True}
34
39
 
35
40
 
@@ -165,6 +165,8 @@ class JavascriptBundler(ClientBuilderBase):
165
165
  ssr_dir = root_path.get_managed_ssr_dir(tmp_build=True)
166
166
 
167
167
  # Client entrypoint config
168
+ # All these tuple arguments map to the input __init__ arguments
169
+ # for mountaineer_rs.BuildContextParams
168
170
  build_params.append(
169
171
  (
170
172
  str(payload.client_entrypoint_path),
@@ -12,6 +12,7 @@ class JsonFormatter(Formatter):
12
12
  log_record = {
13
13
  "level": record.levelname,
14
14
  "name": record.name,
15
+ "timestamp": self.formatTime(record, self.datefmt),
15
16
  "message": record.getMessage(),
16
17
  }
17
18
  if record.exc_info:
@@ -5,6 +5,7 @@ from functools import wraps
5
5
  from inspect import isawaitable, iscoroutinefunction, signature
6
6
  from tempfile import NamedTemporaryFile
7
7
  from time import monotonic_ns
8
+ from typing import Any
8
9
 
9
10
  import pytest
10
11
  from sqlalchemy import text
@@ -19,13 +20,19 @@ class ExecutionTooLong(Exception):
19
20
  pass
20
21
 
21
22
 
22
- def benchmark_function(max_time_seconds: int | float):
23
+ def benchmark_function(
24
+ max_time_seconds: int | float, time_budget_seconds: int | float = 5
25
+ ):
23
26
  """
24
27
  Wrap test functions in a timer that will enforce that the core logic completes
25
28
  in less than `max_time_seconds` seconds. Injects `start_timing` and `end_timing` into
26
29
  the function kwargs that will be called. Client callers should call these to scope
27
30
  where they want us to measure the core logic.
28
31
 
32
+ :param time_budget_seconds: How many seconds we have to run benchmarking. This function will run
33
+ at least 1 benchmark always, but the time budget allows users to better calibrate benchmark duration
34
+ by taking the average of multiple runs.
35
+
29
36
  """
30
37
  import pyinstrument
31
38
 
@@ -48,13 +55,10 @@ def benchmark_function(max_time_seconds: int | float):
48
55
  f"Test function {test_func.__name__} is not a coroutine function. Please decorate it with pytest.mark.asyncio"
49
56
  )
50
57
 
51
- @wraps(test_func)
52
- async def wrapper(*args, **kwargs):
53
- bound = new_sig.bind(*args, **kwargs)
54
- bound.apply_defaults()
55
-
58
+ async def single_time_test(fn, *args, **kwargs):
56
59
  # Try to run the test function regularly, and time it
57
- # Instrumenting profilers at this point typically will slow down execution time
60
+ # Instrumenting profilers typically will slow down execution time so we want
61
+ # to take time of the raw, non-instrumented function for benchmarking
58
62
  start: float | None = None
59
63
  end: float | None = None
60
64
 
@@ -66,31 +70,58 @@ def benchmark_function(max_time_seconds: int | float):
66
70
  nonlocal end
67
71
  end = monotonic_ns()
68
72
 
73
+ result = test_func(
74
+ *args, **kwargs, start_timing=start_timing, end_timing=end_timing
75
+ )
76
+ if isawaitable(result):
77
+ result = await result
78
+
79
+ return (start, end, result)
80
+
81
+ @wraps(test_func)
82
+ async def wrapper(*args, **kwargs):
83
+ bound = new_sig.bind(*args, **kwargs)
84
+ bound.apply_defaults()
85
+
86
+ average_duration: float | None = None
87
+
69
88
  try:
70
- result = test_func(
71
- *args, **kwargs, start_timing=start_timing, end_timing=end_timing
72
- )
73
- if isawaitable(result):
74
- result = await result
89
+ timed_durations: list[tuple[int, int]] = []
90
+ results: list[Any] = []
91
+ global_start = monotonic_ns()
92
+
93
+ while monotonic_ns() - global_start < time_budget_seconds * 1e9:
94
+ start, end, result = await single_time_test(
95
+ test_func, *args, **kwargs
96
+ )
97
+
98
+ if start is None:
99
+ raise Exception("Test function did not call start_timing")
100
+ if end is None:
101
+ raise Exception("Test function did not call end_timing")
75
102
 
76
- if start is None:
77
- raise Exception("Test function did not call start_timing")
78
- if end is None:
79
- raise Exception("Test function did not call end_timing")
103
+ timed_durations.append((start, end))
104
+ results.append(result)
80
105
 
81
- LOGGER.info(f"Test function took: {(end - start) / 1e9}")
106
+ average_duration = sum(
107
+ (end - start) for start, end in timed_durations
108
+ ) / len(timed_durations)
109
+
110
+ LOGGER.info(
111
+ f"Collected {len(results)} timed durations in {(monotonic_ns() - global_start) / 1e9}"
112
+ )
113
+ LOGGER.info(f"Test function took average: {average_duration / 1e9}")
82
114
 
83
- if (end - start) / 1e9 > max_time_seconds:
115
+ if average_duration / 1e9 > max_time_seconds:
84
116
  raise ExecutionTooLong()
85
117
 
86
- return result
118
+ return results[0]
87
119
 
88
120
  except ExecutionTooLong as e:
89
121
  LOGGER.error(f"Test function failed due to: {e}")
90
122
 
91
123
  # This should already be true, but we want to be explicit to help mypy
92
- assert start is not None
93
- assert end is not None
124
+ assert average_duration is not None
94
125
 
95
126
  profiler = pyinstrument.Profiler()
96
127
  output_filename: str | None = None
@@ -115,7 +146,7 @@ def benchmark_function(max_time_seconds: int | float):
115
146
  await result
116
147
 
117
148
  pytest.fail(
118
- f"Test function failed in {end-start}s and profiles generated; Pyinstrument: {output_filename}"
149
+ f"Test function failed in {average_duration/1e9}s and profiles generated; Pyinstrument: {output_filename}"
119
150
  )
120
151
 
121
152
  wrapper.__signature__ = new_sig # type: ignore
@@ -1,4 +1,4 @@
1
- # This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand.
1
+ # This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand.
2
2
 
3
3
  [[package]]
4
4
  name = "annotated-types"
@@ -688,13 +688,13 @@ types = ["typing-extensions"]
688
688
 
689
689
  [[package]]
690
690
  name = "pyright"
691
- version = "1.1.352"
691
+ version = "1.1.357"
692
692
  description = "Command line wrapper for pyright"
693
693
  optional = false
694
694
  python-versions = ">=3.7"
695
695
  files = [
696
- {file = "pyright-1.1.352-py3-none-any.whl", hash = "sha256:0040cf173c6a60704e553bfd129dfe54de59cc76d0b2b80f77cfab4f50701d64"},
697
- {file = "pyright-1.1.352.tar.gz", hash = "sha256:a621c0dfbcf1291b3610641a07380fefaa1d0e182890a1b2a7f13b446e8109a9"},
696
+ {file = "pyright-1.1.357-py3-none-any.whl", hash = "sha256:1cf29ee38e4928131895cd8e90eef37b5b77e2ed72a14e6e8e2405266f5f0aca"},
697
+ {file = "pyright-1.1.357.tar.gz", hash = "sha256:7c66261116c78c5fa9629134fe85c54cc5302ab73e376be4b0a99d89c80a9403"},
698
698
  ]
699
699
 
700
700
  [package.dependencies]
@@ -781,6 +781,7 @@ files = [
781
781
  {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"},
782
782
  {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"},
783
783
  {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"},
784
+ {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"},
784
785
  {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"},
785
786
  {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"},
786
787
  {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"},
@@ -877,7 +878,9 @@ python-versions = ">=3.7"
877
878
  files = [
878
879
  {file = "SQLAlchemy-2.0.26-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:56524d767713054f8758217b3a811f6a736e0ae34e7afc33b594926589aa9609"},
879
880
  {file = "SQLAlchemy-2.0.26-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c2d8a2c68b279617f13088bdc0fc0e9b5126f8017f8882ff08ee41909fab0713"},
881
+ {file = "SQLAlchemy-2.0.26-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:84d377645913d47f0dc802b415bcfe7fb085d86646a12278d77c12eb75b5e1b4"},
880
882
  {file = "SQLAlchemy-2.0.26-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4fc0628d2026926404dabc903dc5628f7d936a792aa3a1fc54a20182df8e2172"},
883
+ {file = "SQLAlchemy-2.0.26-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:872f2907ade52601a1e729e85d16913c24dc1f6e7c57d11739f18dcfafde29db"},
881
884
  {file = "SQLAlchemy-2.0.26-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ba46fa770578b3cf3b5b77dadb7e94fda7692dd4d1989268ef3dcb65f31c40a3"},
882
885
  {file = "SQLAlchemy-2.0.26-cp310-cp310-win32.whl", hash = "sha256:651d10fdba7984bf100222d6e4acc496fec46493262b6170be1981ef860c6184"},
883
886
  {file = "SQLAlchemy-2.0.26-cp310-cp310-win_amd64.whl", hash = "sha256:8f95ede696ab0d7328862d69f29b643d35b668c4f3619cb2f0281adc16e64c1b"},
@@ -898,19 +901,25 @@ files = [
898
901
  {file = "SQLAlchemy-2.0.26-cp312-cp312-win32.whl", hash = "sha256:dc32ecf643c4904dd413e6a95a3f2c8a89ccd6f15083e586dcf8f42eb4e317ae"},
899
902
  {file = "SQLAlchemy-2.0.26-cp312-cp312-win_amd64.whl", hash = "sha256:6e25f029e8ad6d893538b5abe8537e7f09e21d8e96caee46a7e2199f3ddd77b0"},
900
903
  {file = "SQLAlchemy-2.0.26-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:99a9a8204b8937aa72421e31c493bfc12fd063a8310a0522e5a9b98e6323977c"},
904
+ {file = "SQLAlchemy-2.0.26-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:691d68a4fca30c9a676623d094b600797699530e175b6524a9f57e3273f5fa8d"},
901
905
  {file = "SQLAlchemy-2.0.26-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:79a74a4ca4310c812f97bf0f13ce00ed73c890954b5a20b32484a9ab60e567e9"},
906
+ {file = "SQLAlchemy-2.0.26-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:f2efbbeb18c0e1c53b670a46a009fbde7b58e05b397a808c7e598532b17c6f4b"},
902
907
  {file = "SQLAlchemy-2.0.26-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:3fc557f5402206c18ec3d288422f8e5fa764306d49f4efbc6090a7407bf54938"},
903
908
  {file = "SQLAlchemy-2.0.26-cp37-cp37m-win32.whl", hash = "sha256:a9846ffee3283cff4ec476e7ee289314290fcb2384aab5045c6f481c5c4d011f"},
904
909
  {file = "SQLAlchemy-2.0.26-cp37-cp37m-win_amd64.whl", hash = "sha256:ed4667d3d5d6e203a271d684d5b213ebcd618f7a8bc605752a8865eb9e67a79a"},
905
910
  {file = "SQLAlchemy-2.0.26-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:79e629df3f69f849a1482a2d063596b23e32036b83547397e68725e6e0d0a9ab"},
906
911
  {file = "SQLAlchemy-2.0.26-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4b4d848b095173e0a9e377127b814490499e55f5168f617ae2c07653c326b9d1"},
912
+ {file = "SQLAlchemy-2.0.26-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3f06afe8e96d7f221cc0b59334dc400151be22f432785e895e37030579d253c3"},
907
913
  {file = "SQLAlchemy-2.0.26-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f75ac12d302205e60f77f46bd162d40dc37438f1f8db160d2491a78b19a0bd61"},
914
+ {file = "SQLAlchemy-2.0.26-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:ec3717c1efee8ad4b97f6211978351de3abe1e4b5f73e32f775c7becec021c5c"},
908
915
  {file = "SQLAlchemy-2.0.26-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:06ed4d6bb2365222fb9b0a05478a2d23ad8c1dd874047a9ae1ca1d45f18a255e"},
909
916
  {file = "SQLAlchemy-2.0.26-cp38-cp38-win32.whl", hash = "sha256:caa79a6caeb4a3cc4ddb9aba9205c383f5d3bcb60d814e87e74570514754e073"},
910
917
  {file = "SQLAlchemy-2.0.26-cp38-cp38-win_amd64.whl", hash = "sha256:996b41c38e34a980e9f810d6e2709a3196e29ee34e46e3c16f96c63da10a9da1"},
911
918
  {file = "SQLAlchemy-2.0.26-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4f57af0866f6629eae2d24d022ba1a4c1bac9b16d45027bbfcda4c9d5b0d8f26"},
912
919
  {file = "SQLAlchemy-2.0.26-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e1a532bc33163fb19c4759a36504a23e63032bc8d47cee1c66b0b70a04a0957b"},
920
+ {file = "SQLAlchemy-2.0.26-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:02a4f954ccb17bd8cff56662efc806c5301508233dc38d0253a5fdb2f33ca3ba"},
913
921
  {file = "SQLAlchemy-2.0.26-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a678f728fb075e74aaa7fdc27f8af8f03f82d02e7419362cc8c2a605c16a4114"},
922
+ {file = "SQLAlchemy-2.0.26-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:8b39462c9588d4780f041e1b84d2ba038ac01c441c961bbee622dd8f53dec69f"},
914
923
  {file = "SQLAlchemy-2.0.26-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:98f4d0d2bda2921af5b0c2ca99207cdab00f2922da46a6336c62c8d6814303a7"},
915
924
  {file = "SQLAlchemy-2.0.26-cp39-cp39-win32.whl", hash = "sha256:6d68e6b507a3dd20c0add86ac0a0ca061d43c9a0162a122baa5fe952f14240f1"},
916
925
  {file = "SQLAlchemy-2.0.26-cp39-cp39-win_amd64.whl", hash = "sha256:fb97a9b93b953084692a52a7877957b7a88dfcedc0c5652124f5aebf5999f7fe"},
@@ -5,10 +5,11 @@ build-backend = "maturin"
5
5
  [project]
6
6
  name = "mountaineer"
7
7
  dependencies = [ "pydantic", "fastapi", "inflection", "click", "tqdm", "uvicorn[standard]", "packaging", "watchdog", "pydantic-settings", "sqlmodel", "asyncpg", "sqlalchemy[asyncio]",]
8
+ exclude = [ "fixtures", "ci_webapp", "create_mountaineer_app", "media", "docs_website", "benchmarking",]
8
9
 
9
10
  [tool.poetry]
10
11
  name = "mountaineer"
11
- version = "0.3.2.dev2"
12
+ version = "0.3.2.dev4"
12
13
  description = ""
13
14
  authors = [ "Pierce Freeman <pierce@freeman.vc>",]
14
15
  readme = "README.md"