Skip to content

Commit

Permalink
Add Sphinx site (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
bollwyvl committed Jul 22, 2021
1 parent 8687525 commit e259609
Show file tree
Hide file tree
Showing 14 changed files with 197 additions and 8 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ dist
coverage
**/*.d.ts
tests
docs
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,4 @@ dmypy.json

# built labextension
jupyter_videochat/labextension
docs/_build/
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ node_modules
**/package.json
**/build
**/dist
docs/_build/
9 changes: 9 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2

conda:
environment: docs/environment.yml

sphinx:
builder: html
configuration: docs/conf.py
fail_on_warning: true
7 changes: 5 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ issue/screenshot on the GitHub repository!
- Ensure the version has been updated, roughly following [semver]
- Basically, any _removal_ or _data_ constraint would trigger a `0.x+1.0`
- Otherwise it's probably `0.x.y+1`
- Ensure the [CHANGELOG](./CHANGELOG.md) and [README](./README.md) are
up-to-date
- Ensure the [CHANGELOG] and [README] are up-to-date
- Wait until CI passes on `master`
- Validate on Binder
- Download the release assets from the latest CI run
Expand All @@ -130,6 +129,10 @@ issue/screenshot on the GitHub repository!
- validate and merge
- Close the release issue!

[changelog]:
https://github.com/jupyterlab-contrib/jupyter-videochat/blob/master/CHANGELOG.md
[readme]:
https://github.com/jupyterlab-contrib/jupyter-videochat/blob/master/README.md
[semver]: https://semver.org/
[conda-forge feedstock]:
https://github.com/conda-forge/jupyter-videochat-feedstock
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# jupyter-videochat

> Video Chat with JupyterHub peers inside JupyterLab, powered by [Jitsi].
> Video Chat with JupyterHub peers (or the world) inside JupyterLab, powered by
> [Jitsi].
[![install from pypi][pypi-badge]][pypi]
[![install from conda-forge][conda-forge-badge]][conda-forge]
Expand Down Expand Up @@ -71,7 +72,7 @@ jupyter labextension list
```

If you do not see `jupyterlab-videochat`, the best course of action is to
[uninstall](#Uninstall) and [reinstall](#Install), and carefully watch the log
[uninstall](#uninstall) and [reinstall](#install), and carefully watch the log
output.

## Uninstall
Expand Down Expand Up @@ -191,7 +192,7 @@ showing your meeting and content. For example, to use...

...the doubly-escaped URL would be something like:

```http
```
https://mybinder.org/v2/gh/jupyterlab-contrib/jupyter-videochat/demo?
urlpath=git-pull
%3Frepo%3Dhttps%253A%252F%252Fgithub.com%252Fjakevdp%252FPythonDataScienceHandbook
Expand Down
8 changes: 8 additions & 0 deletions docs/_static/logo.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```{include} ../CHANGELOG.md
```
94 changes: 94 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
"""documentation for jupyterlite"""
import datetime
import json
import os
from pathlib import Path
from configparser import ConfigParser

RTD = json.loads(os.environ.get("READTHEDOCS", "False").lower())

CONF_PY = Path(__file__)
HERE = CONF_PY.parent
ROOT = HERE.parent
APP_PKG = ROOT / "package.json"
APP_DATA = json.loads(APP_PKG.read_text(encoding="utf-8"))

SETUP_CFG = ROOT / "setup.cfg"
SETUP_DATA = ConfigParser()
SETUP_DATA.read_file(SETUP_CFG.open())

# metadata
author = APP_DATA["author"]
project = SETUP_DATA["metadata"]["name"]
copyright = f"{datetime.date.today().year}, {author}"

# The full version, including alpha/beta/rc tags
release = APP_DATA["version"]

# The short X.Y version
version = ".".join(release.rsplit(".", 1))

# sphinx config
extensions = [
# first-party sphinx extensions
"sphinx.ext.todo",
"sphinx.ext.autosectionlabel",
# for pretty schema
"sphinx-jsonschema",
# mostly markdown (some ipynb)
"myst_nb",
# autodoc-related stuff must be in order
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
]

autosectionlabel_prefix_document = True
myst_heading_anchors = 3
suppress_warnings = ["autosectionlabel.*"]

# files
# templates_path = ["_templates"]
# html_favicon = "../app/lab/favicon.ico"
# rely on the order of these to patch json, labextensions correctly
html_static_path = [
# docs stuff
"_static",
]
exclude_patterns = [
"_build",
".ipynb_checkpoints",
"**/.ipynb_checkpoints",
"**/~.*",
"**/node_modules",
"babel.config.*",
"jest-setup.js",
"jest.config.js",
"jupyter_execute",
".jupyter_cache",
"test/",
"tsconfig.*",
"webpack.config.*",
]
jupyter_execute_notebooks = "auto"

execution_excludepatterns = [
"_static/**/*",
]
# html_css_files = [
# "theme.css",
# ]

# theme
html_theme = "pydata_sphinx_theme"
html_logo = "_static/logo.svg"
html_theme_options = {
"github_url": APP_DATA["homepage"],
"use_edit_page_button": True,
}

html_context = {
"github_user": "jupyterlab-contrib",
"github_repo": "jupyter-videochat",
"github_version": "master",
"doc_path": "docs",
}
3 changes: 3 additions & 0 deletions docs/developer-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```{include} ../CONTRIBUTING.md
```
23 changes: 23 additions & 0 deletions docs/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: jupyter-videochat-docs

channels:
- conda-forge

dependencies:
# run
- escapism
- jupyterlab >=3,<4
- python >=3,6,<3.10
# build
- nodejs >=14,<15
- pip
- twine
# docs
- myst-nb
- pydata-sphinx-theme
- sphinx
- sphinx-jsonschema
# check
- pytest-check-links
- hunspell
- hunspell-en
39 changes: 39 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# jupyter-videochat

> Video Chat with JupyterHub peers (or the world) inside JupyterLab, powered by [Jitsi].
![jupyter-videochat screenshot][lab-screenshot]

## Quick Start

```bash
pip install jupyter-videochat
```

This will install:

- a Python package named `jupyter-videochat` on PyPI, which offers:
- a `jupyter_server` extension which provides convenient, [configurable](./user-guide.md#configuration)
defaults for rooms on a JupyterHub
- will start as soon as you re-launch your `jupyter_server`
- a JupyterLab 3+ _federated extension_ named `jupyterlab-videochat`
- will be available immediately
- can launch a meet via [URL](./user-guide.md#start-a-meet-by-url)
- also distributed on [npm]
- for more about the TypeScript/JS API, see the [developer guide](./developer-guide.md)

## Learn More

```{toctree}
:maxdepth: 2
user-guide
developer-guide
changelog
```

[npm]: https://www.npmjs.com/package/jupyterlab-videochat
[jupyterhub]: https://github.com/jupyterhub/jupyterhub
[jitsi]: https://jitsi.org
[lab-screenshot]:
https://user-images.githubusercontent.com/45380/106391412-312d0400-63bb-11eb-9ed9-af3c4fe85ee4.png
3 changes: 3 additions & 0 deletions docs/user-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```{include} ../README.md
```
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jupyterlab-videochat",
"version": "0.5.1",
"description": "Video Chat with peers inside JupyterLab",
"description": "Video Chat with peers inside JupyterLab",
"keywords": [
"jupyter",
"jupyterlab",
Expand Down Expand Up @@ -35,8 +35,8 @@
"dev:ext": "jupyter labextension develop --overwrite .",
"lint": "jlpm prettier && jlpm eslint",
"lint:check": "jlpm prettier:check && jlpm eslint:check",
"prettier": "prettier --list-different --write \"*.{json,md}\" \"{.github,jupyter-config,src,style,schema}/*.{yml,json,ts,tsx,css}\"",
"prettier:check": "prettier --check \"*.{json,md}\" \"{.github,jupyter-config,src,style,schema}/*.{yml,json,ts,tsx,css}\"",
"prettier": "prettier --list-different --write \"*.{json,md}\" \"{.github,jupyter-config,src,style,schema,docs}/*.{yml,json,ts,tsx,css}\"",
"prettier:check": "prettier --check \"*.{json,md}\" \"{.github,jupyter-config,src,style,schema,docs}/*.{yml,json,ts,tsx,css}\"",
"eslint": "eslint . --ext .ts,.tsx --fix",
"eslint:check": "eslint . --ext .ts,.tsx",
"watch": "run-p watch:lib watch:ext",
Expand Down

0 comments on commit e259609

Please sign in to comment.