matlab-proxy 0.25.1__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 (63) hide show
  1. matlab_proxy/app.py +68 -16
  2. matlab_proxy/app_state.py +8 -2
  3. matlab_proxy/constants.py +1 -0
  4. matlab_proxy/default_configuration.py +2 -2
  5. matlab_proxy/gui/index.html +1 -1
  6. matlab_proxy/gui/static/js/{index.CZgGkMCD.js → index.BcDShXfH.js} +16 -16
  7. matlab_proxy/settings.py +24 -2
  8. matlab_proxy/util/cookie_jar.py +72 -0
  9. matlab_proxy/util/list_servers.py +2 -2
  10. matlab_proxy/util/mwi/environment_variables.py +15 -0
  11. matlab_proxy/util/mwi/session_name.py +28 -0
  12. matlab_proxy/util/mwi/validators.py +2 -4
  13. {matlab_proxy-0.25.1.dist-info → matlab_proxy-0.27.0.dist-info}/METADATA +37 -23
  14. {matlab_proxy-0.25.1.dist-info → matlab_proxy-0.27.0.dist-info}/RECORD +29 -56
  15. {matlab_proxy-0.25.1.dist-info → matlab_proxy-0.27.0.dist-info}/WHEEL +1 -2
  16. matlab_proxy_manager/README.md +85 -0
  17. matlab_proxy_manager/lib/README.md +53 -0
  18. matlab_proxy_manager/lib/api.py +156 -114
  19. matlab_proxy_manager/storage/README.md +54 -0
  20. matlab_proxy_manager/storage/server.py +5 -2
  21. matlab_proxy_manager/utils/constants.py +2 -1
  22. matlab_proxy_manager/utils/environment_variables.py +6 -1
  23. matlab_proxy_manager/utils/exceptions.py +45 -0
  24. matlab_proxy_manager/utils/helpers.py +2 -2
  25. matlab_proxy_manager/utils/logger.py +4 -1
  26. matlab_proxy_manager/web/README.md +37 -0
  27. matlab_proxy_manager/web/app.py +71 -19
  28. matlab_proxy-0.25.1.dist-info/top_level.txt +0 -3
  29. tests/integration/__init__.py +0 -1
  30. tests/integration/integration_tests_with_license/__init__.py +0 -1
  31. tests/integration/integration_tests_with_license/conftest.py +0 -47
  32. tests/integration/integration_tests_with_license/test_http_end_points.py +0 -397
  33. tests/integration/integration_tests_without_license/__init__.py +0 -1
  34. tests/integration/integration_tests_without_license/conftest.py +0 -116
  35. tests/integration/integration_tests_without_license/test_matlab_is_down_if_unlicensed.py +0 -49
  36. tests/integration/utils/__init__.py +0 -1
  37. tests/integration/utils/integration_tests_utils.py +0 -352
  38. tests/integration/utils/licensing.py +0 -152
  39. tests/unit/__init__.py +0 -1
  40. tests/unit/conftest.py +0 -66
  41. tests/unit/test_app.py +0 -1200
  42. tests/unit/test_app_state.py +0 -1094
  43. tests/unit/test_constants.py +0 -7
  44. tests/unit/test_ddux.py +0 -22
  45. tests/unit/test_devel.py +0 -246
  46. tests/unit/test_non_dev_mode.py +0 -169
  47. tests/unit/test_settings.py +0 -659
  48. tests/unit/util/__init__.py +0 -3
  49. tests/unit/util/mwi/__init__.py +0 -1
  50. tests/unit/util/mwi/embedded_connector/__init__.py +0 -1
  51. tests/unit/util/mwi/embedded_connector/test_helpers.py +0 -29
  52. tests/unit/util/mwi/embedded_connector/test_request.py +0 -64
  53. tests/unit/util/mwi/test_custom_http_headers.py +0 -281
  54. tests/unit/util/mwi/test_download.py +0 -152
  55. tests/unit/util/mwi/test_logger.py +0 -82
  56. tests/unit/util/mwi/test_token_auth.py +0 -303
  57. tests/unit/util/mwi/test_validators.py +0 -364
  58. tests/unit/util/test_mw.py +0 -550
  59. tests/unit/util/test_util.py +0 -221
  60. tests/utils/__init__.py +0 -1
  61. tests/utils/logging_util.py +0 -81
  62. {matlab_proxy-0.25.1.dist-info → matlab_proxy-0.27.0.dist-info}/entry_points.txt +0 -0
  63. {matlab_proxy-0.25.1.dist-info → matlab_proxy-0.27.0.dist-info/licenses}/LICENSE.md +0 -0
tests/unit/conftest.py DELETED
@@ -1,66 +0,0 @@
1
- # Copyright 2020-2022 The MathWorks, Inc.
2
-
3
- """The conftest.py file is run by the pytest framework for setting things up for the test session."""
4
-
5
- import os
6
- import shutil
7
- import asyncio
8
-
9
- import pytest
10
- from matlab_proxy import settings, util
11
- from matlab_proxy.util.mwi import environment_variables as mwi_env
12
-
13
-
14
- def pytest_generate_tests(metafunc):
15
- os.environ[mwi_env.get_env_name_development()] = "true"
16
-
17
-
18
- def __get_matlab_config_file():
19
- return settings.get(dev=True)["matlab_config_file"]
20
-
21
-
22
- def __delete_matlab_config_file():
23
- os.remove(__get_matlab_config_file())
24
-
25
-
26
- @pytest.fixture(autouse=True, scope="session")
27
- def pre_test_cleanup():
28
- """A pytest fixture which deletes matlab_config_file before executing tests.
29
-
30
- If a previous pytest run fails, this file may have an empty Dict which leads
31
- to the server never starting up matlab.
32
- """
33
- try:
34
- __delete_matlab_config_file()
35
- except FileNotFoundError:
36
- pass
37
-
38
-
39
- @pytest.fixture(scope="session", autouse=True)
40
- def cleanup(request):
41
- """Cleanup the temp directory once we are finished."""
42
-
43
- def delete_matlab_test_dir():
44
- # Delete matlab_config_file & its owning directory
45
- matlab_config_file = __get_matlab_config_file()
46
- matlab_config_dir = os.path.dirname(matlab_config_file)
47
- try:
48
- shutil.rmtree(matlab_config_dir)
49
- except FileNotFoundError:
50
- pass
51
-
52
- request.addfinalizer(delete_matlab_test_dir)
53
-
54
-
55
- @pytest.fixture(scope="session")
56
- def event_loop():
57
- """Overriding the default event loop of pytest. Intended for windows systems for
58
- python <= 3.7 where WindowsSelectorEvent Loop is the default event loop. For
59
- python >= 3.8, WindowsProactorEvent Loop is the default.
60
-
61
- Yields:
62
- asyncio.loop: WindowsProactorEvent loop in Windows or UnixSelectorEventLoop in posix.
63
- """
64
- loop = util.get_event_loop()
65
- yield loop
66
- loop.close()