Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tbsgt committed Jan 15, 2019
0 parents commit 865311e
Show file tree
Hide file tree
Showing 95 changed files with 10,371 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
__pycache__/
_notebooks
_testoutput
.*_cache/
.idea/
.ipynb_checkpoints/
.jupyter/
*.egg-info/
*.html
*.log
*.pyc
build/
dist/
envs/
lib/
node_modules/
Untitled*.ipynb
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/lib/**/*
envs/
**/node_modules/
13 changes: 13 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
bracketSpacing: false
printWidth: 88
semi: true
singleQuote: true

overrides:
- files: "*.ts"
options:
arrowParens: always
trailingComma: es5
- files: "*.css"
options:
singleQuote: false
1 change: 1 addition & 0 deletions .projectignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.ipynb
28 changes: 28 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Copyright (c) 2018 Georgia Tech Research Corporation and Contributors

All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

* Neither the name of irobotframework nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include LICENSE README.md
recursive-include src/irobotframework/resources *.*
80 changes: 80 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# irobotframework

> _Interactive Acceptance Test-Driven Development and Robot Process Automation,
> powered by [IPython](http://ipython.org) and [Robot Framework](https://robotframework.org)_

irobotframework is a Jupyter Kernel that provides provides Robot Framework:
- test **execution** with **rich output** from Robot notebooks
- ...and IPython with `%%robot`
- code **completion** and **inspection** in notebooks and consoles
- syntax **highlighting** in JupyterLab for notebooks and `.robot` and `.resource` files
- extensible Robot **magics**, **reporters**, and **completions**

Learn more in the documentation:

| Interactive | HTML | Notebooks | GitHub |
|-|-|-|-|
| [Binder](https://mybinder.org/v2/gh/gtri/irobotframework/master?urlpath=lab%2Ftree%2Fdocs%2Findex.ipynb) | [readthedocs](https://irobotframework.readthedocs.org) | [nbviewer](https://github.com/gtri/irobotframework/docs/index.ipynb) | [GitHub](https://github.com/gtri/irobotframework/docs/index.ipynb)


## Features

| Feature | Screenshot |
|---------|------------|
| _Launch Robot Framework as a Notebook, Console or edit Robot files_ | [![][screenshot_launcher]][screenshot_launcher]
| _Get rich completion of Robot language features, Libraries, Keywords and Variables_ | [![][screenshot_complete]][screenshot_complete]
| _Inspect Libraries and Keywords... even ones you're writing_ | [![][screenshot_inspect]][screenshot_inspect]
| _Work with Robot in IPython as an extension_ | [![][screenshot_magic]][screenshot_magic]
| _Use Console and Rich display_ | [![][screenshot_console]][screenshot_console]




[screenshot_complete]: ./docs/_static/screenshots/screenshot_complete.png
[screenshot_console]: ./docs/_static/screenshots/screenshot_console.png
[screenshot_inspect]: ./docs/_static/screenshots/screenshot_inspect.png
[screenshot_launcher]: ./docs/_static/screenshots/screenshot_launcher.png
[screenshot_magic]: ./docs/_static/screenshots/screenshot_magic.png


## Install

```bash
# COMING SOON pip install irobotframework
# COMING SOON jupyter labextension install jupyterlab-irobotframework
```

or

```bash
# COMING SOON conda install -c conda-forge irobotframework jupyterlab-irobotframework
```

## Develop

Assuming a working [Anaconda](https://www.anaconda.com/download) or
[Miniconda](https://conda.io/miniconda.html):

```bash
conda install anaconda-project
anaconda-project run bootstrap
```

Now launch JupyterLab
```bash
anaconda-project run lab
```

Live develop by running the following in two prompts:
```bash
anaconda-project run jlpm watch
anaconda-project run lab --watch
```
> Note: Python changes require a kernel restart, TypeScript changes require a
browser reload

## Free Software

`irobotframework` is developed on [GitHub](https://github.com/gtri/irobotframework)
and under the [BSD-3-Clause license](./LICENSE).
148 changes: 148 additions & 0 deletions anaconda-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
name: irobotframework-dev

variables:
NEXT_RELEASE: 0.5.0

commands:
atom:
unix: atom .
env_spec: test
bootstrap:
unix: |-
set -eux \
&& pip install -e . --ignore-installed --no-deps --no-cache-dir \
&& jupyter kernelspec install \
--name robotframework \
--sys-prefix \
src/irobotframework/resources \
&& jupyter kernelspec list \
&& jlpm bootstrap
env_spec: default
build:docs:
description: build the docs
unix: sphinx-build docs dist/docs
env_spec: docs
build:docs:watch:
description: build the docs
unix: sphinx-autobuild -b html docs dist/docs
env_spec: docs
build:pip:sdist:
description: build a pip sdist
unix: |-
set -eux \
&& python setup.py clean \
&& python setup.py sdist --dist-dir ${PROJECT_DIR}/dist/pip
env_spec: test
build:pip:wheel:
description: build a pip wheel
unix: |-
set -eux \
&& python setup.py clean \
&& python setup.py bdist_wheel --dist-dir ${PROJECT_DIR}/dist/pip
env_spec: test
build:npm:
description: build an npm package
unix: |-
set -eux \
&& mkdir -p dist/npm \
&& cd src/packages/jupyterlab-robotframework \
&& mv $(npm pack) ../../../dist/npm/
env_spec: test
jlpm:
description: run the yarn bundled with JupyterLab
unix: jlpm
env_spec: default
lab:
description: run JupyterLab
unix: jupyter lab --no-browser --debug
env_spec: default
lab:build:
description: rebuild JupyterLab
unix: jupyter lab build --dev
env_spec: default
ipython:
unix: ipython --kernel-name robotframework
env_spec: default
test:py:
unix: mkdir -p _testoutput && cd _testoutput && pytest
env_spec: test
test:robot:
unix: set -eux \
&& cd atest/acceptance \
&& python -m robot -d ../../_testoutput --xunit junit_robot.xml .
env_spec: test
test:release:
unix: python -m scripts.release_check ${NEXT_RELEASE}
env_spec: test
test:lint:
unix: |-
set -eux \
&& python -m scripts.nblint \
&& python -m scripts.copyright \
&& python -m robot.tidy -r atest \
&& rflint \
--configure TooManyTestSteps:20 \
--configure TooFewKeywordSteps:0 \
--configure LineTooLong:200 \
atest/**/*.robot \
&& black --line-length 88 setup.py ./src/irobotframework/ scripts docs \
&& flake8 --max-line-length=88 \
&& jlpm lint
env_spec: test
release:pypi:
unix: |-
set -eux \
&& twine upload dist/sdist/* \
&& twine upload dist/sdist/*
env_spec: test

env_specs:
_python:
packages:
- python >=3.6,<3.7
_build:
description: an environment for building conda packages (busted in CI, use base)
inherit_from:
- _python
packages:
- conda-build
- conda-verify
default:
description: a pretty heavy environment, because robot & jupyter & node
inherit_from:
- _python
channels:
- conda-forge
- defaults
packages:
- importnb >=0.5.2
- ipykernel >=5.1
- ipython >=7.2
- jupyterlab >=0.35.4,<0.36
- nodejs >=8.12,<9
- pillow
- robotframework >=3.1
test:
description: an even-heavier test environment, because browsers
inherit_from:
- default
packages:
- black
- flake8
- geckodriver
- jupyter_kernel_test
- pylint
- pytest
- pytest-cov
- python-chromedriver-binary
- robotframework-lint
- robotframework-seleniumlibrary >=3.2.0
- twine
docs:
inherit_from:
- default
packages:
- nbsphinx
- sphinx
- sphinx_rtd_theme
- sphinx-autobuild
11 changes: 11 additions & 0 deletions atest/acceptance/00_Smoke.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
*** Settings ***
Documentation Some quick tests to see if we broke the build somehow.
Suite Setup Set Screenshot Directory ${OUTPUT_DIR}/${BROWSER}/smoke
Resource ../resources/Lab.robot
Resource ../resources/Browser.robot

*** Test Cases ***
JupyterLab Loads
[Documentation] Does a JupyterLab open?
Page Should Contain Robot Framework
Capture Page Screenshot 00_smoke.png
20 changes: 20 additions & 0 deletions atest/acceptance/01_Python.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
*** Settings ***
Documentation Try out the python magics
Suite Setup Set Screenshot Directory ${OUTPUT_DIR}/${BROWSER}/python
Default Tags kernel:python browser:${BROWSER}
Resource ../resources/Lab.robot
Resource ../resources/Browser.robot
Resource ../resources/Notebook.robot
Resource ../resources/LabRobot.robot

*** Test Cases ***
Python Notebook
[Documentation] Can we make a simple Python notebook?
Capture Page Screenshot 00_before.png
Launch a new Python 3 Notebook
Capture Page Screenshot 01_new.png
Load IPython Robot extension
Add and Run Cell ${MAGIC TEST CASE 1}
Capture Page Screenshot 02_running.png
Capture Successful Robot "Log" Screenshot
Capture Successful Robot "Report" Screenshot
31 changes: 31 additions & 0 deletions atest/acceptance/02_Robot/00_Basic.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
*** Settings ***
Documentation Try out the Robot kernel
Default Tags kernel:robot browser:${BROWSER}
Resource ../../resources/Lab.robot
Resource ../../resources/Browser.robot
Resource ../../resources/Notebook.robot
Resource ../../resources/LabRobot.robot
Library SeleniumLibrary

*** Test Cases ***
Robot Test Case Notebook
[Documentation] Can we make a simple Robot Test notebook?
Set Screenshot Directory ${OUTPUT_DIR}/${BROWSER}/robot/base
Capture Page Screenshot 00_before.png
Launch a new Robot Framework Notebook
Capture Page Screenshot 01_new.png
Add and Run Cell ${TEST CASE 1}
Capture Page Screenshot 02_running.png
Capture Successful Robot "Log" Screenshot
Capture Successful Robot "Report" Screenshot

Robot Task Notebook
[Documentation] Can we make a simple Robot Process Automation notebook?
Set Screenshot Directory ${OUTPUT_DIR}/${BROWSER}/robot/rpa
Capture Page Screenshot 00_before.png
Launch a new Robot Framework Notebook
Capture Page Screenshot 01_new.png
Add and Run Cell ${TASK 1}
Capture Page Screenshot 02_running.png
Capture Successful Robot "Log" Screenshot
Capture Successful Robot "Report" Screenshot
Loading

0 comments on commit 865311e

Please sign in to comment.