Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
ef51d96
add functionaity to iterate a function operating on a state
goldingn Nov 24, 2022
265b4a5
running-but-wrong time-varying parameters
goldingn Nov 25, 2022
a5d6b81
fix tests
goldingn Nov 25, 2022
5ac06ac
fix warning on unnamed arguments to iterate_dynamic_function
goldingn Nov 27, 2022
81aa809
fix up some time series import bits
goldingn Nov 27, 2022
73531f6
update r-universe installation instructions
njtierney Feb 7, 2024
3b3cf95
bugfix time-varying parameters in iterate_dynamic_function
goldingn Mar 1, 2024
d8f3e40
handle batch dimensions when defining new constants inside user funct…
goldingn Mar 13, 2024
23f5978
add option to clamp to state to min/max values
goldingn Mar 13, 2024
5defd19
use _PACKAGE sentintel, add spell check
njtierney Apr 18, 2024
2a91199
starting the process of implementing this new solver method
njtierney Nov 8, 2024
3274f6f
update R CMD check to use latest installation method
njtierney Nov 8, 2024
f6af4d7
Start implementing new TFP ODE method
njtierney Nov 8, 2024
0167fb4
Merge branch 'master' into fix-ode-solver
njtierney Nov 8, 2024
ce09dc1
update documentation on changes to method, change "dormand_price" to …
njtierney Nov 8, 2024
d76f991
fix switched function argument order and output structure
goldingn Nov 13, 2024
db7df31
update version number
njtierney Nov 13, 2024
76f31a8
Update DESCRIPTION
njtierney Nov 13, 2024
c8e356a
use checker functions with cli to repeat checking code
njtierney Nov 13, 2024
6cb9fb3
Use Dorman-Prince non-stiff "dp" ODE solver as default
njtierney Nov 13, 2024
d051222
Clean up tests:
njtierney Nov 13, 2024
553191c
use "dp" method, not "rk4", since we do not use that method anymore. …
njtierney Nov 13, 2024
9122046
ignore cache set by ode-solve-example
njtierney Nov 13, 2024
51a2836
don't cache vignettes
njtierney Nov 13, 2024
3dcb88c
0 index because python
njtierney Nov 13, 2024
d1a7937
turn for loop into functional approach that facilitates comparison
njtierney Nov 13, 2024
918de5f
News bump
njtierney Nov 13, 2024
56f304a
finish TODO note
njtierney Nov 13, 2024
b411b1a
some small typo fixes / update WORDLIST
njtierney Nov 13, 2024
d000688
add rhub
njtierney Nov 13, 2024
7dbe80c
fixes for trailing/lost `{}`
njtierney Nov 13, 2024
1051d9b
shorten and slacken ODE solver tests
goldingn Nov 13, 2024
ee40619
use_package_doc() + add global vars
njtierney Nov 13, 2024
098e81f
redefine model parameters for `opt` to get MAP estimate, related to #35.
njtierney Nov 13, 2024
b69c61e
Rbuildignore __pycache__
njtierney Nov 13, 2024
cf2be5e
update a couple of redirect links
njtierney Nov 13, 2024
36c75ea
remove check for single core machine
njtierney Nov 13, 2024
6765efd
update pkg doc
njtierney Nov 13, 2024
b4526d8
NEWS bump + update cran-comments.md
njtierney Nov 13, 2024
e30d9ad
update test coverage tests
njtierney Nov 13, 2024
fef1cd5
add CRAN-SUBMISSION file to Rbuildignore
njtierney Nov 14, 2024
619ddb4
Increment version number to 0.2.2.9000
njtierney Nov 14, 2024
b1aa78f
Merge pull request #33 from greta-dev/fix-ode-solver
njtierney Nov 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
^pkgdown$
^cran-comments\.md$
^LICENSE\.md$
^__pycache__$
^CRAN-SUBMISSION$
127 changes: 65 additions & 62 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# NOTE: This workflow is overkill for most R packages
# check-standard.yaml is likely a better choice
# usethis::use_github_action("check-standard") will install it.
#
# 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 @@ -13,96 +7,105 @@ on:
branches:
- main
- master
schedule:
- cron: '1 23 * * Sun'

name: R-CMD-check

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
defaults:
run:
shell: Rscript {0}

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

