Skip to content

Commit aaca4c1

Browse files
committed
Remove zipping of examples folder
1 parent cba3af9 commit aaca4c1

File tree

3 files changed

+2
-33
lines changed

3 files changed

+2
-33
lines changed

docs/conf.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,8 @@
1414
import datetime
1515
import inspect
1616
import os
17-
import re
18-
import shutil
1917
import sys
20-
import tempfile
2118
import warnings
22-
from pathlib import Path
2319

2420
# If extensions (or modules to document with autodoc) are in another directory,
2521
# add these directories to sys.path here. If the directory is relative to the
@@ -219,33 +215,6 @@
219215
}
220216

221217

222-
# Copy code examples to download directory
223-
downloads_folder = Path("_downloads")
224-
downloads_folder.mkdir(exist_ok=True)
225-
226-
227-
def make_filename_safe(filename: str, safe_char: str = "_") -> str:
228-
"""Make a filename safe for saving to disk."""
229-
# Replace any characters that are not allowed in a filename with the safe character
230-
safe_filename = re.sub(r'[\\/:*?"<>|]', safe_char, filename)
231-
return safe_filename
232-
233-
234-
with tempfile.TemporaryDirectory() as temp_dir:
235-
temp_dir = Path(temp_dir)
236-
237-
# Copy examples folder to temp directory (with a folder name matching parcels version)
238-
examples_folder = temp_dir / make_filename_safe(f"parcels_tutorials ({version})")
239-
shutil.copytree("examples", examples_folder)
240-
241-
# Zip contents of temp directory and save to _downloads folder
242-
shutil.make_archive(
243-
"_downloads/parcels_tutorials",
244-
"zip",
245-
temp_dir,
246-
)
247-
248-
249218
# based on pandas doc/source/conf.py
250219
def linkcode_resolve(domain, info):
251220
"""Determine the URL corresponding to Python object."""

docs/documentation/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Documentation and Tutorials
22

3-
Parcels has several documentation and tutorial Jupyter notebooks and scripts which go through various aspects of Parcels. Static versions of the notebooks are available below via the gallery in the site, with the interactive notebooks being available either completely online at the following [Binder link](https://mybinder.org/v2/gh/OceanParcels/parcels/main?labpath=docs%2Fexamples%2Fparcels_tutorial.ipynb). Following the gallery of notebooks is a list of scripts which provide additional examples to users. You can work with the example notebooks and scripts locally by downloading {download}`parcels_tutorials.zip </_downloads/parcels_tutorials.zip>` and running with your own Parcels installation.
3+
Shown below are several documentation and tutorial Jupyter notebooks and scripts which go through various aspects of Parcels.
44

55
```{nbgallery}
66
:caption: Overview

pixi.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ sphinxcontrib-mermaid = "*"
7676

7777
[feature.docs.tasks]
7878
docs = "sphinx-build docs docs/_build"
79-
docs-watch = 'sphinx-autobuild --ignore "*.zip" docs docs/_build'
79+
docs-watch = 'sphinx-autobuild docs docs/_build'
8080
docs-linkcheck = "sphinx-build -b linkcheck docs/ docs/_build/linkcheck"
8181

8282
[feature.pre-commit.dependencies]

0 commit comments

Comments
 (0)