Skip to content

Commit 5d285cf

Browse files
committed
v0.3.0 Release to PyPi
1 parent c1af423 commit 5d285cf

File tree

8 files changed

+31
-6
lines changed

8 files changed

+31
-6
lines changed

Advanced-Usage.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,27 @@ The following table describes all the environment variables that you can set to
2020
| **MWI_LOG_LEVEL** | string | `"CRITICAL"` | Specify the Python log level to be one of the following `NOTSET`, `DEBUG`, `INFO`, `WARN`, `ERROR`, or `CRITICAL`. For more information on Python log levels, see [Logging Levels](https://docs.python.org/3/library/logging.html#logging-levels) .<br />The default value is `INFO`. |
2121
| **MWI_LOG_FILE** | string | `"/tmp/logs.txt"` | Specify the full path to the file where you want the logs to be written. |
2222
| **MWI_WEB_LOGGING_ENABLED** | string | `"True"` | Set this value to `"true"` to see additional web server logs. |
23-
| **MWI_CUSTOM_HTTP_HEADERS** | string |`'{"Content-Security-Policy": "frame-ancestors *.example.com:*"}'`<br /> OR <br />`"/path/to/your/custom/http-headers.json"` |Specify valid HTTP headers as JSON data in a string format. <br /> Alternatively, specify the full path to the JSON file containing valid HTTP headers instead. These headers are injected into the HTTP response sent to the browser. </br> For more information, see the [Custom HTTP Headers](#custom_http_headers) section.|
23+
| **MWI_CUSTOM_HTTP_HEADERS** | string |`'{"Content-Security-Policy": "frame-ancestors *.example.com:*"}'`<br /> OR <br />`"/path/to/your/custom/http-headers.json"` |Specify valid HTTP headers as JSON data in a string format. <br /> Alternatively, specify the full path to the JSON file containing valid HTTP headers instead. These headers are injected into the HTTP response sent to the browser. </br> For more information, see the [Custom HTTP Headers](#custom-http-headers) section.|
2424

25+
## Usage outside of Jupyter environment
2526

26-
### Custom HTTP Headers
27+
This package can be run outside of the Jupyter environment by executing the python console script
28+
`matlab-jupyter-app`.
29+
30+
Execute this command on the machine in which MATLAB is installed with the environment variables `MWI_BASE_URL` and `MWI_APP_PORT` set as follows:
31+
```bash
32+
env MWI_BASE_URL="/my_base_url" MWI_APP_PORT=8080 matlab-jupyter-app
33+
```
34+
35+
You can then access the web server on the link
36+
```html
37+
http://localhost:8080/my_base_url/index.html
38+
```
39+
40+
These environment variables are implicitly set by the Jupyter environment, and
41+
you do not need to set them when accessing the integration through Jupyter.
42+
43+
## Custom HTTP Headers
2744
If the web browser renders the MATLAB Integration for Jupyter with some other content, then the browser could block the integration because of mismatch of `Content-Security-Policy` header in the response headers from the integration.
2845
To avoid this, provide custom HTTP headers. This allows browsers to load the content.
2946

File renamed without changes.
File renamed without changes.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Once you have a Jupyter environment with the `jupyter-matlab-proxy` package inst
1717
<img width="600" src="img/combined_launchers.png">
1818
</p>
1919

20-
3. If prompted to do so, enter credentials for a MathWorks account associated with a MATLAB license. If you are using a network license manager, change to the _Network License Manager_ tab and enter the license server address instead. To determine the appropriate method for your license type, consult [MATLAB Licensing Info](./MATLAB_Licensing_Info.md).
20+
3. If prompted to do so, enter credentials for a MathWorks account associated with a MATLAB license. If you are using a network license manager, change to the _Network License Manager_ tab and enter the license server address instead. To determine the appropriate method for your license type, consult [MATLAB Licensing Info](./MATLAB-Licensing-Info.md).
2121

2222
<p align="center">
2323
<img width="400" src="img/licensing_GUI.png">

gui/src/components/LicensingGatherer/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function LicensingGatherer() {
6262
<p id="LicensingGathererNote">
6363
For more details, see&nbsp;
6464
<a
65-
href="https://github.com/mathworks/jupyter-matlab-proxy/blob/main/MATLAB_Licensing_Info.md"
65+
href="https://github.com/mathworks/jupyter-matlab-proxy/blob/main/MATLAB-Licensing-Info.md"
6666
target="_blank"
6767
rel="noopener noreferrer"
6868
>

jupyter_matlab_proxy/app.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,14 @@ def main():
408408
logger = mwi_logger.get(init=True)
409409

410410
logger.info("Starting MATLAB proxy-app")
411+
logger.info(
412+
f" with base_url: {os.environ[mwi_env.get_env_name_base_url()]} and "
413+
f"app_port:{os.environ[mwi_env.get_env_name_app_port()]}."
414+
)
415+
if os.environ.get(mwi_env.get_env_name_mhlm_context()) is None:
416+
logger.info(
417+
f"\n The webdesktop can be accessed on http://localhost:{os.environ[mwi_env.get_env_name_app_port()]}{os.environ[mwi_env.get_env_name_base_url()]}/index.html"
418+
)
411419

412420
app = create_app()
413421

jupyter_matlab_proxy/util/mw.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def __get_licensing_url():
1919
Returns:
2020
String: Licensing URL
2121
"""
22-
return "https://github.com/mathworks/jupyter-matlab-proxy/blob/main/MATLAB_Licensing_Info.md"
22+
return "https://github.com/mathworks/jupyter-matlab-proxy/blob/main/MATLAB-Licensing-Info.md"
2323

2424

2525
async def fetch_entitlements(mhlm_api_endpoint, access_token, matlab_release):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def run(self):
5151

5252
setuptools.setup(
5353
name="jupyter-matlab-proxy",
54-
version="0.2.0",
54+
version="0.3.0",
5555
url="https://github.com/mathworks/jupyter-matlab-proxy",
5656
author="The MathWorks, Inc.",
5757
author_email="[email protected]",

0 commit comments

Comments
 (0)