Skip to content

Commit

Permalink
Merge branch 'main' into xportr031
Browse files Browse the repository at this point in the history
  • Loading branch information
bms63 authored Feb 20, 2024
2 parents 8dcdd41 + 3f6c8db commit 95cbab5
Show file tree
Hide file tree
Showing 70 changed files with 2,125 additions and 1,480 deletions.
22 changes: 0 additions & 22 deletions .github/PULL_REQUEST_TEMPLATE/release.md

This file was deleted.

25 changes: 13 additions & 12 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
### Thank you for your Pull Request!
### Thank you for your Pull Request!

We have developed a Pull Request template to aid you and our reviewers. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the xportr codebase remains robust and consistent.
We have developed a Pull Request template to aid you and our reviewers. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the xportr codebase remains robust and consistent.

### The scope of `{xportr}`

`{xportr}`'s scope is to enable R users to write out submission compliant `xpt` files that can be delivered to a Health Authority or to downstream validation software programs. We see labels, lengths, types, ordering and formats from a dataset specification object (SDTM and ADaM) as being our primary focus. We also see messaging and warnings to users around applying information from the specification file as a primary focus. Please make sure your Pull Request meets this **scope of {xportr}**. If your Pull Request moves beyond this scope, please get in touch with the `{xportr}` team on [slack](https://pharmaverse.slack.com/archives/C030EB2M4GM) or create an issue to discuss.
`{xportr}`'s scope is to enable R users to write out submission compliant `xpt` files that can be delivered to a Health Authority or to downstream validation software programs. We see labels, lengths, types, ordering and formats from a dataset specification object (SDTM and ADaM) as being our primary focus. We also see messaging and warnings to users around applying information from the specification file as a primary focus. Please make sure your Pull Request meets this **scope of {xportr}**. If your Pull Request moves beyond this scope, please get in touch with the `{xportr}` team on [slack](https://pharmaverse.slack.com/archives/C030EB2M4GM) or create an issue to discuss.

Please check off each task box as an acknowledgment that you completed the task. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the `devel` branch until you have checked off each task.
Please check off each task box as an acknowledgment that you completed the task. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the `main` branch until you have checked off each task.

### Changes Description

_(descriptions of changes)_
_(descriptions of changes)_

### Task List

