-
Notifications
You must be signed in to change notification settings - Fork 1
Add Continuous Integration #1
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
base: main
Are you sure you want to change the base?
Changes from all commits
d2dbefb
e8804a3
5cfd0fd
37e1a22
8148abf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,27 @@ | ||||||||||||||||||||||||||||||
| name: Render and Deploy to GitHub Pages | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||
| branches: [main] | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||
| render: | ||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||
| container: | ||||||||||||||||||||||||||||||
| image: rocker/verse:4.4.1 | ||||||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Use the |
||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Name all steps; naming here acts somewhat like comments do in code where you are explaining your rationale for what you're doing, as well as in your GitHub workflow graph / list. |
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Install RStan | ||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||
| R -q -e 'install.packages(c("rstan", "rstantools", "bayesplot", "deSolve", "posterior"), repos = "https://cloud.r-project.org")' | ||||||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Render Rmd | ||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||
| R -q -e 'rmarkdown::render("stanodeffr/01-stan-ode-forcing-function.Rmd", output_format = "html_document", output_file = "index.html", output_dir = "docs")' | ||||||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
This creates an HTML file with links to all the vignette files in the directory; see https://stackoverflow.com/a/46383157 |
||||||||||||||||||||||||||||||
| - name: Deploy to GitHub Pages | ||||||||||||||||||||||||||||||
| uses: peaceiris/actions-gh-pages@v3 | ||||||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Don't use an arbitrary old version, use the latest tagged version that is most up-to-date, has security fixes, etc. See https://github.com/peaceiris/actions-gh-pages/releases |
||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||||||
| publish_dir: ./docs | ||||||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
You no longer need to specify an input directory if you're creating the default |
||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| FROM rocker/verse:4.4.1 | ||
| RUN apt-get update && apt-get install -y --no-install-recommends libv8-dev && rm -rf /var/lib/apt/lists/* | ||
| RUN R -q -e 'install.packages(c("rstan", "rstantools", "bayesplot"), repos = "https://cloud.r-project.org")' | ||
|
Comment on lines
+1
to
+3
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file shouldn't be part of the PR at all. You woudn't use a |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -656,8 +656,9 @@ df_stan_fit |> | |
| noisy[, c("time", "x")] |> | ||
| as.data.frame() |> | ||
| pivot_longer(-time), | ||
| group = NULL, | ||
| color = NULL, | ||
| inherit.aes = FALSE, | ||
| aes(x = time, y = value), | ||
|
|
||
|
Comment on lines
+659
to
+661
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You shouldn't need to edit this file if you're using an up-to-date rocker/rverse image instead of the 2 year old 4.4 version. |
||
| size = 0.1) | ||
| ``` | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YAML files start with three dashes. I use the
yamllinttool recommended by the YAML standard: https://yaml.org/tools/ which highlights the need to fix this issue, although another handy reference I like is from Learn X in Y Minutes: https://learnxinyminutes.com/yaml/