Skip to content

Commit be97034

Browse files
committed
update notebook rtds
1 parent 0bb294f commit be97034

File tree

4 files changed

+4776
-734
lines changed

4 files changed

+4776
-734
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ notebook/mrn_realtime_news_notebook_app.ipynb
1313
notebook/mrn_trna_notebook_app.ipynb
1414
notebook/images/trna_process.png
1515
notebook/images/trna_process_assemble.png
16+
notebook/mrn_trna_notebook_app.ipynb
17+
notebook/mrn_trna_notebook_app_rto.ipynb
18+
notebook/cloud_mrn_notebook_app.ipynb
1619

1720
old-requirements.txt
1821
mrn_console_app_rto.py

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -84,37 +84,37 @@ The first step is to unzip or download the example project folder into a directo
8484

8585
### <a id="how_to_setup"></a>Set Up Environment
8686

87-
It is an advisable to create a dedicate Python environment to run each Python project. You can create a new Conda environment names *MRN_WEBSOCKET* with the following steps
87+
It is an advisable to create a dedicate Python environment to run each Python project. You can create a new Conda environment names *MRN_RTO* with the following steps
8888

8989
1. Open Anaconda Prompt and go to the project's folder
90-
2. Run the following command in an Anaconda Prompt to create a Conda environment named *MRN_WEBSOCKET* for the project.
90+
2. Run the following command in an Anaconda Prompt to create a Conda environment named *MRN_RTO* for the project.
9191
```
92-
(base) $>conda create --name MRN_WEBSOCKET python=3.8
92+
(base) $>conda create --name MRN_RTO python=3.8
9393
```
94-
3. Once the environment is created, activate MRN_WEBSOCKET environment with this command in Anaconda Prompt
94+
3. Once the environment is created, activate MRN_RTO environment with this command in Anaconda Prompt
9595
```
96-
(base) $>conda activate MRN_WEBSOCKET
96+
(base) $>conda activate MRN_RTO
9797
```
98-
4. Run the following command to install the dependencies in the *MRN_WEBSOCKET* environment
98+
4. Run the following command to install the dependencies in the *MRN_RTO* environment
9999
```
100-
(MRN_WEBSOCKET) $>pip install -r requirements.txt
100+
(MRN_RTO) $>pip install -r requirements.txt
101101
```
102102
### <a id="rtds_jupyter"></a>RTDS Jupyter Notebook example
103103

104104
Please be informed that your Refinitiv Real-Time Advanced Data Hub and Refinitiv Real-Time Advanced Distribution Server should have a Service that contains MRN data. The Python [Anaconda](https://www.anaconda.com/distribution/) or [MiniConda](https://docs.conda.io/en/latest/miniconda.html) distribution/package manager is highly recommended for running the JupyterLab example.
105105

106106
1. Open Anaconda Prompt and go to the project's folder
107-
2. Activate MRN_WEBSOCKET environment with this command in Anaconda Prompt
107+
2. Activate MRN_RTO environment with this command in Anaconda Prompt
108108
```
109-
(base) $>conda activate MRN_WEBSOCKET
109+
(base) $>conda activate MRN_RTO
110110
```
111-
3. Run the following command to install the JupyterLab application and pandas in the *MRN_WEBSOCKET* environment
111+
3. Run the following command to install the JupyterLab application and pandas in the *MRN_RTO* environment
112112
```
113-
(MRN_WEBSOCKET) $>conda install -c conda-forge jupyterlab pandas
113+
(MRN_RTO) $>conda install -c conda-forge jupyterlab pandas
114114
```
115115
4. In the current Anaconda Prompt, go to the project's notebook folder. Run the following command to start the JupyterLab application in the notebook folder.
116116
```
117-
(MRN_WEBSOCKET) $>jupyter lab
117+
(MRN_RTO) $>jupyter lab
118118
```
119119
5. Open *mrn_notebook_app.ipynb* Notebook document, then follow through each notebook cell.
120120

@@ -123,13 +123,13 @@ Please be informed that your Refinitiv Real-Time Advanced Data Hub and Refinitiv
123123
Please be informed that your Refinitiv Real-Time Advanced Data Hub and Refinitiv Real-Time Advanced Distribution Server should have a Service that contains MRN data.
124124

125125
1. Open Anaconda Prompt and go to the project's folder
126-
2. Activate MRN_WEBSOCKET environment with this command in Anaconda Prompt
126+
2. Activate MRN_RTO environment with this command in Anaconda Prompt
127127
```
128-
(base) $>conda activate MRN_WEBSOCKET
128+
(base) $>conda activate MRN_RTO
129129
```
130130
3. Then you can run mrn_console_app.py application with the following command
131131
```
132-
(MRN_WEBSOCKET) $> python mrn_console_app.py --hostname <Real-Time Advanced Distribution Server IP Address/Hostname> --port <WebSocket Port>
132+
(MRN_RTO) $> python mrn_console_app.py --hostname <Real-Time Advanced Distribution Server IP Address/Hostname> --port <WebSocket Port>
133133
```
134134
4. The application subscribes to ```MRN_STORNY``` RIC code from Real-Time Advanced Distribution Server by default. You can pass your interested MRN RIC code to ```--ric``` parameter on the application command line. The supported MRN RIC codes are ```MRN_STORY```, ```MRN_TRNA```, ```MRN_TRNA_DOC``` and ```MRN_TRSI``` only.
135135

mrn_console_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def on_error(ws, error):
229229
print(error)
230230

231231

232-
def on_close(ws):
232+
def on_close(ws,close_status_code, close_msg):
233233
""" Called when websocket is closed """
234234
global web_socket_open
235235
print("WebSocket Closed")

0 commit comments

Comments
 (0)