matlab-proxy 0.27.1__tar.gz → 0.27.3__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.

Potentially problematic release.


This version of matlab-proxy might be problematic. Click here for more details.

Files changed (205) hide show
  1. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/PKG-INFO +2 -1
  2. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/app.py +3 -3
  3. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/app_state.py +19 -23
  4. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/settings.py +2 -3
  5. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/util/__init__.py +23 -42
  6. matlab_proxy-0.27.3/matlab_proxy/util/list_servers.py +89 -0
  7. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/util/mwi/environment_variables.py +10 -0
  8. matlab_proxy-0.27.3/matlab_proxy/util/mwi/logger.py +215 -0
  9. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/util/mwi/validators.py +1 -1
  10. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/pyproject.toml +6 -5
  11. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/util/mwi/test_logger.py +17 -8
  12. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/util/test_util.py +1 -11
  13. matlab_proxy-0.27.1/matlab_proxy/util/list_servers.py +0 -44
  14. matlab_proxy-0.27.1/matlab_proxy/util/mwi/logger.py +0 -130
  15. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/.gitignore +0 -0
  16. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/LICENSE.md +0 -0
  17. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/README.md +0 -0
  18. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/.eslintrc.json +0 -0
  19. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/.gitignore +0 -0
  20. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/README.md +0 -0
  21. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/eslint.config.js +0 -0
  22. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/index.css +0 -0
  23. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/index.html +0 -0
  24. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/package-lock.json +0 -0
  25. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/package.json +0 -0
  26. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/public/favicon.ico +0 -0
  27. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/public/manifest.json +0 -0
  28. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/public/robots.txt +0 -0
  29. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/actionCreators/actionCreators.spec.js +0 -0
  30. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/actionCreators/index.js +0 -0
  31. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/actions/index.js +0 -0
  32. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/3p/css/bootstrap.min.css +0 -0
  33. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/3p/css/site7.min.css +0 -0
  34. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/3p/fonts/glyphicons-halflings-regular.eot +0 -0
  35. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/3p/fonts/glyphicons-halflings-regular.svg +0 -0
  36. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/3p/fonts/glyphicons-halflings-regular.ttf +0 -0
  37. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/3p/fonts/glyphicons-halflings-regular.woff +0 -0
  38. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/3p/fonts/glyphicons-halflings-regular.woff2 +0 -0
  39. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/3p/fonts/mathworks-eps.svg +0 -0
  40. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/3p/fonts/mathworks-eps.ttf +0 -0
  41. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/3p/fonts/mathworks-eps.woff +0 -0
  42. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/3p/fonts/mathworks-pictograms.svg +0 -0
  43. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/3p/fonts/mathworks-pictograms.ttf +0 -0
  44. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/3p/fonts/mathworks-pictograms.woff +0 -0
  45. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/3p/fonts/mathworks.svg +0 -0
  46. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/3p/fonts/mathworks.ttf +0 -0
  47. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/3p/fonts/mathworks.woff +0 -0
  48. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/3p/images/bug_reports/workaround.gif +0 -0
  49. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/3p/images/responsive/global/ico-header-account-hover.svg +0 -0
  50. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/3p/images/responsive/global/ico-header-account.svg +0 -0
  51. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/3p/images/responsive/global/ico-header-contact-hover.svg +0 -0
  52. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/3p/images/responsive/global/ico-header-contact.svg +0 -0
  53. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/3p/images/responsive/global/ico-sprite.png +0 -0
  54. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/App.css +0 -0
  55. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/App.spec.jsx +0 -0
  56. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/IdleBufferTimeouts.spec.jsx +0 -0
  57. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/MATLAB-env-blur.png +0 -0
  58. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/App/index.jsx +0 -0
  59. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/Confirmation/Confirmation.spec.jsx +0 -0
  60. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/Confirmation/index.jsx +0 -0
  61. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/Controls/Controls.css +0 -0
  62. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/Controls/Controls.spec.jsx +0 -0
  63. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/Controls/feedback.svg +0 -0
  64. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/Controls/help.svg +0 -0
  65. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/Controls/index.jsx +0 -0
  66. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/Controls/restart.svg +0 -0
  67. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/Controls/sign-out.svg +0 -0
  68. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/Controls/start.svg +0 -0
  69. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/Controls/stop.svg +0 -0
  70. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/Controls/terminate.svg +0 -0
  71. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/EntitlementSelector/EntitlementSelector.spec.jsx +0 -0
  72. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/EntitlementSelector/index.jsx +0 -0
  73. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/Error/Error.css +0 -0
  74. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/Error/Error.spec.jsx +0 -0
  75. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/Error/index.jsx +0 -0
  76. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/Help/Help.css +0 -0
  77. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/Help/Help.spec.jsx +0 -0
  78. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/Help/index.jsx +0 -0
  79. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/Information/Information.css +0 -0
  80. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/Information/Information.spec.jsx +0 -0
  81. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/Information/index.jsx +0 -0
  82. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/LicensingGatherer/ExistingLicense.css +0 -0
  83. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/LicensingGatherer/ExistingLicense.jsx +0 -0
  84. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/LicensingGatherer/LicenseGatherer.spec.jsx +0 -0
  85. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/LicensingGatherer/LicensingGatherer.css +0 -0
  86. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/LicensingGatherer/MHLM.css +0 -0
  87. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/LicensingGatherer/MHLM.jsx +0 -0
  88. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/LicensingGatherer/NLM.jsx +0 -0
  89. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/LicensingGatherer/index.jsx +0 -0
  90. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/MatlabJsd/MatlabJsd.css +0 -0
  91. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/MatlabJsd/MatlabJsd.spec.jsx +0 -0
  92. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/MatlabJsd/index.jsx +0 -0
  93. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/Overlay/Overlay.css +0 -0
  94. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/Overlay/Overlay.spec.jsx +0 -0
  95. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/Overlay/index.jsx +0 -0
  96. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/OverlayTrigger/OverlayTrigger.css +0 -0
  97. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/OverlayTrigger/OverlayTrigger.spec.jsx +0 -0
  98. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/OverlayTrigger/ResizeOverlayTrigger.spec.jsx +0 -0
  99. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/OverlayTrigger/arrow.svg +0 -0
  100. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/OverlayTrigger/gripper.svg +0 -0
  101. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/OverlayTrigger/index.jsx +0 -0
  102. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/OverlayTrigger/trigger-error.svg +0 -0
  103. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/OverlayTrigger/trigger-ok.svg +0 -0
  104. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/ShutdownWarning/ShutdownWarning.css +0 -0
  105. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/components/ShutdownWarning/index.jsx +0 -0
  106. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/constants.js +0 -0
  107. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/main.jsx +0 -0
  108. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/reducers/index.js +0 -0
  109. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/reducers/reducers.spec.js +0 -0
  110. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/selectors/index.js +0 -0
  111. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/selectors/selectors.spec.js +0 -0
  112. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/setupTests.js +0 -0
  113. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/test/utils/react-test.jsx +0 -0
  114. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/test/utils/responses.js +0 -0
  115. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/src/test/utils/state.js +0 -0
  116. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/gui/vite.config.js +0 -0
  117. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/hatch_build.py +0 -0
  118. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/__init__.py +0 -0
  119. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/constants.py +0 -0
  120. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/default_configuration.py +0 -0
  121. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/devel.py +0 -0
  122. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/icons/matlab.svg +0 -0
  123. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/matlab/evaluateUserMatlabCode.m +0 -0
  124. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/matlab/startup.m +0 -0
  125. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/util/cookie_jar.py +0 -0
  126. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/util/event_loop.py +0 -0
  127. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/util/mw.py +0 -0
  128. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/util/mwi/__init__.py +0 -0
  129. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/util/mwi/custom_http_headers.py +0 -0
  130. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/util/mwi/download.py +0 -0
  131. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/util/mwi/embedded_connector/__init__.py +0 -0
  132. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/util/mwi/embedded_connector/helpers.py +0 -0
  133. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/util/mwi/embedded_connector/request.py +0 -0
  134. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/util/mwi/exceptions.py +0 -0
  135. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/util/mwi/session_name.py +0 -0
  136. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/util/mwi/token_auth.py +0 -0
  137. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/util/system.py +0 -0
  138. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy/util/windows.py +0 -0
  139. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy_manager/README.md +0 -0
  140. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy_manager/__init__.py +0 -0
  141. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy_manager/lib/README.md +0 -0
  142. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy_manager/lib/__init__.py +0 -0
  143. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy_manager/lib/api.py +0 -0
  144. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy_manager/storage/README.md +0 -0
  145. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy_manager/storage/__init__.py +0 -0
  146. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy_manager/storage/file_repository.py +0 -0
  147. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy_manager/storage/interface.py +0 -0
  148. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy_manager/storage/server.py +0 -0
  149. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy_manager/utils/__init__.py +0 -0
  150. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy_manager/utils/auth.py +0 -0
  151. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy_manager/utils/constants.py +0 -0
  152. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy_manager/utils/environment_variables.py +0 -0
  153. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy_manager/utils/exceptions.py +0 -0
  154. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy_manager/utils/helpers.py +0 -0
  155. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy_manager/utils/logger.py +0 -0
  156. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy_manager/web/README.md +0 -0
  157. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy_manager/web/__init__.py +0 -0
  158. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy_manager/web/app.py +0 -0
  159. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy_manager/web/monitor.py +0 -0
  160. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/matlab_proxy_manager/web/watcher.py +0 -0
  161. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/README.md +0 -0
  162. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/__init__.py +0 -0
  163. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/integration/__init__.py +0 -0
  164. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/integration/integration_tests_with_license/__init__.py +0 -0
  165. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/integration/integration_tests_with_license/conftest.py +0 -0
  166. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/integration/integration_tests_with_license/test_http_end_points.py +0 -0
  167. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/integration/integration_tests_without_license/__init__.py +0 -0
  168. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/integration/integration_tests_without_license/conftest.py +0 -0
  169. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/integration/integration_tests_without_license/test_matlab_is_down_if_unlicensed.py +0 -0
  170. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/integration/pytest.ini +0 -0
  171. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/integration/utils/__init__.py +0 -0
  172. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/integration/utils/integration_tests_utils.py +0 -0
  173. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/integration/utils/licensing.py +0 -0
  174. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/matlab-tests/TestEvaluateUserMatlabCodeScript.m +0 -0
  175. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/__init__.py +0 -0
  176. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/conftest.py +0 -0
  177. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/fixtures/fixture_auth.py +0 -0
  178. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/mocks/mock_client.py +0 -0
  179. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/proxy-manager/lib/test_api.py +0 -0
  180. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/proxy-manager/storage/test_file_repository.py +0 -0
  181. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/proxy-manager/storage/test_server.py +0 -0
  182. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/proxy-manager/web/test_app.py +0 -0
  183. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/proxy-manager/web/test_monitor.py +0 -0
  184. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/proxy-manager/web/test_watcher.py +0 -0
  185. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/pytest.ini +0 -0
  186. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/test_app.py +0 -0
  187. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/test_app_state.py +0 -0
  188. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/test_constants.py +0 -0
  189. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/test_ddux.py +0 -0
  190. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/test_devel.py +0 -0
  191. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/test_non_dev_mode.py +0 -0
  192. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/test_settings.py +0 -0
  193. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/util/__init__.py +0 -0
  194. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/util/mwi/__init__.py +0 -0
  195. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/util/mwi/embedded_connector/__init__.py +0 -0
  196. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/util/mwi/embedded_connector/test_helpers.py +0 -0
  197. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/util/mwi/embedded_connector/test_request.py +0 -0
  198. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/util/mwi/test_custom_http_headers.py +0 -0
  199. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/util/mwi/test_download.py +0 -0
  200. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/util/mwi/test_token_auth.py +0 -0
  201. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/util/mwi/test_validators.py +0 -0
  202. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/util/test_cookie_jar.py +0 -0
  203. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/unit/util/test_mw.py +0 -0
  204. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/utils/__init__.py +0 -0
  205. {matlab_proxy-0.27.1 → matlab_proxy-0.27.3}/tests/utils/logging_util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: matlab-proxy
