Skip to content

Rework how we include notebooks in our docs site #139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Oct 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 14 additions & 31 deletions site/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,40 +30,23 @@ clone:
@echo "\nCloning source repos ..."
git clone -b prod git@github.com:validmind/developer-framework.git $(SRC_DIR)

# Copy over Jupyter notebooks

NOTEBOOKS = \
notebooks/quickstart_customer_churn_full_suite.ipynb \
notebooks/external_test_providers_demo.ipynb \
notebooks/external_tests/tests/MyCustomTest.py \
notebooks/how_to/implementing_custom_tests.ipynb \
notebooks/how_to/explore_test_suites_test_plans_and_tests.ipynb \
notebooks/how_to/explore_test_suites_and_tests.ipynb \
notebooks/how_to/run_a_test.ipynb \
notebooks/how_to/run_a_test_suite.ipynb \
notebooks/nlp/nlp_sentiment_analysis_catboost_demo.ipynb \
notebooks/time_series/tutorial_time_series_forecasting.ipynb \
notebooks/llm/hugging_face_integration_demo.ipynb \
notebooks/probability_of_default/credit_risk_scorecard_development_demo.ipynb \
notebooks/probability_of_default/credit_risk_scorecard_validation_demo.ipynb \
notebooks/probability_of_default/helpers/scorecard_model.py \
notebooks/probability_of_default/helpers/model_development.py \
notebooks/llm/prompt_validation_demo.ipynb

# Copy over Jupyter notebooks and supporting files
notebooks:
@echo "\nUpdating notebook source ..."
@rm -f notebooks.zip > /dev/null 2>&1
@rm -rf $(DEST_DIR_NB)/ > /dev/null 2>&1 && mkdir -p $(DEST_DIR_NB)
@$(foreach notebook,$(NOTEBOOKS), \
dest_dir=$(DEST_DIR_NB)/$(patsubst notebooks/%,%,$(dir $(notebook))); \
mkdir -p $$dest_dir > /dev/null 2>&1; \
cp -r $(SRC_DIR)/$(notebook) $$dest_dir > /dev/null 2>&1; \
echo "Updated $(notebook)"; \
)
@echo "\nCopying additional notebooks from Google Drive ..."
cp "$(HOME)/Google Drive/Shared drives/ValidMind Demo/Notebooks/Introduction_Customer_Churn.ipynb" $(DEST_DIR_NB)/
@echo "\nZipping up notebooks into notebooks.zip ..."
@rm -f notebooks.zip
@rm -rf $(DEST_DIR_NB)/ && mkdir -p $(DEST_DIR_NB)
@cp -r $(SRC_DIR)/notebooks/. $(DEST_DIR_NB)/
@echo "Copying LICENSE into notebooks ..."
@cp -r $(SRC_DIR)/LICENSE $(DEST_DIR_NB)/
@rm -rf $(DEST_DIR_NB)/code_sharing
@echo "Moving Quickstart notebook into the root of notebooks/ ..."
@if [ -f "$(DEST_DIR_NB)/code_samples/quickstart_customer_churn_full_suite.ipynb" ]; then mv $(DEST_DIR_NB)/code_samples/quickstart_customer_churn_full_suite.ipynb $(DEST_DIR_NB)/quickstart_customer_churn_full_suite.ipynb; fi
@echo "Zip up notebooks.zip ..."
@zip -r notebooks.zip $(DEST_DIR_NB) > /dev/null 2>&1
# This line fixes text casing in Quarto when notebooks are embedded via wildcard
@echo "Renaming code_samples/nlp_and_llm to fix Quarto sidebar ..."
@if [ -d "$(DEST_DIR_NB)/code_samples/nlp_and_llm" ]; then mv $(DEST_DIR_NB)/code_samples/nlp_and_llm $(DEST_DIR_NB)/code_samples/LLM_and_NLP; fi


