matlab-proxy 0.26.0__py3-none-any.whl → 0.27.0__py3-none-any.whl

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 (54) hide show
  1. matlab_proxy/app.py +13 -15
  2. matlab_proxy/app_state.py +8 -2
  3. matlab_proxy/default_configuration.py +2 -2
  4. matlab_proxy/gui/index.html +1 -1
  5. matlab_proxy/gui/static/js/{index.CZgGkMCD.js → index.BcDShXfH.js} +16 -16
  6. matlab_proxy/settings.py +3 -2
  7. matlab_proxy/util/list_servers.py +2 -2
  8. matlab_proxy/util/mwi/environment_variables.py +5 -0
  9. matlab_proxy/util/mwi/session_name.py +28 -0
  10. matlab_proxy/util/mwi/validators.py +2 -4
  11. {matlab_proxy-0.26.0.dist-info → matlab_proxy-0.27.0.dist-info}/METADATA +37 -25
  12. {matlab_proxy-0.26.0.dist-info → matlab_proxy-0.27.0.dist-info}/RECORD +19 -49
  13. {matlab_proxy-0.26.0.dist-info → matlab_proxy-0.27.0.dist-info}/WHEEL +1 -2
  14. matlab_proxy_manager/README.md +85 -0
  15. matlab_proxy_manager/lib/README.md +53 -0
  16. matlab_proxy_manager/storage/README.md +54 -0
  17. matlab_proxy_manager/web/README.md +37 -0
  18. matlab_proxy-0.26.0.dist-info/top_level.txt +0 -3
  19. tests/integration/__init__.py +0 -1
  20. tests/integration/integration_tests_with_license/__init__.py +0 -1
  21. tests/integration/integration_tests_with_license/conftest.py +0 -47
  22. tests/integration/integration_tests_with_license/test_http_end_points.py +0 -397
  23. tests/integration/integration_tests_without_license/__init__.py +0 -1
  24. tests/integration/integration_tests_without_license/conftest.py +0 -116
  25. tests/integration/integration_tests_without_license/test_matlab_is_down_if_unlicensed.py +0 -49
  26. tests/integration/utils/__init__.py +0 -1
  27. tests/integration/utils/integration_tests_utils.py +0 -352
  28. tests/integration/utils/licensing.py +0 -152
  29. tests/unit/__init__.py +0 -1
  30. tests/unit/conftest.py +0 -66
  31. tests/unit/test_app.py +0 -1299
  32. tests/unit/test_app_state.py +0 -1094
  33. tests/unit/test_constants.py +0 -7
  34. tests/unit/test_ddux.py +0 -22
  35. tests/unit/test_devel.py +0 -246
  36. tests/unit/test_non_dev_mode.py +0 -169
  37. tests/unit/test_settings.py +0 -679
  38. tests/unit/util/__init__.py +0 -3
  39. tests/unit/util/mwi/__init__.py +0 -1
  40. tests/unit/util/mwi/embedded_connector/__init__.py +0 -1
  41. tests/unit/util/mwi/embedded_connector/test_helpers.py +0 -29
  42. tests/unit/util/mwi/embedded_connector/test_request.py +0 -64
  43. tests/unit/util/mwi/test_custom_http_headers.py +0 -281
  44. tests/unit/util/mwi/test_download.py +0 -152
  45. tests/unit/util/mwi/test_logger.py +0 -82
  46. tests/unit/util/mwi/test_token_auth.py +0 -303
  47. tests/unit/util/mwi/test_validators.py +0 -364
  48. tests/unit/util/test_cookie_jar.py +0 -252
  49. tests/unit/util/test_mw.py +0 -550
  50. tests/unit/util/test_util.py +0 -221
  51. tests/utils/__init__.py +0 -1
  52. tests/utils/logging_util.py +0 -81
  53. {matlab_proxy-0.26.0.dist-info → matlab_proxy-0.27.0.dist-info}/entry_points.txt +0 -0
  54. {matlab_proxy-0.26.0.dist-info → matlab_proxy-0.27.0.dist-info/licenses}/LICENSE.md +0 -0
matlab_proxy/app.py CHANGED
@@ -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
 
@@ -497,15 +499,11 @@ def make_static_route_table(app):
497
499
  Returns:
498
500
  Dict: Containing information about the static files and header information.
499
501
  """
500
- import importlib_resources
501
-
502
- from matlab_proxy import gui # noqa: F401
503
- from matlab_proxy.gui import static # noqa: F401
504
- from matlab_proxy.gui.static import (
505
- css, # noqa: F401
506
- js, # noqa: F401
507
- media, # noqa: F401
508
- )
502
+ import importlib_resources as resources
503
+
504
+ from matlab_proxy import gui
505
+ from matlab_proxy.gui import static
506
+ from matlab_proxy.gui.static import css, js, media
509
507
 
510
508
  base_url = app["settings"]["base_url"]
511
509
 
@@ -513,14 +511,14 @@ def make_static_route_table(app):
513
511
 
514
512
  for mod, parent in [
515
513
  (gui.__name__, ""),
516
- (gui.static.__name__, "/static"),
517
- (gui.static.css.__name__, "/static/css"),
518
- (gui.static.js.__name__, "/static/js"),
519
- (gui.static.media.__name__, "/static/media"),
514
+ (static.__name__, "/static"),
515
+ (css.__name__, "/static/css"),
516
+ (js.__name__, "/static/js"),
517
+ (media.__name__, "/static/media"),
520
518
  ]:
521
- for entry in importlib_resources.files(mod).iterdir():
519
+ for entry in resources.files(mod).iterdir():
522
520
  name = entry.name
523
- if not importlib_resources.files(mod).joinpath(name).is_dir():
521
+ if not resources.files(mod).joinpath(name).is_dir():
524
522
  if name != "__init__.py":
525
523
  # Special case for manifest.json
526
524
  if "manifest.json" in name:
matlab_proxy/app_state.py CHANGED
@@ -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(self.settings["mwi_server_url"] + mwi_auth_token_str + "\n")
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-2024 The MathWorks, Inc.
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[str] = [
48
+ required_keys: List[ConfigKeys] = [
49
49
  ConfigKeys.DOC_URL,
50
50
  ConfigKeys.EXT_NAME,
51
51
  ConfigKeys.EXT_NAME_DESC,
@@ -11,7 +11,7 @@
11
11
  <meta name="internal_mw_identifier" content="MWI_MATLAB_PROXY_IDENTIFIER" />
12
12
  <link rel="manifest" href="./manifest.json" />
13
13
  <title>MATLAB</title>
14
- <script type="module" crossorigin src="./static/js/index.CZgGkMCD.js"></script>
14
+ <script type="module" crossorigin src="./static/js/index.BcDShXfH.js"></script>
15
15
  <link rel="stylesheet" crossorigin href="./static/css/index.BSVLACuY.css">
16
16
  </head>
17
17
  <body>