Skip to content

Commit

Permalink
CI: improvements to the docs build (#5161)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximlt committed Dec 15, 2021
1 parent 14ff500 commit d0912af
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ on:
- 'v[0-9]+.[0-9]+.[0-9]+b[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]+'
workflow_dispatch:

inputs:
target:
description: 'dev or main'
required: true
default: 'dev'

jobs:
build_docs:
name: Documentation
Expand All @@ -19,7 +24,8 @@ jobs:
env:
DESC: "Documentation build"
HV_REQUIREMENTS: "doc"
CHANS_DEV: "-c pyviz/label/dev -c bokeh"
# conda-forge to install myst-nb ...
CHANS_DEV: "-c pyviz/label/dev -c conda-forge"
CHANS: "-c pyviz"
MPLBACKEND: "Agg"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -50,14 +56,13 @@ jobs:
conda config --set always_yes True
conda install -c pyviz "pyctdev>=0.5"
doit ecosystem_setup
doit env_create ${{ env.CHANS_DEV}} --python=3.7
doit env_create ${{ env.CHANS_DEV}} --python=3.8
- name: doit develop_install
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
conda list
doit develop_install ${{ env.CHANS_DEV}} -o doc
conda install -c pyviz "jupyter_client<7"
conda install -c conda-forge geckodriver selenium awscli
- name: doit env_capture
run: |
Expand Down Expand Up @@ -85,13 +90,13 @@ jobs:
conda activate test-environment
nbsite build --what=html --output=builtdocs --org holoviz --project-name holoviews
- name: upload dev
if: (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc'))
if: (github.event.inputs.target == 'dev' || contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc'))
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
aws s3 sync --quiet ./builtdocs s3://dev.holoviews.org/
- name: upload main
if: (!(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
if: (github.event.inputs.target == 'main' || !(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
Expand Down
23 changes: 14 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,6 @@
"scikit-image"
]

if sys.version_info.major > 2:
extras_require["examples"].extend(
[
"pyarrow",
"ibis-framework >=1.3",
] # spatialpandas incompatibility
)

# Extra third-party libraries
extras_require["extras"] = extras_require["examples"] + [
"pscript ==0.7.1",
Expand All @@ -78,6 +70,19 @@

extras_require["unit_tests"] = extras_require["examples"] + extras_require["tests"]

# Moving ibis-framework from `examples` to `unit_tests`
# because it could not be installed on Linux with conda-forge
# (https://github.com/conda-forge/ibis-framework-feedstock/issues/54)
# which was blocking the docs build. ibis-framework isn't
# required to build the docs anyway.
if sys.version_info.major > 2:
extras_require["unit_tests"].extend(
[
"pyarrow",
"ibis-framework >=1.3",
] # spatialpandas incompatibility
)

extras_require["basic_tests"] = (
extras_require["tests"]
+ ["matplotlib >=3", "bokeh >=1.1.0", "pandas"]
Expand All @@ -90,7 +95,7 @@
]

extras_require['doc'] = extras_require['examples'] + [
'nbsite >=0.6.8a36',
'nbsite >=0.7.1',
'sphinx',
'sphinx_holoviz_theme',
'mpl_sample_data >=3.1.3',
Expand Down

0 comments on commit d0912af

Please sign in to comment.