Skip to content

Commit b5cf121

Browse files
authored
Build docs against the latest jupyterlite-xeus-python (#338)
* Build docs against the latest jupyterlite-xeus-python * Missing comma * Missing build dependencies * Add workflow for rtd preview in PRs
1 parent fe685a8 commit b5cf121

6 files changed

+47
-20
lines changed

.github/workflows/rtd_preview.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: RTD Preview
2+
on:
3+
pull_request_target:
4+
types: [opened]
5+
6+
permissions:
7+
pull-requests: write
8+
9+
jobs:
10+
binder:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Comment on the PR with the RTD preview
14+
uses: actions/github-script@v6
15+
with:
16+
github-token: ${{secrets.GITHUB_TOKEN}}
17+
script: |
18+
var PR_NUMBER = context.issue.number
19+
github.rest.issues.createComment({
20+
issue_number: context.issue.number,
21+
owner: context.repo.owner,
22+
repo: context.repo.repo,
23+
body: `[![lite-badge](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)](https://ipycanvas--${PR_NUMBER}.org.readthedocs.build/en/${PR_NUMBER}/lite/lab/index.html) :point_left: Try it on ReadTheDocs with JupyterLite!`
24+
})

.readthedocs.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ build:
66
python: "mambaforge-4.10"
77

88
conda:
9-
environment: docs/environment.yml
9+
environment: docs/build-environment.yml

docs/build-environment.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: ipycanvas-docs
2+
3+
channels:
4+
- conda-forge
5+
6+
dependencies:
7+
- ipycanvas
8+
- mamba
9+
# This is needed for building ipycanvas from source for the emscripten env
10+
- yarn
11+
# Docs requirements
12+
- pydata-sphinx-theme
13+
- jupyterlite-sphinx
14+
- jupyterlite-xeus-python >=0.9.2,<0.10
15+
- jupyterlab-night

docs/conf.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# -*- coding: utf-8 -*-
22
extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon", "jupyterlite_sphinx"]
33

4-
jupyterlite_config = "jupyterlite_config.json"
54
jupyterlite_dir = "."
65

76
master_doc = "index"

docs/environment.yml

+7-13
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
name: xeus-python-kernel-docs
2-
1+
name: ipycanvas
32
channels:
4-
- conda-forge
5-
3+
- https://repo.mamba.pm/emscripten-forge
4+
- https://repo.mamba.pm/conda-forge
65
dependencies:
7-
- ipycanvas
8-
- mamba
9-
- pydata-sphinx-theme
10-
- empack
11-
6+
- pillow
7+
- numpy
8+
- ipywidgets
129
- pip:
13-
- jupyterlite
14-
- jupyterlite-sphinx
15-
- jupyterlite-xeus-python
16-
- jupyterlab-night
10+
- ..

docs/jupyterlite_config.json

-5
This file was deleted.

0 commit comments

Comments
 (0)