-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into keras_rest
- Loading branch information
Showing
10 changed files
with
1,538 additions
and
1,381 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
*** Comments *** | ||
# This whole file is a copy of the "clients/jupyterlab/Icons.resource" file from the JupyterLibrary. | ||
|
||
# Motivation for the copy is that there is an explicit usage of the JupyterLibrary on one line of | ||
# the PageInfo.resource file in that library. So this file and the PageInfo.resource file were moved | ||
# to our repository with the one line fix. | ||
|
||
|
||
*** Settings *** | ||
Documentation Icon keywords for JupyterLab | ||
# Resource JupyterLibrary/clients/jupyterlab/PageInfo.resource | ||
Resource ./PageInfo.resource # Edited - our change | ||
|
||
|
||
*** Variables *** | ||
&{JLAB1 CSS ICONS} | ||
... add=span[data-icon="add"] | ||
... run=span[data-icon="run"] | ||
... filled circle=.jp-CircleFilledIcon | ||
... empty circle=.jp-CircleEmptyIcon | ||
&{JLAB2 CSS ICONS} | ||
... add=svg[@data-icon='ui-components:add'] | ||
... run=svg[@data-icon='ui-components:run'] | ||
... filled circle=svg[@data-icon='ui-components:circle-filled'] | ||
... empty circle=svg[@data-icon='ui-components:circle-empty'] | ||
&{JLAB1 XP ICONS} | ||
... add=span[@data-icon = 'add'] | ||
... run=span[@data-icon = 'run'] | ||
... filled circle=div[contains(@class, 'jp-CircleFilledIcon')] | ||
... empty circle=div[contains(@class, 'jp-CircleEmptyIcon')] | ||
&{JLAB2 XP ICONS} | ||
... add=*[@data-icon='ui-components:add'] | ||
... run=*[@data-icon='ui-components:run'] | ||
... filled circle=*[@data-icon='ui-components:circle-filled'] | ||
... empty circle=*[@data-icon='ui-components:circle-empty'] | ||
|
||
|
||
*** Keywords *** | ||
Get JupyterLab Icon CSS Custom # Edited | ||
[Documentation] Get a Lab version-specific, but general CSS selector for an ``icon``. | ||
[Arguments] ${icon} | ||
${version} = Get JupyterLab Application Version Info Custom | ||
${sel} = Set Variable If ${version[0].__eq__('1')} | ||
... ${JLAB1 CSS ICONS['${icon}']} | ||
... ${JLAB2 CSS ICONS['${icon}']} | ||
[Return] ${sel} | ||
|
||
Get JupyterLab Icon XPath Custom # Edited | ||
[Documentation] Get a Lab version-specific, but general XPath selector for an ``icon``. | ||
[Arguments] ${icon} | ||
${version} = Get JupyterLab Application Version Info Custom | ||
${sel} = Set Variable If ${version[0].__eq__('1')} | ||
... ${JLAB1 XP ICONS['${icon}']} | ||
... ${JLAB2 XP ICONS['${icon}']} | ||
[Return] ${sel} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
ods_ci/tests/Resources/Page/ODH/JupyterHub/PageInfo.resource
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
*** Comments *** | ||
# This whole file is a copy of the "clients/jupyterlab/PageInfo.resource" file from the JupyterLibrary. | ||
|
||
# Motivation for the copy is that there is an explicit usage of the JupyterLibrary on one line of | ||
# the PageInfo.resource file in that library. So this file and the Icons.resource file were moved | ||
# to our repository with the one line fix. See the "Edited - our fix" line. | ||
|
||
|
||
*** Settings *** | ||
Documentation Page config keywords for JupyterLab | ||
Resource JupyterLibrary/clients/jupyterlab/Selectors.resource | ||
Library String | ||
Library json WITH NAME JSON | ||
|
||
|
||
*** Variables *** | ||
${JLAB XP PAGEINFO} script[contains(@id, 'jupyter-config-data')] | ||
# keep this updated below | ||
@{JLAB DEFAULT PAGEINFO TAGS} appName appVersion buildAvailable | ||
... buildCheck notebookVersion devMode | ||
|
||
|
||
*** Keywords *** | ||
Get JupyterLab Page Info Custom # Edited | ||
[Documentation] Get one (or all) of the ``pageInfo`` ``key`` s from JupyterLab's HTML ``<head>``. | ||
... Optionally ``clear`` the cached info first. | ||
... | ||
... See also: | ||
... - [#Tag With JupyterLab Metadata|Tag With JupyterLab Metadata] | ||
[Arguments] ${key}=${EMPTY} ${clear}=${False} | ||
${pageInfo} = Get Variable Value ${JLAB PAGEINFO CACHE} ${EMPTY} | ||
# Run Keyword If ${clear} or not ${pageInfo.__len__()} Update JupyterLab PageInfo Cache | ||
Run Keyword If ${clear} or not ${pageInfo.__len__()} Update JupyterLab PageInfo Cache Custom # Edited | ||
${pageInfo} = Set Variable ${JLAB PAGEINFO CACHE} | ||
${result} = Set Variable If ${key.__len__()} ${pageInfo.get("${key}")} ${pageInfo} | ||
[Return] ${result} | ||
|
||
Update JupyterLab PageInfo Cache Custom # Edited | ||
[Documentation] Update the cached JupyterLab ``pageInfo``. _Not usually needed._ | ||
${sel} = Set Variable xpath://${JLAB XP PAGEINFO} | ||
Wait Until Page Contains Element ${sel} | ||
# ${txt} = JupyterLibrary.Get Element Attribute ${sel} innerHTML | ||
${txt} = Get Element Attribute ${sel} innerHTML # Edited - our fix | ||
${pageInfo} = JSON.Loads ${txt} | ||
Set Suite Variable ${JLAB PAGEINFO CACHE} ${pageInfo} children=${True} | ||
|
||
Tag With JupyterLab Metadata Custom # Edited | ||
[Documentation] Tag the current test (or suite) with ``keys`` from the | ||
... JupyterLab ``pageInfo``. | ||
... The default ``keys``: ``appName`` ``appVersion`` ``buildAvailable`` | ||
... ``buildCheck`` ``notebookVersion`` ``devMode`` | ||
[Arguments] ${keys}=${JLAB DEFAULT PAGEINFO TAGS} ${clear}=${False} | ||
# ${info} = Get JupyterLab Page Info clear=${clear} | ||
${info} = Get JupyterLab Page Info Custom clear=${clear} # Edited | ||
FOR ${key} IN @{keys} | ||
${val} = Set Variable ${info.get("${key}")} | ||
Set Tags jupyterlab:${key}:${val} | ||
END | ||
|
||
Get JupyterLab Application Version Info Custom # Edited | ||
[Documentation] Get the version of the application ``2.3.0.rc1`` as a list of | ||
... strings from ``pageInfo``, e.g. ``["2", "3", "1", "rc1"]``. Optionally ``clear`` | ||
... the cached info first. | ||
[Arguments] ${clear}=${False} | ||
# ${version} = Get JupyterLab Page Info appVersion clear=${clear} | ||
${version} = Get JupyterLab Page Info Custom appVersion clear=${clear} # Edited | ||
${version_info} = Set Variable ${version.split(".")} | ||
[Return] ${version_info} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.