Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 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
31 changes: 14 additions & 17 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,25 @@ build:
- SHELL=/bin/bash /bin/bash /tmp/micromamba-install.sh

# Override the create_environment step (undocumented feature) to create
# multiple environments.
# a single environment instead of multiple environments.
create_environment:
# Pin micromamba
- /bin/bash --login -c "micromamba self-update --version 2.0.7"
# Create the env for building the docs
- /bin/bash --login -c "micromamba env create -n jupytergis-docs -f docs/environment-docs.yml"
# Create the isolated env for building JupyterGIS
- /bin/bash --login -c "micromamba create -n jupytergis-build -c conda-forge nodejs hatch pip python=3.13"
- /bin/bash --login -c "micromamba run -n jupytergis-build pip install 'jupyterlab==4.3' 'datamodel-code-generator>=0.23.0'"
# Pin micromamba
- /bin/bash --login -c "micromamba self-update --version 2.0.7"
# Create the environment using the updated environment-docs.yml
- /bin/bash --login -c "micromamba env create -n jupytergis -f docs/environment-docs.yml"

# Override the install step to do nothing - we already created the envs
# Override the install step to do nothing - we already created the env
install:
- "echo 'Skipping! We already have the environments we need.'"
- "echo 'Skipping! We already have the environment we need.'"

# Before building the docs, build JupyterGIS in its isolated environment,
# then install the wheels into the docs environment.
# Before building the docs, build JupyterGIS in its environment,
# then install the wheels into the same environment.
pre_build:
- /bin/bash --login -c "micromamba run -n jupytergis-build jlpm install"
- /bin/bash --login -c "micromamba run -n jupytergis-build jlpm build"
- /bin/bash --login -c "micromamba run -n jupytergis-build jlpm build:packages"
- /bin/bash --login -c "micromamba run -n jupytergis jlpm install"
- /bin/bash --login -c "micromamba run -n jupytergis jlpm build"
- /bin/bash --login -c "micromamba run -n jupytergis jlpm build:packages"
- |-
/bin/bash --login -c "micromamba run -n jupytergis-docs \
/bin/bash --login -c "micromamba run -n jupytergis \
python -m pip install \
$(ls ./python/jupytergis_core/dist/jupytergis*.whl) \
$(ls ./python/jupytergis_lab/dist/jupytergis*.whl) \
Expand All @@ -48,6 +45,6 @@ build:
build:
html:
- |-
/bin/bash --login -c "cd docs && micromamba run -n jupytergis-docs \
/bin/bash --login -c "cd docs && micromamba run -n jupytergis \
python -m sphinx --fail-on-warning --keep-going --nitpicky --show-traceback --builder html --doctree-dir _build/doctrees --define language=en . \
$READTHEDOCS_OUTPUT/html"
11 changes: 7 additions & 4 deletions docs/environment-docs.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: jupytergis-docs
name: jupytergis
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to keep the name as jupytergis-docs because I already have an environment titled jupytergis on my machine and prefer to keep it :)

channels:
- conda-forge
- nodefaults
dependencies:
- python=3.12
- pip # Needed to install jupytergis wheels in RTD build

# Build docs & JupyterLite
- pip
- nodejs
- hatch
- jupyterlite-core
- jupyterlite-xeus>=3.1.3,<4
- jupyterlite-sphinx
Expand All @@ -18,3 +18,6 @@ dependencies:
- sphinx-togglebutton
- myst-parser
- xeus-python # TODO: Do we need this?
- pip:
- jupyterlab==4.3
- datamodel-code-generator>=0.23.0
Loading