Skip to content
This repository has been archived by the owner on Nov 28, 2019. It is now read-only.

WIP: website #75

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
language: generic

os:
- linux

sudo: false

stages:
- name: docs
if: branch = docs2

# TODO: stage=docs (above) only on tag once initial version is
# up. Same for gh pages deploy section (at the bottom).

jobs:
include:
- stage: docs
env: PYTHON_VERSION="3.6"
install:
- source ./etc/travis-miniconda.sh
- conda create -n test-environment python=$PYTHON_VERSION
- source activate test-environment
- conda install param ipywidgets
- conda install -c conda-forge notebook ipython sphinx beautifulsoup4 graphviz selenium phantomjs
- pip install nbsite sphinx_ioam_theme
- pip install -e .
script:
- cd doc
- nbsite_nbpagebuild.py ioam paramnb . .
- PARAMNB_INIT='{"p1":5}' TARGETED='{"Target1":{"p1":3}, "Target2":{"s":"test"}}' CUSTOM='{"custom":{"val":99}}' sphinx-build -b html . ./_build/html
- nbsite_fix_links.py _build/html
- touch ./_build/html/.nojekyll
- nbsite_cleandisthtml.py ./_build/html take_a_chance

deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: ./_build/html
on:
branch: docs2
55 changes: 11 additions & 44 deletions doc/AdditionalFeatures.ipynb → doc/Additional_Features.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"import param\n",
Expand All @@ -24,9 +22,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"class TooltipExample(param.Parameterized):\n",
Expand All @@ -36,9 +32,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"paramnb.Widgets(TooltipExample)"
Expand All @@ -56,9 +50,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"class Location(param.Parameterized):\n",
Expand All @@ -75,9 +67,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"paramnb.Widgets(Task)"
Expand All @@ -86,9 +76,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"Task.employee.location.duration"
Expand All @@ -113,9 +101,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
Expand All @@ -125,9 +111,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"class HTMLExample(param.Parameterized):\n",
Expand Down Expand Up @@ -155,9 +139,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"import holoviews as hv\n",
Expand Down Expand Up @@ -189,30 +171,15 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.0"
"pygments_lexer": "ipython3"
}
},
"nbformat": 4,
Expand Down
79 changes: 17 additions & 62 deletions doc/JSONInit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"import os\n",
Expand Down Expand Up @@ -59,9 +57,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"os.environ['PARAMNB_INIT']"
Expand All @@ -77,9 +73,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"class Test(param.Parameterized):\n",
Expand All @@ -97,9 +91,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"paramnb.Widgets(Test, initializer=paramnb.JSONInit())"
Expand Down Expand Up @@ -128,9 +120,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"os.environ['TARGETED']"
Expand All @@ -146,9 +136,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"class Target1(param.Parameterized):\n",
Expand All @@ -170,9 +158,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"paramnb.Widgets(Target1, initializer=paramnb.JSONInit(varname='TARGETED'))"
Expand All @@ -190,19 +176,15 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"paramnb.Widgets(Target2, initializer=paramnb.JSONInit(varname='TARGETED'))"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"metadata": {},
"source": [
"## Example 3"
]
Expand All @@ -224,9 +206,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"os.environ['CUSTOM']"
Expand All @@ -235,9 +215,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"class Example(param.Parameterized):\n",
Expand Down Expand Up @@ -265,9 +243,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"import json\n",
Expand All @@ -289,9 +265,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"os.environ['PARAMNB_INIT']"
Expand All @@ -300,9 +274,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"class Test(param.Parameterized):\n",
Expand All @@ -322,19 +294,15 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"paramnb.Widgets(Test, initializer=paramnb.JSONInit(json_file='param_init.json'))"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"metadata": {},
"source": [
"## Tips"
]
Expand All @@ -355,22 +323,9 @@
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.12"
"pygments_lexer": "ipython3"
}
},
"nbformat": 4,
Expand Down
Loading