- [ ] The spirit of xportr is met in your Pull Request
- [ ] Place Closes #<insert_issue_number> into the beginning of your Pull Request Title (Use Edit button in top-right if you need to update)
- [ ] Summary of changes filled out in the above Changes Description. Can be removed or left blank if changes are minor/self-explanatory.
- [ ] Check that your Pull Request is targeting the `devel` branch, Pull Requests to `main` should use the [Release Pull Request Template](https://github.com/atorus-research/xportr/tree/94_pr_template/.github/PULL_REQUEST_TEMPLATE)
- [ ] Code is formatted according to the [tidyverse style guide](https://style.tidyverse.org/). Use `styler` package and functions to style files accordingly.
- [ ] Summary of changes filled out in the above Changes Description. Can be removed or left blank if changes are minor/self-explanatory.
- [ ] Code is formatted according to the [tidyverse style guide](https://style.tidyverse.org/). Use `styler` package and functions to style files accordingly.
- [ ] New functions or arguments follow established convention found in the [Wiki](https://github.com/atorus-research/xportr/wiki/Style-Guide-for-Roxygen-Headers).
- [ ] Updated relevant unit tests or have written new unit tests. See our [Wiki](https://github.com/atorus-research/xportr/wiki/Style-Guide-for-Unit-Tests) for conventions used in this package.
- [ ] Creation/updated relevant roxygen headers and examples. See our [Wiki](https://github.com/atorus-research/xportr/wiki/Style-Guide-for-Roxygen-Headers) for conventions used in this package.
- [ ] Run `devtools::document()` so all `.Rd` files in the `man` folder and the `NAMESPACE` file in the project root are updated appropriately
- [ ] Run `pkgdown::build_site()` and check that all affected examples are displayed correctly and that all new/updated functions occur on the "Reference" page.
- [ ] Update NEWS.md if the changes pertain to a user-facing function (i.e. it has an @export tag) or documentation aimed at users (rather than developers)
- [ ] Address any updates needed for vignettes and/or templates
- [ ] Update `NEWS.md` if the changes pertain to a user-facing function (i.e. it has an `@export` tag) or documentation aimed at users (rather than developers)
- [ ] The `NEWS.md` entry should go under the `# xportr development version` section. Don't worry about updating the version because it will be auto-updated using the `vbump.yaml` CI.
- [ ] Address any updates needed for vignettes and/or templates.
- [ ] Link the issue Development Panel so that it closes after successful merging.
- [ ] Fix merge conflicts
- [ ] Pat yourself on the back for a job well done! Much love to your accomplishment!
- [ ] The developer is responsible for fixing merge conflicts not the Reviewer.
- [ ] Pat yourself on the back for a job well done! Much love to your accomplishment!
36 changes: 0 additions & 36 deletions .github/workflows/check-links.yml

This file was deleted.

58 changes: 39 additions & 19 deletions .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
@@ -1,46 +1,66 @@
---
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
name: R-CMD-check 📦

on:
# 'push' events are triggered when commits
# are pushed to one of these branches
push:
branches: [main, devel]
branches:
- main
tags:
- "v*"
# 'pull_request' events are triggered when PRs are
# created against one of these target branches.
pull_request:
branches: [main, devel]
types:
- opened
- synchronize
- reopened
- ready_for_review
branches:
- main
# 'workflow_dispatch' gives you the ability
# to run this workflow on demand, anytime
workflow_dispatch:

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

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

runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

- { os: macOS-latest, r: "release" }
- { os: windows-latest, r: "release" }
- { os: ubuntu-latest, r: "devel", http-user-agent: "release" }
- { os: ubuntu-latest, r: "release" }
- { os: ubuntu-latest, r: "oldrel-1" }
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

if: >
!contains(github.event.commits[0].message, '[skip checks]')
steps:
- uses: actions/checkout@v3
- name: Checkout repository 🛎
uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2
- name: Install Pandoc
uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
- name: Setup R 📊
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
- name: Install R package dependencies 📦
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: rcmdcheck
extra-packages: any::rcmdcheck

- uses: r-lib/actions/check-r-package@v2
- name: Run R CMD check 🎯
uses: r-lib/actions/check-r-package@v2
113 changes: 113 additions & 0 deletions .github/workflows/common.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
---
name: xportr CI/CD Workflows

on:
# 'push' events are triggered when commits
# are pushed to one of these branches
push:
branches:
- main
tags:
- "v*"
# 'pull_request' events are triggered when PRs are
# created against one of these target branches.
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
branches:
- main
# 'workflow_dispatch' gives you the ability
# to run this workflow on demand, anytime
workflow_dispatch:

concurrency:
group: common-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
R_VERSION: "release"

jobs:
# Get R version from environmental variable
# and use it in downstream jobs
get_r_version:
name: Get R version
runs-on: ubuntu-latest
outputs:
r-version: ${{ steps.get_r_version.outputs.R_VERSION }}
steps:
- name: Get R Version for Downstream Container Jobs
id: get_r_version
run: echo "R_VERSION=$R_VERSION" >> $GITHUB_OUTPUT
shell: bash

# Test code coverage of R Package
coverage:
name: Code Coverage
uses: pharmaverse/admiralci/.github/workflows/code-coverage.yml@main
if: >
github.event_name != 'release'
needs: get_r_version
with:
r-version: "${{ needs.get_r_version.outputs.r-version }}"
# Whether to skip code coverage badge creation
# Setting to 'false' will require you to create
# an orphan branch called 'badges' in your repository
skip-coverage-badges: true

# Ensure that styling guidelines are followed
style:
name: Code Style
uses: pharmaverse/admiralci/.github/workflows/style.yml@main
if: github.event_name == 'pull_request'
needs: get_r_version
with:
r-version: "${{ needs.get_r_version.outputs.r-version }}"

# Ensure there are no broken URLs in the package documentation
links:
name: Links
uses: pharmaverse/admiralci/.github/workflows/links.yml@main
if: github.event_name == 'pull_request'

# Build the website and deploy to `gh-pages` branch
site:
name: Documentation
uses: pharmaverse/admiralci/.github/workflows/pkgdown.yml@main
if: github.event_name == 'push' || startsWith(github.ref, 'refs/tags/v')
needs: get_r_version
with:
r-version: "release"
skip-multiversion-docs: true
secrets:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

# Ensure there are no linter errors in the package
linter:
name: Lint
uses: pharmaverse/admiralci/.github/workflows/lintr.yml@main
if: github.event_name == 'pull_request'
needs: get_r_version
with:
r-version: "${{ needs.get_r_version.outputs.r-version }}"

# Ensure there are no spelling errors in the package
spellcheck:
name: Spelling
uses: pharmaverse/admiralci/.github/workflows/spellcheck.yml@main
if: github.event_name == 'pull_request'
needs: get_r_version
with:
r-version: "${{ needs.get_r_version.outputs.r-version }}"

# Bumps development version of the package
vbump:
name: Version Bump 🤜🤛
if: github.event_name == 'push'
uses: insightsengineering/r.pkg.template/.github/workflows/version-bump.yaml@main
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}

32 changes: 0 additions & 32 deletions .github/workflows/lint.yaml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/pkgdown.yaml

This file was deleted.

Loading

0 comments on commit 95cbab5

Please sign in to comment.