Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into fabiha-branch
Browse files Browse the repository at this point in the history
  • Loading branch information
fabihaahmed committed Jun 20, 2019
2 parents b02c05c + 84e9a0e commit afea99b
Show file tree
Hide file tree
Showing 5 changed files with 195 additions and 34 deletions.
100 changes: 100 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@

variables:
JUPYTER_TEST_BROWSER: firefox
MOZ_HEADLESS: 1

pool:
vmImage: 'ubuntu-latest'

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.6'
addToPath: true
architecture: 'x64'

- script: |
pip install --upgrade pip
pip install --upgrade setuptools wheel nose coverage codecov
nvm install 6.9.2
nvm use 6.9.2
node --version
npm --version
npm upgrade -g npm
npm install
git clone git://github.com/n1k0/casperjs.git
cd casperjs
sudo ln -sf `pwd`/bin/casperjs /usr/local/bin/casperjs
cd ..
echo 'casperjs and phantomjs installed'
sudo apt-get install libc6 libstdc++6 libgcc1 libgtk2.0-0 libasound2 libxrender1 libdbus-glib-1-2
sudo apt-get install firefox
echo 'FIREFOX INSTALLED'
wget https://github.com/laurentj/slimerjs/releases/download/1.0.0/slimerjs-1.0.0.tar.bz2
tar -xvjf slimerjs-1.0.0.tar.bz2
sudo mv slimerjs-1.0.0 /usr/local/share
sudo ln -sf /usr/local/share/slimerjs-1.0.0/slimerjs /usr/local/bin
export SLIMERJSLAUNCHER=/usr/bin/firefox
pip install -r docs/doc-requirements.txt
pip install --upgrade pytest
pip install --upgrade selenium pytest
wget https://github.com/mozilla/geckodriver/releases/download/v0.19.1/geckodriver-v0.19.1-linux64.tar.gz
mkdir geckodriver
tar -xzf geckodriver-v0.19.1-linux64.tar.gz -C geckodriver
cd geckodriver
sudo cp geckodriver /usr/local/bin
cd ..
# export PATH=$PATH:$PWD/geckodriver
npm install sqlite3
pip install "attrs>=17.4.0"
displayName: 'Before Install'
continueOnError: false

- script: |
pip install --pre .[test] $EXTRA_PIP
pip freeze
wget https://github.com/jgm/pandoc/releases/download/1.19.1/pandoc-1.19.1-1-amd64.deb
sudo dpkg -i pandoc-1.19.1-1-amd64.deb
displayName: 'Install'
continueOnError: false

- script: |
jupyter kernelspec list
symlinks=$(find . -type l| grep -v './node_modules/' | grep -v './git-hooks')
if [[ $(echo $symlinks) ]]; then
echo "Repository contains symlinks which won't work on windows:"
echo $symlinks
echo ""
false
else
true
fi
python -m notebook.jstest base
displayName: 'Run base Tests'
continueOnError: false

- script: |
python -m notebook.jstest notebook
displayName: 'Run notebook Tests'
continueOnError: false

# - script: |
# python -m notebook.jstest services
# displayName: 'Run services Tests'
# continueOnError: false

- script: |
nosetests -v --exclude-dir notebook/tests/selenium --with-coverage --cover-package=notebook notebook
displayName: 'Run coverage Tests'
continueOnError: false

# - script: |
# py.test -sv notebook/tests/selenium
# displayName: 'Run selenium Tests'
# continueOnError: false

