matlab-proxy 0.22.0__py3-none-any.whl → 0.23.1__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.
- matlab_proxy/app_state.py +2 -2
- matlab_proxy/default_configuration.py +39 -4
- matlab_proxy/gui/asset-manifest.json +6 -6
- matlab_proxy/gui/index.html +1 -1
- matlab_proxy/gui/static/css/{main.6cd0caba.css → main.efa05ff9.css} +2 -2
- matlab_proxy/gui/static/css/{main.6cd0caba.css.map → main.efa05ff9.css.map} +1 -1
- matlab_proxy/gui/static/js/{main.77e6cbaf.js → main.ce0f5505.js} +3 -3
- matlab_proxy/gui/static/js/main.ce0f5505.js.map +1 -0
- matlab_proxy/util/mwi/validators.py +16 -15
- {matlab_proxy-0.22.0.dist-info → matlab_proxy-0.23.1.dist-info}/METADATA +2 -2
- {matlab_proxy-0.22.0.dist-info → matlab_proxy-0.23.1.dist-info}/RECORD +18 -18
- tests/unit/test_app.py +1 -0
- tests/unit/util/mwi/test_validators.py +4 -5
- matlab_proxy/gui/static/js/main.77e6cbaf.js.map +0 -1
- /matlab_proxy/gui/static/js/{main.77e6cbaf.js.LICENSE.txt → main.ce0f5505.js.LICENSE.txt} +0 -0
- {matlab_proxy-0.22.0.dist-info → matlab_proxy-0.23.1.dist-info}/LICENSE.md +0 -0
- {matlab_proxy-0.22.0.dist-info → matlab_proxy-0.23.1.dist-info}/WHEEL +0 -0
- {matlab_proxy-0.22.0.dist-info → matlab_proxy-0.23.1.dist-info}/entry_points.txt +0 -0
- {matlab_proxy-0.22.0.dist-info → matlab_proxy-0.23.1.dist-info}/top_level.txt +0 -0
|
@@ -179,30 +179,31 @@ def validate_env_config(config):
|
|
|
179
179
|
Returns:
|
|
180
180
|
Dict: Containing data specific to the environment in which MATLAB proxy is being used in.
|
|
181
181
|
"""
|
|
182
|
-
|
|
182
|
+
from matlab_proxy.default_configuration import get_required_config
|
|
183
|
+
|
|
184
|
+
available_configs: dict = __get_configs()
|
|
183
185
|
config = config.lower()
|
|
184
186
|
|
|
185
187
|
# Check if supplied config is present in the available configs
|
|
186
188
|
if config in available_configs:
|
|
187
|
-
# Check if all keys are present in the supplied config
|
|
188
|
-
default_config_keys = available_configs[
|
|
189
|
-
matlab_proxy.get_default_config_name()
|
|
190
|
-
].keys()
|
|
191
189
|
env_config = available_configs[config]
|
|
190
|
+
required_keys = get_required_config()
|
|
192
191
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
192
|
+
# Check if all required keys are present in the supplied config
|
|
193
|
+
valid = all(key in env_config for key in required_keys)
|
|
194
|
+
if not valid:
|
|
195
|
+
error_message = (
|
|
196
|
+
f"Required key/s missing in the provided {config} configuration"
|
|
197
|
+
)
|
|
198
|
+
logger.error(error_message)
|
|
199
|
+
raise FatalError(error_message)
|
|
198
200
|
|
|
199
|
-
logger.debug(
|
|
201
|
+
logger.debug("Successfully validated provided %s configuration", config)
|
|
200
202
|
return env_config
|
|
201
203
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
raise FatalError(error_message)
|
|
204
|
+
error_message = f"{config} is not a valid config. Available configs are : {list(available_configs.keys())}"
|
|
205
|
+
logger.error(error_message)
|
|
206
|
+
raise FatalError(error_message)
|
|
206
207
|
|
|
207
208
|
|
|
208
209
|
def __get_configs():
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: matlab-proxy
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.23.1
|
|
4
4
|
Summary: Python® package enables you to launch MATLAB® and access it from a web browser.
|
|
5
5
|
Home-page: https://github.com/mathworks/matlab-proxy/
|
|
6
6
|
Author: The MathWorks, Inc.
|
|
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
18
|
Requires-Python: ~=3.8
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
|
-
Requires-Dist: aiohttp
|
|
20
|
+
Requires-Dist: aiohttp<=3.10.5,>=3.7.4
|
|
21
21
|
Requires-Dist: aiohttp-session[secure]
|
|
22
22
|
Requires-Dist: importlib-metadata
|
|
23
23
|
Requires-Dist: importlib-resources
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
matlab_proxy/__init__.py,sha256=6cwi8buKCMtw9OeWaOYUHEoqwl5MyJ_s6GxgNuqPuNg,1673
|
|
2
2
|
matlab_proxy/app.py,sha256=7BsHSM3PxTjN6eN10HLj74Y1wtu-Gl92g1RLbaTGz9U,34698
|
|
3
|
-
matlab_proxy/app_state.py,sha256=
|
|
3
|
+
matlab_proxy/app_state.py,sha256=kzgcdzU7O5AgUWtL0pPDPQxRBxpQLW0ZSpEEkZKEvHU,71298
|
|
4
4
|
matlab_proxy/constants.py,sha256=L9fhXdcGH7Eu56h0aB_TNm3d6aNFr2nP6-HyQJ96TAA,1175
|
|
5
|
-
matlab_proxy/default_configuration.py,sha256=
|
|
5
|
+
matlab_proxy/default_configuration.py,sha256=tBHaEq_bYsX2uC9pPA9mi_8M6o94ij-rxq8mbvcYpFc,1874
|
|
6
6
|
matlab_proxy/devel.py,sha256=nR6XPVBUEdQ-RZGtYvX1YHTp8gj9cuw5Hp8ahasMBc8,14310
|
|
7
7
|
matlab_proxy/settings.py,sha256=63pyCUvT7WLBRUpUr3F4r4nL13pQ2Hn6-oZODAhuGLo,26722
|
|
8
8
|
matlab_proxy/gui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
matlab_proxy/gui/asset-manifest.json,sha256=
|
|
9
|
+
matlab_proxy/gui/asset-manifest.json,sha256=VW67P_Jg7RPTCNDkMCWmphyXKJvv-KE-DjFQvQxm8aM,3516
|
|
10
10
|
matlab_proxy/gui/favicon.ico,sha256=7w7Ki1uQP2Rgwc64dOV4-NrTu97I3WsZw8OvRSoY1A0,130876
|
|
11
|
-
matlab_proxy/gui/index.html,sha256=
|
|
11
|
+
matlab_proxy/gui/index.html,sha256=QFS6XN-j7nMc8qNT6m9nJzC73St0zo76PS2e__HS5BM,637
|
|
12
12
|
matlab_proxy/gui/manifest.json,sha256=NwDbrALM5auYyj2bbEf4aGwAUDqNl1FzMFQpPiG2Ty4,286
|
|
13
13
|
matlab_proxy/gui/robots.txt,sha256=kNJLw79pisHhc3OVAimMzKcq3x9WT6sF9IS4xI0crdI,67
|
|
14
14
|
matlab_proxy/gui/static/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
15
|
matlab_proxy/gui/static/css/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
-
matlab_proxy/gui/static/css/main.
|
|
17
|
-
matlab_proxy/gui/static/css/main.
|
|
16
|
+
matlab_proxy/gui/static/css/main.efa05ff9.css,sha256=dOvmpZ0-Xez2_dwxue5yb0el7o7btgZTzzbuQZ3hnSg,269167
|
|
17
|
+
matlab_proxy/gui/static/css/main.efa05ff9.css.map,sha256=y9dh-GxZmqmtSCOwW6szE68iuVhO7gEhm80yqvRX4oU,350512
|
|
18
18
|
matlab_proxy/gui/static/js/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
|
-
matlab_proxy/gui/static/js/main.
|
|
20
|
-
matlab_proxy/gui/static/js/main.
|
|
21
|
-
matlab_proxy/gui/static/js/main.
|
|
19
|
+
matlab_proxy/gui/static/js/main.ce0f5505.js,sha256=yK_ZQcKt2MrEb4BAcFeeWmSxD82N8dmhGhxrPxNBTeE,283625
|
|
20
|
+
matlab_proxy/gui/static/js/main.ce0f5505.js.LICENSE.txt,sha256=uJRPpXtA1Wzfw2dMAUGOPgwqYk2GvDcIafoGMMNLECQ,1539
|
|
21
|
+
matlab_proxy/gui/static/js/main.ce0f5505.js.map,sha256=drUlJe9d8w69Djdw-LIdrt7sRRjZl9Zw_PaZd-MlSdo,912523
|
|
22
22
|
matlab_proxy/gui/static/media/MATLAB-env-blur.4fc94edbc82d3184e5cb.png,sha256=QpmQTLDvBu2-b7ev83Rvpt0Q72R6wdQGkuJMPPpjv7M,220290
|
|
23
23
|
matlab_proxy/gui/static/media/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
24
|
matlab_proxy/gui/static/media/arrow.0c2968b90bd9a64c8c3f.svg,sha256=XtmvDWzGZnwCZm08TKBnqt5hc1wphJnNupG0Fx_faAY,327
|
|
@@ -67,7 +67,7 @@ matlab_proxy/util/mwi/environment_variables.py,sha256=sOfmL8PjQONgkJdegdotLbsqHs
|
|
|
67
67
|
matlab_proxy/util/mwi/exceptions.py,sha256=3jklFU6br2_pSSsATCRDY3A5fTzk6ekJ4M69sunwxBk,5114
|
|
68
68
|
matlab_proxy/util/mwi/logger.py,sha256=EHHr6OWlXe6yVX0RPh57HSE7lz6MhWmwLQIpe_SlsC0,3803
|
|
69
69
|
matlab_proxy/util/mwi/token_auth.py,sha256=UbIWqo7qADaZdijFvorLYsZbxzaB8TycGP8nk305ru0,9997
|
|
70
|
-
matlab_proxy/util/mwi/validators.py,sha256=
|
|
70
|
+
matlab_proxy/util/mwi/validators.py,sha256=CQnwf2kIm-bApSYClasbJCIWP-2ZxBNGn0X4B1U-2_0,12632
|
|
71
71
|
matlab_proxy/util/mwi/embedded_connector/__init__.py,sha256=Vfl2hNC7V1IwoK9_wrwfENs4BC8P-Mvvqh4BNGi2n48,119
|
|
72
72
|
matlab_proxy/util/mwi/embedded_connector/helpers.py,sha256=aOn-AvcDy6jBQJIffiv_agIa4UVldAIl3--QnDpXWDM,3656
|
|
73
73
|
matlab_proxy/util/mwi/embedded_connector/request.py,sha256=-IzTDjy3qViHfLJpK3OnFtEyV7dgwJKPQAfav9lqILc,4317
|
|
@@ -100,7 +100,7 @@ tests/integration/utils/integration_tests_utils.py,sha256=IbJ9CedFHiz3k85FBY-8Gw
|
|
|
100
100
|
tests/integration/utils/licensing.py,sha256=rEBjvMXO8R3mL6KnePu2lojmOsjD4GXl9frf9N0Wacs,4842
|
|
101
101
|
tests/unit/__init__.py,sha256=KfwQxxM5a1kMRtNbhz8tb7YfHp8e2d0tNLB55wYvDS8,37
|
|
102
102
|
tests/unit/conftest.py,sha256=Hfxq3h8IZuLJkRMh5jdEFiq78CIAdKvm-6KryRDZ0FY,1918
|
|
103
|
-
tests/unit/test_app.py,sha256=
|
|
103
|
+
tests/unit/test_app.py,sha256=pM8zVyXWLx8nP8RePusXH4admEBYKc5JC8eE2t8xIQE,38487
|
|
104
104
|
tests/unit/test_app_state.py,sha256=ZtM79HAe5W6pVVWV-NICjDJBlmuxJ4NnZn-urGGtH-E,33429
|
|
105
105
|
tests/unit/test_constants.py,sha256=2nXxTmDP8utr8krsfZ4c_Bh4_mWPcDO5uI8MXeq4Usg,158
|
|
106
106
|
tests/unit/test_ddux.py,sha256=a2J2iM8j_nnfJVuMI38p5AjwrRdoMj3N88gFgS2I4hg,713
|
|
@@ -115,15 +115,15 @@ tests/unit/util/mwi/test_custom_http_headers.py,sha256=UfrhclS0j6WhShtg1ki2oF1kK
|
|
|
115
115
|
tests/unit/util/mwi/test_download.py,sha256=jYwPJFYGrPKqnkIJW42XYSe1fowmzChAkOx0k0xVldo,4779
|
|
116
116
|
tests/unit/util/mwi/test_logger.py,sha256=2VFoVlMLgsSWtDn0iVxHNArGBfN-IgWehuoaLvWlS6U,3151
|
|
117
117
|
tests/unit/util/mwi/test_token_auth.py,sha256=-eBsaQ5JC7pyd9PXt48Rqs4cWjg6I-eOkp_gFVEwYhk,10538
|
|
118
|
-
tests/unit/util/mwi/test_validators.py,sha256=
|
|
118
|
+
tests/unit/util/mwi/test_validators.py,sha256=lJy9rEXCULRrp9wxv9KXUjtlTFbchqTefxGLUg_n3S8,11452
|
|
119
119
|
tests/unit/util/mwi/embedded_connector/__init__.py,sha256=pl5jqyCHEwZEviiL8OC-SHulb1rBecstQCFF6qVjL9Y,37
|
|
120
120
|
tests/unit/util/mwi/embedded_connector/test_helpers.py,sha256=vYTWNUTuDeaygo16JGMTvWeI_CLOnvPkwNJmLndvJhE,890
|
|
121
121
|
tests/unit/util/mwi/embedded_connector/test_request.py,sha256=PR-jddnXDEiip-lD7A_QSvRwEkwo3eQ8owZlk-r9vnk,1867
|
|
122
122
|
tests/utils/__init__.py,sha256=ttzJ8xKWGxOJZz56qOiWOn6sp5LGomkZMn_w4KJLRMU,42
|
|
123
123
|
tests/utils/logging_util.py,sha256=VBy_NRvwau3C_CVTBjK5RMROrQimnJYHO2U0aKSZiRw,2234
|
|
124
|
-
matlab_proxy-0.
|
|
125
|
-
matlab_proxy-0.
|
|
126
|
-
matlab_proxy-0.
|
|
127
|
-
matlab_proxy-0.
|
|
128
|
-
matlab_proxy-0.
|
|
129
|
-
matlab_proxy-0.
|
|
124
|
+
matlab_proxy-0.23.1.dist-info/LICENSE.md,sha256=oF0h3UdSF-rlUiMGYwi086ZHqelzz7yOOk9HFDv9ELo,2344
|
|
125
|
+
matlab_proxy-0.23.1.dist-info/METADATA,sha256=T9odF5XgnV7G2o8ETI3vvLvYCCGBu8WqSbF_b9vAWYY,10199
|
|
126
|
+
matlab_proxy-0.23.1.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
|
127
|
+
matlab_proxy-0.23.1.dist-info/entry_points.txt,sha256=ZAlCUsgKzGcAeQaMZOq31FrTB5tQ8Ypq8Op_8U600-A,305
|
|
128
|
+
matlab_proxy-0.23.1.dist-info/top_level.txt,sha256=KF-347aoRGsfHTpiSqfIPUZ95bzK5-oMIu8S_TUcu-w,40
|
|
129
|
+
matlab_proxy-0.23.1.dist-info/RECORD,,
|
tests/unit/test_app.py
CHANGED
|
@@ -317,6 +317,7 @@ async def test_get_env_config(test_server):
|
|
|
317
317
|
"doc_url": "foo",
|
|
318
318
|
"extension_name": "bar",
|
|
319
319
|
"extension_name_short_description": "foobar",
|
|
320
|
+
"should_show_shutdown_button": True,
|
|
320
321
|
"isConcurrencyEnabled": "foobar",
|
|
321
322
|
"idleTimeoutDuration": 100,
|
|
322
323
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
# Copyright 2020-
|
|
1
|
+
# Copyright 2020-2024 The MathWorks, Inc.
|
|
2
2
|
|
|
3
|
-
"""Tests for functions in matlab_proxy/util/mwi_validators.py
|
|
4
|
-
"""
|
|
3
|
+
"""Tests for functions in matlab_proxy/util/mwi_validators.py"""
|
|
5
4
|
|
|
6
5
|
import os
|
|
7
6
|
import random
|
|
@@ -185,8 +184,8 @@ def test_validate_env_config_true():
|
|
|
185
184
|
def test_validate_env_config_false():
|
|
186
185
|
"""Passing a non existent config should raise FatalError exception"""
|
|
187
186
|
|
|
188
|
-
with pytest.raises(FatalError)
|
|
189
|
-
|
|
187
|
+
with pytest.raises(FatalError):
|
|
188
|
+
validators.validate_env_config(str(random.randint(10, 100)))
|
|
190
189
|
|
|
191
190
|
|
|
192
191
|
def test_get_configs():
|