Skip to content

Commit 6d78fad

Browse files
authored
Merge pull request #51 from bollwyvl/gh-50-pre-docs
Update docs for 0.4.0 release
2 parents e2d3cb0 + e7838ed commit 6d78fad

13 files changed

+124
-60
lines changed

CONTRIBUTING.md

+27-18
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
## Get `CONDA_EXE`
44

5-
- Get [miniforge](https://github.com/conda-forge/miniforge)
5+
- Get [Mambaforge](https://conda-forge.org/miniforge/)
66

77
```bash
8-
conda install -c conda-forge doit
9-
optional meta-dependencies
10-
conda install -c conda-forge conda-lock mamba
8+
mamba install -c conda-forge doit
9+
# optional meta-dependency
10+
mamba install -c conda-forge conda-lock
1111
```
1212

1313
## Get the code
@@ -51,36 +51,45 @@ developing, hoping for a better cache hit rate. On the same _operating system_,
5151
however, any of the pre-solved lockfiles can be used, by specifying the
5252
`RJFL_LOCKFILE` environment variable.
5353

54-
For example, if `linux-64` running `python3.6` with `jupyterlab 1` failed:
54+
For example, if `linux-64` running `python3.7` with `jupyterlab 1` failed:
5555

5656
```bash
5757
!/usr/bin/env bash
5858
set -eux
59-
RFJL_LOCKDIR=test/linux-64/py3.6/lab1 doit release
59+
RFJL_LOCKDIR=test/linux-64/py3.7/lab1 doit release
6060
```
6161

6262
Or, in a `bat` script:
6363

6464
```bat
6565
@echo on
66-
set RFJL_LOCKDIR=test/win-64/py3.9/lab1
66+
set RFJL_LOCKDIR=test/win-64/py3.7/lab1
6767
doit release
6868
```
6969

7070
This will recreate the `test` environment with the specified lockfile, and
7171
repeat all the steps.
7272

73-
### Releasing
74-
75-
- ensure `VERSION` has been increased appropriately
76-
- ensure `HISTORY.ipynb` is up-to-date
77-
- (usually) grab the `dist` assets from CI, unpack into `./dist`
78-
- make a GitHub release, adding the `.tar.gz`, `.whl`, and `SHA256SUMS`
79-
- upload to PyPI
80-
73+
## Releasing
74+
75+
- [ ] merge all outstanding PRs
76+
- [ ] start a release issue with a checklist (maybe like this one)
77+
- [ ] ensure `VERSION` has been increased appropriately
78+
- [ ] ensure the `HISTORY.ipynb` is up-to-date
79+
- [ ] validate on binder
80+
- [ ] validate on ReadTheDocs
81+
- [ ] wait for a successful build of `master`
82+
- [ ] download the `dist` archive and unpack somewhere (maybe a fresh `dist`)
83+
- [ ] create a new release through the GitHub UI
84+
- [ ] paste in the relevant `HISTORY` entries
85+
- [ ] upload the artifacts
86+
- [ ] actually upload to pypi.org
8187
```bash
8288
doit publish
8389
```
84-
85-
- do a post-mortem issue
86-
- bump `VERSION` to a working status
90+
- [ ] postmortem
91+
- [ ] handle `conda-forge` feedstock tasks
92+
- [ ] validate on binder via simplest-possible gists
93+
- [ ] activate the version on ReadTheDocs
94+
- [ ] bump `VERSION` to next development version
95+
- [ ] update release procedures

_scripts/project.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
DOCS = ROOT / "docs"
105105
RTD_ENV = DOCS / "rtd.yml"
106106
DOCS_CONF_PY = DOCS / "conf.py"
107-
DOCS_BUILDINFO = BUILD / "docs" / "html" / ".buildinfo"
107+
DOCS_BUILDINFO = BUILD / "docs/html/.buildinfo"
108108

109109
# demo
110110
LABEXTXT = BINDER / "labex.txt"
@@ -239,6 +239,8 @@ def _is_excluded(flow, pf, py, lab):
239239
DOCS_CONF_PY,
240240
]
241241
if ".ipynb_checkpoints" not in str(p)
242+
and "_robot_magic_" not in str(p)
243+
and not p.name.endswith(".html")
242244
]
243245

244246
PACKAGE_JSON = ROOT / "package.json"

docs/CI.ipynb

