INSTALL

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.

pip

pip install robotframework-jupyterlibrary

conda

conda install -c conda-forge robotframework-jupyterlibrary

master

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.

Here’s a complete setup:

conda create --name testing-jupyter --channel conda-forge
  python=3 \   # 3.6 required, not tested with pypy
  jupyterlab \
  robotframework-seleniumlibrary \
  geckodriver

conda activate testing-jupyter

pip install --no-deps \             # don't want any surprises
  git+http://github.com/robots-from-jupyter/robotframework-jupyterlibrary
[1]:

Contributing to JupyterLibrary

Get CONDA_EXE

conda install -c conda-forge doit
# optional meta-dependencies
conda install -c conda-forge conda-lock mamba

Get the code

git clone http://github.com/robots-from-jupyter/robotframework-jupyterlibrary
cd robotframework-jupyterlibrary

Doit

Listing all the tasks
doit list
Just run (just about) everything
doit release
Lock Files

After adding/changing any dependencies in .github/env_specs, the lockfiles need to be refreshed in .github/locks and committed.

Requires conda-lock, and optionally mamba for faster solves

doit lock
Reproducing CI failures

By default, the doit scripts use the lockfile most like where you are developing, hoping for a better cache hit rate. On the same operating system, however, any of the pre-solved lockfiles can be used, by specifying the RJFL_LOCKFILE environment variable.

For example, if linux-64 running python3.6 with jupyterlab 1 failed:

#!/usr/bin/env bash
set -eux
RFJL_LOCKDIR=test/linux-64/py3.6/lab1 doit release

Or, in a bat script:

@echo on
set RFJL_LOCKDIR=test/win-64/py3.9/lab1
doit release

This will recreate the test environment with the specified lockfile, and repeat all the steps.

Appendix: Current tasks

[2]:
!python ../dodo.py list --all --status
E binder            get to a basic interactive state
R build             build packages
R build:hash
R build:pypi
R docs              build HTML docs
R docs:rtd:env      generate a readthedocs-compatible env
R docs:sphinx
R env
R env:docs
R env:lint
R env:test
R js                javascript cruft
R js:yarn
R lab               start a jupyter lab server (with all other extensions)
R lab:serve
R lint              lint code
R lint:black
R lint:prettier
R lint:pyflakes
R lint:robot:tidy
E release           the full set of tasks needed for a new release
R setup
R setup:docs        [docs] python development install
R setup:lint        [lint] python development install
R setup:test        [test] python development install
R test              (dry)run tests
R test:atest        run acceptance tests with robot
E test:combine      combine all robot outputs into a single HTML report
R test:dryrun