Skip to content

Commit

Permalink
Merge branch 'main' into feature/keras_core
Browse files Browse the repository at this point in the history
  • Loading branch information
t-kalinowski committed Oct 11, 2023
2 parents 7e040a3 + 4004266 commit 671681b
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 44 deletions.
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/installation-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Many installation issues are resolved by running the following in a **fresh R se
# issue is already fixed but not on CRAN yet.
install.packages("remotes")
remotes::install_github(sprintf("rstudio/%s", c("reticulate", "tensorflow", "keras")))
reticulate::miniconda_uninstall() # start with a blank slate
reticulate::install_miniconda()
if (is.null(reticulate::virtualenv_starter()))
reticulate::install_python()
keras::install_keras()
```

Expand Down
45 changes: 4 additions & 41 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
- {os: 'macOS-latest' , tf: 'default', r: 'oldrel'}
- {os: 'ubuntu-latest' , tf: 'default', r: 'oldrel'}
- {os: 'ubuntu-latest' , tf: 'default', r: 'oldrel-1'}
- {os: 'ubuntu-latest' , tf: 'default', r: 'oldrel-2'}
- {os: 'ubuntu-20.04' , tf: 'default', r: '3.6'} # default R in ubuntu-20.04

## release keras/tf version (if different from 'default')
Expand All @@ -40,14 +41,14 @@ jobs:
# - {os: 'macOS-latest' , tf: 'release', r: 'release'}

## old keras/tf versions
- {os: 'ubuntu-latest', tf: '2.14', r: 'release'}
- {os: 'ubuntu-latest', tf: '2.13', r: 'release'}
- {os: 'ubuntu-latest', tf: '2.12', r: 'release'}
- {os: 'ubuntu-latest', tf: '2.11', r: 'release'}
- {os: 'ubuntu-latest', tf: '2.10', r: 'release'}
- {os: 'ubuntu-latest', tf: '2.8' , r: 'release'}
- {os: 'ubuntu-latest', tf: '2.9' , r: 'release'}

# these are allowed to fail
- {os: 'ubuntu-latest', tf: '2.14.0rc1', r: 'release'}
# - {os: 'ubuntu-latest', tf: '2.14.0rc1', r: 'release'}
# - {os: 'ubuntu-20.04', tf: 'default', r: 'devel'}
# - {os: 'ubuntu-20.04', tf: 'nightly' , r: 'release'}

Expand Down Expand Up @@ -89,53 +90,15 @@ jobs:
path: ${{ env.R_LIBS_USER }}
key: ${{ matrix.os }}-${{ steps.setup-r.outputs.installed-r-version }}-${{ steps.get-date.outputs.year-week }}-1

# - name: Install remotes
# if: steps.r-package-cache.outputs.cache-hit != 'true'
# run: install.packages("remotes")

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck local::.
cache-version: 1
upgrade: 'TRUE'

# - name: Install system dependencies
# if: runner.os == 'Linux'
# shell: bash
# run: |
# . /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 Miniconda
# run: reticulate::install_miniconda()

- name: Install Tensorflow + Keras deps
run: keras::install_keras(tensorflow = '${{ matrix.tf }}-cpu')

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

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true

# - 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
79 changes: 79 additions & 0 deletions .github/workflows/pr-commands.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
issue_comment:
types: [created]

name: Commands

jobs:
document:
if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/document') }}
name: document
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/pr-fetch@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

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

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::roxygen2
needs: pr-document

- name: Document
run: roxygen2::roxygenise()
shell: Rscript {0}

- name: commit
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
git add man/\* NAMESPACE
git commit -m 'Document'
- uses: r-lib/actions/pr-push@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

style:
if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/style') }}
name: style
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/pr-fetch@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

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

- name: Install dependencies
run: install.packages("styler")
shell: Rscript {0}

- name: Style
run: styler::style_pkg()
shell: Rscript {0}

- name: commit
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
git add \*.R
git commit -m 'Style'
- uses: r-lib/actions/pr-push@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Depends:
Imports:
generics (>= 0.0.1),
reticulate (>= 1.31),
tensorflow (>= 2.8.0),
tensorflow (>= 2.13.0.9000),
tfruns (>= 1.0),
magrittr,
zeallot,
Expand All @@ -51,3 +51,5 @@ Suggests:
Roxygen: list(markdown = TRUE, r6 = FALSE)
RoxygenNote: 7.2.3
VignetteBuilder: knitr
Remotes:
rstudio/tensorflow

0 comments on commit 671681b

Please sign in to comment.