- script: |
make -C docs/ html
pytest --nbval --current-env docs
displayName: 'Run documentation Tests'
continueOnError: false
6 changes: 3 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"marked": "~0.5",
"MathJax": "^2.7.4",
"moment": "~2.19.3",
"preact": "https://unpkg.com/preact@^7.2.0/dist/preact.min.js",
"preact-compat": "https://unpkg.com/preact-compat@^3.14.3/dist/preact-compat.min.js",
"proptypes": "https://unpkg.com/proptypes@^0.14.4/index.js",
"preact": "https://unpkg.com/preact@~7.2.0/dist/preact.min.js",
"preact-compat": "https://unpkg.com/preact-compat@~3.14.3/dist/preact-compat.min.js",
"proptypes": "https://unpkg.com/proptypes@~0.14.4/index.js",
"requirejs": "~2.2",
"requirejs-text": "~2.0.15",
"requirejs-plugins": "~1.0.3",
Expand Down
47 changes: 47 additions & 0 deletions notebook/static/tree/less/tree.less
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ ul.breadcrumb {
.dynamic-buttons {
padding-top: @dashboard_tb_pad - 1px;
display: inline-block;
width: 400px;

}

.list_toolbar [class*="span"] {
Expand Down Expand Up @@ -412,3 +414,48 @@ ul#new-menu {
display: inline-block;
padding-top: @dashboard_tb_pad;
}

//TO show tooltips via keyboard for"Duplicate","View","Rename", "Download", "Shutdown", "Edit","Move", "Delete" buttons.

.visually-hidden {
clip-path: inset(100%);
clip: rect(1px, 1px, 1px, 1px);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}

button:focus + [role="tooltip"] {
visibility: visible;
opacity: 1;
}

.button-and-tooltip {
position: relative;
display: inline-block;
}

[role="tooltip"] {
/* Position the tooltip */
position: absolute;
top:70%;
display:inline;
//--------------
visibility: hidden;
width: 100px;
background-color: #F0EFEF;
color: #080808;
text-align: center;
padding: 3px;
outline-color: grey;
outline-offset: -2px;
outline-style: auto;
outline-width:1px;
z-index: 1;
opacity: 0;
transition: opacity .6s;
margin: 3px;
font-size:10px;
}
70 changes: 43 additions & 27 deletions notebook/templates/tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,24 @@
{% trans %}Select items to perform actions on them.{% endtrans %}
</div>
<div class="dynamic-buttons">
<button title="{% trans %}Duplicate selected{% endtrans %}" aria-label="{% trans %}Duplicate{% endtrans %}" class="duplicate-button btn btn-default btn-xs">{% trans %}Duplicate{% endtrans %}</button>
<button title="{% trans %}Rename selected{% endtrans %}" aria-label="{% trans %}Rename{% endtrans %}" class="rename-button btn btn-default btn-xs">{% trans %}Rename{% endtrans %}</button>
<button title="{% trans %}Move selected{% endtrans %}" aria-label="{% trans %}Move{% endtrans %}" class="move-button btn btn-default btn-xs">{% trans %}Move{% endtrans %}</button>
<button title="{% trans %}Download selected{% endtrans %}" aria-label="{% trans %}Download{% endtrans %}" class="download-button btn btn-default btn-xs">{% trans %}Download{% endtrans %}</button>
<button title="{% trans %}Shutdown selected notebook(s){% endtrans %}" aria-label="{% trans %}Shutdown{% endtrans %}" class="shutdown-button btn btn-default btn-xs btn-warning">{% trans %}Shutdown{% endtrans %}</button>
<button title="{% trans %}View selected{% endtrans %}" aria-label="{% trans %}View{% endtrans %}" class="view-button btn btn-default btn-xs">{% trans %}View{% endtrans %}</button>
<button title="{% trans %}Edit selected{% endtrans %}" aria-label="{% trans %}Edit{% endtrans %}" class="edit-button btn btn-default btn-xs">{% trans %}Edit{% endtrans %}</button>
<button title="{% trans %}Delete selected{% endtrans %}" aria-label="{% trans %}Delete selected{% endtrans %}" class="delete-button btn btn-default btn-xs btn-danger"><i class="fa fa-trash"></i></button>
<button title="{% trans %}Duplicate selected{% endtrans %}" aria-label="{% trans %}Duplicate{% endtrans %}" class="duplicate-button btn btn-default btn-xs" aria-describedby="tooltip1">{% trans %}Duplicate{% endtrans %} </button>
<div role="tooltip" id="tooltip1" >{% trans %}Duplicate selected{% endtrans %}</div>
<button title="{% trans %}Rename selected{% endtrans %}" aria-label="{% trans %}Rename{% endtrans %}" class="rename-button btn btn-default btn-xs" aria-describedby="tooltip2">{% trans %} Rename{% endtrans %}</button>
<div role="tooltip" id="tooltip2" >{% trans %}Rename selected{% endtrans %}</div>
<button title="{% trans %}Move selected{% endtrans %}" aria-label="{% trans %}Move{% endtrans %}" class="move-button btn btn-default btn-xs" aria-describedby="tooltip3">{% trans %}Move{% endtrans %}</button>
<div role="tooltip" id="tooltip3" >{% trans %}Move selected{% endtrans %}</div>
<button title="{% trans %}Download selected{% endtrans %}" aria-label="{% trans %}Download{% endtrans %}" class="download-button btn btn-default btn-xs" aria-describedby="tooltip4">{% trans %}Download{% endtrans %}</button>
<div role="tooltip" id="tooltip4" >{% trans %}Download selected{% endtrans %}</div>
<button title="{% trans %}Shutdown selected notebook(s){% endtrans %}" aria-label="{% trans %}Shutdown{% endtrans %}" class="shutdown-button btn btn-default btn-xs btn-warning" aria-describedby="tooltip5">{% trans %}Shutdown{% endtrans %}</button>
<div role="tooltip" id="tooltip5" >{% trans %}Shutdown selected notebook(s){% endtrans %}</div>
<button title="{% trans %}View selected{% endtrans %}" aria-label="{% trans %}View{% endtrans %}" class="view-button btn btn-default btn-xs" aria-describedby="tooltip6">{% trans %}View{% endtrans %}</button>
<div role="tooltip" id="tooltip6" >{% trans %}View selected{% endtrans %}</div>
<button title="{% trans %}Edit selected{% endtrans %}" aria-label="{% trans %}Edit{% endtrans %}" class="edit-button btn btn-default btn-xs" aria-describedby="tooltip7">{% trans %}Edit{% endtrans %}</button>
<div role="tooltip" id="tooltip7" >{% trans %}Edit selected{% endtrans %}</div>
<button title="{% trans %}Delete selected{% endtrans %}" aria-label="{% trans %}Delete selected{% endtrans %}" class="delete-button btn btn-default btn-xs btn-danger" aria-describedby="tooltip8">
<i class="fa fa-trash"></i>
</button>
<div role="tooltip" id="tooltip8" >{% trans %}Delete selected{% endtrans %}</div>
</div>
</div>
<div class="col-sm-4 no-padding tree-buttons">
Expand Down Expand Up @@ -100,7 +110,7 @@
<div id="notebook_list_header" class="row list_header">
<div class="btn-group dropdown" id="tree-selector">
<button title="{% trans %}Select All / None{% endtrans %}" aria-label="{% trans %}Select All / None{% endtrans %}" type="button" class="btn btn-default btn-xs" id="button-select-all" role="checkbox">
<input type="checkbox" class="pull-left tree-selector" id="select-all"><span id="counter-select-all">&nbsp;</span></input>
<input type="checkbox" class="pull-left tree-selector" id="select-all" tabindex="-1"><span id="counter-select-all">&nbsp;</span></input>
</button>
<button title="{% trans %}Select Folders/All Notebooks/Running/Files {% endtrans %}" class="btn btn-default btn-xs dropdown-toggle" type="button" id="tree-selector-btn" data-toggle="dropdown" aria-expanded="true">
<span class="caret"></span>
Expand All @@ -121,24 +131,27 @@
{% endfor %}
</ul>
</div>
<div id="file_size" class="pull-right sort_button">
<span class="btn btn-xs btn-default sort-action" id="file-size">
{% trans %}File size{% endtrans %}
<i class="fa"></i>
</span>
</div>
<div id="last_modified" class="pull-right sort_button">
<span class="btn btn-xs btn-default sort-action" id="last-modified">
{% trans %}Last Modified{% endtrans %}
<i class="fa"></i>
</span>
</div>
<div id="sort_name" class="pull-right sort_button">
<span class="btn btn-xs btn-default sort-action" id="sort-name">
{% trans %}Name{% endtrans %}
<i class="fa fa-arrow-down"></i>
</span>
<div id="sort_buttons" class="pull-right">
<div id="sort_name" class="sort_button">
<button type="button" class="btn btn-xs btn-default sort-action" id="sort-name" aria-label="{% trans %}Sort by name{% endtrans %}">
{% trans %}Name{% endtrans %}
<i class="fa fa-arrow-down"></i>
</button>
</div>
<div id="last_modified" class="sort_button">
<button type="button" class="btn btn-xs btn-default sort-action" id="last-modified" aria-label="{% trans %}Sort by last modified{% endtrans %}">
{% trans %}Last Modified{% endtrans %}
<i class="fa"></i>
</button>
</div>
<div id="file_size" class="sort_button">
<button type="button" class="btn btn-xs btn-default sort-action" id="file-size" aria-label="{% trans %}Sort by file size{% endtrans %}">
{% trans %}File size{% endtrans %}
<i class="fa"></i>
</button>
</div>
</div>

</div>
</div>
</div>
Expand Down Expand Up @@ -204,7 +217,10 @@

{% block script %}
{{super()}}

<script type="text/javascript">
('#element').tooltip('enable')
</script>

<script src="{{ static_url("tree/js/main.min.js") }}" type="text/javascript" charset="utf-8"></script>

{% endblock %}
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"scripts": {
"bower": "bower install",
"build": "python3 setup.py js css",
"build": "python setup.py js css",
"build:watch": "set -e; while true; do npm run build; sleep 3; done"
},
"devDependencies": {
Expand All @@ -19,7 +19,5 @@
"requirejs": "^2.1.17",
"po2json": "^0.4.5"
},
"dependencies": {
"requests": "^0.2.2"
}
"dependencies": {}
}

0 comments on commit afea99b

Please sign in to comment.