# Make Python library docs & copy them over
python-docs:
Expand Down
42 changes: 14 additions & 28 deletions site/_quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,27 @@ website:
menu:
- text: "{{< fa rocket >}} Get Started"
file: guide/get-started-developer-framework.qmd
- text: "{{< fa cube >}} Supported Models"
- text: "{{< fa cubes >}} Supported Models"
file: guide/supported-models.qmd
- text: "---"
- text: "{{< fa code >}} CODE SAMPLES"
- text: "{{< fa book >}} QuickStart · `Customer Churn` · `Binary Classification`"
- text: "{{< fa book >}} Quickstart · `Customer Churn` · `Binary Classification`"
file: notebooks/quickstart_customer_churn_full_suite.ipynb
- text: "{{< fa book >}} Full Introduction · `Customer Churn` · `Binary Classification`"
file: notebooks/Introduction_Customer_Churn.ipynb
- text: "{{< fa book >}} Forecasting · `Credit Risk Scorecard` · `Time Series`"
file: notebooks/time_series/tutorial_time_series_forecasting.ipynb
- text: "{{< fa book >}} Natural Language Processing · `Sensitivity Analysis` · `Binary Classification`"
file: notebooks/nlp/nlp_sentiment_analysis_catboost_demo.ipynb
- text: "{{< fa code >}} Try it on Jupyter Hub!"
# - text: "{{< fa book >}} Full Introduction · `Customer Churn` · `Binary Classification`"
# file: notebooks/code_samples/Introduction_Customer_Churn.ipynb
- text: "{{< fa book-open-reader >}} More Samples · `LLM` · `NLP` · `Time Series` · `Etc.`"
file: guide/samples-jupyter-notebooks.qmd
- text: "{{< fa download >}} Download Samples · `notebooks.zip`"
file: notebooks.zip
- text: "{{< fa hand-point-right >}} Try it on Jupyter Hub {{< fa hand-point-left >}}"
file: https://jupyterhub.validmind.ai/
- text: "---"
- text: "{{< fa vial >}} TESTING"
- text: "{{< fa vials >}} Run Tests & Test Suites"
- text: "{{< fa flask-vial >}} Run Tests & Test Suites"
file: guide/testing-overview.qmd
- text: "---"
- text: "{{< fa book >}} REFERENCE"
- text: "Developer Framework {{< fa external-link >}}"
- text: "{{< fa external-link >}} Developer Framework"
file: validmind/validmind.html
target: _blank
- text: "FAQ"
Expand Down Expand Up @@ -179,27 +179,13 @@ website:
- text: "---"
# - guide/dataset-object.qmd
# - guide/model-object.qmd
- text: "Tests, test plans & test suites"
- text: "Tests & test suites"
file: guide/testing-overview.qmd
contents:
- notebooks/external_test_providers_demo.ipynb
- notebooks/how_to/implementing_custom_tests.ipynb
- notebooks/how_to/explore_test_suites_and_tests.ipynb
- notebooks/how_to/run_a_test.ipynb
- notebooks/how_to/run_a_test_suite.ipynb
contents: "notebooks/how_to/*.ipynb"
- text: "---"
- text: "Code samples"
file: guide/samples-jupyter-notebooks.qmd
contents:
- notebooks/quickstart_customer_churn_full_suite.ipynb
- notebooks/Introduction_Customer_Churn.ipynb
- notebooks/time_series/tutorial_time_series_forecasting.ipynb
- text: "Sensitivity Analysis: Natural Language Processing Analysis & Binary Classification using CatBoost"
file: notebooks/nlp/nlp_sentiment_analysis_catboost_demo.ipynb
- text: "Credit Risk Scorecard Model Development"
file: notebooks/probability_of_default/credit_risk_scorecard_development_demo.ipynb
- text: "Credit Risk Scorecard Model Validation"
file: notebooks/probability_of_default/credit_risk_scorecard_validation_demo.ipynb
contents: "notebooks/code_samples/**"
- text: "---"
- test: "Reference"
file: guide/reference.qmd
Expand Down
22 changes: 9 additions & 13 deletions site/_site/guide/add-content-blocks.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,41 +114,37 @@
</li>
<li>
<a class="dropdown-item" href="../guide/supported-models.html" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-cube" aria-label="cube"></i> Supported Models</span></a>
<span class="dropdown-text"><i class="fa-solid fa-cubes" aria-label="cubes"></i> Supported Models</span></a>
</li>
<li><hr class="dropdown-divider"></li>
<li class="dropdown-header"><i class="fa-solid fa-code" aria-label="code"></i> CODE SAMPLES</li>
<li>
<a class="dropdown-item" href="../notebooks/quickstart_customer_churn_full_suite.html" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-book" aria-label="book"></i> QuickStart · <code>Customer Churn</code> · <code>Binary Classification</code></span></a>
<span class="dropdown-text"><i class="fa-solid fa-book" aria-label="book"></i> Quickstart · <code>Customer Churn</code> · <code>Binary Classification</code></span></a>
</li>
<li>
<a class="dropdown-item" href="../notebooks/Introduction_Customer_Churn.html" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-book" aria-label="book"></i> Full Introduction · <code>Customer Churn</code> · <code>Binary Classification</code></span></a>
<a class="dropdown-item" href="../guide/samples-jupyter-notebooks.html" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-book-open-reader" aria-label="book-open-reader"></i> More Samples · <code>LLM</code> · <code>NLP</code> · <code>Time Series</code> · <code>Etc.</code></span></a>
</li>
<li>
<a class="dropdown-item" href="../notebooks/time_series/tutorial_time_series_forecasting.html" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-book" aria-label="book"></i> Forecasting · <code>Credit Risk Scorecard</code> · <code>Time Series</code></span></a>
</li>
<li>
<a class="dropdown-item" href="../notebooks/nlp/nlp_sentiment_analysis_catboost_demo.html" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-book" aria-label="book"></i> Natural Language Processing · <code>Sensitivity Analysis</code> · <code>Binary Classification</code></span></a>
<a class="dropdown-item" href="../notebooks.zip" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-download" aria-label="download"></i> Download Samples · <code>notebooks.zip</code></span></a>
</li>
<li>
<a class="dropdown-item" href="https://jupyterhub.validmind.ai/" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-code" aria-label="code"></i> Try it on Jupyter Hub!</span></a>
<span class="dropdown-text"><i class="fa-solid fa-hand-point-right" aria-label="hand-point-right"></i> Try it on Jupyter Hub <i class="fa-solid fa-hand-point-left" aria-label="hand-point-left"></i></span></a>
</li>
<li><hr class="dropdown-divider"></li>
<li class="dropdown-header"><i class="fa-solid fa-vial" aria-label="vial"></i> TESTING</li>
<li>
<a class="dropdown-item" href="../guide/testing-overview.html" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-vials" aria-label="vials"></i> Run Tests &amp; Test Suites</span></a>
<span class="dropdown-text"><i class="fa-solid fa-flask-vial" aria-label="flask-vial"></i> Run Tests &amp; Test Suites</span></a>
</li>
<li><hr class="dropdown-divider"></li>
<li class="dropdown-header"><i class="fa-solid fa-book" aria-label="book"></i> REFERENCE</li>
<li>
<a class="dropdown-item" href="../validmind/validmind.html" rel="" target="_blank">
<span class="dropdown-text">Developer Framework <i class="fa-solid fa-external-link" aria-label="external-link"></i></span></a>
<span class="dropdown-text"><i class="fa-solid fa-external-link" aria-label="external-link"></i> Developer Framework</span></a>
</li>
</ul>
</li>
Expand Down
22 changes: 9 additions & 13 deletions site/_site/guide/before-you-begin.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,41 +112,37 @@
</li>
<li>
<a class="dropdown-item" href="../guide/supported-models.html" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-cube" aria-label="cube"></i> Supported Models</span></a>
<span class="dropdown-text"><i class="fa-solid fa-cubes" aria-label="cubes"></i> Supported Models</span></a>
</li>
<li><hr class="dropdown-divider"></li>
<li class="dropdown-header"><i class="fa-solid fa-code" aria-label="code"></i> CODE SAMPLES</li>
<li>
<a class="dropdown-item" href="../notebooks/quickstart_customer_churn_full_suite.html" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-book" aria-label="book"></i> QuickStart · <code>Customer Churn</code> · <code>Binary Classification</code></span></a>
<span class="dropdown-text"><i class="fa-solid fa-book" aria-label="book"></i> Quickstart · <code>Customer Churn</code> · <code>Binary Classification</code></span></a>
</li>
<li>
<a class="dropdown-item" href="../notebooks/Introduction_Customer_Churn.html" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-book" aria-label="book"></i> Full Introduction · <code>Customer Churn</code> · <code>Binary Classification</code></span></a>
<a class="dropdown-item" href="../guide/samples-jupyter-notebooks.html" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-book-open-reader" aria-label="book-open-reader"></i> More Samples · <code>LLM</code> · <code>NLP</code> · <code>Time Series</code> · <code>Etc.</code></span></a>
</li>
<li>
<a class="dropdown-item" href="../notebooks/time_series/tutorial_time_series_forecasting.html" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-book" aria-label="book"></i> Forecasting · <code>Credit Risk Scorecard</code> · <code>Time Series</code></span></a>
</li>
<li>
<a class="dropdown-item" href="../notebooks/nlp/nlp_sentiment_analysis_catboost_demo.html" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-book" aria-label="book"></i> Natural Language Processing · <code>Sensitivity Analysis</code> · <code>Binary Classification</code></span></a>
<a class="dropdown-item" href="../notebooks.zip" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-download" aria-label="download"></i> Download Samples · <code>notebooks.zip</code></span></a>
</li>
<li>
<a class="dropdown-item" href="https://jupyterhub.validmind.ai/" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-code" aria-label="code"></i> Try it on Jupyter Hub!</span></a>
<span class="dropdown-text"><i class="fa-solid fa-hand-point-right" aria-label="hand-point-right"></i> Try it on Jupyter Hub <i class="fa-solid fa-hand-point-left" aria-label="hand-point-left"></i></span></a>
</li>
<li><hr class="dropdown-divider"></li>
<li class="dropdown-header"><i class="fa-solid fa-vial" aria-label="vial"></i> TESTING</li>
<li>
<a class="dropdown-item" href="../guide/testing-overview.html" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-vials" aria-label="vials"></i> Run Tests &amp; Test Suites</span></a>
<span class="dropdown-text"><i class="fa-solid fa-flask-vial" aria-label="flask-vial"></i> Run Tests &amp; Test Suites</span></a>
</li>
<li><hr class="dropdown-divider"></li>
<li class="dropdown-header"><i class="fa-solid fa-book" aria-label="book"></i> REFERENCE</li>
<li>
<a class="dropdown-item" href="../validmind/validmind.html" rel="" target="_blank">
<span class="dropdown-text">Developer Framework <i class="fa-solid fa-external-link" aria-label="external-link"></i></span></a>
<span class="dropdown-text"><i class="fa-solid fa-external-link" aria-label="external-link"></i> Developer Framework</span></a>
</li>
</ul>
</li>
Expand Down
22 changes: 9 additions & 13 deletions site/_site/guide/collaborate-on-documentation-projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,41 +113,37 @@
</li>
<li>
<a class="dropdown-item" href="../guide/supported-models.html" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-cube" aria-label="cube"></i> Supported Models</span></a>
<span class="dropdown-text"><i class="fa-solid fa-cubes" aria-label="cubes"></i> Supported Models</span></a>
</li>
<li><hr class="dropdown-divider"></li>
<li class="dropdown-header"><i class="fa-solid fa-code" aria-label="code"></i> CODE SAMPLES</li>
<li>
<a class="dropdown-item" href="../notebooks/quickstart_customer_churn_full_suite.html" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-book" aria-label="book"></i> QuickStart · <code>Customer Churn</code> · <code>Binary Classification</code></span></a>
<span class="dropdown-text"><i class="fa-solid fa-book" aria-label="book"></i> Quickstart · <code>Customer Churn</code> · <code>Binary Classification</code></span></a>
</li>
<li>
<a class="dropdown-item" href="../notebooks/Introduction_Customer_Churn.html" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-book" aria-label="book"></i> Full Introduction · <code>Customer Churn</code> · <code>Binary Classification</code></span></a>
<a class="dropdown-item" href="../guide/samples-jupyter-notebooks.html" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-book-open-reader" aria-label="book-open-reader"></i> More Samples · <code>LLM</code> · <code>NLP</code> · <code>Time Series</code> · <code>Etc.</code></span></a>
</li>
<li>
<a class="dropdown-item" href="../notebooks/time_series/tutorial_time_series_forecasting.html" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-book" aria-label="book"></i> Forecasting · <code>Credit Risk Scorecard</code> · <code>Time Series</code></span></a>
</li>
<li>
<a class="dropdown-item" href="../notebooks/nlp/nlp_sentiment_analysis_catboost_demo.html" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-book" aria-label="book"></i> Natural Language Processing · <code>Sensitivity Analysis</code> · <code>Binary Classification</code></span></a>
<a class="dropdown-item" href="../notebooks.zip" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-download" aria-label="download"></i> Download Samples · <code>notebooks.zip</code></span></a>
</li>
<li>
<a class="dropdown-item" href="https://jupyterhub.validmind.ai/" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-code" aria-label="code"></i> Try it on Jupyter Hub!</span></a>
<span class="dropdown-text"><i class="fa-solid fa-hand-point-right" aria-label="hand-point-right"></i> Try it on Jupyter Hub <i class="fa-solid fa-hand-point-left" aria-label="hand-point-left"></i></span></a>
</li>
<li><hr class="dropdown-divider"></li>
<li class="dropdown-header"><i class="fa-solid fa-vial" aria-label="vial"></i> TESTING</li>
<li>
<a class="dropdown-item" href="../guide/testing-overview.html" rel="" target="">
<span class="dropdown-text"><i class="fa-solid fa-vials" aria-label="vials"></i> Run Tests &amp; Test Suites</span></a>
<span class="dropdown-text"><i class="fa-solid fa-flask-vial" aria-label="flask-vial"></i> Run Tests &amp; Test Suites</span></a>
</li>
<li><hr class="dropdown-divider"></li>
<li class="dropdown-header"><i class="fa-solid fa-book" aria-label="book"></i> REFERENCE</li>
<li>
<a class="dropdown-item" href="../validmind/validmind.html" rel="" target="_blank">
<span class="dropdown-text">Developer Framework <i class="fa-solid fa-external-link" aria-label="external-link"></i></span></a>
<span class="dropdown-text"><i class="fa-solid fa-external-link" aria-label="external-link"></i> Developer Framework</span></a>
</li>
</ul>
</li>
Expand Down
Loading