Skip to content

Commit

Permalink
Merge pull request #5 from posit-conf-2023/gha
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelizimm authored Aug 4, 2023
2 parents cbafa71 + bf9c7a4 commit b5a6ac6
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 2 deletions.
32 changes: 31 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,41 @@ name: "Deploy docs to GHPages"
on:
workflow_dispatch:
push:
branches: ['main', 'gh*']
branches: ['main']

jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
version: 1.3.340

- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- name: R Dependencies
uses: r-lib/actions/setup-r-dependencies@v2

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r python-req.txt
- name: Render and publish to GitHub Pages (and render)
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 changes: 28 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Package: positconf2023-vetiver-workshop
Title: positconf2023 vetiver workshop
Version: 0.1
Authors@R: c(
person("Julia", "Silge", , "[email protected]", role = c("cre", "aut"),
comment = c(ORCID = "0000-0002-3671-836X")),
person("Isabel", "Zimmerman", , "[email protected]", role = "aut"),
person("RStudio", role = c("cph", "fnd"))
)
License: MIT
Depends:
R (>= 3.1.0)
Imports:
countdown,
gt,
partykit,
pins,
plumber,
ranger,
reticulate,
rmarkdown,
rsample (>= 1.1.1),
tidymodels,
tidyverse,
vetiver
Encoding: UTF-8
Remotes:
tidymodels/rsample
6 changes: 6 additions & 0 deletions python-req.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
vetiver==0.2.1
scikit-learn
pins
pandas
pydantic<2.0.0
ipython
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
vetiver
plotnine
pandas
numpy
scikit-learn
dotenv-python
pydantic==1.10.11
4 changes: 3 additions & 1 deletion slides/01-introduction.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ you likely *should* be the one to operationalize that model!

```{r}
#| echo: false
library(countdown)
countdown(minutes = 3)
```

Expand Down Expand Up @@ -293,7 +294,8 @@ This histogram brings up a concern. What if we split our data into training/test
##


```{python}
```{python, execute=FALSE}
#| eval: false
#| fig-align: 'center'
from plotnine import ggplot, aes, geom_boxplot, coord_flip
(ggplot(abalone, aes('sex', 'rings', fill='sex'))
Expand Down
3 changes: 3 additions & 0 deletions slides/02-deploy.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ library(tidyverse)
library(tidymodels)
library(vetiver)
library(pins)
library(countdown)
abalone <- read_csv("abalone.csv")
Expand Down Expand Up @@ -100,6 +101,7 @@ board |> vetiver_pin_write(v)
```{python}
#| eval: false
from vetiver import VetiverModel, vetiver_pin_write
from pins import board_connect
import os
from dotenv import load_dotenv
load_dotenv()
Expand Down Expand Up @@ -237,6 +239,7 @@ jsonlite::fromJSON(metadata)
### Python

```{python}
#| eval: false
board.pin_meta("isabel.zimmerman/test_model").user
```

Expand Down
1 change: 1 addition & 0 deletions slides/04-monitor.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ We made it! 🎉

```{r}
#| echo: false
library(countdown)
countdown(minutes = 5)
```

Expand Down

0 comments on commit b5a6ac6

Please sign in to comment.