Spaces:
Runtime error
Runtime error
Greg Wilson commited on
Commit ·
a13d387
1
Parent(s): ff3a291
fix: trying to get missing notebooks to build
Browse files- skip YAML metadata from pages
- modify deploy.yml to use Makefile
Files that aren't building:
- optimization/05_portfolio_optimization.html
- polars/03_loading_data.html
- polars/13_window_functions.html
- polars/14_user_defined_functions.html
- polars/16_lazy_execution.html
- .github/workflows/deploy.yml +2 -2
- Makefile +2 -2
- scripts/build.py +7 -1
.github/workflows/deploy.yml
CHANGED
|
@@ -28,11 +28,11 @@ jobs:
|
|
| 28 |
|
| 29 |
- name: 📦 Install dependencies
|
| 30 |
run: |
|
| 31 |
-
|
| 32 |
|
| 33 |
- name: 🛠️ Export notebooks
|
| 34 |
run: |
|
| 35 |
-
|
| 36 |
|
| 37 |
- name: 📤 Upload artifact
|
| 38 |
uses: actions/upload-pages-artifact@v3
|
|
|
|
| 28 |
|
| 29 |
- name: 📦 Install dependencies
|
| 30 |
run: |
|
| 31 |
+
make install
|
| 32 |
|
| 33 |
- name: 🛠️ Export notebooks
|
| 34 |
run: |
|
| 35 |
+
make build
|
| 36 |
|
| 37 |
- name: 📤 Upload artifact
|
| 38 |
uses: actions/upload-pages-artifact@v3
|
Makefile
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
# Default target.
|
| 2 |
-
all
|
| 3 |
|
| 4 |
## commands : show all commands.
|
| 5 |
-
commands
|
| 6 |
@grep -h -E '^##' ${MAKEFILE_LIST} | sed -e 's/## //g' | column -t -s ':'
|
| 7 |
|
| 8 |
## install: install minimal required packages into current environment.
|
|
|
|
| 1 |
# Default target.
|
| 2 |
+
all: commands
|
| 3 |
|
| 4 |
## commands : show all commands.
|
| 5 |
+
commands:
|
| 6 |
@grep -h -E '^##' ${MAKEFILE_LIST} | sed -e 's/## //g' | column -t -s ':'
|
| 7 |
|
| 8 |
## install: install minimal required packages into current environment.
|
scripts/build.py
CHANGED
|
@@ -72,7 +72,13 @@ def get_course_metadata(course_dir: Path) -> Dict[str, Any]:
|
|
| 72 |
if readme_path.exists():
|
| 73 |
with open(readme_path, "r", encoding="utf-8") as f:
|
| 74 |
content = f.read()
|
| 75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
# Try to extract title from first heading
|
| 77 |
title_match = content.split("\n")[0]
|
| 78 |
if title_match.startswith("# "):
|
|
|
|
| 72 |
if readme_path.exists():
|
| 73 |
with open(readme_path, "r", encoding="utf-8") as f:
|
| 74 |
content = f.read()
|
| 75 |
+
|
| 76 |
+
# Strip YAML front matter if present
|
| 77 |
+
if content.startswith("---"):
|
| 78 |
+
end = content.find("\n---", 3)
|
| 79 |
+
if end != -1:
|
| 80 |
+
content = content[end + 4:].lstrip("\n")
|
| 81 |
+
|
| 82 |
# Try to extract title from first heading
|
| 83 |
title_match = content.split("\n")[0]
|
| 84 |
if title_match.startswith("# "):
|