Skip to content

Commit

Permalink
Precompute notebook with PlutoSliderServer (#5)
Browse files Browse the repository at this point in the history
* Update notebook manifest to latest versions

* Reduce number of slider options

* Build notebook with PlutoSliderServer

* Ignore PlutoSliderServer prebuild files

* Separate bind elements to different cells

* Add DocsPreviewCleanup workflow

* Remove test job from CI

* Instantiate before building docs

* Don't test docstrings

* Rerun notebook

* Update IntroML URL

* Reduce size of groups for precomputation

* Simplify notebook building code

* Fix splitting of weight groups

* Run formatter

* Update note about interactivity

* Make sliders a little finer again

* Make bounds of bivariate plot match interactive elements

* Revert "Make bounds of bivariate plot match interactive elements"

This reverts commit 37c274b.
  • Loading branch information
sethaxen authored Jun 20, 2023
1 parent 4d1df5f commit 7e2c642
Show file tree
Hide file tree
Showing 9 changed files with 1,281 additions and 447 deletions.
33 changes: 1 addition & 32 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.6'
- 'nightly'
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v2
with:
files: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
Expand All @@ -46,13 +20,8 @@ jobs:
with:
version: '1'
- uses: julia-actions/julia-buildpkg@v1
- run: julia --project=docs/ -e 'using Pkg; Pkg.instantiate()'
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
- run: |
julia --project=docs -e '
using Documenter: DocMeta, doctest
using IntroML
DocMeta.setdocmeta!(IntroML, :DocTestSetup, :(using IntroML); recursive=true)
doctest(IntroML)'
26 changes: 26 additions & 0 deletions .github/workflows/DocsPreviewCleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: DocsPreviewCleanup

on:
pull_request:
types: [closed]

jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v2
with:
ref: gh-pages
- name: Delete preview and history + push changes
run: |
if [ -d "previews/PR$PRNUM" ]; then
git config user.name "Documenter.jl"
git config user.email "[email protected]"
git rm -rf "previews/PR$PRNUM"
git commit -m "delete preview"
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
git push --force origin gh-pages-new:gh-pages
fi
env:
PRNUM: ${{ github.event.number }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
*.jl.mem
/Manifest.toml
/docs/build/

# PlutoSliderServer outputs
/docs/src/*.html
/docs/src/staterequest
/docs/src/bondconnections
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet)](https://github.com/SciML/ColPrac)
[![License: CC BY-SA 4.0](https://img.shields.io/badge/License-CC%20BY--SA%204.0-lightgrey.svg)](http://creativecommons.org/licenses/by-sa/4.0/)

This repository contains notebooks for the [Introduction to Machine Learning workshop](https://mlcolab.org/intro-ml) with the [Machine Learning ⇌ Science Colaboratory](https://mlcolab.org).
This repository contains notebooks for the [Introduction to Machine Learning workshop](https://mlcolab.org/resources/introml-july-2022-workshop-materials) with the [Machine Learning ⇌ Science Colaboratory](https://mlcolab.org).

[![notebook_preview](https://user-images.githubusercontent.com/8673634/161941600-b1c31af3-df9b-4481-bb6f-1e25a4f849d2.gif)](https://mlcolab.github.io/IntroML.jl/dev/supervised_learning.html)

Expand Down
Loading

0 comments on commit 7e2c642

Please sign in to comment.