Skip to content

Commit

Permalink
docs: prebuild the documentation notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
12rambau authored Oct 18, 2024
1 parent 5c37f58 commit 9a71fae
Show file tree
Hide file tree
Showing 11 changed files with 712 additions and 203 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/documentation.yaml

This file was deleted.

12 changes: 7 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ repos:
additional_dependencies:
- tomli

- repo: "https://github.com/kynan/nbstripout"
rev: "0.5.0"
hooks:
- id: nbstripout
stages: [pre-commit]
# waiting for https://github.com/gee-community/geetools/issues/337
# so notebooks can again be executed from the documentation
#- repo: "https://github.com/kynan/nbstripout"
# rev: "0.5.0"
# hooks:
# - id: nbstripout
# stages: [pre-commit]
17 changes: 1 addition & 16 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
from datetime import datetime
from pathlib import Path

import pytest_gee

# add . to sys to import local extensions
sys.path.append(str(Path(".").resolve()))

Expand Down Expand Up @@ -126,17 +124,4 @@
autosectionlabel_prefix_document = True

# -- options for myst-nb ------------------------------------------------------
nb_execution_mode = "force"

# -- Script to authenticate to Earthengine using a token -----------------------
def gee_configure() -> None:
"""Initialize earth engine according to the environment."""
if "EARTHENGINE_SERVICE_ACCOUNT" in os.environ:
pytest_gee.init_ee_from_service_account()
elif "EARTHENGINE_PROJECT" in os.environ:
pytest_gee.init_ee_from_token()
else:
raise ValueError("Cannot authenticate with Earth Engine.")


gee_configure()
nb_execution_mode = "auto"
Loading

0 comments on commit 9a71fae

Please sign in to comment.