Skip to content

Commit fc89769

Browse files
committed
more cleaning
1 parent def26a0 commit fc89769

File tree

12 files changed

+175
-1003
lines changed

12 files changed

+175
-1003
lines changed

anaconda-project.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,7 @@ commands:
5959
env_spec: win_rfjl37
6060

6161
docs:
62-
unix: cd docs && make html
63-
env_spec: rfjl37
64-
65-
docs:libdoc:
66-
unix: python -m robot.libdoc JupyterLibrary docs/JupyterLibrary.html
62+
unix: sphinx-build -M html docs dist/docs
6763
env_spec: rfjl37
6864

6965
env_specs:

docs/source/notebooks/INSTALL.ipynb renamed to docs/INSTALL.ipynb

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"source": [
77
"# INSTALL\n",
88
"Installing `JupyterLibrary` will bring along Robot Framework and SeleniumLibrary. Jupyter components, like `notebook`, `jupyterlab` and `nteract_on_jupyter`, and browser executors (e.g. `chromedriver`, `geckodriver`) and various utilities (e.g. `nodejs`) are up to you, depending on what you want to test. Here are some examples.\n",
9-
"\n> _Sorry for the mess, haven't actually shipped anything yet... but the [DEV](#DEV) install does kinda work already_"
9+
"\n",
10+
"> _Sorry for the mess, haven't actually shipped anything yet... but the [DEV](#DEV) install does kinda work already_"
1011
]
1112
},
1213
{
@@ -48,7 +49,7 @@
4849
"cell_type": "markdown",
4950
"metadata": {},
5051
"source": [
51-
"## DEV\n",
52+
"## `master`\n",
5253
"`JupyterLibrary` is under active development, and is heavily invested in `conda` because of the complexity of managing browser execution dependencies. But `conda` (rightly) makes it hard to install Random Repos from the Internet, so you'll need a bit of `pip`, too. \n",
5354
"\n",
5455
"Here's a complete setup:\n",
@@ -72,6 +73,38 @@
7273
"```\n",
7374
"Also take a gander at this project's `environment.yml` or `anaconda-project.yml` at that URL there."
7475
]
76+
},
77+
{
78+
"cell_type": "markdown",
79+
"metadata": {},
80+
"source": [
81+
"## DEV\n",
82+
"- get Firefox\n",
83+
"- get Miniconda\n",
84+
"- clone\n",
85+
" \n",
86+
" git clone http://github.com/bollwyvl/robotframework-jupyterlibrary\n",
87+
"\n",
88+
"- update and activate\n",
89+
"\n",
90+
" conda env update\n",
91+
" conda activate robotframework-jupyterlibrary\n",
92+
"\n",
93+
"- then\n",
94+
"\n",
95+
" pip install -e . --no-deps --ignore-installed\n",
96+
"\n",
97+
"- run the tests\n",
98+
"\n",
99+
" python -m scripts.atest"
100+
]
101+
},
102+
{
103+
"cell_type": "code",
104+
"execution_count": null,
105+
"metadata": {},
106+
"outputs": [],
107+
"source": []
75108
}
76109
],
77110
"metadata": {

docs/source/notebooks/KEYWORDS.ipynb renamed to docs/KEYWORDS.ipynb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
},
2626
{
2727
"cell_type": "code",
28-
"execution_count": 28,
28+
"execution_count": 3,
2929
"metadata": {
3030
"jupyter": {
3131
"source_hidden": true
@@ -39,23 +39,23 @@
3939
" <iframe\n",
4040
" width=\"100%\"\n",
4141
" height=\"\"\n",
42-
" src=\"../_static/JupyterLibrary.html\"\n",
42+
" src=\"_static/JupyterLibrary.html\"\n",
4343
" frameborder=\"0\"\n",
4444
" allowfullscreen\n",
4545
" ></iframe>\n",
4646
" "
4747
],
4848
"text/plain": [
49-
"<IPython.lib.display.IFrame at 0x7feaa96874e0>"
49+
"<IPython.lib.display.IFrame at 0x7ff15c58c4a8>"
5050
]
5151
},
52-
"execution_count": 28,
52+
"execution_count": 3,
5353
"metadata": {},
5454
"output_type": "execute_result"
5555
}
5656
],
5757
"source": [
58-
"iframe = lambda url: __import__(\"IPython\").display.IFrame(f\"../_static/{url}.html\", width=\"100%\", height=\"\")\n",
58+
"iframe = lambda url: __import__(\"IPython\").display.IFrame(f\"_static/{url}.html\", width=\"100%\", height=\"\")\n",
5959
"iframe(\"JupyterLibrary\")"
6060
]
6161
},
@@ -69,7 +69,7 @@
6969
},
7070
{
7171
"cell_type": "code",
72-
"execution_count": 29,
72+
"execution_count": 4,
7373
"metadata": {
7474
"jupyter": {
7575
"source_hidden": true
@@ -83,17 +83,17 @@
8383
" <iframe\n",
8484
" width=\"100%\"\n",
8585
" height=\"\"\n",
86-
" src=\"../_static/JupyterLab.html\"\n",
86+
" src=\"_static/JupyterLab.html\"\n",
8787
" frameborder=\"0\"\n",
8888
" allowfullscreen\n",
8989
" ></iframe>\n",
9090
" "
9191
],
9292
"text/plain": [
93-
"<IPython.lib.display.IFrame at 0x7feaa9687400>"
93+
"<IPython.lib.display.IFrame at 0x7ff15c5cca20>"
9494
]
9595
},
96-
"execution_count": 29,
96+
"execution_count": 4,
9797
"metadata": {},
9898
"output_type": "execute_result"
9999
}