+5-5
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
">\n",
100100
"> A small collection of [scripts][], not shipped as part of the distribution, provide some custom behaviors around particularly complex tasks.\n",
101101
"> \n",
102-
"> - sometimes `doit` is to heavy of a hammer for delicate work\n",
102+
"> - sometimes `doit` is too heavy of a hammer for delicate work\n",
103103
"\n",
104104
"[scripts]: https://github.com/robots-from-jupyter/robotframework-jupyterlibrary/tree/master/scripts\n",
105105
"[doit]: https://github.com/robots-from-jupyter/robotframework-jupyterlibrary/blob/master/dodo.py"
@@ -124,15 +124,15 @@
124124
"A heavy CI pipeline can become necessary to manage many competing concerns. Each non-trivial, browser-based robot test can easily cost tens of seconds. Some approaches:\n",
125125
"- use an up-front dry-run `robot` test\n",
126126
" - this can help catch whitespace errors in robot syntax\n",
127-
" - this usually costs $\\frac{\\sim1}{100}$ the time of running the full test \n",
128-
"- run tests in subsets and in parallel with `pabot`\n",
127+
" - this usually costs $\\frac{\\sim1}{100}$ the time of running the full test\n",
128+
"- run tests in subsets, in parallel, and in random order with `pabot`\n",
129129
" - requires avoiding shared resources, e.g. network ports, databases, logfiles"
130130
]
131131
}
132132
],
133133
"metadata": {
134134
"kernelspec": {
135-
"display_name": "Python 3",
135+
"display_name": "Python 3 (ipykernel)",
136136
"language": "python",
137137
"name": "python3"
138138
},
@@ -146,7 +146,7 @@
146146
"name": "python",
147147
"nbconvert_exporter": "python",
148148
"pygments_lexer": "ipython3",
149-
"version": "3.9.0"
149+
"version": "3.8.12"
150150
}
151151
},
152152
"nbformat": 4,

docs/INSTALL.ipynb

+9-6
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,17 @@
3838
"Here's a complete setup:\n",
3939
"```shell\n",
4040
"conda create --name testing-jupyter --channel conda-forge \n",
41-
" python=3 \\ # 3.6 required, not tested with pypy \n",
41+
" python=3 \\ # 3.7 required, not tested with pypy \n",
4242
" jupyterlab \\\n",
4343
" robotframework-seleniumlibrary \\\n",
44-
" geckodriver\n",
44+
" geckodriver \\\n",
45+
" firefox\n",
4546
"\n",
4647
"conda activate testing-jupyter\n",
4748
"\n",
48-
"pip install --no-deps \\ # don't want any surprises\n",
49+
"pip install \\\n",
50+
" --no-deps \\ # don't want any surprises\n",
51+
" --ignore-installed \\ # just to be sure\n",
4952
" git+http://github.com/robots-from-jupyter/robotframework-jupyterlibrary\n",
5053
"```"
5154
]
@@ -79,13 +82,13 @@
7982
},
8083
"outputs": [],
8184
"source": [
82-
"!python ../dodo.py list --all --status"
85+
"!python ../dodo.py list --all"
8386
]
8487
}
8588
],
8689
"metadata": {
8790
"kernelspec": {
88-
"display_name": "Python 3",
91+
"display_name": "Python 3 (ipykernel)",
8992
"language": "python",
9093
"name": "python3"
9194
},
@@ -99,7 +102,7 @@
99102
"name": "python",
100103
"nbconvert_exporter": "python",
101104
"pygments_lexer": "ipython3",
102-
"version": "3.9.2"
105+
"version": "3.8.12"
103106
},
104107
"nteract": {
105108
"version": "[email protected]"

docs/KEYWORDS.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
],
145145
"metadata": {
146146
"kernelspec": {
147-
"display_name": "Python 3",
147+
"display_name": "Python 3 (ipykernel)",
148148
"language": "python",
149149
"name": "python3"
150150
},
@@ -158,7 +158,7 @@
158158
"name": "python",
159159
"nbconvert_exporter": "python",
160160
"pygments_lexer": "ipython3",
161-
"version": "3.9.2"
161+
"version": "3.8.12"
162162
}
163163
},
164164
"nbformat": 4,

docs/LIMITS.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
],
3333
"metadata": {
3434
"kernelspec": {
35-
"display_name": "Python 3",
35+
"display_name": "Python 3 (ipykernel)",
3636
"language": "python",
3737
"name": "python3"
3838
},
@@ -46,7 +46,7 @@
4646
"name": "python",
4747
"nbconvert_exporter": "python",
4848
"pygments_lexer": "ipython3",
49-
"version": "3.9.2"
49+
"version": "3.8.12"
5050
}
5151
},
5252
"nbformat": 4,