3
- Version: 0.27.1
3
+ Version: 0.27.3
4
4
  Summary: Python® package enables you to launch MATLAB® and access it from a web browser.
5
5
  Project-URL: Homepage, https://github.com/mathworks/matlab-proxy/
6
6
  Project-URL: Documentation, https://github.com/mathworks/matlab-proxy/blob/main/README.md
@@ -23,6 +23,7 @@ Requires-Dist: importlib-metadata
23
23
  Requires-Dist: importlib-resources
24
24
  Requires-Dist: psutil
25
25
  Requires-Dist: requests
26
+ Requires-Dist: rich
26
27
  Requires-Dist: watchdog
27
28
  Provides-Extra: dev
28
29
  Requires-Dist: aiohttp-devtools; extra == 'dev'
@@ -996,7 +996,7 @@ def configure_no_proxy_in_env():
996
996
  os.environ["no_proxy"] = ",".join(
997
997
  set(existing_no_proxy_env + no_proxy_whitelist)
998
998
  )
999
- logger.info(f"Setting no_proxy to: {os.environ.get('no_proxy')}")
999
+ logger.debug(f"Setting no_proxy to: {os.environ.get('no_proxy')}")
1000
1000
 
1001
1001
 
1002
1002
  def create_and_start_app(config_name):
