matlab-proxy 0.26.0__tar.gz → 0.27.1__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.
- matlab_proxy-0.27.1/.gitignore +16 -0
- {matlab_proxy-0.26.0/matlab_proxy.egg-info → matlab_proxy-0.27.1}/PKG-INFO +37 -26
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/index.jsx +7 -7
- matlab_proxy-0.27.1/gui/src/components/LicensingGatherer/MHLM.css +7 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/LicensingGatherer/MHLM.jsx +2 -3
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/MatlabJsd/index.jsx +0 -1
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/selectors/index.js +17 -3
- matlab_proxy-0.27.1/hatch_build.py +74 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/app.py +50 -39
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/app_state.py +9 -3
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/default_configuration.py +2 -2
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/settings.py +5 -5
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/util/__init__.py +2 -2
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/util/list_servers.py +2 -2
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/util/mwi/environment_variables.py +5 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/util/mwi/logger.py +1 -2
- matlab_proxy-0.27.1/matlab_proxy/util/mwi/session_name.py +28 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/util/mwi/token_auth.py +2 -2
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/util/mwi/validators.py +3 -5
- matlab_proxy-0.27.1/matlab_proxy_manager/README.md +85 -0
- matlab_proxy-0.27.1/matlab_proxy_manager/lib/README.md +53 -0
- matlab_proxy-0.27.1/matlab_proxy_manager/storage/README.md +54 -0
- matlab_proxy-0.27.1/matlab_proxy_manager/web/README.md +37 -0
- matlab_proxy-0.27.1/pyproject.toml +106 -0
- matlab_proxy-0.27.1/tests/README.md +83 -0
- matlab_proxy-0.27.1/tests/integration/pytest.ini +16 -0
- matlab_proxy-0.27.1/tests/matlab-tests/TestEvaluateUserMatlabCodeScript.m +85 -0
- matlab_proxy-0.27.1/tests/unit/__init__.py +1 -0
- matlab_proxy-0.27.1/tests/unit/fixtures/fixture_auth.py +19 -0
- matlab_proxy-0.27.1/tests/unit/mocks/mock_client.py +42 -0
- matlab_proxy-0.27.1/tests/unit/proxy-manager/lib/test_api.py +311 -0
- matlab_proxy-0.27.1/tests/unit/proxy-manager/storage/test_file_repository.py +152 -0
- matlab_proxy-0.27.1/tests/unit/proxy-manager/storage/test_server.py +237 -0
- matlab_proxy-0.27.1/tests/unit/proxy-manager/web/test_app.py +687 -0
- matlab_proxy-0.27.1/tests/unit/proxy-manager/web/test_monitor.py +120 -0
- matlab_proxy-0.27.1/tests/unit/proxy-manager/web/test_watcher.py +69 -0
- matlab_proxy-0.27.1/tests/unit/pytest.ini +16 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/unit/test_app.py +27 -5
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/unit/test_settings.py +29 -0
- matlab_proxy-0.26.0/MANIFEST.in +0 -6
- matlab_proxy-0.26.0/PKG-INFO +0 -249
- matlab_proxy-0.26.0/matlab_proxy.egg-info/SOURCES.txt +0 -190
- matlab_proxy-0.26.0/matlab_proxy.egg-info/dependency_links.txt +0 -1
- matlab_proxy-0.26.0/matlab_proxy.egg-info/entry_points.txt +0 -7
- matlab_proxy-0.26.0/matlab_proxy.egg-info/not-zip-safe +0 -1
- matlab_proxy-0.26.0/matlab_proxy.egg-info/requires.txt +0 -22
- matlab_proxy-0.26.0/matlab_proxy.egg-info/top_level.txt +0 -3
- matlab_proxy-0.26.0/setup.cfg +0 -10
- matlab_proxy-0.26.0/setup.py +0 -129
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/LICENSE.md +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/README.md +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/.eslintrc.json +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/.gitignore +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/README.md +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/eslint.config.js +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/index.css +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/index.html +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/package-lock.json +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/package.json +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/public/favicon.ico +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/public/manifest.json +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/public/robots.txt +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/actionCreators/actionCreators.spec.js +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/actionCreators/index.js +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/actions/index.js +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/3p/css/bootstrap.min.css +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/3p/css/site7.min.css +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/3p/fonts/glyphicons-halflings-regular.eot +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/3p/fonts/glyphicons-halflings-regular.svg +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/3p/fonts/glyphicons-halflings-regular.ttf +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/3p/fonts/glyphicons-halflings-regular.woff +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/3p/fonts/glyphicons-halflings-regular.woff2 +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/3p/fonts/mathworks-eps.svg +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/3p/fonts/mathworks-eps.ttf +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/3p/fonts/mathworks-eps.woff +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/3p/fonts/mathworks-pictograms.svg +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/3p/fonts/mathworks-pictograms.ttf +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/3p/fonts/mathworks-pictograms.woff +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/3p/fonts/mathworks.svg +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/3p/fonts/mathworks.ttf +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/3p/fonts/mathworks.woff +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/3p/images/bug_reports/workaround.gif +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/3p/images/responsive/global/ico-header-account-hover.svg +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/3p/images/responsive/global/ico-header-account.svg +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/3p/images/responsive/global/ico-header-contact-hover.svg +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/3p/images/responsive/global/ico-header-contact.svg +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/3p/images/responsive/global/ico-sprite.png +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/App.css +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/App.spec.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/IdleBufferTimeouts.spec.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/App/MATLAB-env-blur.png +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/Confirmation/Confirmation.spec.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/Confirmation/index.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/Controls/Controls.css +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/Controls/Controls.spec.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/Controls/feedback.svg +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/Controls/help.svg +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/Controls/index.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/Controls/restart.svg +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/Controls/sign-out.svg +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/Controls/start.svg +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/Controls/stop.svg +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/Controls/terminate.svg +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/EntitlementSelector/EntitlementSelector.spec.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/EntitlementSelector/index.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/Error/Error.css +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/Error/Error.spec.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/Error/index.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/Help/Help.css +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/Help/Help.spec.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/Help/index.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/Information/Information.css +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/Information/Information.spec.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/Information/index.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/LicensingGatherer/ExistingLicense.css +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/LicensingGatherer/ExistingLicense.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/LicensingGatherer/LicenseGatherer.spec.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/LicensingGatherer/LicensingGatherer.css +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/LicensingGatherer/NLM.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/LicensingGatherer/index.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/MatlabJsd/MatlabJsd.css +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/MatlabJsd/MatlabJsd.spec.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/Overlay/Overlay.css +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/Overlay/Overlay.spec.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/Overlay/index.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/OverlayTrigger/OverlayTrigger.css +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/OverlayTrigger/OverlayTrigger.spec.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/OverlayTrigger/ResizeOverlayTrigger.spec.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/OverlayTrigger/arrow.svg +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/OverlayTrigger/gripper.svg +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/OverlayTrigger/index.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/OverlayTrigger/trigger-error.svg +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/OverlayTrigger/trigger-ok.svg +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/ShutdownWarning/ShutdownWarning.css +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/components/ShutdownWarning/index.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/constants.js +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/main.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/reducers/index.js +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/reducers/reducers.spec.js +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/selectors/selectors.spec.js +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/setupTests.js +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/test/utils/react-test.jsx +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/test/utils/responses.js +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/src/test/utils/state.js +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/gui/vite.config.js +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/__init__.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/constants.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/devel.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/icons/matlab.svg +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/matlab/evaluateUserMatlabCode.m +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/matlab/startup.m +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/util/cookie_jar.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/util/event_loop.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/util/mw.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/util/mwi/__init__.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/util/mwi/custom_http_headers.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/util/mwi/download.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/util/mwi/embedded_connector/__init__.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/util/mwi/embedded_connector/helpers.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/util/mwi/embedded_connector/request.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/util/mwi/exceptions.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/util/system.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy/util/windows.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy_manager/__init__.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy_manager/lib/__init__.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy_manager/lib/api.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy_manager/storage/__init__.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy_manager/storage/file_repository.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy_manager/storage/interface.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy_manager/storage/server.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy_manager/utils/__init__.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy_manager/utils/auth.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy_manager/utils/constants.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy_manager/utils/environment_variables.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy_manager/utils/exceptions.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy_manager/utils/helpers.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy_manager/utils/logger.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy_manager/web/__init__.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy_manager/web/app.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy_manager/web/monitor.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/matlab_proxy_manager/web/watcher.py +0 -0
- {matlab_proxy-0.26.0/tests/unit → matlab_proxy-0.27.1/tests}/__init__.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/integration/__init__.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/integration/integration_tests_with_license/__init__.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/integration/integration_tests_with_license/conftest.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/integration/integration_tests_with_license/test_http_end_points.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/integration/integration_tests_without_license/__init__.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/integration/integration_tests_without_license/conftest.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/integration/integration_tests_without_license/test_matlab_is_down_if_unlicensed.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/integration/utils/__init__.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/integration/utils/integration_tests_utils.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/integration/utils/licensing.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/unit/conftest.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/unit/test_app_state.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/unit/test_constants.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/unit/test_ddux.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/unit/test_devel.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/unit/test_non_dev_mode.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/unit/util/__init__.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/unit/util/mwi/__init__.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/unit/util/mwi/embedded_connector/__init__.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/unit/util/mwi/embedded_connector/test_helpers.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/unit/util/mwi/embedded_connector/test_request.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/unit/util/mwi/test_custom_http_headers.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/unit/util/mwi/test_download.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/unit/util/mwi/test_logger.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/unit/util/mwi/test_token_auth.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/unit/util/mwi/test_validators.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/unit/util/test_cookie_jar.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/unit/util/test_mw.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/unit/util/test_util.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/utils/__init__.py +0 -0
- {matlab_proxy-0.26.0 → matlab_proxy-0.27.1}/tests/utils/logging_util.py +0 -0
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: matlab-proxy
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.27.1
|
|
4
4
|
Summary: Python® package enables you to launch MATLAB® and access it from a web browser.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
Project-URL: Homepage, https://github.com/mathworks/matlab-proxy/
|
|
6
|
+
Project-URL: Documentation, https://github.com/mathworks/matlab-proxy/blob/main/README.md
|
|
7
|
+
Project-URL: Issues, https://github.com/mathworks/matlab-proxy/issues
|
|
8
|
+
Author-email: "The MathWorks Inc." <cloud@mathworks.com>
|
|
9
|
+
License-Expression: LicenseRef-MATHWORKS-CLOUD-REFERENCE-ARCHITECTURE-LICENSE
|
|
10
|
+
License-File: LICENSE.md
|
|
11
|
+
Keywords: MATLAB,MATLAB Javascript Desktop,MATLAB Proxy,MATLAB Web Desktop,Proxy,Remote MATLAB Web Access
|
|
10
12
|
Classifier: Intended Audience :: Developers
|
|
11
13
|
Classifier: Natural Language :: English
|
|
12
14
|
Classifier: Programming Language :: Python
|
|
@@ -14,31 +16,40 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
14
16
|
Classifier: Programming Language :: Python :: 3.9
|
|
15
17
|
Classifier: Programming Language :: Python :: 3.10
|
|
16
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
-
Requires-Python:
|
|
18
|
-
|
|
19
|
-
License-File: LICENSE.md
|
|
19
|
+
Requires-Python: >=3.8
|
|
20
|
+
Requires-Dist: aiohttp-session[secure]
|
|
20
21
|
Requires-Dist: aiohttp>=3.7.4
|
|
21
|
-
Requires-Dist: aiohttp_session[secure]
|
|
22
22
|
Requires-Dist: importlib-metadata
|
|
23
23
|
Requires-Dist: importlib-resources
|
|
24
24
|
Requires-Dist: psutil
|
|
25
|
-
Requires-Dist: watchdog
|
|
26
25
|
Requires-Dist: requests
|
|
26
|
+
Requires-Dist: watchdog
|
|
27
27
|
Provides-Extra: dev
|
|
28
|
-
Requires-Dist: aiohttp-devtools; extra ==
|
|
29
|
-
Requires-Dist: black; extra ==
|
|
30
|
-
Requires-Dist:
|
|
31
|
-
Requires-Dist: pytest; extra ==
|
|
32
|
-
Requires-Dist: pytest-
|
|
33
|
-
Requires-Dist: pytest-
|
|
34
|
-
Requires-Dist: pytest-
|
|
35
|
-
Requires-Dist: pytest-
|
|
36
|
-
Requires-Dist: pytest-
|
|
37
|
-
Requires-Dist: pytest-
|
|
38
|
-
Requires-Dist:
|
|
39
|
-
Requires-Dist:
|
|
40
|
-
Requires-Dist:
|
|
41
|
-
|
|
28
|
+
Requires-Dist: aiohttp-devtools; extra == 'dev'
|
|
29
|
+
Requires-Dist: black; extra == 'dev'
|
|
30
|
+
Requires-Dist: psutil; extra == 'dev'
|
|
31
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
32
|
+
Requires-Dist: pytest-aiohttp; extra == 'dev'
|
|
33
|
+
Requires-Dist: pytest-asyncio==0.24.0; extra == 'dev'
|
|
34
|
+
Requires-Dist: pytest-cov; extra == 'dev'
|
|
35
|
+
Requires-Dist: pytest-env; extra == 'dev'
|
|
36
|
+
Requires-Dist: pytest-mock; extra == 'dev'
|
|
37
|
+
Requires-Dist: pytest-playwright; extra == 'dev'
|
|
38
|
+
Requires-Dist: pytest-timeout; extra == 'dev'
|
|
39
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
40
|
+
Requires-Dist: urllib3; extra == 'dev'
|
|
41
|
+
Provides-Extra: test
|
|
42
|
+
Requires-Dist: psutil; extra == 'test'
|
|
43
|
+
Requires-Dist: pytest; extra == 'test'
|
|
44
|
+
Requires-Dist: pytest-aiohttp; extra == 'test'
|
|
45
|
+
Requires-Dist: pytest-asyncio==0.24.0; extra == 'test'
|
|
46
|
+
Requires-Dist: pytest-cov; extra == 'test'
|
|
47
|
+
Requires-Dist: pytest-env; extra == 'test'
|
|
48
|
+
Requires-Dist: pytest-mock; extra == 'test'
|
|
49
|
+
Requires-Dist: pytest-playwright; extra == 'test'
|
|
50
|
+
Requires-Dist: pytest-timeout; extra == 'test'
|
|
51
|
+
Requires-Dist: urllib3; extra == 'test'
|
|
52
|
+
Description-Content-Type: text/markdown
|
|
42
53
|
|
|
43
54
|
# MATLAB Proxy
|
|
44
55
|
[](https://github.com/mathworks/matlab-proxy/actions) [](https://pypi.python.org/pypi/matlab-proxy) [](https://codecov.io/gh/mathworks/matlab-proxy) [](https://pepy.tech/project/matlab-proxy)
|
|
@@ -4,8 +4,6 @@ import React, { useState, useCallback, useEffect, useMemo, useRef } from 'react'
|
|
|
4
4
|
import { useSelector, useDispatch } from 'react-redux';
|
|
5
5
|
import { useInterval, useTimeoutFn } from 'react-use';
|
|
6
6
|
import './App.css';
|
|
7
|
-
import './3p/css/bootstrap.min.css';
|
|
8
|
-
import './3p/css/site7.min.css';
|
|
9
7
|
import Confirmation from '../Confirmation';
|
|
10
8
|
import OverlayTrigger from '../OverlayTrigger';
|
|
11
9
|
import Overlay from '../Overlay';
|
|
@@ -40,6 +38,7 @@ import {
|
|
|
40
38
|
selectMatlabStarting,
|
|
41
39
|
selectIsIdleTimeoutEnabled,
|
|
42
40
|
selectMatlabStopping,
|
|
41
|
+
selectBrowserTitle,
|
|
43
42
|
selectIntegrationName
|
|
44
43
|
} from '../../selectors';
|
|
45
44
|
|
|
@@ -54,7 +53,7 @@ import blurredBackground from './MATLAB-env-blur.png';
|
|
|
54
53
|
import EntitlementSelector from '../EntitlementSelector';
|
|
55
54
|
import { BUFFER_TIMEOUT_DURATION, MWI_AUTH_TOKEN_NAME_FOR_HTTP } from '../../constants';
|
|
56
55
|
|
|
57
|
-
function App
|
|
56
|
+
function App() {
|
|
58
57
|
const dispatch = useDispatch();
|
|
59
58
|
|
|
60
59
|
const overlayVisible = useSelector(selectOverlayVisible);
|
|
@@ -76,6 +75,7 @@ function App () {
|
|
|
76
75
|
const isConcurrencyEnabled = useSelector(selectIsConcurrencyEnabled);
|
|
77
76
|
const wasEverActive = useSelector(selectWasEverActive);
|
|
78
77
|
const integrationName = useSelector(selectIntegrationName);
|
|
78
|
+
const browserTitle = useSelector(selectBrowserTitle);
|
|
79
79
|
|
|
80
80
|
// Timeout duration is specified in seconds, but useTimeoutFn accepts timeout values in ms.
|
|
81
81
|
const idleTimeoutDurationInMS = useSelector(selectIdleTimeoutDurationInMS);
|
|
@@ -93,7 +93,7 @@ function App () {
|
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
// callback that will fire once the IDLE timer expires
|
|
96
|
-
function terminationFn
|
|
96
|
+
function terminationFn() {
|
|
97
97
|
// Reset the timer if MATLAB is either starting or stopping or is busy
|
|
98
98
|
if (isMatlabStarting || isMatlabStopping || isMatlabBusy) {
|
|
99
99
|
idleTimerReset();
|
|
@@ -303,7 +303,7 @@ function App () {
|
|
|
303
303
|
if (hasFetchedEnvConfig) {
|
|
304
304
|
const queryParams = parseQueryParams(window.location);
|
|
305
305
|
const token = queryParams.get(MWI_AUTH_TOKEN_NAME_FOR_HTTP);
|
|
306
|
-
|
|
306
|
+
document.title = `${browserTitle}`;
|
|
307
307
|
if (token) {
|
|
308
308
|
dispatch(updateAuthStatus(token));
|
|
309
309
|
}
|
|
@@ -331,7 +331,7 @@ function App () {
|
|
|
331
331
|
overlayContent = <ShutdownWarning
|
|
332
332
|
bufferTimeout={BUFFER_TIMEOUT_DURATION}
|
|
333
333
|
resumeCallback={() => {
|
|
334
|
-
|
|
334
|
+
// Restart IDLE timer
|
|
335
335
|
idleTimerReset();
|
|
336
336
|
setIdleTimerHasExpired(false);
|
|
337
337
|
|
|
@@ -386,7 +386,7 @@ function App () {
|
|
|
386
386
|
if (matlabUp) {
|
|
387
387
|
matlabJsd = (!authEnabled || isAuthenticated)
|
|
388
388
|
? (<MatlabJsd handleUserInteraction={handleUserInteraction} url={matlabUrl} iFrameRef={MatlabJsdIframeRef} shouldListenForEvents={shouldListenForEvents} />)
|
|
389
|
-
: <img style={{ objectFit: 'fill' }}src={blurredBackground} alt='Blurred MATLAB environment'/>;
|
|
389
|
+
: <img style={{ objectFit: 'fill' }} src={blurredBackground} alt='Blurred MATLAB environment' />;
|
|
390
390
|
}
|
|
391
391
|
|
|
392
392
|
const overlayTrigger = overlayVisible
|
|
@@ -13,6 +13,8 @@ import {
|
|
|
13
13
|
fetchSetLicensing
|
|
14
14
|
} from '../../actionCreators';
|
|
15
15
|
|
|
16
|
+
import './MHLM.css';
|
|
17
|
+
|
|
16
18
|
// Send a generated nonce to the login iframe
|
|
17
19
|
function setLoginNonce (username) {
|
|
18
20
|
const clientNonce = (Math.random() + '').substr(2);
|
|
@@ -150,9 +152,6 @@ function MHLM ({ mhlmLicensingInfo = null }) {
|
|
|
150
152
|
id="loginframe"
|
|
151
153
|
title="MathWorks Embedded Login"
|
|
152
154
|
type="text/html"
|
|
153
|
-
height="380"
|
|
154
|
-
width="100%"
|
|
155
|
-
frameBorder="0"
|
|
156
155
|
src={embeddedLoginUrl}
|
|
157
156
|
onLoad={handleIFrameLoaded}
|
|
158
157
|
>
|
|
@@ -260,9 +260,23 @@ export const selectIsIdleTimeoutEnabled = createSelector(
|
|
|
260
260
|
export const selectIdleTimeoutDurationInMS = createSelector(
|
|
261
261
|
selectIsIdleTimeoutEnabled,
|
|
262
262
|
selectIdleTimeoutDuration,
|
|
263
|
-
(isTimeoutEnabled, idleTimeoutDuration) => {
|
|
264
|
-
|
|
265
|
-
|
|
263
|
+
(isTimeoutEnabled, idleTimeoutDuration) => {
|
|
264
|
+
return isTimeoutEnabled
|
|
265
|
+
? idleTimeoutDuration * 1000
|
|
266
|
+
: undefined;
|
|
267
|
+
}
|
|
268
|
+
);
|
|
269
|
+
|
|
270
|
+
export const selectBrowserTitle = createSelector(
|
|
271
|
+
selectHasFetchedEnvConfig,
|
|
272
|
+
selectEnvConfig,
|
|
273
|
+
(hasFetchedEnvConfig, envConfig) => {
|
|
274
|
+
if (hasFetchedEnvConfig) {
|
|
275
|
+
return envConfig.browserTitle;
|
|
276
|
+
} else {
|
|
277
|
+
return 'MATLAB';
|
|
278
|
+
}
|
|
279
|
+
}
|
|
266
280
|
);
|
|
267
281
|
|
|
268
282
|
export const selectIntegrationName = createSelector(
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Copyright 2025 The MathWorks, Inc.
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import subprocess
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from shutil import copytree, which
|
|
7
|
+
from typing import Any, Dict
|
|
8
|
+
|
|
9
|
+
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class CustomBuildHook(BuildHookInterface):
|
|
13
|
+
# Identifier that connects this Python hook class to pyproject.toml configuration
|
|
14
|
+
PLUGIN_NAME = "custom"
|
|
15
|
+
|
|
16
|
+
def initialize(self, version: str, build_data: Dict[str, Any]) -> None:
|
|
17
|
+
"""Run npm install and build, then copy files to package."""
|
|
18
|
+
|
|
19
|
+
# Ensure npm is present
|
|
20
|
+
npm_path = which("npm")
|
|
21
|
+
if not npm_path:
|
|
22
|
+
raise Exception(
|
|
23
|
+
"npm must be installed and on the path during package build!"
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
# Adding retries to npm install to avoid transient rate limiting issues
|
|
27
|
+
npm_install = [npm_path, "install", "--fetch-retries", "10"]
|
|
28
|
+
npm_build = [npm_path, "run", "build"]
|
|
29
|
+
|
|
30
|
+
pwd = Path.cwd()
|
|
31
|
+
gui_path = pwd / "gui"
|
|
32
|
+
gui_build_path = gui_path / "build"
|
|
33
|
+
|
|
34
|
+
if not gui_path.exists():
|
|
35
|
+
raise Exception(f"GUI directory not found: {gui_path}")
|
|
36
|
+
|
|
37
|
+
# Cleanup the build folder to ensure latest artifacts are generated
|
|
38
|
+
if gui_build_path.exists():
|
|
39
|
+
import shutil
|
|
40
|
+
|
|
41
|
+
shutil.rmtree(gui_build_path)
|
|
42
|
+
|
|
43
|
+
# Change to directory where GUI files are present
|
|
44
|
+
original_cwd = str(pwd)
|
|
45
|
+
os.chdir(gui_path)
|
|
46
|
+
|
|
47
|
+
try:
|
|
48
|
+
# Install dependencies and build GUI files
|
|
49
|
+
subprocess.run(npm_install, check=True)
|
|
50
|
+
subprocess.run(npm_build, check=True)
|
|
51
|
+
finally:
|
|
52
|
+
os.chdir(original_cwd)
|
|
53
|
+
|
|
54
|
+
if not gui_build_path.exists():
|
|
55
|
+
raise Exception(f"GUI build directory not found: {gui_build_path}")
|
|
56
|
+
|
|
57
|
+
# Copy built files to a temporary location that will be included in wheel
|
|
58
|
+
temp_gui_path = pwd / "matlab_proxy" / "gui"
|
|
59
|
+
temp_gui_path.mkdir(parents=True, exist_ok=True)
|
|
60
|
+
|
|
61
|
+
# Cleanup pre-existing gui files
|
|
62
|
+
if temp_gui_path.exists():
|
|
63
|
+
import shutil
|
|
64
|
+
|
|
65
|
+
shutil.rmtree(temp_gui_path)
|
|
66
|
+
|
|
67
|
+
copytree(gui_build_path, temp_gui_path)
|
|
68
|
+
|
|
69
|
+
# Create __init__.py files to make directories into Python modules
|
|
70
|
+
(temp_gui_path / "__init__.py").touch(exist_ok=True)
|
|
71
|
+
for root, dirs, _ in os.walk(temp_gui_path):
|
|
72
|
+
for directory in dirs:
|
|
73
|
+
(Path(root) / directory / "__init__.py").touch(exist_ok=True)
|
|
74
|
+
print("Build hook step completed!")
|
|
@@ -209,6 +209,8 @@ async def get_env_config(req):
|
|
|
209
209
|
"supportedVersions": constants.SUPPORTED_MATLAB_VERSIONS,
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
+
config["browserTitle"] = state.settings["browser_title"]
|
|
213
|
+
|
|
212
214
|
# Send timeout duration for the idle timer as part of the response
|
|
213
215
|
config["idleTimeoutDuration"] = state.settings["mwi_idle_timeout"]
|
|
214
216
|
|
|
@@ -430,25 +432,38 @@ async def shutdown_integration_delete(req):
|
|
|
430
432
|
req (HTTPRequest): HTTPRequest Object
|
|
431
433
|
"""
|
|
432
434
|
state = req.app["state"]
|
|
433
|
-
|
|
434
435
|
logger.info(f"Shutting down {state.settings['integration_name']}...")
|
|
435
436
|
|
|
436
|
-
# Send response manually because this has to happen before the application exits
|
|
437
437
|
res = create_status_response(req.app, "../")
|
|
438
|
-
await res.prepare(req)
|
|
439
|
-
await res.write_eof()
|
|
440
438
|
|
|
441
|
-
#
|
|
442
|
-
|
|
443
|
-
|
|
439
|
+
# Schedule the shutdown to happen after the response is sent
|
|
440
|
+
asyncio.create_task(_shutdown_after_response(req.app))
|
|
441
|
+
|
|
442
|
+
return res
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
async def _shutdown_after_response(app):
|
|
446
|
+
# Shutdown the application after a short delay to allow the response to be fully sent
|
|
447
|
+
# back to the client before the server is stopped
|
|
448
|
+
await asyncio.sleep(0.1)
|
|
449
|
+
|
|
450
|
+
# aiohttp shutdown to be invoked before cleanup -
|
|
451
|
+
# https://docs.aiohttp.org/en/stable/web_reference.html#aiohttp.web.Application.shutdown
|
|
452
|
+
await app.shutdown()
|
|
453
|
+
await app.cleanup()
|
|
444
454
|
|
|
445
455
|
loop = util.get_event_loop()
|
|
446
|
-
# Run the current batch of coroutines in the event loop and then exit.
|
|
447
|
-
# This completes the loop.run_forever() blocking call and subsequent code
|
|
448
|
-
# in create_and_start_app() resumes execution.
|
|
449
|
-
loop.stop()
|
|
450
456
|
|
|
451
|
-
|
|
457
|
+
# Cancel remaining tasks (except this one: _shutdown_after_response)
|
|
458
|
+
running_tasks = asyncio.all_tasks(loop)
|
|
459
|
+
current_task = asyncio.current_task()
|
|
460
|
+
if current_task:
|
|
461
|
+
running_tasks.discard(current_task)
|
|
462
|
+
|
|
463
|
+
await util.cancel_tasks(running_tasks)
|
|
464
|
+
|
|
465
|
+
# Stop the event loop from this task
|
|
466
|
+
loop.call_soon_threadsafe(loop.stop)
|
|
452
467
|
|
|
453
468
|
|
|
454
469
|
# @token_auth.authenticate_access_decorator
|
|
@@ -497,15 +512,11 @@ def make_static_route_table(app):
|
|
|
497
512
|
Returns:
|
|
498
513
|
Dict: Containing information about the static files and header information.
|
|
499
514
|
"""
|
|
500
|
-
import importlib_resources
|
|
501
|
-
|
|
502
|
-
from matlab_proxy import gui
|
|
503
|
-
from matlab_proxy.gui import static
|
|
504
|
-
from matlab_proxy.gui.static import
|
|
505
|
-
css, # noqa: F401
|
|
506
|
-
js, # noqa: F401
|
|
507
|
-
media, # noqa: F401
|
|
508
|
-
)
|
|
515
|
+
import importlib_resources as resources
|
|
516
|
+
|
|
517
|
+
from matlab_proxy import gui
|
|
518
|
+
from matlab_proxy.gui import static
|
|
519
|
+
from matlab_proxy.gui.static import css, js, media
|
|
509
520
|
|
|
510
521
|
base_url = app["settings"]["base_url"]
|
|
511
522
|
|
|
@@ -513,14 +524,14 @@ def make_static_route_table(app):
|
|
|
513
524
|
|
|
514
525
|
for mod, parent in [
|
|
515
526
|
(gui.__name__, ""),
|
|
516
|
-
(
|
|
517
|
-
(
|
|
518
|
-
(
|
|
519
|
-
(
|
|
527
|
+
(static.__name__, "/static"),
|
|
528
|
+
(css.__name__, "/static/css"),
|
|
529
|
+
(js.__name__, "/static/js"),
|
|
530
|
+
(media.__name__, "/static/media"),
|
|
520
531
|
]:
|
|
521
|
-
for entry in
|
|
532
|
+
for entry in resources.files(mod).iterdir():
|
|
522
533
|
name = entry.name
|
|
523
|
-
if not
|
|
534
|
+
if not resources.files(mod).joinpath(name).is_dir():
|
|
524
535
|
if name != "__init__.py":
|
|
525
536
|
# Special case for manifest.json
|
|
526
537
|
if "manifest.json" in name:
|
|
@@ -875,8 +886,6 @@ def configure_and_start(app):
|
|
|
875
886
|
"""
|
|
876
887
|
loop = util.get_event_loop()
|
|
877
888
|
|
|
878
|
-
web_logger = None if not mwi_env.is_web_logging_enabled() else logger
|
|
879
|
-
|
|
880
889
|
# Setup the session storage,
|
|
881
890
|
# Uniqified per session to prevent multiple proxy servers on the same FQDN from interfering with each other.
|
|
882
891
|
uniqify_session_cookie = secrets.token_hex()
|
|
@@ -890,7 +899,9 @@ def configure_and_start(app):
|
|
|
890
899
|
)
|
|
891
900
|
|
|
892
901
|
# Setup runner
|
|
893
|
-
runner = web.AppRunner(
|
|
902
|
+
runner = web.AppRunner(
|
|
903
|
+
app, access_log=logger if mwi_env.is_web_logging_enabled() else None
|
|
904
|
+
)
|
|
894
905
|
loop.run_until_complete(runner.setup())
|
|
895
906
|
|
|
896
907
|
# Prepare site to start, then set port of the app.
|
|
@@ -963,7 +974,7 @@ def create_app(config_name=matlab_proxy.get_default_config_name()):
|
|
|
963
974
|
app.router.add_route("*", f"{base_url}", root_redirect)
|
|
964
975
|
|
|
965
976
|
app.router.add_route("*", f"{base_url}/{{proxyPath:.*}}", matlab_view)
|
|
966
|
-
app.
|
|
977
|
+
app.on_shutdown.append(cleanup_background_tasks)
|
|
967
978
|
|
|
968
979
|
return app
|
|
969
980
|
|
|
@@ -1013,15 +1024,15 @@ def create_and_start_app(config_name):
|
|
|
1013
1024
|
|
|
1014
1025
|
# After handling the interrupt, proceed with shutting down the server gracefully.
|
|
1015
1026
|
try:
|
|
1027
|
+
# aiohttp shutdown to be invoked before cleanup -
|
|
1028
|
+
# https://docs.aiohttp.org/en/stable/web_reference.html#aiohttp.web.Application.shutdown
|
|
1029
|
+
loop.run_until_complete(app.shutdown())
|
|
1030
|
+
loop.run_until_complete(app.cleanup())
|
|
1031
|
+
|
|
1016
1032
|
running_tasks = asyncio.all_tasks(loop)
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
app.cleanup(),
|
|
1021
|
-
util.cancel_tasks(running_tasks),
|
|
1022
|
-
return_exceptions=False,
|
|
1023
|
-
)
|
|
1024
|
-
)
|
|
1033
|
+
|
|
1034
|
+
# Gracefully cancel all running background tasks
|
|
1035
|
+
loop.run_until_complete(util.cancel_tasks(running_tasks))
|
|
1025
1036
|
|
|
1026
1037
|
except Exception:
|
|
1027
1038
|
pass
|
|
@@ -484,7 +484,7 @@ class AppState:
|
|
|
484
484
|
"'busy' status endpoint returned an invalid response, falling back to using 'ping' endpoint to determine MATLAB state"
|
|
485
485
|
)
|
|
486
486
|
warning = f"{mwi_env.get_env_name_shutdown_on_idle_timeout()} environment variable is supported only for MATLAB versions R2021a or later"
|
|
487
|
-
logger.
|
|
487
|
+
logger.warning(warning)
|
|
488
488
|
self.warnings.append(warning)
|
|
489
489
|
|
|
490
490
|
else:
|
|
@@ -896,8 +896,14 @@ class AppState:
|
|
|
896
896
|
|
|
897
897
|
mwi_server_info_file = mwi_logs_dir / "mwi_server.info"
|
|
898
898
|
mwi_auth_token_str = token_auth.get_mwi_auth_token_access_str(self.settings)
|
|
899
|
-
with open(mwi_server_info_file, "w") as fh:
|
|
900
|
-
fh.write(
|
|
899
|
+
with open(mwi_server_info_file, "w", encoding="utf-8") as fh:
|
|
900
|
+
fh.write(
|
|
901
|
+
self.settings["mwi_server_url"]
|
|
902
|
+
+ mwi_auth_token_str
|
|
903
|
+
+ "\n"
|
|
904
|
+
+ self.settings["browser_title"]
|
|
905
|
+
+ "\n"
|
|
906
|
+
)
|
|
901
907
|
self.mwi_server_session_files["mwi_server_info_file"] = mwi_server_info_file
|
|
902
908
|
logger.debug(f"Server info stored into: {mwi_server_info_file}")
|
|
903
909
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2020-
|
|
1
|
+
# Copyright 2020-2025 The MathWorks, Inc.
|
|
2
2
|
from enum import Enum
|
|
3
3
|
from typing import List
|
|
4
4
|
|
|
@@ -45,7 +45,7 @@ def get_required_config() -> List[str]:
|
|
|
45
45
|
list: A list of strings representing the required
|
|
46
46
|
configuration keys.
|
|
47
47
|
"""
|
|
48
|
-
required_keys: List[
|
|
48
|
+
required_keys: List[ConfigKeys] = [
|
|
49
49
|
ConfigKeys.DOC_URL,
|
|
50
50
|
ConfigKeys.EXT_NAME,
|
|
51
51
|
ConfigKeys.EXT_NAME_DESC,
|
|
@@ -21,7 +21,7 @@ from matlab_proxy.constants import MWI_AUTH_TOKEN_NAME_FOR_HTTP
|
|
|
21
21
|
from matlab_proxy.util import mwi, system
|
|
22
22
|
from matlab_proxy.util.cookie_jar import HttpOnlyCookieJar
|
|
23
23
|
from matlab_proxy.util.mwi import environment_variables as mwi_env
|
|
24
|
-
from matlab_proxy.util.mwi import token_auth
|
|
24
|
+
from matlab_proxy.util.mwi import token_auth, session_name
|
|
25
25
|
from matlab_proxy.util.mwi.exceptions import (
|
|
26
26
|
FatalError,
|
|
27
27
|
MatlabInstallError,
|
|
@@ -222,6 +222,7 @@ def get_dev_settings(config):
|
|
|
222
222
|
"is_windowmanager_available": False,
|
|
223
223
|
"mwi_idle_timeout": None,
|
|
224
224
|
"cookie_jar": _get_cookie_jar(),
|
|
225
|
+
"browser_title": session_name.get_browser_title("R2020b"),
|
|
225
226
|
}
|
|
226
227
|
|
|
227
228
|
|
|
@@ -288,7 +289,6 @@ def get(config_name=matlab_proxy.get_default_config_name(), dev=False):
|
|
|
288
289
|
if not settings["is_windowmanager_available"]:
|
|
289
290
|
warning = " Unable to find fluxbox on the system PATH. To use Simulink Online, add Fluxbox to the system PATH and restart matlab-proxy. For details, see https://github.com/mathworks/matlab-proxy#requirements."
|
|
290
291
|
logger.warning(warning)
|
|
291
|
-
settings["warnings"].append(warning)
|
|
292
292
|
|
|
293
293
|
settings.update(get_matlab_settings())
|
|
294
294
|
|
|
@@ -324,7 +324,6 @@ def get_server_settings(config_name):
|
|
|
324
324
|
)
|
|
325
325
|
|
|
326
326
|
cookie_jar = _get_cookie_jar()
|
|
327
|
-
|
|
328
327
|
return {
|
|
329
328
|
"create_xvfb_cmd": create_xvfb_cmd,
|
|
330
329
|
"base_url": mwi.validators.validate_base_url(
|
|
@@ -406,6 +405,7 @@ def get_matlab_settings():
|
|
|
406
405
|
**mw_licensing_urls,
|
|
407
406
|
"nlm_conn_str": nlm_conn_str,
|
|
408
407
|
"has_custom_code_to_execute": has_custom_code_to_execute,
|
|
408
|
+
"browser_title": session_name.get_browser_title(matlab_version),
|
|
409
409
|
}
|
|
410
410
|
|
|
411
411
|
|
|
@@ -499,7 +499,7 @@ def _validate_ssl_files_and_get_ssl_context(mwi_config_folder):
|
|
|
499
499
|
# Don't use SSL if the user has explicitly disabled SSL communication or not set the respective env var
|
|
500
500
|
if not is_ssl_enabled:
|
|
501
501
|
if ssl_cert_file:
|
|
502
|
-
logger.
|
|
502
|
+
logger.warning(
|
|
503
503
|
f"Ignoring provided SSL files, as {env_name_enable_ssl} is either unset or set to false"
|
|
504
504
|
)
|
|
505
505
|
return None
|
|
@@ -596,7 +596,7 @@ def generate_new_self_signed_certs(mwi_certs_dir):
|
|
|
596
596
|
f.write(cert.public_bytes(serialization.Encoding.PEM))
|
|
597
597
|
|
|
598
598
|
except Exception as ex:
|
|
599
|
-
logger.
|
|
599
|
+
logger.warning(
|
|
600
600
|
f"Failed to generate self-signed certificates, proceeding with non-secure mode! Error: {ex}"
|
|
601
601
|
)
|
|
602
602
|
cert_file = priv_key_file = None
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2020-
|
|
1
|
+
# Copyright 2020-2025 The MathWorks, Inc.
|
|
2
2
|
import argparse
|
|
3
3
|
import inspect
|
|
4
4
|
import os
|
|
@@ -312,7 +312,7 @@ class TrackingLock:
|
|
|
312
312
|
self._acquired_by = None
|
|
313
313
|
self._lock = asyncio.Lock()
|
|
314
314
|
if not purpose:
|
|
315
|
-
logger.
|
|
315
|
+
logger.warning("Provide a purpose for this instance of TrackingLock")
|
|
316
316
|
self._purpose = purpose
|
|
317
317
|
|
|
318
318
|
@property
|
|
@@ -31,8 +31,8 @@ def print_server_info():
|
|
|
31
31
|
for server in search_results:
|
|
32
32
|
server_number += 1
|
|
33
33
|
with open(server) as f:
|
|
34
|
-
server_info = f.
|
|
35
|
-
print_output += str(server_number) + ". " + str(server_info)
|
|
34
|
+
server_info = f.readline().strip()
|
|
35
|
+
print_output += str(server_number) + ". " + str(server_info) + "\n"
|
|
36
36
|
|
|
37
37
|
print_output += str(
|
|
38
38
|
mwi_util.prettify(
|
|
@@ -172,6 +172,11 @@ def get_env_name_shutdown_on_idle_timeout():
|
|
|
172
172
|
return "MWI_SHUTDOWN_ON_IDLE_TIMEOUT"
|
|
173
173
|
|
|
174
174
|
|
|
175
|
+
def get_env_name_session_name():
|
|
176
|
+
"""User specified session name for the MATLAB Proxy instance, used to set the browser title."""
|
|
177
|
+
return "MWI_SESSION_NAME"
|
|
178
|
+
|
|
179
|
+
|
|
175
180
|
class Experimental:
|
|
176
181
|
"""This class houses functions which are undocumented APIs and Environment variables.
|
|
177
182
|
Note: Never add any state to this class. Its only intended for use as an abstraction layer
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2020-
|
|
1
|
+
# Copyright 2020-2025 The MathWorks, Inc.
|
|
2
2
|
"""Functions to access & control the logging behavior of the app"""
|
|
3
3
|
|
|
4
4
|
import logging
|
|
@@ -8,7 +8,6 @@ from pathlib import Path
|
|
|
8
8
|
|
|
9
9
|
from . import environment_variables as mwi_env
|
|
10
10
|
|
|
11
|
-
|
|
12
11
|
logging.getLogger("aiohttp_session").setLevel(logging.ERROR)
|
|
13
12
|
|
|
14
13
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Copyright 2025 The MathWorks, Inc.
|
|
2
|
+
"""This file provides functions to set a session name for the MATLAB Proxy instance."""
|
|
3
|
+
|
|
4
|
+
import os
|
|
5
|
+
from matlab_proxy.util.mwi import environment_variables as mwi_env
|
|
6
|
+
from matlab_proxy.util.mwi import logger as mwi_logger
|
|
7
|
+
|
|
8
|
+
logger = mwi_logger.get()
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _get_session_name():
|
|
12
|
+
"""Get the session name for the MATLAB Proxy instance.
|
|
13
|
+
|
|
14
|
+
Returns:
|
|
15
|
+
str: returns the user-defined session name if set, otherwise returns None.
|
|
16
|
+
"""
|
|
17
|
+
return os.getenv(mwi_env.get_env_name_session_name(), None)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def get_browser_title(matlab_version) -> str:
|
|
21
|
+
"""Get the browser title for the MATLAB Proxy instance."""
|
|
22
|
+
|
|
23
|
+
browser_title = "MATLAB " + (matlab_version or "")
|
|
24
|
+
session_name = _get_session_name()
|
|
25
|
+
if session_name:
|
|
26
|
+
browser_title = session_name + " - " + browser_title
|
|
27
|
+
logger.info("Session Name set to : %s", session_name)
|
|
28
|
+
return browser_title
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2020-
|
|
1
|
+
# Copyright 2020-2025 The MathWorks, Inc.
|
|
2
2
|
|
|
3
3
|
# This file contains functions required to enable token based authentication in the server.
|
|
4
4
|
|
|
@@ -39,7 +39,7 @@ def generate_mwi_auth_token_and_hash():
|
|
|
39
39
|
|
|
40
40
|
if enable_token_auth == "false":
|
|
41
41
|
if auth_token:
|
|
42
|
-
logger.
|
|
42
|
+
logger.warning(
|
|
43
43
|
f"Ignoring {env_name_mwi_auth_token}, as {env_name_enable_mwi_token_auth} explicitly set to false"
|
|
44
44
|
)
|
|
45
45
|
return _format_token_as_dictionary(None)
|