docs/MAGIC.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
],
174174
"metadata": {
175175
"kernelspec": {
176-
"display_name": "Python 3",
176+
"display_name": "Python 3 (ipykernel)",
177177
"language": "python",
178178
"name": "python3"
179179
},
@@ -187,7 +187,7 @@
187187
"name": "python",
188188
"nbconvert_exporter": "python",
189189
"pygments_lexer": "ipython3",
190-
"version": "3.9.2"
190+
"version": "3.8.12"
191191
}
192192
},
193193
"nbformat": 4,

docs/WHY.ipynb

+11-9
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,23 @@
3131
"source": [
3232
"## ...JupyterLibrary?\n",
3333
"\n",
34-
"Powered by [Robot Framework](https://robotframework.org), `JupyterLibrary` allows you to:\n",
34+
"Powered by [Robot Framework](https://robotframework.org) and [SeleniumLibrary](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html), `JupyterLibrary` allows you to:\n",
3535
"\n",
36-
"- write tests in concise, plain language\n",
36+
"- write tests in concise, **plain language**\n",
3737
" - and extend this language to meet your needs\n",
38-
"- run in multiple browsers (even at the same time)\n",
39-
" - run on multiple operating systems\n",
40-
"- view rich reports of your test results\n",
41-
" - but also compare your reports over time with machine-readable formats\n",
42-
"- generate screenshots to augment your documentation"
38+
"- test multiple Jupyter **clients**\n",
39+
" - and multiple **versions** of them\n",
40+
"- run in multiple, **real browsers** (even at the same time)\n",
41+
" - and on multiple **operating systems**\n",
42+
"- view rich **reports** of your test results\n",
43+
" - but also compare your reports over time with **machine-readable** formats\n",
44+
"- generate **screenshots** to augment your documentation"
4345
]
4446
}
4547
],
4648
"metadata": {
4749
"kernelspec": {
48-
"display_name": "Python 3",
50+
"display_name": "Python 3 (ipykernel)",
4951
"language": "python",
5052
"name": "python3"
5153
},
@@ -59,7 +61,7 @@
5961
"name": "python",
6062
"nbconvert_exporter": "python",
6163
"pygments_lexer": "ipython3",
62-
"version": "3.9.2"
64+
"version": "3.8.12"
6365
}
6466
},
6567
"nbformat": 4,

docs/conf.py

+19-3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
CONF = {k: _parser[k] for k in _parser.sections()}
2222
YEAR = datetime.now().year
23+
KEYWORDS = "*** Keywords ***"
24+
VARIABLES = "*** Variables ***"
2325

2426

2527
def setup(app):
@@ -38,12 +40,26 @@ def setup(app):
3840

3941
for client_dir in CLIENTS:
4042
client = Path(client_dir)
43+
print(client.name)
4144
with TemporaryDirectory() as td:
4245
tdp = Path(td)
43-
agg = ""
46+
agg = "\n".join(
47+
[
48+
"*** Settings ***",
49+
f"Documentation Keywords for {client.name}",
50+
"",
51+
]
52+
)
4453
for sub in sorted(client.rglob("*.resource")):
45-
print(f"collecting {sub.relative_to(client)}")
46-
agg += sub.read_text()
54+
sub_text = sub.read_text()
55+
has_vars = VARIABLES in sub_text
56+
has_kw = KEYWORDS in sub_text
57+
print(f"... collecting {sub.relative_to(client)}")
58+
print(f" ... keywords? {has_kw}")
59+
print(f" ... variables? {has_vars}")
60+
61+
split_on = VARIABLES if has_vars else KEYWORDS
62+
agg += "\n".join([split_on, sub_text.split(split_on)[1], ""])
4763
out_file = Path(tdp / f"{client.name}.resource")
4864
out_file.write_text(agg)
4965
subprocess.run(

docs/index.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
],
3232
"metadata": {
3333
"kernelspec": {
34-
"display_name": "Python 3",
34+
"display_name": "Python 3 (ipykernel)",
3535
"language": "python",
3636
"name": "python3"
3737
},
@@ -45,7 +45,7 @@
4545
"name": "python",
4646
"nbconvert_exporter": "python",
4747
"pygments_lexer": "ipython3",
48-
"version": "3.9.2"
48+
"version": "3.8.12"
4949
}
5050
},
5151
"nbformat": 4,

0 commit comments

Comments
 (0)