@@ -1053,12 +1053,12 @@ def print_version_and_exit():
1053
1053
 
1054
1054
  def main():
1055
1055
  """Starting point of the integration. Creates the web app and runs indefinitely."""
1056
- if util.parse_cli_args()["version"]:
1056
+ if util.parse_main_cli_args()["version"]:
1057
1057
  print_version_and_exit()
1058
1058
 
1059
1059
  # The integration needs to be called with --config flag.
1060
1060
  # Parse the passed cli arguments.
1061
- desired_configuration_name = util.parse_cli_args()["config"]
1061
+ desired_configuration_name = util.parse_main_cli_args()["config"]
1062
1062
 
1063
1063
  create_and_start_app(config_name=desired_configuration_name)
1064
1064
 
@@ -875,15 +875,8 @@ class AppState:
875
875
  user_code_output_file
876
876
  )
877
877
  logger.info(
878
- util.prettify(
879
- boundary_filler="*",
880
- text_arr=[
881
- f"When MATLAB starts, you can see the output for your startup code at:",
882
- f"{self.matlab_session_files.get('startup_code_output_file', ' ')}",
883
- ],
884
- )
878
+ f"The results of executing MWI_MATLAB_STARTUP_SCRIPT are stored at: {user_code_output_file} "
885
879
  )
886
-
887
880
  return
888
881
 
889
882
  def create_server_info_file(self):
@@ -909,16 +902,16 @@ class AppState:
909
902
 
910
903
  # By default mwi_server_url usually points to 0.0.0.0 as the hostname, but this does not work well
911
904
  # on some browsers. Specifically on Safari (MacOS)
