Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes needed for rOpenSci submission #140

Merged
merged 33 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
2a62bfd
create metadata for package
RayStick Oct 28, 2024
64fa20d
update citation file and add gh workflow
RayStick Oct 28, 2024
6598d9b
tidy style - removing unnecessary capitals
RayStick Nov 18, 2024
d64b251
tidy style - docs with the new names
RayStick Nov 18, 2024
386fedc
tidy style - docs reflect new func names
RayStick Nov 18, 2024
a967f32
tidy style - rename and group functions
RayStick Nov 19, 2024
d5c9a60
tidy style - remove unnessary capital letters from object names
RayStick Nov 19, 2024
6717f39
after running styler::style_pkg()
RayStick Nov 19, 2024
106eae7
package documentation
RayStick Nov 19, 2024
1ad31e4
urlchecker::url_update('.')
RayStick Nov 19, 2024
eb4c775
debugging
RayStick Nov 19, 2024
c9d0166
add more authors
RayStick Nov 19, 2024
31fb283
update authors and desc
RayStick Nov 22, 2024
659973c
update authors and desc
RayStick Nov 22, 2024
4d4b8ae
add very simple examples
RayStick Nov 22, 2024
e25ee47
add CI and test coverage
RayStick Nov 22, 2024
cc2e4c6
update
RayStick Nov 22, 2024
cdbf363
fixing bug
RayStick Nov 22, 2024
24204d2
fixing CI bug
RayStick Nov 22, 2024
6d93d40
code vis best practice
RayStick Nov 22, 2024
6627ab9
put back
RayStick Nov 22, 2024
c02dfa2
nope
RayStick Nov 22, 2024
63c34f1
fixing bug
RayStick Nov 22, 2024
4a04f5b
fixing bug
RayStick Nov 22, 2024
403e535
trying to fix pkgdown
RayStick Nov 22, 2024
22efc63
back to manual listing
RayStick Nov 22, 2024
ebc9df1
add in package data
RayStick Nov 22, 2024
059fab6
don't fail on notes
RayStick Nov 22, 2024
f9e089d
change package data names
RayStick Nov 22, 2024
d9eb841
fixing windows not passing
RayStick Nov 22, 2024
b696f71
fixing unit tests due to renaming or mispelling
RayStick Nov 22, 2024
aea5a67
from rjson to jsonlite
RayStick Nov 26, 2024
45e5c10
final package checks
RayStick Nov 26, 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
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@



^codemeta\.json$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
71 changes: 71 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# 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:
push:
branches: [main, master]
pull_request:

name: R-CMD-check.yaml

permissions: read-all

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

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

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'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

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

- 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

- name: Update Homebrew
if: matrix.config.os == 'macos-latest'
run: brew update

- name: Install Dependencies
if: matrix.config.os == 'macos-latest'
run: |
brew install gcc
brew install qpdf

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- name: Check R package (macOS and Linux)
if: matrix.config.os != 'windows-latest'
run: |
R CMD check --no-manual --as-cran > check.log 2>&1 || true
cat check.log
grep -q -E "WARNING" check.log && exit 1 || true

- name: Check R package (Windows)
if: matrix.config.os == 'windows-latest'
shell: cmd
run: |
R CMD check --no-manual --as-cran > check.log 2>&1 || true
type check.log
findstr /i "WARNING" check.log && exit 1 || true
61 changes: 61 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 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:
push:
branches: [main, master]
pull_request:

name: test-coverage.yaml

permissions: read-all

jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v4

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

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr, any::xml2
needs: coverage

- name: Test coverage
run: |
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v4
with:
# Fail if error if not on PR, or if on PR and token is given
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
file: ./cobertura.xml
plugin: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
58 changes: 58 additions & 0 deletions .github/workflows/update-citation-cff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# The action runs when:
# - A new release is published
# - The DESCRIPTION or inst/CITATION are modified
# - Can be run manually
# For customizing the triggers, visit https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
on:
release:
types: [published]
push:
branches: [master, main]
paths:
- DESCRIPTION
- inst/CITATION
workflow_dispatch:

name: Update CITATION.cff

jobs:
update-citation-cff:
runs-on: macos-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::cffr
any::V8

- name: Update CITATION.cff
run: |

library(cffr)

# Customize with your own code
# See https://docs.ropensci.org/cffr/articles/cffr.html

# Write your own keys
mykeys <- list()

# Create your CITATION.cff file
cff_write(keys = mykeys)

shell: Rscript {0}

- name: Commit results
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add CITATION.cff
git commit -m 'Update CITATION.cff' || echo "No changes to commit"
git push origin || echo "No changes to commit"



28 changes: 19 additions & 9 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,26 @@ Type: Package
Package: browseMetadata
Title: Browse and categorise health metadata
Version: 1.2.2
Authors@R:
person("Rachael", "Stickland", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-3398-4272"))
Authors@R: c(
person("Rachael", "Stickland", , "[email protected]",
role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-3398-4272")),
person("Batool", "Almarzouq", , , role = "ctb",
comment = c(ORCID = "0000-0002-3905-2751")),
person("Mahwish", "Mohammad", , , role = "ctb",
comment = c(ORCID = "0009-0004-5295-0726")),
person("Daniel", "Delbarre", , , role = "ctb",
comment = c(ORCID = "0000-0003-4633-4252")),
person("Nida", "Ziauddeen", , , role = "ctb",
comment = c(ORCID = "0000-0002-8964-5029"))
)
Maintainer: Rachael Stickland <[email protected]>
Description: This R package helps a researcher browse datasets in SAIL databank.
It has scope to be applied to other health datasets.
It is useful in the earlier stages of a project; prior to data access,
researchers can use the metadata to browse and categorise variables.
Description: Visualise and categorise publicly available metadata from health
datasets. By interacting with metadata prior to gaining full access to health
datasets, researchers can use this tool to browse datasets and categorise
variables.
License: GPL (>= 3)
URL: https://aim-rsf.github.io/browseMetadata
URL: https://aim-rsf.github.io/browseMetadata/
Depends:
R (>= 2.10)
Imports:
Expand All @@ -21,7 +31,7 @@ Imports:
gridExtra,
htmlwidgets,
plotly,
rjson,
jsonlite,
tidyr
Suggests:
knitr,
Expand Down
10 changes: 5 additions & 5 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Generated by roxygen2: do not edit by hand

export(browseMetadata)
export(mapMetadata)
export(mapMetadata_compare_outputs)
export(mapMetadata_convert_outputs)
export(browse_metadata)
export(map_metadata)
export(map_metadata_compare)
export(map_metadata_convert)
import(ggplot2)
importFrom(cli,cli_alert_danger)
importFrom(cli,cli_alert_info)
Expand All @@ -27,9 +27,9 @@ importFrom(graphics,plot.new)
importFrom(gridExtra,grid.arrange)
importFrom(gridExtra,tableGrob)
importFrom(htmlwidgets,saveWidget)
importFrom(jsonlite,fromJSON)
importFrom(plotly,layout)
importFrom(plotly,plot_ly)
importFrom(rjson,fromJSON)
importFrom(stats,reorder)
importFrom(tidyr,complete)
importFrom(tidyr,pivot_longer)
Expand Down
6 changes: 6 additions & 0 deletions R/browseMetadata-package.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#' @keywords internal
"_PACKAGE"

## usethis namespace: start
## usethis namespace: end
NULL
Loading
Loading