Skip to content

Commit 3b94a52

Browse files
Add action to test docs build and automate tutorials (logicalclocks#44)
1 parent 9a31c15 commit 3b94a52

21 files changed

+106
-5299
lines changed

Diff for: .github/workflows/mkdocs-release.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: mkdocs-release
2+
3+
on:
4+
push:
5+
branches: [ branch-* ]
6+
7+
jobs:
8+
publish-release:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v3
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Checkout hopsworks-tutorials
17+
uses: actions/checkout@v3
18+
with:
19+
repository: logicalclocks/hopsworks-tutorials
20+
path: docs/hopsworks-tutorials
21+
fetch-depth: 0
22+
23+
- uses: actions/setup-python@v2
24+
with:
25+
python-version: '3.8'
26+
27+
- name: install deps
28+
run: pip3 install pip==22.0.3 && pip3 install 'git+https://github.com/logicalclocks/feature-store-api@master#egg=hsfs[docs]&subdirectory=python'
29+
30+
- name: copy tutorial images
31+
run: python prepare_images.py
32+
33+
- name: setup git
34+
run: |
35+
git config --global user.name Mike
36+
git config --global user.email mike@docs.hopsworks.ai
37+
38+
# Put this back and increment version when cutting a new release branch
39+
# - name: mike deploy docs
40+
# run: mike deploy 3.0 latest -u --push

Diff for: .github/workflows/mkdocs-test.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: mkdocs-test
2+
3+
on: pull_request
4+
5+
jobs:
6+
test-docs-build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout main repo
11+
uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 0
14+
15+
- name: Checkout hopsworks-tutorials
16+
uses: actions/checkout@v3
17+
with:
18+
repository: logicalclocks/hopsworks-tutorials
19+
path: docs/hopsworks-tutorials
20+
fetch-depth: 0
21+
22+
- uses: actions/setup-python@v2
23+
with:
24+
python-version: '3.8'
25+
26+
- name: install deps
27+
run: pip3 install pip==22.0.3 && pip3 install 'git+https://github.com/logicalclocks/feature-store-api@master#egg=hsfs[docs]&subdirectory=python'
28+
29+
- name: copy tutorial images
30+
run: python prepare_images.py
31+
32+
- name: setup git
33+
run: |
34+
git config --global user.name Mike
35+
git config --global user.email mike@docs.hopsworks.ai
36+
37+
- name: mike deploy docs
38+
run: mike deploy 3.1-SNAPSHOT dev -u

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ venv.bak/
109109

110110
# mkdocs documentation
111111
site/
112+
docs/hopsworks-tutorials/
112113

113114
# mypy
114115
.mypy_cache/

Diff for: docs/getting_started/images/01_featuregroups.png

-120 KB
Binary file not shown.

Diff for: docs/getting_started/images/02_training-dataset.png

-295 KB
Binary file not shown.

Diff for: docs/getting_started/images/03_model.png

-238 KB
Binary file not shown.

Diff for: docs/getting_started/images/fg_overview.gif

-1.8 MB
Binary file not shown.

Diff for: docs/getting_started/images/fg_statistics.gif

-2.45 MB
Binary file not shown.

Diff for: docs/getting_started/images/fv_overview.gif

-2.63 MB
Binary file not shown.

Diff for: docs/getting_started/images/icon102.png

-5.04 KB
Binary file not shown.

Diff for: docs/getting_started/images/provenance.gif

-7.57 MB
Binary file not shown.

Diff for: docs/getting_started/images/serving_endpoints.gif

-1.26 MB
Binary file not shown.

Diff for: docs/getting_started/quickstart.ipynb

-1,587
This file was deleted.

Diff for: docs/tutorials/fraud_batch/1_feature_groups.ipynb

-935
This file was deleted.

Diff for: docs/tutorials/fraud_batch/2_feature_view_creation.ipynb

-879
This file was deleted.

Diff for: docs/tutorials/fraud_batch/3_model_training.ipynb

-631
This file was deleted.

Diff for: docs/tutorials/fraud_online/1_feature_groups.ipynb

-403
This file was deleted.

Diff for: docs/tutorials/fraud_online/2_feature_view_creation.ipynb

-302
This file was deleted.

Diff for: docs/tutorials/fraud_online/3_model_training.ipynb

-555
This file was deleted.

Diff for: mkdocs.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ edit_uri: ""
1010

1111
nav:
1212
- Home: index.md
13-
- Getting Started: getting_started/quickstart.ipynb
13+
- Getting Started: hopsworks-tutorials/quickstart.ipynb
1414
- Tutorials:
1515
- Fraud Batch:
16-
- 1. Feature Groups: tutorials/fraud_batch/1_feature_groups.ipynb
17-
- 2. Feature View: tutorials/fraud_batch/2_feature_view_creation.ipynb
18-
- 3. Model Training: tutorials/fraud_batch/3_model_training.ipynb
16+
- 1. Feature Groups: hopsworks-tutorials/fraud_batch/1_feature_groups.ipynb
17+
- 2. Feature View: hopsworks-tutorials/fraud_batch/2_feature_view_creation.ipynb
18+
- 3. Model Training: hopsworks-tutorials/fraud_batch/3_model_training.ipynb
1919
- Fraud Online:
20-
- 1. Feature Groups: tutorials/fraud_online/1_feature_groups.ipynb
21-
- 2. Feature View: tutorials/fraud_online/2_feature_view_creation.ipynb
22-
- 3. Model Training: tutorials/fraud_online/3_model_training.ipynb
20+
- 1. Feature Groups: hopsworks-tutorials/fraud_online/1_feature_groups.ipynb
21+
- 2. Feature View: hopsworks-tutorials/fraud_online/2_feature_view_creation.ipynb
22+
- 3. Model Training: hopsworks-tutorials/fraud_online/3_model_training.ipynb
2323
- Concepts:
2424
- Hopsworks Platform: concepts/hopsworks.md
2525
- Feature Store:

Diff for: prepare_images.py

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import argparse
2+
import shutil
3+
import os
4+
5+
if __name__ == "__main__":
6+
parser = argparse.ArgumentParser()
7+
parser.add_argument('--path', '-p', help="path to the hopsworks tutorials dir", type=str, default="docs/hopsworks-tutorials")
8+
parser.add_argument('--src', '-s', help="name of directory with images to copy", type=str, default="images")
9+
10+
args = parser.parse_args()
11+
12+
except_dirs = [".git", args.src]
13+
14+
sub_dirs = [
15+
element for element in os.listdir(args.path)
16+
if os.path.isdir(os.path.join(args.path, element)) and element not in except_dirs
17+
]
18+
19+
for dst in sub_dirs:
20+
shutil.copytree(os.path.join(args.path, args.src), os.path.join(args.path, dst, args.src), dirs_exist_ok=True)

0 commit comments

Comments
 (0)