docs/Makefile

Lines changed: 0 additions & 19 deletions
This file was deleted.
File renamed without changes.

docs/source/_static/css/custom.css renamed to docs/_static/css/custom.css

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,26 @@ h1, h2, h3, h4, h5, h6 {
1111
text-transform: uppercase;
1212
}
1313

14+
.rst-content blockquote {
15+
padding: 24px;
16+
margin-left: 0;
17+
font-size: 120%;
18+
font-style: italic;
19+
background: linear-gradient(to right, #eee 10px, #fff 0)
20+
}
21+
22+
h1 {
23+
font-size: 350%;
24+
}
25+
26+
h2 {
27+
font-size: 200%;
28+
}
29+
30+
p {
31+
max-width: 45em;
32+
}
33+
1434
.wy-side-nav-search,
1535
.wy-nav-top {
1636
background-color: var(--rf-blue);
@@ -45,7 +65,8 @@ div.nbinput div.prompt, div.nboutput div.prompt {
4565
}
4666

4767

48-
#rtd-search-form input[type=text] {
68+
#rtd-search-form input[type=text],
69+
.rst-content blockquote {
4970
border: 0;
5071
border-radius: 0;
5172
--notchSize: 9px;
@@ -62,3 +83,25 @@ div.nbinput div.prompt, div.nboutput div.prompt {
6283
0% calc(100% - var(--notchSize))
6384
);
6485
}
86+
87+
.rst-content .section .toctree-wrapper > ul {
88+
display: flex;
89+
flex-direction: row;
90+
}
91+
92+
.rst-content .section .toctree-wrapper > ul > li {
93+
flex: 1;
94+
}
95+
96+
.rst-content .section .toctree-wrapper ul,
97+
.rst-content .section .toctree-wrapper li {
98+
list-style: none;
99+
margin: 0;
100+
padding: 0;
101+
}
102+
103+
.rst-content .section .toctree-wrapper .toctree-l1 > a {
104+
font-family: "OCR-A", monospace;
105+
text-transform: uppercase;
106+
font-size: 150%;
107+
}
File renamed without changes.

docs/source/conf.py renamed to docs/conf.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -218,37 +218,37 @@
218218

219219

220220
def setup(app):
221-
here = Path(__file__)
222-
root = (here / ".." / ".." / "..").resolve()
221+
here = Path(__file__).parent
222+
root = here.parent.resolve()
223223

224-
subprocess.run(
224+
subprocess.check_call(
225225
[
226226
sys.executable,
227227
"-m",
228228
"robot.libdoc",
229229
"JupyterLibrary",
230-
"source/_static/JupyterLibrary.html",
230+
str(here / "_static" / "JupyterLibrary.html"),
231231
]
232232
)
233233

234-
resources = root / "src" / "JupyterLibrary" / "resources"
234+
client_resources = root / "src" / "JupyterLibrary" / "resources"
235235

236-
print("looking for resources in", resources)
237-
for top_level in resources.glob("*"):
236+
print("looking for resources in", client_resources)
237+
for client in client_resources.glob("*"):
238238
with TemporaryDirectory() as td:
239239
tdp = Path(td)
240240
agg = ""
241-
for sub in top_level.rglob("*.robot"):
241+
for sub in client.rglob("*.robot"):
242242
agg += sub.read_text()
243-
out_file = Path(tdp / f"{top_level.name}.robot")
243+
out_file = Path(tdp / f"{client.name}.robot")
244244
out_file.write_text(agg)
245245
subprocess.run(
246246
[
247247
sys.executable,
248248
"-m",
249249
"robot.libdoc",
250250
str(out_file),
251-
f"source/_static/{top_level.name}.html",
251+
str(here / "_static" / f"{client.name}.html"),
252252
]
253253
)
254254

docs/index.ipynb

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# JupyterLibrary"
8+
]
9+
},
10+
{
11+
"cell_type": "markdown",
12+
"metadata": {},
13+
"source": [
14+
"> A Robot Framework library for testing Jupyter end-user applications and extensions"
15+
]
16+
},
17+
{
18+
"cell_type": "markdown",
19+
"metadata": {},
20+
"source": [
21+
"Write `.robot` files that use `JupyterLibrary` keywords.\n",
22+
"\n",
23+
"```robotframework\n",
24+
"*** Settings ***\n",
25+
"Library JupyterLibrary\n",
26+
"Suite Setup Wait for New Jupyter Server to be Ready\n",
27+
"Test Teardown Reset JupyterLab and Close\n",
28+
"Suite Teardown Terminate All Jupyter Servers\n",
29+
"\n",
30+
"*** Test Cases ***\n",
31+
"IPython Notebook\n",
32+
" Open JupyterLab\n",
33+
" Launch a new JupyterLab Document\n",
34+
" Add and Run JupyterLab Code Cell print(\"hello world\")\n",
35+
" Wait Until JupyterLab Kernel Is Idle\n",
36+
" Capture Page Screenshot ipython.png\n",
37+
"```"
38+
]
39+
},
40+
{
41+
"cell_type": "markdown",
42+
"metadata": {
43+
"nbsphinx-toctree": {
44+
"maxdepth": 2
45+
}
46+
},
47+
"source": [
48+
"# MORE\n",
49+
"- [WHY](WHY.ipynb)\n",
50+
"- [INSTALL](INSTALL.ipynb)\n",
51+
"- [KEYWORDS](KEYWORDS.ipynb)"
52+
]
53+
}
54+
],
55+
"metadata": {
56+
"kernelspec": {
57+
"display_name": "Python 3",
58+
"language": "python",
59+
"name": "python3"
60+
},
61+
"language_info": {
62+
"codemirror_mode": {
63+
"name": "ipython",
64+
"version": 3
65+
},
66+
"file_extension": ".py",
67+
"mimetype": "text/x-python",
68+
"name": "python",
69+
"nbconvert_exporter": "python",
70+
"pygments_lexer": "ipython3",
71+
"version": "3.7.1"
72+
}
73+
},
74+
"nbformat": 4,
75+
"nbformat_minor": 2
76+
}

docs/make.bat

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)