From 1bb2ea532dbb296a9018ade4aa0c36d1c43645fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Ko=C5=82oma=C5=84ski?= <63905560+m-kolomanski@users.noreply.github.com> Date: Thu, 31 Oct 2024 07:56:06 +0100 Subject: [PATCH 01/10] Enhancement: implemented relevant CI workflows from admiralci --- .github/workflows/admiral.yml | 61 +++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/admiral.yml diff --git a/.github/workflows/admiral.yml b/.github/workflows/admiral.yml new file mode 100644 index 00000000..909aa151 --- /dev/null +++ b/.github/workflows/admiral.yml @@ -0,0 +1,61 @@ +# Source: https://github.com/pharmaverse/admiralci +# Stripped down version of admiralci checks. Good for +# the developement process. When package is ready to +# be published, revisit and add release-related +# workflows. +name: admiral CI/CD Workflows + +on: + workflow_dispatch: + push: + branches: + - main + pull_request: + branches: + - "*" + +concurrency: + group: admiral-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +env: + R_VERSION: "release" + +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 + 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 }}" + linter: + name: Lint + uses: pharmaverse/admiralci/.github/workflows/lintr.yml@main + needs: get_r_version + if: github.event_name == 'pull_request' + with: + r-version: "${{ needs.get_r_version.outputs.r-version }}" + man-pages: + name: Man Pages + uses: pharmaverse/admiralci/.github/workflows/man-pages.yml@main + if: github.event_name == 'pull_request' + needs: get_r_version + with: + r-version: "${{ needs.get_r_version.outputs.r-version }}" + check: + name: Check + uses: pharmaverse/admiralci/.github/workflows/r-cmd-check.yml@main + with: + error-on: warning # TODO: find a way to ignore specific notes + if: github.event_name == 'pull_request' From cbcfee61a7f115da34465e74f824fb769f56fcb1 Mon Sep 17 00:00:00 2001 From: m-kolomanski Date: Thu, 31 Oct 2024 08:15:00 +0100 Subject: [PATCH 02/10] fix: removed error-on: warning from R CMD CHECK --- .github/workflows/admiral.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/admiral.yml b/.github/workflows/admiral.yml index 909aa151..42e29b2e 100644 --- a/.github/workflows/admiral.yml +++ b/.github/workflows/admiral.yml @@ -12,7 +12,7 @@ on: - main pull_request: branches: - - "*" + - main concurrency: group: admiral-${{ github.event.pull_request.number || github.ref }} @@ -56,6 +56,5 @@ jobs: check: name: Check uses: pharmaverse/admiralci/.github/workflows/r-cmd-check.yml@main - with: - error-on: warning # TODO: find a way to ignore specific notes + # TODO: reinstate with: error-on: warning when warnings are cleaned up if: github.event_name == 'pull_request' From 2b4c9402c543f7e0df8fbc7bb355bdb42b062e4e Mon Sep 17 00:00:00 2001 From: m-kolomanski Date: Thu, 31 Oct 2024 08:22:41 +0100 Subject: [PATCH 03/10] fix: spelling mistakes --- DESCRIPTION | 1 + NAMESPACE | 4 ++++ R/calculate_summary_stats.R | 2 +- R/reshape_PKNCA_results.R | 2 +- README.md | 2 +- inst/WORDLIST | 40 ++++++++++++++++++++++++++++++++++ man/calculate_summary_stats.Rd | 2 +- man/filter_breaks.Rd | 24 ++++++++++++++++++++ man/reshape_pknca_results.Rd | 2 +- 9 files changed, 74 insertions(+), 5 deletions(-) create mode 100644 inst/WORDLIST create mode 100644 man/filter_breaks.Rd diff --git a/DESCRIPTION b/DESCRIPTION index 18f1da88..764cb10d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -60,3 +60,4 @@ Suggests: lintr (>= 3.1.2), testthat (>= 3.0.0) Config/testthat/edition: 3 +Language: en-US diff --git a/NAMESPACE b/NAMESPACE index 46f55fcb..4847a62b 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -6,6 +6,7 @@ export(as_factor_preserve_label) export(calculate_summary_stats) export(create_conc) export(create_dose) +export(filter_breaks) export(flexible_violinboxplot) export(format_data) export(general_lineplot) @@ -58,7 +59,10 @@ importFrom(ggplot2,geom_errorbar) importFrom(ggplot2,geom_line) importFrom(ggplot2,geom_point) importFrom(ggplot2,ggplot) +importFrom(ggplot2,ggplot_build) +importFrom(ggplot2,ggplot_gtable) importFrom(ggplot2,labs) +importFrom(grid,convertUnit) importFrom(htmlwidgets,JS) importFrom(logger,log_debug) importFrom(logger,log_error) diff --git a/R/calculate_summary_stats.R b/R/calculate_summary_stats.R index d5a2e8a8..57e1a89b 100644 --- a/R/calculate_summary_stats.R +++ b/R/calculate_summary_stats.R @@ -3,7 +3,7 @@ #' This function calculates various summary statistics for formatted output of PKNCA::pk.nca(). #' #' @param input_groups A character vector specifying the columns to group by. -#' Here. the hierachrical order matters +#' Here. the hierarchical order matters #' @param res_pknca A data frame containing results of #' Non Compartmental Analysis using PKNCA package #' @return A data frame with summary statistics for each group and parameter. diff --git a/R/reshape_PKNCA_results.R b/R/reshape_PKNCA_results.R index 04c51fbd..986d45da 100644 --- a/R/reshape_PKNCA_results.R +++ b/R/reshape_PKNCA_results.R @@ -6,7 +6,7 @@ #' #' @param res_nca The output of PKNCA::pk.nca #' -#' @returns A data frame (finalres2) which provides an easy overview on the results from the NCA +#' @returns A data frame which provides an easy overview on the results from the NCA #' in each profile/subject and how it was computed lambda (half life) and the results #' of the NCA parameters (cmax, AUC, AUClast) #' diff --git a/README.md b/README.md index 907e8c78..cd698ea8 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ devtools::load_all() aNCA::run_app() ``` -Have fun running your tailored Non-Compartemental Analysis! +Have fun running your tailored Non-Compartmental Analysis!