Skip to content

Commit

Permalink
more pkgdown stuff [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
bbolker committed May 27, 2021
1 parent 7ce883a commit 9e80643
Show file tree
Hide file tree
Showing 81 changed files with 145 additions and 334 deletions.
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ Authors@R: c(person("Ben","Bolker",email="[email protected]",role=c("aut","cre"
person("Mike Li",role="aut"),
person("Jonathan Dushoff",role="aut"),
person("Zach Levine", role="ctb"),
person("Matthew So", role="ctb"))
person("Matthew So", role="ctb"),
person("Irena Papst", role="ctb")
)
Depends: R (>= 3.5.0)
Imports:
lattice,
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ pkgcheck:
clean:
find . \( -name "\.#*" -o -name "*~" -o -name ".Rhistory" \) -exec rm {} \;

site-update-lazy:
echo "pkgdown::build_site(lazy=TRUE)" | $(R) --slave

site-update:
echo "pkgdown::build_site()" | $(R) --slave

Expand Down
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,41 @@
[![R-CMD-check](https://github.com/bbolker/McMasterPandemic/workflows/R-CMD-check/badge.svg)](https://github.com/bbolker/McMasterPandemic/actions)
<!-- badges: end -->

Compartmental epidemic models for forecasting and analysis of infectious disease pandemics: contributions from Ben Bolker, Jonathan Dushoff, David Earn, Morgan Kain, Michael Li, Irena Papst (in alphabetical order). Feedback is welcome at the [issues list](https://github.com/bbolker/McMasterPandemic/issues), or e-mail us.
Compartmental epidemic models for forecasting and analysis of infectious disease pandemics. Feedback is welcome at the [issues list](https://github.com/bbolker/McMasterPandemic/issues).

### Installation

The repository contains an R package and various workflows/analyses. You can fork/clone the repository (from [here](https://github.com/bbolker/McMasterPandemic)) and install locally or use `remotes::install_github("bbolker/McMasterPandemic")` to install the package. You will need to first install the developer version of `bbmle` (`remotes::install_github("bbolker/bbmle")`) before installing `McMasterPandemic`.

### Documentation

See the accompanying [pkgdown site](https://bbolker.github.io/McMasterPandemic).

- Functions are under the `Reference` tab.
- Vignettes (under construction!) are under `Articles`

### For developers

* to re-install the package, including re-building and incorporating vignettes, use `make build`
* If you modify function arguments, you should change the roxygen documentation accordingly. If you change the roxygen documentation, please use `make doc-update` to update the `.Rd` files.
* **please test/check the package periodically** as you go (use `make pkgcheck` and `make pkgtest` from the shell or `devtools::check()` and `devtools::test()` from within R). (Tests are also run on [GitHub Actions](https://github.com/bbolker/McMasterPandemic/actions); if you want to skip CI testing, e.g. for a trivial commit, put `[skip ci]` somewhere in your commit message.) Please don't make a habit of pushing without testing.
* Code that is used in the refactoring process should go in the top-level refactor folder.
* re-build the `pkgdown` site with `make site-update-lazy` (to rebuild just changed files) or `make site-update` (to be thorough) (or `pkgdown::build_site()`)
* it's OK to push *small* changes to the master branch; use your own branch + pull request for anything non-trivial
* If you modify function arguments, please update the roxygen documentation and use `make doc-update` (or `devtools::document`) to update the `.Rd` files.
* **Check the package periodically** as you go (use `make pkgcheck` and `make pkgtest` from the shell or `devtools::check()` and `devtools::test()` from within R). (Tests are also run on [GitHub Actions](https://github.com/bbolker/McMasterPandemic/actions); if you want to skip CI testing, e.g. for a trivial commit, put `[skip ci]` somewhere in your commit message.) Don't push without checking.
* Code that is used in the refactoring process should go in the top-level `refactor` folder.
* Slow tests are skipped by default; this process is controlled by the presence of a `MACPAN_TEST_LEVEL` environment (shell) variable. Many of the test files contain this code:
```r
testLevel <- if (nzchar(s <- Sys.getenv("MACPAN_TEST_LEVEL"))) as.numeric(s) else 1
```
which sets `testLevel` to a default value of 1 unless the environment variable is found. You can set this environment variable outside of your R session (e.g. via `export MACPAN_TEST_LEVEL=2` in a bash shell), or via `Sys.setenv(MACPAN_TEST_LEVEL=2)` from within R. In principle this mechanism allows for a hierarchy of slowness; at present only 1 and >1 are distinguished.

### Documentation

The [documentation](https://bbolker.github.io/McMasterPandemic) is a little bit scattered right now, working on cleaning it up and making it easily accessible.
## Obsolete documentation

In addition to the standard short descriptions of the functions (`help(package="McMasterPandemic")`), stuff can be found:
(Keeping links here for now)

* in the vignettes (look at the source code in the [vignettes] directory or `vignette(<title>, package="McMasterPandemic")`)
* `getting_started`
* `model`: design decisions and information for developers
* `calibration` (**very out of date**)
* `farr`: stuff on Farr's law and phenomenological curve-fitting (**very incomplete and likely to remain so for now**)
* `testing_flow`: incorporating testing dynamics (**ditto**)
* `McMasterReport.Rnw`: this is a more or less up-to-date description of calibration to Ontario data
* `ontario_calibration_report.html`: more technical and less up-to-date than the preceding document
Expand Down
5 changes: 1 addition & 4 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions docs/ChangeLog.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions docs/TODO.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions docs/articles/calibration.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Hide empty <a> tag within highlighted CodeBlock for screen reader accessibility (see https://github.com/jgm/pandoc/issues/6352#issuecomment-626106786) -->
// v0.0.1
// Written by JooYoung Seo ([email protected]) and Atsushi Yasumoto on June 1st, 2020.

document.addEventListener('DOMContentLoaded', function() {
const codeList = document.getElementsByClassName("sourceCode");
for (var i = 0; i < codeList.length; i++) {
var linkList = codeList[i].getElementsByTagName('a');
for (var j = 0; j < linkList.length; j++) {
if (linkList[j].innerHTML === "") {
linkList[j].setAttribute('aria-hidden', 'true');
}
}
}
});
9 changes: 2 additions & 7 deletions docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions docs/articles/model.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 5 additions & 8 deletions docs/articles/new_getting_started.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions docs/articles/testing_flow.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9e80643

Please sign in to comment.