diff --git a/docs/conf.py b/docs/conf.py index 91cd82f..35d8c3b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -93,6 +93,9 @@ `on Github `_. + + Or, `click here `_ + to run these notebooks on Coiled with access to Dask clusters. """ # TODO enable binder once Coiled supports websocket clusters over 443. diff --git a/examples/gif.ipynb b/examples/gif.ipynb index 69b98b1..f3156df 100644 --- a/examples/gif.ipynb +++ b/examples/gif.ipynb @@ -108,8 +108,8 @@ ], "source": [ "cluster = coiled.Cluster(\n", - " name=\"gjoseph92/stackstac\",\n", - " software=\"stackstac\",\n", + " name=\"stackstac-eu\",\n", + " software=\"gjoseph92/stackstac\",\n", " backend_options={\"region\": \"eu-central-1\"},\n", " # ^ Coiled doesn't yet support Azure's West Europe region, so instead we'll run on a nearby AWS data center in Frankfurt\n", " n_workers=20,\n", @@ -3816,4 +3816,4 @@ }, "nbformat": 4, "nbformat_minor": 5 -} +} \ No newline at end of file diff --git a/examples/show.ipynb b/examples/show.ipynb index fa4cfdf..52cb5ae 100644 --- a/examples/show.ipynb +++ b/examples/show.ipynb @@ -131,8 +131,8 @@ "source": [ "cluster = coiled.Cluster(\n", " name=\"stackstac\",\n", - " software=\"stackstac-show\",\n", - " n_workers=25,\n", + " software=\"gjoseph92/stackstac\",\n", + " n_workers=22,\n", " scheduler_cpu=2,\n", " backend_options={\"region\": \"us-west-1\"},\n", ")\n", diff --git a/scripts/coiled-notebook.py b/scripts/coiled-notebook.py new file mode 100644 index 0000000..894c4fb --- /dev/null +++ b/scripts/coiled-notebook.py @@ -0,0 +1,33 @@ +import subprocess + +from pathlib import Path +import coiled + +if __name__ == "__main__": + proc = subprocess.run( + "poetry export --without-hashes -E binder -E viz", + shell=True, + check=True, + capture_output=True, + text=True, + ) + deps = proc.stdout.splitlines() + + # TODO single-source the version! this is annoying + version = subprocess.run( + "poetry version -s", shell=True, check=True, capture_output=True, text=True + ).stdout.strip() + deps += [f"stackstac[binder,viz]=={version}"] + + examples = Path(__file__).parent.parent / "examples" + docs = Path(__file__).parent.parent / "docs" + notebooks = list(examples.glob("*.ipynb")) + list(docs.glob("*.ipynb")) + print(notebooks) + coiled.create_notebook( + name="stackstac", + pip=deps, + cpu=2, + memory="8 GiB", + files=notebooks, + description="Example notebooks from the stackstac documentation (https://stackstac.readthedocs.io/en/stable/)", + )