name: ${{ matrix.os }}, tf-${{ matrix.tf }}, R-${{ matrix.r}}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: windows-latest, r: 'oldrel'}
- {os: ubuntu-18.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", http-user-agent: "R/4.0.0 (ubuntu-18.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
- {os: ubuntu-18.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
- {os: ubuntu-18.04, r: 'oldrel-1', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
- {os: ubuntu-18.04, r: 'oldrel-2', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
include:
- {os: 'ubuntu-latest' , tf: 'default', r: 'release'}
- {os: 'windows-latest', tf: 'default', r: 'release'}
- {os: 'macOS-latest' , tf: 'default', r: 'release'}

runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.tf == 'nightly' || contains(matrix.tf, 'rc') || matrix.r == 'devel' }}
env:
RSPM: ${{ matrix.config.rspm }}
R_REMOTES_NO_ERRORS_FROM_WARNINGS: 'true'
R_COMPILE_AND_INSTALL_PACKAGES: 'never'
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
RETICULATE_AUTOCONFIGURE: 'FALSE'
TF_VERSION: '1.14.0'

steps:

- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v2
id: install-r
id: setup-r
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
r-version: ${{ matrix.r }}
Ncpus: '2L'
use-public-rspm: true

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r-dependencies@v2
- name: Get Date
id: get-date
shell: bash
run: |
echo "::set-output name=year-week::$(date -u "+%Y-%U")"
echo "::set-output name=date::$(date -u "+%F")"

- name: Restore R package cache
uses: actions/cache@v2
id: r-package-cache
with:
cache-version: 2
extra-packages: |
local::.
any::keras
any::rcmdcheck
path: ${{ env.R_LIBS_USER }}
key: ${{ matrix.os }}-${{ steps.setup-r.outputs.installed-r-version }}-${{ steps.get-date.outputs.year-week }}-1

- name: Install Miniconda
run: |
reticulate::install_miniconda()
shell: Rscript {0}
- name: Install remotes
if: steps.r-package-cache.outputs.cache-hit != 'true'
run: install.packages("remotes")

- name: Set options for conda binary for macOS
if: runner.os == 'macOS'
- name: Install system dependencies
if: runner.os == 'Linux'
shell: bash
run: |
echo "options(reticulate.conda_binary = reticulate:::miniconda_conda())" >> .Rprofile
. /etc/os-release
while read -r cmd
do
echo "$cmd"
sudo $cmd
done < <(Rscript -e "writeLines(remotes::system_requirements('$ID-$VERSION_ID'))")

- name: Install package + deps
run: remotes::install_local(dependencies = TRUE, force = TRUE)

- name: Install TensorFlow
- name: Install greta deps
run: |
cat("::group::Create Environment", sep = "\n")
reticulate::conda_create('r-reticulate', packages = c('python==3.7'))
cat("::endgroup::", sep = "\n")
library(greta)
greta::install_greta_deps(timeout = 50)

cat("::group::Install Tensorflow", sep = "\n")
keras::install_keras(tensorflow = Sys.getenv('TF_VERSION'),
extra_packages = c('IPython', 'requests', 'certifi', 'urllib3', 'tensorflow-probability==0.7.0', 'numpy==1.16.4'))
cat("::endgroup::", sep = "\n")
shell: Rscript {0}
- name: Situation Report on greta install
run: greta::greta_sitrep()

- name: Install rcmdcheck
run: remotes::install_cran("rcmdcheck")

- name: Python + TF details
run: |
tensorflow::tf_config()
tensorflow::tf_version()
reticulate::py_module_available("tensorflow_probability")
reticulate::py_config()
shell: Rscript {0}
- name: Check
run: rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'warning', check_dir = 'check')

- name: Show testthat output
if: always()
shell: bash
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true

- name: Don't use tar from old Rtools to store the cache
if: ${{ runner.os == 'Windows' && startsWith(steps.install-r.outputs.installed-r-version, '3') }}
shell: bash
run: echo "C:/Program Files/Git/usr/bin" >> $GITHUB_PATH

- name: Session info
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

- uses: r-lib/actions/check-r-package@v2
with:
args: 'c("--no-manual", "--as-cran", "--no-multiarch")'

95 changes: 95 additions & 0 deletions .github/workflows/rhub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# R-hub's generic GitHub Actions workflow file. It's canonical location is at
# https://github.com/r-hub/actions/blob/v1/workflows/rhub.yaml
# You can update this file to a newer version using the rhub2 package:
#
# rhub::rhub_setup()
#
# It is unlikely that you need to modify this file manually.

name: R-hub
run-name: "${{ github.event.inputs.id }}: ${{ github.event.inputs.name || format('Manually run by {0}', github.triggering_actor) }}"

on:
workflow_dispatch:
inputs:
config:
description: 'A comma separated list of R-hub platforms to use.'
type: string
default: 'linux,windows,macos'
name:
description: 'Run name. You can leave this empty now.'
type: string
id:
description: 'Unique ID. You can leave this empty now.'
type: string

jobs:

setup:
runs-on: ubuntu-latest
outputs:
containers: ${{ steps.rhub-setup.outputs.containers }}
platforms: ${{ steps.rhub-setup.outputs.platforms }}

steps:
# NO NEED TO CHECKOUT HERE
- uses: r-hub/actions/setup@v1
with:
config: ${{ github.event.inputs.config }}
id: rhub-setup

linux-containers:
needs: setup
if: ${{ needs.setup.outputs.containers != '[]' }}
runs-on: ubuntu-latest
name: ${{ matrix.config.label }}
strategy:
fail-fast: false
matrix:
config: ${{ fromJson(needs.setup.outputs.containers) }}
container:
image: ${{ matrix.config.container }}

steps:
- uses: r-hub/actions/checkout@v1
- uses: r-hub/actions/platform-info@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/actions/setup-deps@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/actions/run-check@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}

other-platforms:
needs: setup
if: ${{ needs.setup.outputs.platforms != '[]' }}
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.label }}
strategy:
fail-fast: false
matrix:
config: ${{ fromJson(needs.setup.outputs.platforms) }}

steps:
- uses: r-hub/actions/checkout@v1
- uses: r-hub/actions/setup-r@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
- uses: r-hub/actions/platform-info@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/actions/setup-deps@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
- uses: r-hub/actions/run-check@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
Loading
Loading