Skip to content

Commit

Permalink
Merge branch 'master' into bugfix/agg_lt
Browse files Browse the repository at this point in the history
  • Loading branch information
chacalle authored Aug 20, 2020
2 parents 97be6d3 + 86f1bf7 commit 80e8585
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 47 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
on:
push:
branches:
Expand All @@ -20,8 +22,8 @@ jobs:
config:
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: macOS-latest, r: 'devel'}
- {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
Expand All @@ -40,24 +42,24 @@ jobs:
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ matrix.config.r }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-1-
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install system dependencies
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'cat(remotes::system_requirements("ubuntu", "20.04"), sep = "\n")')
- name: Install dependencies
run: |
Expand All @@ -73,7 +75,7 @@ jobs:

- name: Upload check results
if: failure()
uses: actions/upload-artifact@master
uses: actions/upload-artifact@main
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
16 changes: 10 additions & 6 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ name: pkgdown
jobs:
pkgdown:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

Expand All @@ -18,25 +20,27 @@ jobs:
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: macOS-r-4.0-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: macOS-r-4.0-1-
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install dependencies
run: |
install.packages("remotes")
remotes::install_deps(dependencies = TRUE)
remotes::install_dev("pkgdown")
install.packages("pkgdown")
shell: Rscript {0}

- name: Install package
run: R CMD INSTALL .

- name: Deploy package
run: pkgdown::deploy_to_branch(new_process = FALSE)
shell: Rscript {0}
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
7 changes: 5 additions & 2 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ name: test-coverage
jobs:
test-coverage:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

Expand All @@ -22,14 +24,15 @@ jobs:
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: macOS-r-4.0-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: macOS-r-4.0-1-
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install dependencies
run: |
Expand Down
45 changes: 16 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,35 @@
[![Codecov test coverage](https://codecov.io/gh/ihmeuw-demographics/demCore/branch/master/graph/badge.svg)](https://codecov.io/gh/ihmeuw-demographics/demCore?branch=master)
<!-- badges: end -->

Common core functions for demographic methods. Includes basic demography
calculations such as:
Common core functions for demographic methods.
Includes basic demography calculations such as:

* Mortality: life table composition
* Fertility: TFR, ASFR
* Population: CCMPP, Leslie matrices

Go [here](https://ihmeuw-demographics.github.io/demCore) for more documentation
and examples.
## Installation

### Authors

All of the following authors of this package are at the [Institute for Health
Metrics and Evaluation](http://www.healthdata.org/) at the University of
Washington.

| | |
|--------------------|-----------------|
| Katie Paulson | [email protected] |
| Charlton Callender | [email protected] |
| Spencer Pease | [email protected] |

### Installation

This package has not yet been published on CRAN, but can be installed from
GitHub using the [remotes](https://remotes.r-lib.org/) package. Installation of
the [hierarchyUtils](https://github.com/ihmeuw-demographics/hierarchyUtils)
package is also required.
This package has not yet been published on CRAN, but can be installed from GitHub using the [remotes](https://remotes.r-lib.org/) package.
Installation of the [hierarchyUtils](https://github.com/ihmeuw-demographics/hierarchyUtils) package is also required.

```r
remotes::install_github("ihmeuw-demographics/hierarchyUtils")
remotes::install_github("ihmeuw-demographics/demCore")
```

### Getting help
## Getting help

demCore function documentation and vignettes can be found at [https://ihmeuw-demographics.github.io/demCore/index.html](https://ihmeuw-demographics.github.io/demCore/index.html)

If you encounter a clear bug, missing documentation, or a feature you'd like to see implemented please file an issue on [github](https://github.com/ihmeuw-demographics/demCore/issues) with the information requested in the issue template.

## Contributing

If you encounter a clear bug, please file a minimal reproducible example on [github](https://github.com/ihmeuw-demographics/demCore/issues).
See the [contributing guidelines](https://github.com/ihmeuw-demographics/.github/blob/master/contributing.md) for more information.

### Additional resources
## Additional resources

Much of the content in this package comes from well established demographic
methods, as reported in the following book:
Much of the content in this package comes from well established demographic methods, as reported in the following book:

*Preston Samuel H, Patrick H, Michel G. Demography: measuring and modeling
population processes. MA: Blackwell Publishing. 2001.*
*Preston Samuel H, Patrick H, Michel G. Demography: measuring and modeling population processes. MA: Blackwell Publishing. 2001.*

0 comments on commit 80e8585

Please sign in to comment.