Skip to content

Commit

Permalink
Merge pull request #79 from ontime-re/76-update-documentation-notebooks
Browse files Browse the repository at this point in the history
76 update documentation notebooks
  • Loading branch information
ben-jy authored Jan 8, 2025
2 parents 8748f30 + f69a63a commit c868b0d
Show file tree
Hide file tree
Showing 25 changed files with 4,302 additions and 2,933 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jupyter:

run-notebooks:
@echo "Running notebooks"
@cd docs && poetry run python run_notebooks.py
poetry run python docs/run_notebooks.py

test:
@echo "Running tests"
Expand Down
766 changes: 524 additions & 242 deletions docs/getting_started.ipynb

Large diffs are not rendered by default.

16 changes: 14 additions & 2 deletions docs/run_notebooks.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import papermill as pm
from pathlib import Path
import subprocess

def is_git_ignored(file_path):
result = subprocess.run(
["git", "check-ignore", "-q", str(file_path)],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
return result.returncode == 0

print("########################################")
print("# Notebook Executor #")
Expand All @@ -8,11 +17,14 @@
current_directory = Path(".")
files = [file for file in current_directory.rglob("*.ipynb")]

# filter out git-ignored files
filtered_files = [file for file in files if not is_git_ignored(file)]

print("\n")
print("Files to execute:\n")
print(files)
print(filtered_files)

for file in files:
for file in filtered_files:
# print("\n")
print(f"Executing: {file}")
pm.execute_notebook(input_path=file, output_path=file, progress_bar=False)
Expand Down
460 changes: 237 additions & 223 deletions docs/tutorials/0_create-an-anomaly-detection-workflow.ipynb

Large diffs are not rendered by default.

330 changes: 174 additions & 156 deletions docs/user_guide/0_core/0.1.1_time-series_data-loading.ipynb

Large diffs are not rendered by default.

187 changes: 123 additions & 64 deletions docs/user_guide/0_core/0.1_time-series.ipynb

Large diffs are not rendered by default.

254 changes: 200 additions & 54 deletions docs/user_guide/0_core/0.2_detectors.ipynb

Large diffs are not rendered by default.

274 changes: 229 additions & 45 deletions docs/user_guide/0_core/0.3_generators.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit c868b0d

Please sign in to comment.