912
- logger.info(
913
- util.prettify(
914
- boundary_filler="=",
915
- text_arr=[
916
- f"Access MATLAB at:",
917
- self.settings["mwi_server_url"].replace("0.0.0.0", "localhost")
918
- + mwi_auth_token_str,
919
- ],
920
- )
905
+ server_url = (
906
+ self.settings["mwi_server_url"].replace("0.0.0.0", "localhost")
907
+ + mwi_auth_token_str
908
+ )
909
+
910
+ mwi.logger.log_startup_info(
911
+ title=f"matlab-proxy-app running on {self.settings['app_port']}",
912
+ matlab_url=server_url,
921
913
  )
914
+ logger.info(f"MATLAB Root: {self.settings['matlab_path']}")
922
915
 
923
916
  def clean_up_mwi_server_session(self):
924
917
  # Clean up mwi_server_session_files
@@ -965,10 +958,11 @@ class AppState:
965
958
  matlab_env["MLM_LICENSE_FILE"] = self.licensing["conn_str"]
966
959
 
967
960
  # Env setup related to MATLAB
968
- matlab_env["MW_CRASH_MODE"] = "native"
969
- matlab_env["MATLAB_WORKER_CONFIG_ENABLE_LOCAL_PARCLUSTER"] = "true"
970
- matlab_env["PCT_ENABLED"] = "true"
971
- matlab_env["HTTP_MATLAB_CLIENT_GATEWAY_PUBLIC_PORT"] = "1"
961
+ ## Update the values only if it does not already exist in the environment
962
+ matlab_env["MW_CRASH_MODE"] = matlab_env.get("MW_CRASH_MODE", "native")
963
+ matlab_env["MATLAB_WORKER_CONFIG_ENABLE_LOCAL_PARCLUSTER"] = matlab_env.get(
964
+ "MATLAB_WORKER_CONFIG_ENABLE_LOCAL_PARCLUSTER", "true"
965
+ )
972
966
  matlab_env["MW_DOCROOT"] = os.path.join("ui", "webgui", "src")
973
967
  matlab_env["MWAPIKEY"] = self.settings["mwapikey"]
974
968
 
@@ -1003,7 +997,7 @@ class AppState:
1003
997
 
1004
998
  # Set MW_CONNECTOR_CONTEXT_ROOT
1005
999
  matlab_env["MW_CONNECTOR_CONTEXT_ROOT"] = self.settings.get("base_url", "/")
1006
- logger.info(
1000
+ logger.debug(
1007
1001
  f"MW_CONNECTOR_CONTEXT_ROOT is set to: {matlab_env['MW_CONNECTOR_CONTEXT_ROOT']}"
1008
1002
  )
1009
1003
 
@@ -1315,6 +1309,8 @@ class AppState:
1315
1309
  # to MATLAB state by other functions/tasks until the lock is released, ensuring consistency. It's released early only in case of exceptions.
1316
1310
  await self.matlab_state_updater_lock.acquire()
1317
1311
  self.set_matlab_state("starting")
1312
+ logger.info(f"Starting MATLAB...")
1313
+
1318
1314
  # Clear MATLAB errors and logging
1319
1315
  self.error = None
1320
1316
  self.logs["matlab"].clear()
@@ -1534,7 +1530,7 @@ class AppState:
1534
1530
  except:
1535
1531
  pass
1536
1532
 
1537
- logger.info("Stopped (any running) MATLAB process.")
1533
+ logger.debug("Stopped (any running) MATLAB process.")
1538
1534
 
1539
1535
  # Terminating Xvfb
1540
1536
  if system.is_posix():
@@ -53,7 +53,7 @@ def get_process_startup_timeout():
53
53
  )
54
54
  return constants.DEFAULT_PROCESS_START_TIMEOUT
55
55
 
56
- logger.info(
56
+ logger.debug(
57
57
  f"Using {constants.DEFAULT_PROCESS_START_TIMEOUT} seconds as the default timeout value"
58
58
  )
59
59
 
@@ -94,7 +94,7 @@ def get_matlab_executable_and_root_path():
94
94
 
95
95
  if matlab_executable_path:
96
96
  matlab_root_path = Path(matlab_executable_path).resolve().parent.parent
97
- logger.info(f"Found MATLAB executable at: {matlab_executable_path}")
97
+ logger.debug(f"MATLAB root folder: {matlab_root_path}")
98
98
  matlab_root_path = mwi.validators.validate_matlab_root_path(
99
99
  matlab_root_path, is_custom_matlab_root=False
100
100
  )
@@ -698,7 +698,6 @@ def _get_matlab_cmd(matlab_executable_path, code_to_execute, nlm_conn_str):
698
698
  "-nosplash",
699
699
  *flag_to_hide_desktop,
700
700
  "-softwareopengl",
701
- # " v=mvm ",
702
701
  *matlab_lic_mode,
703
702
  "-externalUI",
704
703
  profile_matlab_startup,
@@ -26,7 +26,7 @@ logger = mwi.logger.get()
26
26
  interrupt_signal_caught = False
27
27
 
28
28
 
29
- def parse_cli_args():
29
+ def parse_main_cli_args():
30
30
  """Parses CLI arguments passed to the main() function.
31
31
 
32
32
  Returns:
@@ -56,6 +56,28 @@ def parse_cli_args():
56
56
  return parsed_args
57
57
 
58
58
 
59
+ def parse_list_cli_args():
60
+ """Parses CLI arguments passed to the matlab-proxy-app-list-servers entrypoint.
61
+
62
+ Returns:
63
+ dict: Containing the parsed arguments
64
+ """
65
+ # Parse the --config flag provided to the console script executable.
66
+ parsed_args = {}
67
+ parser = argparse.ArgumentParser()
68
+ parser.add_argument(
69
+ "-q",
70
+ "--quiet",
71
+ help="Return the server list without any additional text.",
72
+ action="store_true",
73
+ )
74
+ args = parser.parse_args()
75
+
76
+ parsed_args["quiet"] = args.quiet
77
+
78
+ return parsed_args
79
+
80
+
59
81
  def prepare_site(app, runner):
60
82
  """Prepares to launch a TCPSite. If MWI_APP_PORT env variable is set,
61
83
  it will setup a site to launch on that port, else will launch on a random available port.
@@ -148,47 +170,6 @@ def add_signal_handlers(loop):
148
170
  return loop
149
171
 
150
172
 
151
- def prettify(boundary_filler=" ", text_arr=[]):
152
- """Prettify array of strings with borders for stdout
153
-
154
- Args:
155
- boundary_filler (str, optional): Upper and lower border filler for text. Defaults to " ".
156
- text_arr (list, optional):The text array to prettify. Each element will be added to a newline. Defaults to [].
157
-
158
- Returns:
159
- [str]: Prettified String
160
- """
161
-
162
- import sys
163
-
164
- if not sys.stdout.isatty():
165
- return (
166
- "\n============================\n"
167
- + "\n".join(text_arr)
168
- + "\n============================\n"
169
- )
170
-
171
- size = os.get_terminal_size()
172
- cols, _ = size.columns, size.lines
173
-
174
- if any(len(text) > cols for text in text_arr):
175
- result = ""
176
- for text in text_arr:
177
- result += text + "\n"
178
- return result
179
-
180
- upper = "\n" + "".ljust(cols, boundary_filler) + "\n" if len(text_arr) > 0 else ""
181
- lower = "".ljust(cols, boundary_filler) if len(text_arr) > 0 else ""
182
-
183
- content = ""
184
- for text in text_arr:
185
- content += text.center(cols) + "\n"
186
-
187
- result = upper + content + lower
188
-
189
- return result
190
-
191
-
192
173
  def get_child_processes(parent_process, max_attempts=10, sleep_interval=1):
193
174
  """Get list of child processes from a parent process.
194
175
 
@@ -0,0 +1,89 @@
1
+ # Copyright (c) 2020-2025 The MathWorks, Inc.
2
+ # Script to print information about all running matlab-proxy servers for current user on current machine.
3
+
4
+ import glob
5
+ import os
6
+
7
+ import matlab_proxy.settings as mwi_settings
8
+ import matlab_proxy.util as mwi_util
9
+
10
+ from datetime import datetime
11
+ from rich.console import Console
12
+ from rich.table import Table
13
+
14
+ __NO_SERVERS_MSG = "No MATLAB-PROXY Servers are currently running."
15
+
16
+
17
+ def _extract_version_and_session(title):
18
+ """Extracts session name and MATLAB version from the title."""
19
+ parts = title.split("-")
20
+ if len(parts) < 2:
21
+ return title.replace("MATLAB ", ""), ""
22
+ session_name = parts[0].strip()
23
+ matlab_version = parts[1].strip().replace("MATLAB ", "")
24
+ return matlab_version, session_name
25
+
26
+
27
+ def _get_server_info(server):
28
+ """Helper function to parse info from server file."""
29
+ with open(server) as f:
30
+ # Assumes that the server file contains the address on the first line,
31
+ # the browser_title on the second line, and the timestamp is derived from the file's last modified time.
32
+ address = f.readline().strip()
33
+ browser_title = f.readline().strip()
34
+ matlab_version, session_name = _extract_version_and_session(browser_title)
35
+ timestamp = _get_timestamp(server)
36
+ return timestamp, matlab_version, session_name, address
37
+
38
+
39
+ def _print_server_info_as_table(servers):
40
+ console = Console()
41
+ table = Table(
42
+ title="MATLAB Proxy Servers",
43
+ title_style="cyan",
44
+ title_justify="center",
45
+ caption="No servers found." if not servers else "",
46
+ caption_style="bold red",
47
+ show_header=True,
48
+ header_style="yellow",
49
+ show_lines=True,
50
+ show_edge=True,
51
+ )
52
+ table.add_column("Created On")
53
+ table.add_column("MATLAB\nVersion")
54
+ table.add_column("Session Name")
55
+ table.add_column("Server URL", overflow="fold")
56
+
57
+ # Build server information
58
+ for server in servers:
59
+ table.add_row(*_get_server_info(server))
60
+
61
+ console.print(table)
62
+
63
+
64
+ def _get_timestamp(filename):
65
+ """Get the last modified timestamp of the file in a human-readable format."""
66
+ timestamp = os.path.getmtime(filename)
67
+ readable_time = datetime.fromtimestamp(timestamp).strftime("%d/%m/%y %H:%M:%S")
68
+ return readable_time
69
+
70
+
71
+ def print_server_info():
72
+ """Print information about all matlab-proxy servers (with version > 0.4.0) running on this machine"""
73
+ home_folder = mwi_settings.get_mwi_config_folder()
74
+
75
+ # Look for files in port folders
76
+ ports_folder = home_folder / "ports"
77
+ search_string = str(ports_folder) + "/**/mwi_server.info"
78
+ servers = sorted(glob.glob(search_string), key=os.path.getmtime)
79
+
80
+ args = mwi_util.parse_list_cli_args()
81
+
82
+ if args["quiet"]:
83
+ for server in servers:
84
+ with open(server) as f:
85
+ server_info = f.readline().strip()
86
+ print(f"{server_info}", end="\n")
87
+ else:
88
+ _print_server_info_as_table(servers)
89
+ return
@@ -213,3 +213,13 @@ class Experimental:
213
213
  def should_use_cookie_cache():
214
214
  """Returns true if the cookie jar support is enabled."""
215
215
  return _is_env_set_to_true(Experimental.get_env_name_use_cookie_cache())
216
+
217
+ @staticmethod
218
+ def get_env_name_use_rich_logging():
219
+ """Set to True to enable rich logging to console."""
220
+ return "MWI_USE_RICH_LOGGING"
221
+
222
+ @staticmethod
223
+ def use_rich_logger():
224
+ """Returns true if the cookie jar support is enabled."""
225
+ return _is_env_set_to_true(Experimental.get_env_name_use_rich_logging())
@@ -0,0 +1,215 @@
1
+ # Copyright 2020-2025 The MathWorks, Inc.
2
+ """Functions to access & control the logging behavior of the app"""
3
+
4
+ from . import environment_variables as mwi_env
5
+
6
+ from pathlib import Path
7
+ from rich.console import Console
8
+ from rich.table import Table
9
+ import logging
10
+ import os
11
+ import sys
12
+ import time
13
+
14
+ logging.getLogger("aiohttp_session").setLevel(logging.ERROR)
15
+
16
+
17
+ def get(init=False):
18
+ """Get the logger used by this application.
19
+ Set init=True to initialize the logger
20
+ Returns:
21
+ Logger: The logger used by this application.
22
+ """
23
+ if init is True:
24
+ return __set_logging_configuration()
25
+
26
+ return __get_mw_logger()
27
+
28
+
29
+ def __get_mw_logger_name():
30
+ """Name of logger used by the app
31
+
32
+ Returns:
33
+ String: The name of the Logger.
34
+ """
35
+ return "MATLABProxyApp"
36
+
37
+
38
+ def __get_mw_logger():
39
+ """Returns logger for use in this app.
40
+
41
+ Returns:
42
+ Logger: A logger object
43
+ """
44
+ return logging.getLogger(__get_mw_logger_name())
45
+
46
+
47
+ def __set_logging_configuration():
48
+ """Sets the logging environment for the app
49
+
50
+ Returns:
51
+ Logger: Logger object with the set configuration.
52
+ """
53
+ # Create the Logger for MATLABProxy
54
+ logger = __get_mw_logger()
55
+
56
+ # log_level is either set by environment or is the default value.
57
+ log_level = os.getenv(
58
+ mwi_env.get_env_name_logging_level(), __get_default_log_level()
59
+ ).upper()
60
+
61
+ if __is_invalid_log_level(log_level):
62
+ default_log_level = __get_default_log_level()
63
+ logging.warning(
64
+ f"Unknown log level '{log_level}' set. Defaulting to log level '{default_log_level}'..."
65
+ )
66
+ log_level = default_log_level
67
+
68
+ ## Set logging object
69
+ if mwi_env.Experimental.use_rich_logger():
70
+ from rich.logging import RichHandler
71
+
72
+ rich_handler = RichHandler(
73
+ keywords=[__get_mw_logger_name()],
74
+ )
75
+ rich_handler.setFormatter(logging.Formatter("%(name)s %(message)s"))
76
+ logger.addHandler(rich_handler)
77
+ else:
78
+ colored_formatter = _ColoredFormatter(
79
+ "%(color)s[%(levelname)1.1s %(asctime)s %(name)s]%(end_color)s %(message)s"
80
+ )
81
+ stream_handler = logging.StreamHandler()
82
+ stream_handler.setFormatter(colored_formatter)
83
+ logger.addHandler(stream_handler)
84
+
85
+ logger.setLevel(log_level)
86
+
87
+ log_file = os.getenv(mwi_env.get_env_name_log_file(), None)
88
+ if log_file:
89
+ try:
90
+ log_file = Path(log_file)
91
+ # Need to create the file if it doesn't exist or else logging.FileHandler
92
+ # would open it in 'write' mode instead of 'append' mode.
93
+ log_file.touch(exist_ok=True)
94
+ logger.info(f"Initializing logger with log file:{log_file}")
95
+ file_handler = logging.FileHandler(filename=log_file, mode="a")
96
+ formatter = logging.Formatter(
97
+ fmt="[%(levelname)s %(asctime)s %(name)s] %(message)s"
98
+ )
99
+ file_handler.setFormatter(formatter)
100
+ file_handler.setLevel(log_level)
101
+ logger.addHandler(file_handler)
102
+
103
+ except PermissionError:
104
+ print(
105
+ f"PermissionError: Permission denied to create log file at: {log_file}"
106
+ )
107
+ sys.exit(1)
108
+
109
+ except Exception as err:
110
+ print(f"Failed to use log file: {log_file} with error: {err}")
111
+ sys.exit(1)
112
+
113
+ return logger
114
+
115
+
116
+ def get_environment_variable_names():
117
+ """Helper to return names of environment variables queried.
118
+
119
+ Returns:
120
+ tuple: name of environment variable to control log level,
121
+ name of environment variable to control logging to file
122
+ """
123
+ __log_file_environment_variable_name = mwi_env.get_env_name_log_file()
124
+ __log_level_environment_variable_name = mwi_env.get_env_name_logging_level()
125
+ return __log_level_environment_variable_name, __log_file_environment_variable_name
126
+
127
+
128
+ def __get_default_log_level():
129
+ """The default logging level used by this application.
130
+
131
+ Returns:
132
+ String: The default logging level
133
+ """
134
+ return "INFO"
135
+
136
+
137
+ def __is_invalid_log_level(log_level):
138
+ """Helper to check if the log level is valid.
139
+
140
+ Returns:
141
+ Boolean: Whether log level exists
142
+ """
143
+
144
+ return not hasattr(logging, log_level)
145
+
146
+
147
+ def log_startup_info(title=None, matlab_url=None):
148
+ """Logs the startup information to the console and log file if specified."""
149
+ logger = __get_mw_logger()
150
+ print_as_table = False
151
+ header_info = "Access MATLAB at:"
152
+
153
+ if sys.stdout.isatty():
154
+ # Width cannot be determined in non-interactive sessions
155
+ console = Console()
156
+ # Number of additional characters used by the table
157
+ padding = 4
158
+ print_as_table = len(matlab_url) + padding <= console.width
159
+
160
+ if print_as_table:
161
+ table = Table(
162
+ caption=title,
163
+ show_header=False,
164
+ show_lines=True,
165
+ show_edge=True,
166
+ highlight=True,
167
+ expand=True,
168
+ )
169
+ table.add_column(overflow="fold", style="bold green", justify="center")
170
+ table.add_row(header_info)
171
+ table.add_row(matlab_url)
172
+ console.print(table)
173
+
174
+ if os.getenv(mwi_env.get_env_name_log_file(), None) or not print_as_table:
175
+ logger.critical(f"{header_info} {matlab_url}")
176
+
177
+
178
+ class _ColoredFormatter(logging.Formatter):
179
+ """Custom formatter to add colors based on log level and modify time format."""
180
+
181
+ def format(self, record):
182
+ # Example: Add 'color' and 'end_color' attributes based on log level
183
+ if record.levelno == logging.INFO:
184
+ record.color = "\033[32m" # Green
185
+ record.end_color = "\033[0m"
186
+ elif record.levelno == logging.DEBUG:
187
+ record.color = "\033[94m" # Blue
188
+ record.end_color = "\033[0m"
189
+ elif record.levelno == logging.WARNING:
190
+ record.color = "\033[93m" # Yellow
191
+ record.end_color = "\033[0m"
192
+ elif record.levelno == logging.ERROR:
193
+ record.color = "\033[91m" # Red
194
+ record.end_color = "\033[0m"
195
+ elif record.levelno == logging.CRITICAL:
196
+ record.color = "\033[35m" # Magenta
197
+ record.end_color = "\033[0m"
198
+ else:
199
+ record.color = ""
200
+ record.end_color = ""
201
+
202
+ # Call the original format method
203
+ return super().format(record)
204
+
205
+ def formatTime(self, record, datefmt=None):
206
+ # Default behavior of formatTime
207
+ ct = self.converter(record.created)
208
+ if datefmt:
209
+ s = time.strftime(datefmt, ct)
210
+ else:
211
+ t = time.strftime("%Y-%m-%d %H:%M:%S", ct)
212
+ s = "%s,%03d" % (t, record.msecs)
213
+
214
+ # Replace the comma with a period
215
+ return s.replace(",", ".")
@@ -70,7 +70,7 @@ def validate_mlm_license_file(nlm_connections_str):
70
70
  # regex = Start of Line, Any number of 0-9 digits , @, any number of nonwhite space characters with "- _ ." allowed
71
71
  # "^[0-9]+[@](\w|\_|\-|\.)+$"
72
72
  # Server triad is of the form : port@host1 or port@host1,port@host2,port@host3
73
- nlm_connection_str_regex = "(^[0-9]+[@](\w|\_|\-|\.)+$)"
73
+ nlm_connection_str_regex = r"(^[0-9]+[@](\w|\_|\-|\.)+$)"
74
74
  error_message = (
75
75
  f"MLM_LICENSE_FILE validation failed for {nlm_connections_str}. "
76
76
  f"If set, the MLM_LICENSE_FILE environment variable must contain server names (each of the form port@hostname) separated by ':' on unix or ';' on windows(server triads however must be comma seperated)"
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
6
6
 
7
7
  [project]
8
8
  name = "matlab-proxy"
9
- version = "0.27.1"
9
+ version = "0.27.3"
10
10
  description = "Python® package enables you to launch MATLAB® and access it from a web browser."
11
11
  readme = "README.md"
12
12
  license = "LicenseRef-MATHWORKS-CLOUD-REFERENCE-ARCHITECTURE-LICENSE"
@@ -34,13 +34,14 @@ classifiers = [
34
34
  ]
35
35
 
36
36
  dependencies = [
37
- "aiohttp>=3.7.4",
38
37
  "aiohttp_session[secure]",
39
- "psutil",
40
- "watchdog",
41
- "requests",
38
+ "aiohttp>=3.7.4",
42
39
  "importlib-metadata",
43
40
  "importlib-resources",
41
+ "psutil",
42
+ "requests",
43
+ "rich",
44
+ "watchdog",
44
45
  ]
45
46
 
46
47
  [project.urls]
@@ -1,4 +1,4 @@
1
- # Copyright 2020-2024 The MathWorks, Inc.
1
+ # Copyright 2020-2025 The MathWorks, Inc.
2
2
  """This file tests methods present in matlab_proxy/util/mwi_logger.py"""
3
3
 
4
4
  import logging
@@ -7,6 +7,13 @@ import pytest
7
7
  from matlab_proxy.util.mwi import logger as mwi_logger
8
8
 
9
9
 
10
+ @pytest.fixture
11
+ def reset_logger_handlers():
12
+ """Fixture to reset logger handlers after each test."""
13
+ logger = mwi_logger.get()
14
+ logger.handlers.clear()
15
+
16
+
10
17
  def test_get():
11
18
  """This test checks if the get method returns a logger with expected name"""
12
19
  logger = mwi_logger.get()
@@ -20,7 +27,7 @@ def test_get_mw_logger_name():
20
27
  assert "MATLABProxyApp" == mwi_logger.__get_mw_logger_name()
21
28
 
22
29
 
23
- def test_get_with_no_environment_variables(monkeypatch):
30
+ def test_get_with_no_environment_variables(monkeypatch, reset_logger_handlers):
24
31
  """This test checks if the get method returns a logger with default settings if no environment variable is set"""
25
32
  # Delete the environment variables if they do exist
26
33
  env_names_list = mwi_logger.get_environment_variable_names()
@@ -29,10 +36,10 @@ def test_get_with_no_environment_variables(monkeypatch):
29
36
 
30
37
  logger = mwi_logger.get(init=True)
31
38
  assert logger.isEnabledFor(logging.INFO) == True
32
- assert len(logger.handlers) == 0
39
+ assert len(logger.handlers) == 1
33
40
 
34
41
 
35
- def test_get_with_environment_variables(monkeypatch, tmp_path):
42
+ def test_get_with_environment_variables(monkeypatch, tmp_path, reset_logger_handlers):
36
43
  """This test checks if the get method returns a logger with the specified settings"""
37
44
  env_names_list = mwi_logger.get_environment_variable_names()
38
45
  monkeypatch.setenv(env_names_list[0], "CRITICAL")
@@ -44,8 +51,8 @@ def test_get_with_environment_variables(monkeypatch, tmp_path):
44
51
  assert logger.isEnabledFor(logging.CRITICAL) == True
45
52
 
46
53
  # Verify that environment variable setting the file is respected
47
- assert len(logger.handlers) == 1
48
- assert os.path.basename(logger.handlers[0].baseFilename) == "testing123.log"
54
+ assert len(logger.handlers) == 2
55
+ assert os.path.basename(logger.handlers[1].baseFilename) == "testing123.log"
49
56
 
50
57
 
51
58
  @pytest.mark.parametrize(
@@ -60,7 +67,7 @@ def test_get_with_environment_variables(monkeypatch, tmp_path):
60
67
  ],
61
68
  )
62
69
  def test_set_logging_configuration_known_logging_levels(
63
- monkeypatch, log_level, expected_level
70
+ monkeypatch, log_level, expected_level, reset_logger_handlers
64
71
  ):
65
72
  """This test checks if the logger is set with correct level for known log levels"""
66
73
  env_names_list = mwi_logger.get_environment_variable_names()
@@ -72,7 +79,9 @@ def test_set_logging_configuration_known_logging_levels(
72
79
 
73
80
 
74
81
  @pytest.mark.parametrize("log_level", ["ABC", "abc"])
75
- def test_set_logging_configuration_unknown_logging_levels(monkeypatch, log_level):
82
+ def test_set_logging_configuration_unknown_logging_levels(
83
+ monkeypatch, log_level, reset_logger_handlers
84
+ ):
76
85
  """This test checks if the logger is set with INFO level for unknown log levels"""
77
86
  env_names_list = mwi_logger.get_environment_variable_names()
78
87
  monkeypatch.setenv(env_names_list[0], log_level)