Skip to content

Commit 59b1d94

Browse files
authored
Pre-release 0.3.1 (#42)
1 parent 90ad158 commit 59b1d94

File tree

12 files changed

+34
-21
lines changed

12 files changed

+34
-21
lines changed

.github/locks/docs/linux-64/conda.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ https://conda.anaconda.org/conda-forge/noarch/typing_extensions-3.7.4.3-py_0.tar
6868
https://conda.anaconda.org/conda-forge/noarch/webencodings-0.5.1-py_1.tar.bz2#3563be4c5611a44210d9ba0c16113136
6969
https://conda.anaconda.org/conda-forge/noarch/wheel-0.36.2-pyhd3deb0d_0.tar.bz2#768bfbe026426d0e76b377997d1f2b98
7070
https://conda.anaconda.org/conda-forge/noarch/zipp-3.4.1-pyhd8ed1ab_0.tar.bz2#a4fa30eb74a326092b3d8078b1f1aae1
71-
https://conda.anaconda.org/conda-forge/noarch/babel-2.9.0-pyhd3deb0d_0.tar.bz2#1cb532c9a6fd4e56a9f0906b87c17b76
71+
https://conda.anaconda.org/conda-forge/noarch/babel-2.9.1-pyh44b312d_0.tar.bz2#74136ed39bfea0832d338df1e58d013e
7272
https://conda.anaconda.org/conda-forge/noarch/beautifulsoup4-4.9.3-pyhb0f4dca_0.tar.bz2#d243a293d7303ab6195d96ce8c16b1cb
7373
https://conda.anaconda.org/conda-forge/linux-64/certifi-2020.12.5-py36h5fab9bb_1.tar.bz2#da529031bd8882eff7d72484661c1b83
7474
https://conda.anaconda.org/conda-forge/linux-64/cffi-1.14.5-py36hc120d54_0.tar.bz2#f49c72aeb497efcd918217d142ddfc9c

.github/locks/lint/linux-64/conda.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ https://conda.anaconda.org/conda-forge/linux-64/regex-2021.4.4-py38h497a2fe_0.ta
5050
https://conda.anaconda.org/conda-forge/noarch/robotframework-lint-1.1-pyh9f0ad1d_0.tar.bz2#c3fa280c4a10c06e83f23193ef4ea5cc
5151
https://conda.anaconda.org/conda-forge/noarch/robotframework-pythonlibcore-2.2.0-pyhd8ed1ab_0.tar.bz2#29a329f0b817038d27d7bdfb2ca04b5a
5252
https://conda.anaconda.org/conda-forge/linux-64/typed-ast-1.4.3-py38h497a2fe_0.tar.bz2#f4a5eeaccf5c5bab10491071ea2e32b1
53-
https://conda.anaconda.org/conda-forge/noarch/black-21.4b0-pyhd8ed1ab_0.tar.bz2#2e836ca8292cb164d8527d64cda3fdc3
53+
https://conda.anaconda.org/conda-forge/noarch/black-21.4b2-pyhd8ed1ab_0.tar.bz2#4f2d99eb5db5311952a043bf646c199f
5454
https://conda.anaconda.org/conda-forge/linux-64/brotlipy-0.7.0-py38h497a2fe_1001.tar.bz2#56753dd777a6517b34966ddcb39af734
5555
https://conda.anaconda.org/conda-forge/linux-64/cryptography-3.4.7-py38ha5dfef3_0.tar.bz2#a8b014aba670157256dabdc885f71af4
5656
https://conda.anaconda.org/conda-forge/linux-64/doit-0.33.1-py38h32f6830_1.tar.bz2#c3a34ba48a004ab17e926f72f13ca488

.github/locks/meta/linux-64/conda.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,5 +109,5 @@ https://conda.anaconda.org/conda-forge/noarch/ensureconda-1.4.1-pyhd8ed1ab_0.tar
109109
https://conda.anaconda.org/conda-forge/noarch/requests-toolbelt-0.9.1-py_0.tar.bz2#402668adee8fcba9a9c265cdc2a88f5a
110110
https://conda.anaconda.org/conda-forge/linux-64/conda-build-3.21.4-py39hf3d152e_0.tar.bz2#fced48eb5f382639bb4d0af18117e429
111111
https://conda.anaconda.org/conda-forge/noarch/conda-lock-0.9.1-pyhd8ed1ab_0.tar.bz2#c918c8071db1665663a46371b0a46620
112-
https://conda.anaconda.org/conda-forge/linux-64/mamba-0.12.0-py39h951de11_0.tar.bz2#458d59975c8f03fdef40f0e599489653
112+
https://conda.anaconda.org/conda-forge/linux-64/mamba-0.12.1-py39h951de11_0.tar.bz2#982a9076cfd28e53f24e1a8614bb140f
113113
https://conda.anaconda.org/conda-forge/noarch/twine-3.4.1-pyhd8ed1ab_0.tar.bz2#c7d4ab21a13c919f9ae59eae7bcebf2a

.github/locks/test/linux-64/py3.9/lab3/conda.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ https://conda.anaconda.org/conda-forge/noarch/testpath-0.4.4-py_0.tar.bz2#3b98ff
5757
https://conda.anaconda.org/conda-forge/noarch/webencodings-0.5.1-py_1.tar.bz2#3563be4c5611a44210d9ba0c16113136
5858
https://conda.anaconda.org/conda-forge/noarch/wheel-0.36.2-pyhd3deb0d_0.tar.bz2#768bfbe026426d0e76b377997d1f2b98
5959
https://conda.anaconda.org/conda-forge/noarch/zipp-3.4.1-pyhd8ed1ab_0.tar.bz2#a4fa30eb74a326092b3d8078b1f1aae1
60-
https://conda.anaconda.org/conda-forge/noarch/babel-2.9.0-pyhd3deb0d_0.tar.bz2#1cb532c9a6fd4e56a9f0906b87c17b76
60+
https://conda.anaconda.org/conda-forge/noarch/babel-2.9.1-pyh44b312d_0.tar.bz2#74136ed39bfea0832d338df1e58d013e
6161
https://conda.anaconda.org/conda-forge/linux-64/certifi-2020.12.5-py39hf3d152e_1.tar.bz2#83afa403caafd7ef3162385cca9bce13
6262
https://conda.anaconda.org/conda-forge/linux-64/cffi-1.14.5-py39he32792d_0.tar.bz2#b561e1fad1fc8bb343064bd5497444bb
6363
https://conda.anaconda.org/conda-forge/linux-64/chardet-4.0.0-py39hf3d152e_1.tar.bz2#d0da429a3428ffcacaad25595b96a648
@@ -112,7 +112,7 @@ https://conda.anaconda.org/conda-forge/linux-64/ipykernel-5.5.3-py39hef51801_0.t
112112
https://conda.anaconda.org/conda-forge/linux-64/jupyter_server-1.6.4-py39hf3d152e_0.tar.bz2#49e35c5dca28ce4efde9346ba608d6d7
113113
https://conda.anaconda.org/conda-forge/noarch/jupyterlab_server-2.5.0-pyhd8ed1ab_0.tar.bz2#5de37a58281ec57b3abc1eecc6db1012
114114
https://conda.anaconda.org/conda-forge/noarch/notebook-6.3.0-pyha770c72_1.tar.bz2#6a53111a5a62d32abfa21aac8fc55a1b
115-
https://conda.anaconda.org/conda-forge/noarch/voila-0.2.9-pyhd8ed1ab_0.tar.bz2#fc25ed20c77360028cc38cab6391ea4b
115+
https://conda.anaconda.org/conda-forge/noarch/voila-0.2.10-pyhd8ed1ab_0.tar.bz2#3ac331314316886a570fe6cbb668dd0c
116116
https://conda.anaconda.org/conda-forge/noarch/nbclassic-0.2.7-pyhd8ed1ab_0.tar.bz2#cf4723f3178fb1cae4f7bf8e31db0e38
117117
https://conda.anaconda.org/conda-forge/linux-64/widgetsnbextension-3.5.1-py39hf3d152e_4.tar.bz2#ae54c7d751b678c0021929892d598ecd
118118
https://conda.anaconda.org/conda-forge/noarch/ipywidgets-7.6.3-pyhd3deb0d_0.tar.bz2#536a9ed6d9e740f2b83d1a3c388e4388

atest/lab/10_notebook.robot

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ IPython Notebook on Lab
1212
Add and Run JupyterLab Code Cell print("hello world")
1313
Wait Until JupyterLab Kernel Is Idle
1414
Current JupyterLab Cell Output Should Contain hello world
15-
Capture Page Screenshot 10-00-ipython.png
15+
Capture Page Screenshot lab${/}10-00-ipython.png
1616
Save JupyterLab Notebook
1717

1818
IPython Notebook Outputs on Lab
@@ -32,15 +32,15 @@ Multiple Notebooks on Lab
3232
Add and Run JupyterLab Code Cell print("hello world")
3333
Wait Until JupyterLab Kernel Is Idle
3434
Page Should Contain hello world
35-
Capture Page Screenshot 10-20-one-notebook.png
35+
Capture Page Screenshot lab${/}10-20-one-notebook.png
3636
Launch a new JupyterLab Document
3737
${tab1} = Get JupyterLab Dock Panel Tab Untitled1.ipynb
3838
Click Element ${tab1}
3939
Add and Run JupyterLab Code Cell print("yet another world") n=2
4040
Wait Until JupyterLab Kernel Is Idle
4141
Page Should Contain another world
4242
Drag And Drop By Offset ${tab1} 800 500
43-
Capture Page Screenshot 10-21-two-notesbook.png
43+
Capture Page Screenshot lab${/}10-21-two-notesbook.png
4444
Close JupyterLab Dock Panel Tab Untitled1.ipynb
4545
Maybe Accept a JupyterLab Prompt
4646
Page Should Not Contain yet another world

atest/lab/20_magic.robot

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ Wait for and Click Text
3131
${sel} = Set Variable xpath://*[contains(text(), '${canary}')]
3232
Wait Until Page Contains Element ${sel}
3333
Click Element ${sel}
34-
Capture Page Screenshot 20-00-magic-${NEXT SCREENSHOT}-${canary}.png
34+
Capture Page Screenshot lab${/}20-00-magic-${NEXT SCREENSHOT}-${canary}.png
3535
Set Test Variable ${NEXT SCREENSHOT} ${NEXT SCREENSHOT.__add__(1)}

atest/lab/__init__.robot

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
*** Settings ***
22
Suite Setup Set Up JupyterLab Suite
3-
Suite Teardown Terminate All Jupyter Servers
3+
Suite Teardown Tear Down JupyterLab Suite
44
Force Tags client:jupyterlab
55
Library JupyterLibrary
66

77
*** Keywords ***
88
Set Up JupyterLab Suite
99
Wait for New Jupyter Server to be Ready
10-
Set Screenshot Directory ${OUTPUT DIR}${/}lab
10+
11+
Tear Down JupyterLab Suite
12+
Run Keyword and Ignore Error
13+
... Execute JupyterLab Command Shut Down All Kernels
14+
Terminate All Jupyter Servers

docs/HISTORY.ipynb

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"| Voila | 0.2.9 |\n",
2626
"\n",
2727
"- Several JupyterLab keywords now accept an `${n}` argument to handle multiple documents on the page.\n",
28-
"- Many JupyterLab keywords that wait for certain events can be configured with `${timeout}` and `${sleep}` to suit."
28+
"- Many JupyterLab keywords that wait for certain events can be configured with `${timeout}` and `${sleep}` to suit.\n",
29+
"- Properly pass library initialization options to `SeleniumLibrary`"
2930
]
3031
},
3132
{

docs/rtd.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ dependencies:
7777
- https://conda.anaconda.org/conda-forge/noarch/webencodings-0.5.1-py_1.tar.bz2#3563be4c5611a44210d9ba0c16113136
7878
- https://conda.anaconda.org/conda-forge/noarch/wheel-0.36.2-pyhd3deb0d_0.tar.bz2#768bfbe026426d0e76b377997d1f2b98
7979
- https://conda.anaconda.org/conda-forge/noarch/zipp-3.4.1-pyhd8ed1ab_0.tar.bz2#a4fa30eb74a326092b3d8078b1f1aae1
80-
- https://conda.anaconda.org/conda-forge/noarch/babel-2.9.0-pyhd3deb0d_0.tar.bz2#1cb532c9a6fd4e56a9f0906b87c17b76
80+
- https://conda.anaconda.org/conda-forge/noarch/babel-2.9.1-pyh44b312d_0.tar.bz2#74136ed39bfea0832d338df1e58d013e
8181
- https://conda.anaconda.org/conda-forge/noarch/beautifulsoup4-4.9.3-pyhb0f4dca_0.tar.bz2#d243a293d7303ab6195d96ce8c16b1cb
8282
- https://conda.anaconda.org/conda-forge/linux-64/certifi-2020.12.5-py36h5fab9bb_1.tar.bz2#da529031bd8882eff7d72484661c1b83
8383
- https://conda.anaconda.org/conda-forge/linux-64/cffi-1.14.5-py36hc120d54_0.tar.bz2#f49c72aeb497efcd918217d142ddfc9c

src/JupyterLibrary/VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3.1a0
1+
0.3.1

src/JupyterLibrary/core.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def __init__(
3030
implicit_wait=0.0,
3131
run_on_failure="Capture Page Screenshot",
3232
screenshot_root_directory=None,
33+
**kwargs
3334
):
3435
"""JupyterLibrary can be imported with several optional arguments.
3536
- ``timeout``:
@@ -43,10 +44,11 @@ def __init__(
4344
the directory where the log file is written is used.
4445
"""
4546
super(JupyterLibrary, self).__init__(
46-
timeout=5.0,
47-
implicit_wait=0.0,
48-
run_on_failure="Capture Page Screenshot",
49-
screenshot_root_directory=None,
47+
timeout=timeout,
48+
implicit_wait=implicit_wait,
49+
run_on_failure=run_on_failure,
50+
screenshot_root_directory=screenshot_root_directory,
51+
**kwargs
5052
)
5153
self.add_library_components(
5254
[Component(self) for Component in component_classes]

src/JupyterLibrary/keywords/server.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def wait_for_new_jupyter_server_to_be_ready(self, command=None, *args, **config)
191191
return handle
192192

193193
@keyword
194-
def terminate_all_jupyter_servers(self, timeout="5s"):
194+
def terminate_all_jupyter_servers(self, timeout="6s"):
195195
"""Close all Jupyter servers started by
196196
[#Start New Jupyter Server|Start New Jupyter Server],
197197
waiting ``timeout`` to ensure all files/processes are freed before
@@ -215,14 +215,20 @@ def terminate_all_jupyter_servers(self, timeout="5s"):
215215
if shutdown:
216216
for nbh in self._handles:
217217
try:
218-
plib.terminate_process(nbh, kill=True)
218+
plib.terminate_process(nbh)
219219
terminated += 1
220220
except Exception as err:
221221
BuiltIn().log(err)
222+
if self._handles:
223+
BuiltIn().sleep(timeout)
224+
for nbh in self._handles:
225+
try:
226+
plib.terminate_process(nbh, kill=True)
227+
except Exception as err:
228+
BuiltIn().log(err)
222229

223230
# give processes a mo to shutdown
224231
if terminated or shutdown and self._tmpdirs:
225-
BuiltIn().sleep(timeout)
226232
for nbh in self._handles:
227233
shutil.rmtree(self._tmpdirs[nbh])
228234

0 commit comments

Comments
 (0)