Skip to content

Commit a8413ff

Browse files
authored
🏗️ upgrade all the things 🤖 (#41)
Upgrade robotkernel, jupyterlab, node, conda, etc. Build with constructor 3. Run acceptance tests from shipped code.
1 parent 24fbe3d commit a8413ff

File tree

84 files changed

+983
-1127
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+983
-1127
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ constructor/construct.yaml
99
dist/
1010
envs/
1111
**/icons/*.png
12+
constructor/.*

README.md

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ anaconda-project run test:win
2222

2323
## Motivation
2424

25-
While Robot Framework has no dependencies beyond the Python standard library,
26-
using it for non-trivial testing or process automation usually requires a fair
27-
amount of additional Python dependencies, and even some more exotic ones.
25+
While [Robot Framework][robotframework] has no dependencies beyond the Python
26+
standard library, using it for non-trivial testing or process automation usually
27+
requires a fair amount of additional Python dependencies, and even some more
28+
exotic ones.
2829

29-
As the focus of this workshop, using [robotkernel][] requires the Jupyter stack,
30-
and to demonstrate some of its more advanced features, some fairly extensive
31-
extra libraries from both the Robot Framework and the scientific Python ecosystems.
30+
The focus of this workshop, running Robot tests and tasks interactively with
31+
[robotkernel][], requires the Jupyter stack, and to demonstrate some of its more
32+
advanced features, some fairly extensive extra libraries from both the Robot
33+
Framework and the scientific Python ecosystems.
3234

3335
To make a three-hour workshop reasonable, this repo uses [conda][] and
3436
[constructor][] to build single-file installers for multiple platforms, reducing
@@ -39,16 +41,12 @@ possible in the event that network problems arise.
3941
## conda packaging
4042
Once it has matured, `robotkernel` will be available from [conda-forge][], the
4143
community-driven upstream of the Anaconda Distribution.
42-
However, in the name of efficiency, `conda-forge` builds `noarch: python`
43-
packages, which are not compatible with `constructor`'s multiplatform magic.
4444

45-
So for these installers, we build (or rebuild) a number of dependencies, such
46-
as [robotframework][] 3.1 and SeleniumLibrary 3.2.0.
47-
48-
> TODO: automated detection and re-arching of packages from conda-forge feedstocks
45+
So for these installers, and supporting exmaples, we build a number of
46+
dependencies.
4947

5048
### robotlab
51-
While still pre-`1.0`, JupyterLab's build chain has some negative externalities
49+
JupyterLab's build chain has some negative externalities
5250
for end users, namely an install- or run-time dependency on NodeJS and npmjs.org
5351
when using any labextensions other than the built-in set (e.g. Notebook, Terminal,
5452
Console, Editor, etc.). Because, for the purposes of the workshop, we want to
@@ -65,7 +63,7 @@ do most of the things `jupyter lab` can do.
6563
`robotlab` works like `jupyter lab`, while `robotlab-extension` works like
6664
`jupyter labextension`. This isn't a toy installation: with the bundled `nodejs`,
6765
an intrepid user can still install any of the [labextensions][] that are
68-
compatible with the version `robotlab` was built with: as of writing, `0.35.x`.
66+
compatible with the version `robotlab` was built with: as of writing, `1.1.x`.
6967

7068
## [constructor][]
7169
All of the dependencies are captured in [construct.yaml.in][]. In addition to
@@ -75,14 +73,24 @@ In addition to required dependencies a number of extra libraries are included to
7573
showcase some of the features of using Robot Framework interactively.
7674
- `JupyterLibrary` for testing Jupyter clients with robotframework
7775
- `SeleniumLibrary` for controlling browsers
78-
- `geckodriver` for interacting with Mozilla Firefox
79-
- `chromedriver` for interacting with Chromium and Google Chrome
80-
- > it's pretty easy to [get `webdriver`][webdriver] for Microsoft Edge, but
81-
can't be redistributed
76+
- `geckodriver` for interacting with Mozilla Firefox 57+
8277
- `opencv` for image-driven testing
8378
- `robotframework-lint` for helping you write clean robot syntax
8479
- `RESTInstance` for testing REST APIs, including swagger
8580

81+
## On Browsers and WebDrivers
82+
RobotLab includes Mozilla Firefox and `geckodriver`, with versions that will be
83+
supported for _years_, not _months_, by a team that is committed to open source
84+
and web standards.
85+
86+
### webdriver for Microsoft Internet Explorer
87+
It's pretty easy to [get `webdriver`][webdriver] for Microsoft Edge, but...
88+
- it but can't be redistributed
89+
- it has to match the version of Edge/Explorer exactly
90+
91+
### chromedriver for Google Chrome
92+
It's also pretty easy to get [chromedriver][] for Google Chrome, but...
93+
- it has to match the version of Chrome exactly
8694

8795
[anaconda-project]: https://github.com/anaconda-platform/anaconda-project
8896
[conda-forge]: https://github.com/conda-forge
@@ -94,3 +102,4 @@ showcase some of the features of using Robot Framework interactively.
94102
[Miniconda]: https://conda.io/miniconda.html
95103
[robotkernel]: https://github.com/robots-from-jupyter/robotkernel
96104
[webdriver]: https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/#downloads
105+
[chromedriver]: https://chromedriver.chromium.org/downloads

anaconda-project.yml

Lines changed: 62 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,154 +1,121 @@
1-
name: robocon-2019-workshop
1+
name: robotlab
22

33
commands:
4-
build:
5-
unix: python -m scripts.build
6-
env_spec: _build
4+
integrity:
5+
unix: python -m scripts.integrity
6+
env_spec: _qa
77

88
lint:
99
unix: python -m scripts.lint
10-
env_spec: _build
11-
12-
integrity:
13-
unix: python -m scripts.integrity
14-
env_spec: _build
10+
env_spec: _qa
1511

16-
build:win:
12+
build:
13+
unix: python -m scripts.build
1714
windows: python -m scripts.build
18-
env_spec: _build_win
15+
env_spec: _robots_from_jupyter
16+
17+
build:lab:
18+
unix: python -m scripts.build lab
19+
windows: python -m scripts.build lab
20+
env_spec: _qa
1921

2022
test:
2123
unix: python -m scripts.test
22-
env_spec: _test
23-
24-
test:win:
2524
windows: python -m scripts.test
26-
env_spec: _test_win
25+
env_spec: _test
2726

2827
combine:
2928
unix: python -m scripts.combine
30-
env_spec: _build
29+
env_spec: _qa
3130

3231
robotlab:setup:
32+
unix: cd robotlab && python -m pip install -e . --ignore-installed --no-deps -vv
33+
windows: cd robotlab && python -m pip install -e . --ignore-installed --no-deps -vv
3334
env_spec: robotlab-dev
34-
unix: cd robotlab && python -m pip install -e . --ignore-installed --no-deps --no-cache-dir -vv
35-
windows: cd robotlab && python -m pip install -e . --ignore-installed --no-deps --no-cache-dir -vv
36-
37-
robotlab:setup:win:
38-
env_spec: robotlab-dev-win
39-
windows: cd robotlab && python -m pip install -e . --ignore-installed --no-deps --no-cache-dir -vv
4035

41-
robotlab:shortcuts:
36+
robotlab:
37+
unix: robotlab
38+
windows: robotlab
4239
env_spec: robotlab-dev
43-
unix: robotlab-shortcuts
4440

4541
robotlab:launch:
46-
env_spec: robotlab-dev
47-
unix: python ./robotlab/src/robotlab/launch.py
48-
49-
robotlab:launch:win:
50-
env_spec: robotlab-dev-win
42+
unix: python -m robotlab.launch
5143
windows: python -m robotlab.launch
44+
env_spec: robotlab-dev
5245

5346
robotlab:build:
54-
env_spec: robotlab-dev
5547
unix: robotlab build
56-
57-
robotlab:build:win:
58-
env_spec: robotlab-dev-win
5948
windows: robotlab build
60-
61-
robotlab:
6249
env_spec: robotlab-dev
63-
unix: robotlab
6450

65-
robotlab:win:
66-
env_spec: robotlab-dev-win
67-
windows: robotlab
51+
channels:
52+
- https://conda.anaconda.org/anaconda
53+
- https://conda.anaconda.org/conda-forge
6854

6955
env_specs:
70-
_build:
71-
platforms:
72-
- linux-64
73-
- osx-64
74-
inherit_from:
75-
- _robots_from_jupyter
76-
77-
_build_win:
78-
platforms:
79-
- win-64
80-
inherit_from:
81-
- _robots_from_jupyter
82-
83-
_test:
84-
platforms:
85-
- linux-64
86-
- osx-64
87-
inherit_from:
88-
- _robots_from_jupyter
56+
_robots_from_jupyter:
57+
description: the main build/test environment
8958
channels:
90-
- ./_artifacts/conda-bld
91-
- https://repo.anaconda.com/pkgs/main
92-
- https://repo.anaconda.com/pkgs/free
59+
- https://conda.anaconda.org/anaconda
9360
- https://conda.anaconda.org/conda-forge
9461
packages:
95-
- robotframework-jupyterlibrary
62+
- conda >=4.7.12,<4.8
63+
- conda-build >=3.18.9,<3.19
64+
- conda-verify
65+
- constructor >=3,<3.1
66+
- firefox >=68.0.2,<69
67+
- geckodriver
68+
- pillow
69+
- python >=3.6,<3.7.0a0
70+
- python-libarchive-c
71+
- ripgrep
72+
- robotframework
73+
- robotframework-seleniumlibrary
74+
75+
_lab:
76+
packages:
77+
- jupyterlab ==1.1.4
78+
- nodejs >=11,<12
79+
- python >=3.6,<3.7.0a0
9680

97-
_test_win:
98-
platforms:
99-
- win-64
81+
_qa:
82+
inherit_from:
83+
- _lab
84+
packages:
85+
- black
86+
- flake8
87+
- robotframework-lint
88+
89+
_test:
10090
inherit_from:
10191
- _robots_from_jupyter
10292
channels:
10393
- ./_artifacts/conda-bld
104-
- https://repo.anaconda.com/pkgs/main
105-
- https://repo.anaconda.com/pkgs/free
106-
- https://conda.anaconda.org/conda-forge
10794
packages:
10895
- robotframework-jupyterlibrary
10996

110-
11197
robotlab-dev:
98+
description: basically what goes in the constructor for interactive dev/test
99+
inherit_from:
100+
- _lab
112101
channels:
113102
- ./_artifacts/conda-bld
114-
- https://repo.anaconda.com/pkgs/main
115-
- https://repo.anaconda.com/pkgs/free
116-
- https://conda.anaconda.org/conda-forge
117103
packages:
118-
- jupyterlab >=0.35,<0.36
119-
- nodejs >=8,<9
104+
- conda
105+
- firefox
120106
- pyshortcuts
121-
- python >=3.6,<3.7
122107
- restinstance
123108
- robotframework-seleniumscreenshots
124109
- robotkernel
125110

126111
robotlab-dev-win:
127112
inherit_from:
128113
- robotlab-dev
129-
114+
packages:
115+
- robotframework-whitelibrary
130116

131117
robotlab-test:
132118
inherit_from:
133119
- robotlab-dev
134120
packages:
135121
- robotlab
136-
137-
_robots_from_jupyter:
138-
packages:
139-
- black
140-
- conda >=4.5.11,<4.6
141-
- conda-build >=3.15,<3.16
142-
- conda-verify
143-
- constructor >=2.3,<2.4
144-
- flake8
145-
- geckodriver
146-
- python >=3.6,<3.7
147-
- python-chromedriver-binary ==2.46
148-
- robotframework
149-
- robotframework-lint
150-
- robotframework-seleniumlibrary
151-
channels:
152-
- https://repo.anaconda.com/pkgs/main
153-
- https://repo.anaconda.com/pkgs/free
154-
- https://conda.anaconda.org/conda-forge

azure-pipelines.yml

Lines changed: 48 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,51 @@
1-
jobs:
2-
- template: ci/job.test.yml
3-
parameters:
4-
name: Linux
5-
vmImage: ubuntu-16.04
6-
7-
- template: ci/job.test.yml
8-
parameters:
9-
name: MacOSX
10-
vmImage: macos-10.13
11-
12-
- template: ci/job.test.yml
13-
parameters:
14-
name: Windows
15-
vmImage: vs2017-win2016
16-
17-
- template: ci/job.combine.yml
18-
parameters:
19-
name: Linux
20-
vmImage: ubuntu-16.04
21-
221
trigger: [master]
232

243
pr: [master]
4+
5+
variables:
6+
ROBOTLAB_VERSION: 2019.9.0
7+
PYTHONUNBUFFERED: 1
8+
9+
jobs:
10+
# group one: simple conda/webpack builds, validation
11+
- template: ci/job.noarch.yml
12+
- template: ci/job.win.yml
13+
- template: ci/job.lab.yml
14+
15+
# group two: verify conda builds, do acceptance tests
16+
- template: ci/job.noarch-test.yml
17+
- template: ci/job.win-test.yml
18+
19+
- template: ci/job.main.yml
20+
parameters:
21+
name: Linux
22+
vmImage: ubuntu-16.04
23+
24+
- template: ci/job.main.yml
25+
parameters:
26+
name: MacOSX
27+
vmImage: macos-10.13
28+
29+
- template: ci/job.main.yml
30+
parameters:
31+
name: Windows
32+
vmImage: vs2017-win2016
33+
activate: call activate &&
34+
35+
- template: ci/job.selftest.yml
36+
parameters:
37+
name: Linux
38+
vmImage: ubuntu-16.04
39+
40+
- template: ci/job.selftest.yml
41+
parameters:
42+
name: MacOSX
43+
vmImage: macos-10.13
44+
45+
- template: ci/job.selftest.yml
46+
parameters:
47+
name: Windows
48+
vmImage: vs2017-win2016
49+
50+
# group 3: reporting, etc
51+
- template: ci/job.combine.yml

ci/env-combine.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: robotlab-combine
2+
3+
channels:
4+
- https://conda.anaconda.org/anaconda
5+
- https://conda.anaconda.org/conda-forge
6+
7+
dependencies:
8+
- robotframework

0 commit comments

Comments
 (0)