Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create cell form templates notes #12

Merged
merged 1 commit into from
Feb 7, 2019
Merged
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
82 changes: 82 additions & 0 deletions cell-forms/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Cell Forms

## Design Tenets

1. Avoid "plugin" system that hurts portability/external dependencies
2. Don't break non-interactive
3. No Kernel involved
4. No magic; introspectable
5. Notebook files are source of truth; templates are expectecd to change over time and we need an answer to that problem

<!---- Insert UI example image here -->

```
pip install jupyter-cell-form-dbconn
```

vs.

```
jupyter template install http://example.com/cell-forms/dbconn.json
```

## Notebook Level Metadata

* packages/deps/environment configuration
* in-use templates (drop down section #2)

## Cell-level Metadata

* ref to nb-level templates entry

```js
{
cell_type: "code"
source: "# Generated Code ...",
metadata: {
form: {
type: { vendor, name, version },
values: { ... }
}

}
}
```

## Jupyter Server Configuration

* json files but (extensible / overridable for `/hub`)
* config dir? data dir?

## UI Logic in JS

* Toggle Views
* JSON Schema --> Render form
* Find data dependencies and GET on the extension path
* Run button

## Jupyter Server Extension

* `/api/cell-forms`
* (available-to-create)
* (dd section #1)
* `/api/cell-forms/vendor/name/version`
* POST
* --> form-fields
* <-- rendered code

## JupyterTemplateApp

* JupyterApp
* Adheres to data dir
* Stores templates in `/templates`

## Template definition

* `vendor`
* `display_name`
* `version`
* `lang => template contents (Jinja)`
* `schema: {}`
* `server-reqs`