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
Contributing to JupyterLibrary¶
Get CONDA_EXE
¶
Get miniforge
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.
doit lock
Bootstrapping from no lockfiles requires an external provider of
conda-lock
. It may require runningdoit lock
a few times to get a stable set of environment solutions.
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.
Releasing¶
ensure
VERSION
has been increased appropriatelyensure
HISTORY.ipynb
is up-to-date(usually) grab the
dist
assets from CI, unpack into./dist
make a GitHub release, adding the
.tar.gz
,.whl
, andSHA256SUMS
upload to PyPI
doit publish
do a post-mortem issue
bump
VERSION
to a working status
Appendix: Current tasks¶
E binder get to a basic interactive state
R build build packages
R build:hash
R build:pypi
R conda_build build conda package
R conda_build:build
R conda_build:recipe
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:meta
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
R lock generate conda lock files for all the excursions
R lock:docs__linux-64
R lock:docs__osx-64
R lock:docs__win-64
R lock:lint__linux-64
R lock:lint__osx-64
R lock:lint__win-64
R lock:meta__linux-64
R lock:meta__osx-64
R lock:meta__win-64
R lock:test__linux-64__py3_6__lab1
R lock:test__linux-64__py3_6__lab2
R lock:test__linux-64__py3_8__lab1
R lock:test__linux-64__py3_8__lab2
R lock:test__linux-64__py3_8__lab3
R lock:test__linux-64__py3_9__lab1
R lock:test__linux-64__py3_9__lab2
R lock:test__linux-64__py3_9__lab3
R lock:test__osx-64__py3_6__lab1
R lock:test__osx-64__py3_6__lab2
R lock:test__osx-64__py3_8__lab1
R lock:test__osx-64__py3_8__lab2
R lock:test__osx-64__py3_8__lab3
R lock:test__osx-64__py3_9__lab1
R lock:test__osx-64__py3_9__lab2
R lock:test__osx-64__py3_9__lab3
R lock:test__win-64__py3_6__lab1
R lock:test__win-64__py3_6__lab2
R lock:test__win-64__py3_8__lab1
R lock:test__win-64__py3_8__lab2
R lock:test__win-64__py3_8__lab3
R lock:test__win-64__py3_9__lab1
R lock:test__win-64__py3_9__lab2
R lock:test__win-64__py3_9__lab3
R publish publish to pypi
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