diff --git a/404.html b/404.html index 7a2e4ca..02a2083 100644 --- a/404.html +++ b/404.html @@ -25,7 +25,7 @@ - +
@@ -56,7 +56,7 @@
  • - +
  • @@ -67,7 +67,7 @@
    - +
    @@ -95,16 +95,16 @@

    Page not found (404)

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/LICENSE-text.html b/LICENSE-text.html index e548592..84063b6 100644 --- a/LICENSE-text.html +++ b/LICENSE-text.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -65,15 +65,15 @@

    License

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/LICENSE.html b/LICENSE.html index e767c38..366de4d 100644 --- a/LICENSE.html +++ b/LICENSE.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -47,6 +47,7 @@

    MIT License

    +

    Copyright (c) 2023 mpn.scorecard authors

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    @@ -68,15 +69,15 @@

    MIT License

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/authors.html b/authors.html index 8328c83..0d12d5a 100644 --- a/authors.html +++ b/authors.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -47,17 +47,17 @@

    Authors and Citation

    - +
    @@ -71,14 +71,13 @@

    Citation

    Barrett K, Green S, Meyer K (2024). mpn.scorecard: Generate a scorecard with various measures of R package quality and risk. -R package version 0.4.1, https://github.com/metrumresearchgroup/mpn.scorecard. +https://metrumresearchgroup.github.io/mpn.scorecard, https://github.com/metrumresearchgroup/mpn.scorecard.

    @Manual{,
       title = {mpn.scorecard: Generate a scorecard with various measures of R package quality and risk},
       author = {Kyle Barrett and Seth Green and Kyle Meyer},
       year = {2024},
    -  note = {R package version 0.4.1},
    -  url = {https://github.com/metrumresearchgroup/mpn.scorecard},
    +  note = {https://metrumresearchgroup.github.io/mpn.scorecard, https://github.com/metrumresearchgroup/mpn.scorecard},
     }
    @@ -92,15 +91,15 @@

    Citation

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/index.html b/index.html index bfce45a..659be87 100644 --- a/index.html +++ b/index.html @@ -26,7 +26,7 @@ - +
    @@ -57,7 +57,7 @@
  • - +
  • @@ -68,7 +68,7 @@
    - +
    @@ -79,6 +79,7 @@
    +

    mpn.scorecard is an R package designed to score other R packages on key attributes that help evaluate the risk of adding them to MPN. mpn.scorecard leans heavily on the metrics developed by R Validation Hub’s riskmetric R package, and has additional features related to the scoring and outputs. Each package is first evaluated based on code documentation, maintenance and sustainability, and transparency. Code coverage and R CMD Check results are then tabulated and saved out to a specified location. These metrics are summarized in a scorecard report.

    Scoring a Package @@ -192,6 +193,11 @@

    Summary ReportThe report provides additional context, session info, proof points, etc., but will render a table that looks like the one below:

    +
    +

    Rendering scorecards for non-R packages +

    +

    The workflow described above focuses on R packages. Generating scorecards for other types of packages is also supported. In this case, the scoring happens outside of mpn.scorecard, and a directory of results is fed to render_scorecard. The required input format is described at ?external_scores.

    +
    @@ -248,16 +254,16 @@

    Dev status

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/news/index.html b/news/index.html index 02df49c..2872be0 100644 --- a/news/index.html +++ b/news/index.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -47,33 +47,52 @@

    Changelog

    Source: NEWS.md
    +
    + +
    +

    New features and change

    +
    • Added support for externally scored packages. render_scorecard() can now render a scorecard from a set of files created by an external scorer (i.e. something other than score_pkg()). Note that they do not need to be R packages (#70).
    • +
    • Exports in the traceability matrix that spanned more than one page (usually due to linking to many test files), are now split into and <export (cont.)> to ensure tables do not overflow into the footer (#73).
    • +
    • Expanded support for linking methods to their documentation and relevant test files (#71).
    • +
    +
    +

    Bug Fixes

    +
    • Due to a few text wrapping bugs in the traceability matrix, some packages would fail to render a scorecard. (#66)
    • +
    • Other columns in the traceability matrix now indent when overflowing to the next line (#71)
    • +
    +

    Bug Fixes

    -
    • Due to a regression in the 0.4.0 release, an error was triggered when formatting the traceability matrix of a package with exports in its namespace that couldn’t be mapped to a code file. (#65)
    +

    New features and change

    +alternates in color) to help distinguish between rows for potentially large tables. (#58) +

    Bug Fixes

    -
    +

    New features and changes

    -
    +

    Bug Fixes

    -
    +
    @@ -121,15 +140,15 @@
    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/pkgdown.yml b/pkgdown.yml index dd54dcc..7d07e34 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -1,9 +1,8 @@ -pandoc: 2.14.1 -pkgdown: 2.0.9 +pandoc: 3.1.8 +pkgdown: 2.1.1 pkgdown_sha: ~ articles: {} -last_built: 2024-05-31T17:51Z +last_built: 2024-09-18T21:37Z urls: reference: https://metrumresearchgroup.github.io/mpn.scorecard/reference article: https://metrumresearchgroup.github.io/mpn.scorecard/articles - diff --git a/reference/add_coverage.html b/reference/add_coverage.html index 9fc4ed3..90dc9c1 100644 --- a/reference/add_coverage.html +++ b/reference/add_coverage.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,15 +58,17 @@

    Run covr and potentially save results to disk

    Arguments

    -
    pkg_source_path
    + + +
    pkg_source_path

    package installation directory

    -
    out_dir
    +
    out_dir

    directory for saving results

    -
    timeout
    +
    timeout

    Timeout to pass to callr::r_safe() when running covr.

    @@ -87,15 +89,15 @@

    Details

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/add_rcmdcheck.html b/reference/add_rcmdcheck.html index 1160850..c2086b5 100644 --- a/reference/add_rcmdcheck.html +++ b/reference/add_rcmdcheck.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,11 +58,13 @@

    Run R CMD CHECK

    Arguments

    -
    out_dir
    + + +
    out_dir

    directory for saving results

    -
    rcmdcheck_args
    +
    rcmdcheck_args

    list of arguments to pass to rcmdcheck::rcmdcheck

    @@ -86,15 +88,15 @@

    Details

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/add_score_minibar.html b/reference/add_score_minibar.html index 0eb7650..c576033 100644 --- a/reference/add_score_minibar.html +++ b/reference/add_score_minibar.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -65,28 +65,30 @@

    Add flextable minibar to column

    Arguments

    -
    flextable_df
    + + +
    flextable_df

    a flextable object

    -
    score_col
    +
    score_col

    The name of the column specifying the scores. Used to calculate

    -
    risk_col
    +
    risk_col

    The name of the column specifying the risks

    -
    column_index
    +
    column_index

    Index of column to apply the minibar to. Traditionally, this should map to the index of score_col, but doesn't need to. If NULL, will map to the index of score_col.

    -
    color_text
    +
    color_text

    Logical (T/F). If FALSE color the text in column_index black. Otherwise use risk colors (green, orange, red)

    -
    digits
    +
    digits

    number of digits to round scores to.

    @@ -109,15 +111,15 @@

    Details

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/build_risk_summary.html b/reference/build_risk_summary.html index b93f623..e49ecba 100644 --- a/reference/build_risk_summary.html +++ b/reference/build_risk_summary.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,11 +58,14 @@

    Summarise overall risks for each package

    Arguments

    -
    result_dirs
    -

    A vector of output directories

    -
    risk_breaks
    +
    result_dirs
    +

    A vector of output directories, each one produced by +score_pkg(). external_scores are not supported.

    + + +
    risk_breaks

    A numeric vector of length 2, with both numbers being between 0 and 1. These are used for the "breaks" when classifying scores into Risk categories. For example, for the default value of c(0.3, 0.7), @@ -70,11 +73,11 @@

    Arguments

    is "Medium Risk", and 0.7 <= score < 1 is "High Risk".

    -
    out_dir
    +
    out_dir

    Output directory for saving scorecard summary. If NULL, assumes all result_dirs point to the same output directory

    -
    append_out_dir
    +
    append_out_dir

    Logical (T/F). If TRUE, keep the package-specific output directory as part of the returned table.

    @@ -91,15 +94,15 @@

    Arguments

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/calc_overall_scores.html b/reference/calc_overall_scores.html index a18069a..b15acc9 100644 --- a/reference/calc_overall_scores.html +++ b/reference/calc_overall_scores.html @@ -5,7 +5,7 @@ - +
    @@ -33,14 +33,14 @@
    - +
    @@ -62,7 +62,9 @@

    Calculate overall category scores

    Arguments

    -
    scorelist
    + + +
    scorelist

    a complete named list of scores. Should contain all the elementary blocks and just need to be summarized

    @@ -79,15 +81,15 @@

    Arguments

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/check_exists_and_overwrite.html b/reference/check_exists_and_overwrite.html index 1c3321c..ab60fd9 100644 --- a/reference/check_exists_and_overwrite.html +++ b/reference/check_exists_and_overwrite.html @@ -4,7 +4,7 @@ - +
    @@ -32,14 +32,14 @@
    - +
    @@ -60,11 +60,13 @@

    Check if a path exists and delete the file if overwrite is TRUE

    Arguments

    -
    path
    + + +
    path

    a file path to check if it exists

    -
    overwrite
    +
    overwrite

    Logical (T/F). If TRUE, delete the file at the specified path

    @@ -81,15 +83,15 @@

    Arguments

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/check_for_comments.html b/reference/check_for_comments.html index 1e3c5a5..058c8e4 100644 --- a/reference/check_for_comments.html +++ b/reference/check_for_comments.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,8 +58,11 @@

    Look for comment file and return contents if is found

    Arguments

    -
    results_dir
    -

    directory containing json file and individual results. Output file path from score_pkg()

    + + +
    results_dir
    +

    Directory with scoring results. This is the path returned +by score_pkg().

    @@ -75,15 +78,15 @@

    Arguments

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/check_for_traceability.html b/reference/check_for_traceability.html index 07d2cdb..f37937f 100644 --- a/reference/check_for_traceability.html +++ b/reference/check_for_traceability.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,11 +58,14 @@

    Look for Traceability matrix RDS file and return contents if is found

    Arguments

    -
    results_dir
    -

    directory containing json file and individual results. Output file path from score_pkg()

    -
    add_traceability
    +
    results_dir
    +

    Directory with scoring results. This is the path returned +by score_pkg().

    + + +
    add_traceability

    Logical (T/F). If TRUE, append a table that links package functionality to the documentation and test files. Defaults to "auto", which will include the matrix if found.

    @@ -80,15 +83,15 @@

    Arguments

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/check_missing_artifact.html b/reference/check_missing_artifact.html new file mode 100644 index 0000000..b623f56 --- /dev/null +++ b/reference/check_missing_artifact.html @@ -0,0 +1,106 @@ + +Check for missing links in a traceability matrix — check_missing_artifact • mpn.scorecard + + +
    +
    + + + +
    +
    + + +
    +

    Check for missing links in a traceability matrix

    +
    + +
    +
    check_missing_artifact(
    +  exports_df,
    +  pkg_source_path,
    +  artifact = c("code_file", "documentation", "test_files")
    +)
    +
    + +
    +

    Arguments

    + + +
    exports_df
    +

    data.frame with a column, named exported_function, +containing the names of all exported functions. Can also have other columns +(which will be returned unmodified).

    + + +
    pkg_source_path
    +

    a file path pointing to an unpacked/untarred package directory

    + + +
    artifact
    +

    either "code_file", "documentation", or "test_files". +Must be a column present in exports_df.

    + +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.1.

    +
    + +
    + + + + + + + + diff --git a/reference/check_scores_valid.html b/reference/check_scores_valid.html index c886e53..82e7644 100644 --- a/reference/check_scores_valid.html +++ b/reference/check_scores_valid.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,12 +58,14 @@

    Check that package scores are valid

    Arguments

    -
    pkg_scores
    + + +
    pkg_scores

    a named list containing the build up of score elements and overall category scores.

    -
    json_path
    +
    json_path

    a JSON file path.

    @@ -99,15 +101,15 @@

    Details

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/create_extra_notes.html b/reference/create_extra_notes.html index a333b3e..7449e5d 100644 --- a/reference/create_extra_notes.html +++ b/reference/create_extra_notes.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,8 +58,11 @@

    Create extra notes summarizing the covr & rcmdcheck outputs, and documen

    Arguments

    -
    results_dir
    -

    directory containing json file and individual results. Output file path from score_pkg()

    + + +
    results_dir
    +

    Directory with scoring results. This is the path returned +by score_pkg().

    @@ -75,15 +78,15 @@

    Arguments

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/create_score_list_from_riskmetric.html b/reference/create_score_list_from_riskmetric.html index 79709d6..c7c7b4c 100644 --- a/reference/create_score_list_from_riskmetric.html +++ b/reference/create_score_list_from_riskmetric.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,11 +58,13 @@

    Format riskmetric results into scorecard list

    Arguments

    -
    res
    + + +
    res

    a named list containing the initial build up of score elements

    -
    pkg_source_path
    +
    pkg_source_path

    path to package source code (untarred)

    @@ -79,15 +81,15 @@

    Arguments

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/external_scores.html b/reference/external_scores.html new file mode 100644 index 0000000..ae2941b --- /dev/null +++ b/reference/external_scores.html @@ -0,0 +1,208 @@ + +Rendering externally scored packages — external_scores • mpn.scorecard + + +
    +
    + + + +
    +
    + + +
    +

    For R packages, mpn.scorecard handles both scoring and rendering. The +workflow is to first score the package with score_pkg(), then to optionally +generate a traceability matrix with make_traceability_matrix(), and finally +to render the scorecard with render_scorecard().

    +

    render_scorecard() also supports rendering packages that are scored outside +of mpn.scorecard. The scorer is responsible for preparing a results directory +with the set of files described below.

    +
    + + +
    +

    Details

    + +
    +

    Input files

    + + +

    The following input files define results for the scorecard to render. These +must reside in a directory named <package>_<version>, following the naming +of the output directory returned by score_pkg().

    • <package>_<version>.pkg.json: This file provides general information +about the package being scored. It requires the following keys:

      • mpn_scorecard_format: The version of the format in which these input +files are specified. This should be "1.0".

      • +
      • pkg_name, pkg_version: The name and version of the package.

      • +
      • scorecard_type: The type of package. Two types are currently +recognized and receive special handling: "R" and "cli". Everything else +falls back to default handling.

        +

        If you're specifying "R" here, you should probably use score_pkg() +instead.

      • +

      Example:

      +

      {
      +  "mpn_scorecard_format": "1.0",
      +  "pkg_name": "foo",
      +  "pkg_version": "1.2.3",
      +  "scorecard_type": "cli"
      +}

    • +
    • <package>_<version>.check.txt: Output from the package check. This is +included in the appendix verbatim.

    • +
    • <package>_<version>.coverage.json: Code coverage percentages. The values +will be rounded to two decimal places when rendering. This file is +optional.

      +

      Example:

      +

      {
      +  "overall": 91.54265,
      +  "files": [
      +    {
      +      "file": "cmd/foo.go",
      +      "coverage": 98.7643
      +    },
      +    {
      +      "file": "cmd/bar.go",
      +      "coverage": 84.321
      +    }
      +  ]
      +}

    • +
    • <package>_<version>.scores.json: Scores for individual metrics grouped +into four categories: "testing", "documentation", "maintenance", and +"transparency". Each category must have a least one score.

      +

      For the testing category, "check is required. "check" should be 1 if the +tests passed and 0 if they failed. "coverage" is required if the +<package>_<version>.coverage.json coverage" file exists. The value +should match the "overall" value from <package>_<version>.coverage.json, +divided by 100.

      +

      Example:

      +

      {
      +  "testing": {
      +    "check": 1,
      +    "coverage": 0.9154265
      +  },
      +  "documentation": {
      +    "has_website": 1,
      +    "has_news": 1
      +  },
      +  "maintenance": {
      +    "has_maintainer": 1,
      +    "news_current": 1
      +  },
      +  "transparency": {
      +    "has_source_control": 1,
      +    "has_bug_reports_url": 1
      +  }
      +}

    • +
    • <package>_<version>.metadata.json: Information to include in the +"System Info" table. The table will include the "date" and "executor" +value, as well as any key-value pairs defined under "info.env_vars" and +"info.sys". The "date" and "executor" keys are required.

      +

      Example:

      +

      {
      +  "date": "2024-08-01 08:19:12",
      +  "executor": "Bobert",
      +  "info": {
      +    "env_vars": {
      +      "METWORX_VERSION": "22.09"
      +    },
      +    "sys": {
      +      "sysname": "Linux",
      +      "machine": "x86_64"
      +    }
      +  }
      +}

    • +
    • <package>_<version>.matrix.yaml: A file defining entries to render as +the traceability matrix table. The traceability matrix table is meant to +map all user-facing entry points (e.g., exported functions or available +commands for a command-line executable) to the relevant documentation and +test files.

      +

      The file should consist of a sequence of entries with the following items:

      • entrypoint: The name of the entry point.

      • +
      • code: The path to where the entry point is defined.

      • +
      • doc: The path to the entry point's main documentation.

      • +
      • tests: A list of paths where the entry point is tested.

      • +

      What the entry point is called in the table depends on scorecard_type. +For "cli", the column name is "Command" and, for "R", it is +"Exported Function". For all other types, it is "Entry Point".

      +

      This file is optional if the add_traceability argument of +render_scorecard() is "auto" or FALSE.

      +

      Example:

      +

      - entrypoint: foo
      +  skip: true
      +
      +- entrypoint: foo bar
      +  code: cmd/bar.go
      +  doc: docs/commands/foo_bar.md
      +  tests:
      +    - cmd/bar_test.go
      +    - integration/bar_test.go

    • +
    + +
    + +
    + +
    + + +
    + + + + + + + + diff --git a/reference/filter_symbol_functions.html b/reference/filter_symbol_functions.html index 485852e..64bc66a 100644 --- a/reference/filter_symbol_functions.html +++ b/reference/filter_symbol_functions.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,7 +58,9 @@

    Remove specific symbols from vector of functions

    Arguments

    -
    funcs
    + + +
    funcs

    vector of functions to filter

    @@ -75,15 +77,15 @@

    Arguments

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/flex_stripe.html b/reference/flex_stripe.html index 6358eeb..63d30c6 100644 --- a/reference/flex_stripe.html +++ b/reference/flex_stripe.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -63,16 +63,18 @@

    Helper to apply flextable styling for alternating row background color

    Arguments

    -
    tab
    + + +
    tab

    a flextable

    -
    odd_body_bg, even_body_bg
    +
    odd_body_bg, even_body_bg

    the background color of odd and even rows for the main body of tab. Note that all font is black for the body.

    -
    border
    +
    border

    Logical (T/F). If TRUE, add horizontal borders and a vertical border after the first column.

    @@ -90,15 +92,15 @@

    Arguments

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/flextable_formatted.html b/reference/flextable_formatted.html index 9f8dfc6..7fb4b25 100644 --- a/reference/flextable_formatted.html +++ b/reference/flextable_formatted.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -67,36 +67,38 @@

    Autofit and format flextables

    Arguments

    -
    tab
    + + +
    tab

    a dataframe or flextable object. Must be coercible to a dataframe

    -
    autofit
    +
    autofit

    logical (T/F). Whether or not to autofit the table.

    -
    pg_width
    +
    pg_width

    width (in inches) of the table. Generally 1 inch less than the default word document (8 in.)

    -
    column_width
    +
    column_width

    named vector, where the column names are assigned to the desired relative width. If specified, set these column widths before fitting to word document

    -
    doc_type
    +
    doc_type

    Word, PDF, or HTML. Controls font size and autofit scaling.

    -
    digits
    +
    digits

    numeric. Number of digits to round to. If NULL, and as_flextable = TRUE, flextable will round to one digit.

    -
    font_size
    +
    font_size

    font size of the table.

    -
    ...
    +
    ...

    additional args to be passed to as_flextable() or flextable(). Which function, if any, is called depends on the type of tab. If tab is already a flextable, neither is called. If tab inherits from @@ -106,15 +108,13 @@

    Arguments

    Value

    - - -

    a formatted flextable

    +

    a formatted flextable

    Details

    column_width is specified using the following convention:

    -

    tab %>%
    -flextable_word(column_width = c("col1" = 2, "col2" = 3))

    +

    tab %>%
    +flextable_word(column_width = c("col1" = 2, "col2" = 3))

    flextable by default will make the tables as wide as possible in word. This function will correct the autofit() feature and make the contents fit. Other formatting corrections are done depending on the specified doc_type

    @@ -131,15 +131,15 @@

    Details

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/format_appendix.html b/reference/format_appendix.html index d344ec8..ee019eb 100644 --- a/reference/format_appendix.html +++ b/reference/format_appendix.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -53,16 +53,18 @@

    Format Appendix

    -
    format_appendix(extra_notes_data, return_vals = FALSE)
    +
    format_appendix(extra_notes_data, return_vals = FALSE, scorecard_type = "R")

    Arguments

    -
    extra_notes_data
    + + +
    extra_notes_data

    named list. Output of create_extra_notes()

    -
    return_vals
    +
    return_vals

    Logical (T/F). If TRUE, return the objects instead of printing them out for rmarkdown. Used for testing.

    @@ -79,15 +81,15 @@

    Arguments

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/format_colnames_to_title.html b/reference/format_colnames_to_title.html index 949a187..c53e7d5 100644 --- a/reference/format_colnames_to_title.html +++ b/reference/format_colnames_to_title.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,7 +58,9 @@

    Format column names to be user friendly

    Arguments

    -
    df
    + + +
    df

    a dataframe

    @@ -75,15 +77,15 @@

    Arguments

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/format_comments.html b/reference/format_comments.html index fc8e53f..e604a6e 100644 --- a/reference/format_comments.html +++ b/reference/format_comments.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,7 +58,9 @@

    Format vector of comments text

    Arguments

    -
    comments_block
    + + +
    comments_block

    character vector of comments text. Can include bullets

    @@ -75,15 +77,15 @@

    Arguments

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/format_metadata.html b/reference/format_metadata.html index 85068a4..251c08e 100644 --- a/reference/format_metadata.html +++ b/reference/format_metadata.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,15 +58,15 @@

    Format system info and metadata

    Arguments

    -
    metadata_list
    + + +
    metadata_list

    metadata list returned by formatted_pkg_scores$metadata

    Value

    - - -

    a formatted flextable object

    +

    a formatted flextable object

    @@ -81,15 +81,15 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/format_overall_scores.html b/reference/format_overall_scores.html index a4a6a19..620b2e8 100644 --- a/reference/format_overall_scores.html +++ b/reference/format_overall_scores.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,19 +58,19 @@

    Format Overall Scores

    Arguments

    -
    formatted_pkg_scores
    + + +
    formatted_pkg_scores

    list containing all scores

    -
    digits
    +
    digits

    number of digits to round scores to.

    Value

    - - -

    a formatted flextable object

    +

    a formatted flextable object

    @@ -85,15 +85,15 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/format_package_details.html b/reference/format_package_details.html index cf49be6..6cf1af2 100644 --- a/reference/format_package_details.html +++ b/reference/format_package_details.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,19 +58,19 @@

    Format Package Details

    Arguments

    -
    formatted_pkg_scores
    + + +
    formatted_pkg_scores

    list containing all scores

    -
    color_headers
    +
    color_headers

    Logical (T/F). If TRUE, color the headers based on risk level

    Value

    - - -

    a formatted flextable object

    +

    a formatted flextable object

    @@ -85,15 +85,15 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/format_score_summaries.html b/reference/format_score_summaries.html index 2328c9a..d603767 100644 --- a/reference/format_score_summaries.html +++ b/reference/format_score_summaries.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,20 +58,20 @@

    Format summary of overall risks

    Arguments

    -
    risk_summary_df
    + + +
    risk_summary_df

    summary dataframe containing overall scores, risks, and package info for each package

    -
    digits
    +
    digits

    number of digits to round scores to

    Value

    - - -

    a formatted flextable object

    +

    a formatted flextable object

    @@ -86,15 +86,15 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/format_scorecard_version.html b/reference/format_scorecard_version.html index da77eb8..a4fa75d 100644 --- a/reference/format_scorecard_version.html +++ b/reference/format_scorecard_version.html @@ -4,7 +4,7 @@ - +
    @@ -32,14 +32,14 @@
    - +
    @@ -60,12 +60,14 @@

    Format mpn.scorecard version as a footer note

    Arguments

    -
    json_ver
    + + +
    json_ver

    version of mpn.scorecard as recorded in score_pkg. Set to NULL for use with render_scorecard_summary.

    -
    scorecard_ver
    +
    scorecard_ver

    version of mpn.scorecard as recorded in render_scorecard or render_scorecard_summary

    @@ -83,15 +85,15 @@

    Arguments

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/format_scores_for_render.html b/reference/format_scores_for_render.html index 33c89f5..1f2d649 100644 --- a/reference/format_scores_for_render.html +++ b/reference/format_scores_for_render.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,11 +58,13 @@

    Prepare the raw risk scores to be rendered into PDF

    Arguments

    -
    pkg_scores
    + + +
    pkg_scores

    named list of all scores

    -
    risk_breaks
    +
    risk_breaks

    A numeric vector of length 2, with both numbers being between 0 and 1. These are used for the "breaks" when classifying scores into Risk categories. For example, for the default value of c(0.3, 0.7), @@ -83,15 +85,15 @@

    Arguments

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/format_testing_scores.html b/reference/format_testing_scores.html index d2c59d7..2e28b28 100644 --- a/reference/format_testing_scores.html +++ b/reference/format_testing_scores.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,15 +58,15 @@

    Format testing scores

    Arguments

    -
    formatted_pkg_scores
    + + +
    formatted_pkg_scores

    list containing all scores

    Value

    - - -

    a formatted flextable object

    +

    a formatted flextable object

    @@ -81,15 +81,15 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/format_traceability_matrix.html b/reference/format_traceability_matrix.html index bf5460c..f9a9a69 100644 --- a/reference/format_traceability_matrix.html +++ b/reference/format_traceability_matrix.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -53,16 +53,18 @@

    Format Traceability Matrix

    -
    format_traceability_matrix(exports_df, wrap_cols = TRUE)
    +
    format_traceability_matrix(exports_df, wrap_cols = TRUE, scorecard_type = "R")

    Arguments

    -
    exports_df
    + + +
    exports_df

    tibble. Output of make_traceability_matrix()

    -
    wrap_cols
    +
    wrap_cols

    logical (T/F). If TRUE, wrap columns

    @@ -79,15 +81,15 @@

    Arguments

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/get_exports.html b/reference/get_exports.html index 4784602..f8f2add 100644 --- a/reference/get_exports.html +++ b/reference/get_exports.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,15 +58,15 @@

    list all package exports

    Arguments

    -
    pkg_source_path
    + + +
    pkg_source_path

    a file path pointing to an unpacked/untarred package directory

    Value

    - - -

    data.frame, with one column exported_function, that can be passed +

    data.frame, with one column exported_function, that can be passed to all downstream map_* helpers

    @@ -82,15 +82,15 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/get_flex_caption.html b/reference/get_flex_caption.html index e926c57..a492b78 100644 --- a/reference/get_flex_caption.html +++ b/reference/get_flex_caption.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,19 +58,19 @@

    Create a flextable caption colored by risk

    Arguments

    -
    formatted_pkg_scores
    + + +
    formatted_pkg_scores

    list containing all scores

    -
    category
    +
    category

    one of c('testing', 'documentation', 'maintenance', 'transparency', 'overall')

    Value

    - - -

    a flextable caption

    +

    a flextable caption

    @@ -85,15 +85,15 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/get_overall_labels.html b/reference/get_overall_labels.html index 5fbf8b3..9ea8264 100644 --- a/reference/get_overall_labels.html +++ b/reference/get_overall_labels.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,25 +58,23 @@

    Retrieve and format category labels

    Arguments

    -
    formatted_pkg_scores
    + + +
    formatted_pkg_scores

    list containing all scores

    -
    category
    +
    category

    one of c('testing', 'documentation', 'maintenance', 'transparency', 'overall')

    -
    risk_only
    +
    risk_only

    Logical (T/F). If TRUE, return just the overall risk

    Value

    - - -

    a character string in the format of :

    - - +

    a character string in the format of :

    @@ -91,15 +89,15 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/get_pkg_desc.html b/reference/get_pkg_desc.html index 24f057e..15b5c25 100644 --- a/reference/get_pkg_desc.html +++ b/reference/get_pkg_desc.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,7 +58,9 @@

    Read Description file and parse the package name and version

    Arguments

    -
    pkg_source_path
    + + +
    pkg_source_path

    path to package source code (untarred)

    @@ -75,15 +77,15 @@

    Arguments

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/get_result_path.html b/reference/get_result_path.html index e999d21..cc947fa 100644 --- a/reference/get_result_path.html +++ b/reference/get_result_path.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -55,18 +55,21 @@

    Assign output file path for various outputs during scorecard rendering

    get_result_path(
       out_dir,
    -  ext = c("scorecard.json", "scorecard.pdf", "check.rds", "covr.rds", "comments.txt",
    -    "summary.pdf", "export_doc.rds", "mitigation.txt")
    +  ext = c("scorecard.json", "scorecard.pdf", "comments.txt", "mitigation.txt",
    +    "check.rds", "covr.rds", "export_doc.rds", "summary.pdf", "check.txt",
    +    "coverage.json", "matrix.yaml", "metadata.json", "pkg.json", "scores.json")
     )

    Arguments

    -
    out_dir
    + + +
    out_dir

    output directory for saving results and json

    -
    ext
    +
    ext

    file name and extension. "mitigation.txt" is deprecated, but still supported.

    @@ -88,15 +91,15 @@

    Details

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/get_testing_dir.html b/reference/get_testing_dir.html index c1282fe..dad8dcc 100644 --- a/reference/get_testing_dir.html +++ b/reference/get_testing_dir.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -53,16 +53,18 @@

    Get tests/testthat directory from package directory

    -
    get_testing_dir(pkg_source_path, verbose)
    +
    get_testing_dir(pkg_source_path, verbose = FALSE)

    Arguments

    -
    pkg_source_path
    + + +
    pkg_source_path

    a file path pointing to an unpacked/untarred package directory

    -
    verbose
    +
    verbose

    Logical (TRUE/FALSE). If TRUE, show any warnings/messages per function.

    @@ -79,15 +81,15 @@

    Arguments

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/get_tests.html b/reference/get_tests.html index 13f155a..2258f52 100644 --- a/reference/get_tests.html +++ b/reference/get_tests.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,19 +58,19 @@

    Tabulate all tests in a package directory

    Arguments

    -
    pkg_source_path
    + + +
    pkg_source_path

    a file path pointing to an unpacked/untarred package directory

    -
    test_dirs
    +
    test_dirs

    one or more directories containing test scripts

    Value

    - - -

    a dataframe containing all test names and the test file they are associated with

    +

    a dataframe containing all test names and the test file they are associated with

    @@ -85,15 +85,15 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/get_toplevel_assignments.html b/reference/get_toplevel_assignments.html index 9ceff3d..3fe6352 100644 --- a/reference/get_toplevel_assignments.html +++ b/reference/get_toplevel_assignments.html @@ -6,7 +6,7 @@ - +
    @@ -34,14 +34,14 @@
    - +
    @@ -64,15 +64,15 @@

    list all top-level objects defined in the package code

    Arguments

    -
    pkg_source_path
    + + +
    pkg_source_path

    a file path pointing to an unpacked/untarred package directory

    Value

    - - -

    A data.frame with the columns func and code_file with a row for +

    A data.frame with the columns func and code_file with a row for every top-level object defined in the package.

    @@ -88,15 +88,15 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/index.html b/reference/index.html index 170834f..b0ff660 100644 --- a/reference/index.html +++ b/reference/index.html @@ -1,9 +1,9 @@ -Function reference • mpn.scorecardPackage index • mpn.scorecard - +
    @@ -31,14 +31,14 @@
    - +
    @@ -69,11 +69,15 @@

    Rendering Scorecards render_scorecard()

    -

    Take a JSON from score_pkg() and render a pdf

    +

    Render a scorecard PDF from a directory of results

    render_scorecard_summary()

    Render PDF summary of scorecards

    + +

    external_scores render_external

    + +

    Rendering externally scored packages

    - - + + diff --git a/reference/make_traceability_matrix.html b/reference/make_traceability_matrix.html index a315a4a..367c4c0 100644 --- a/reference/make_traceability_matrix.html +++ b/reference/make_traceability_matrix.html @@ -4,7 +4,7 @@ - +
    @@ -32,14 +32,14 @@
    - +
    @@ -60,23 +60,24 @@

    Create a Traceability Matrix

    Arguments

    -
    pkg_tar_path
    + + +
    pkg_tar_path

    path to a tarball

    -
    results_dir
    -

    directory containing json file and individual results. Output file path from score_pkg()

    +
    results_dir
    +

    Directory with scoring results. This is the path returned +by score_pkg().

    -
    verbose
    +
    verbose

    Logical (TRUE/FALSE). If TRUE, show any warnings/messages per function.

    Value

    - - -

    a tibble

    +

    a tibble

    @@ -91,15 +92,15 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/map_answer.html b/reference/map_answer.html index 7e41837..69c856d 100644 --- a/reference/map_answer.html +++ b/reference/map_answer.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -53,22 +53,33 @@

    Use answer_breaks to map results into character strings

    -
    map_answer(scores, criteria, answer_breaks = c(0, 1))
    +
    map_answer(
    +  scores,
    +  criteria,
    +  answer_breaks = c(0, 1),
    +  include_check_score = TRUE
    +)

    Arguments

    -
    scores
    + + +
    scores

    vector of risk scores

    -
    criteria
    +
    criteria

    vector of criteria names

    -
    answer_breaks
    +
    answer_breaks

    breaks determining 'Yes'/'Passing' or 'No'/'Failed'. NA has special handling. See details.

    + +
    include_check_score
    +

    Whether to include score in the result check.

    +

    Details

    @@ -90,15 +101,15 @@

    Details

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/map_functions_to_docs.html b/reference/map_functions_to_docs.html index 3c084df..6b9eb97 100644 --- a/reference/map_functions_to_docs.html +++ b/reference/map_functions_to_docs.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,28 +58,26 @@

    Map all Rd files to the functions they describe

    Arguments

    -
    exports_df
    + + +
    exports_df

    data.frame with a column, named exported_function, containing the names of all exported functions. Can also have other columns (which will be returned unmodified).

    -
    pkg_source_path
    +
    pkg_source_path

    a file path pointing to an unpacked/untarred package directory

    -
    verbose
    +
    verbose

    Logical (TRUE/FALSE). If TRUE, show any warnings/messages per function.

    Value

    - - -

    Returns the data.frame passed to exports_df, with a documentation

    - - -

    column appended. This column will contain the path to the .Rd files in +

    Returns the data.frame passed to exports_df, with a documentation +column appended. This column will contain the path to the .Rd files in man/ that document the associated exported functions.

    @@ -95,15 +93,15 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/map_functions_to_scripts.html b/reference/map_functions_to_scripts.html index a998ebd..3825691 100644 --- a/reference/map_functions_to_scripts.html +++ b/reference/map_functions_to_scripts.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -53,30 +53,30 @@

    Get all exported functions and map them to R script where they are defined
    -
    map_functions_to_scripts(exports_df, pkg_source_path, verbose)
    +
    map_functions_to_scripts(exports_df, pkg_source_path, verbose = FALSE)

    Arguments

    -
    exports_df
    + + +
    exports_df

    data.frame with a column, named exported_function, containing the names of all exported functions. Can also have other columns (which will be returned unmodified).

    -
    pkg_source_path
    +
    pkg_source_path

    a file path pointing to an unpacked/untarred package directory

    -
    verbose
    +
    verbose

    Logical (TRUE/FALSE). If TRUE, show any warnings/messages per function.

    Value

    - - -

    A data.frame with the columns exported_function and code_file.

    +

    A data.frame with the columns exported_function and code_file.

    @@ -91,15 +91,15 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/map_risk.html b/reference/map_risk.html index c08b892..9652bfb 100644 --- a/reference/map_risk.html +++ b/reference/map_risk.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,11 +58,13 @@

    Use risk_breaks to map scores into character strings

    Arguments

    -
    scores
    + + +
    scores

    vector of risk scores

    -
    risk_breaks
    +
    risk_breaks

    breaks determining low, medium, and high risk

    @@ -79,15 +81,15 @@

    Arguments

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/map_tests_to_functions.html b/reference/map_tests_to_functions.html index 9fb1474..0a259f3 100644 --- a/reference/map_tests_to_functions.html +++ b/reference/map_tests_to_functions.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -53,30 +53,30 @@

    Map test files and directories to all functions

    -
    map_tests_to_functions(exports_df, pkg_source_path, verbose)
    +
    map_tests_to_functions(exports_df, pkg_source_path, verbose = FALSE)

    Arguments

    -
    exports_df
    + + +
    exports_df

    data.frame with a column, named exported_function, containing the names of all exported functions. Can also have other columns (which will be returned unmodified).

    -
    pkg_source_path
    +
    pkg_source_path

    a file path pointing to an unpacked/untarred package directory

    -
    verbose
    +
    verbose

    Logical (TRUE/FALSE). If TRUE, show any warnings/messages per function.

    Value

    - - -

    Returns the data.frame passed to exports_df, with test_files and +

    Returns the data.frame passed to exports_df, with test_files and test_dirs columns appended. These columns will contain the paths to the test files that call the associated exported functions.

    @@ -93,15 +93,15 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/mpn.scorecard.html b/reference/mpn.scorecard.html index 0807139..7d43225 100644 --- a/reference/mpn.scorecard.html +++ b/reference/mpn.scorecard.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -66,15 +66,15 @@

    mpn.scorecard

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/pkg_riskmetric.html b/reference/pkg_riskmetric.html index 20190b2..115fab6 100644 --- a/reference/pkg_riskmetric.html +++ b/reference/pkg_riskmetric.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,15 +58,15 @@

    Run all relevant riskmetric checks

    Arguments

    -
    pkg_source_path
    + + +
    pkg_source_path

    path to package source code (untarred)

    Value

    - - -

    raw riskmetric outputs

    +

    raw riskmetric outputs

    @@ -81,15 +81,15 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/render_external.html b/reference/render_external.html new file mode 100644 index 0000000..27e65c4 --- /dev/null +++ b/reference/render_external.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/reference/render_scorecard.html b/reference/render_scorecard.html index 458f9bd..5ec2764 100644 --- a/reference/render_scorecard.html +++ b/reference/render_scorecard.html @@ -1,9 +1,10 @@ -Take a JSON from score_pkg() and render a pdf — render_scorecard • mpn.scorecardRender a scorecard PDF from a directory of results — render_scorecard • mpn.scorecard - +
    @@ -31,25 +32,26 @@
    - +
    -

    Take a JSON from score_pkg() and render a pdf

    +

    Create a scorecard from a results directory prepared by score_pkg() or an +external scorer (see external_scores).

    @@ -63,11 +65,14 @@

    Take a JSON from score_pkg() and render a pdf

    Arguments

    -
    results_dir
    -

    directory containing json file and individual results. Output file path from score_pkg()

    -
    risk_breaks
    +
    results_dir
    +

    Directory with scoring results. This is the path returned +by score_pkg().

    + + +
    risk_breaks

    A numeric vector of length 2, with both numbers being between 0 and 1. These are used for the "breaks" when classifying scores into Risk categories. For example, for the default value of c(0.3, 0.7), @@ -75,11 +80,11 @@

    Arguments

    is "Medium Risk", and 0.7 <= score < 1 is "High Risk".

    -
    overwrite
    +
    overwrite

    Logical (T/F). If TRUE, will overwrite an existing file path if it exists

    -
    add_traceability
    +
    add_traceability

    Logical (T/F). If TRUE, append a table that links package functionality to the documentation and test files. Defaults to "auto", which will include the matrix if found.

    @@ -88,8 +93,7 @@

    Arguments

    Details

    If a plain text comments file is found in results_dir, it will automatically be included. Note that it must follow the naming convention of <pkg_name>_<pkg_version>.comments.txt

    -

    If a traceability matrix is found in results_dir, it will automatically be included unless overridden via add_traceability. -Note that it must follow the naming convention of <pkg_name>_<pkg_version>.export_doc.rds

    +

    If a traceability matrix is found in results_dir, it will automatically be included unless overridden via add_traceability.

    @@ -104,15 +108,15 @@

    Details

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/render_scorecard_summary.html b/reference/render_scorecard_summary.html index 33497c3..9a38d5b 100644 --- a/reference/render_scorecard_summary.html +++ b/reference/render_scorecard_summary.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -64,11 +64,14 @@

    Render PDF summary of scorecards

    Arguments

    -
    result_dirs
    -

    A vector of output directories

    -
    risk_breaks
    +
    result_dirs
    +

    A vector of output directories, each one produced by +score_pkg(). external_scores are not supported.

    + + +
    risk_breaks

    A numeric vector of length 2, with both numbers being between 0 and 1. These are used for the "breaks" when classifying scores into Risk categories. For example, for the default value of c(0.3, 0.7), @@ -76,15 +79,15 @@

    Arguments

    is "Medium Risk", and 0.7 <= score < 1 is "High Risk".

    -
    out_dir
    +
    out_dir

    Output directory for saving scorecard summary. If NULL, assumes all result_dirs point to the same output directory

    -
    snapshot
    +
    snapshot

    A report subtitle indicating the grouping of these packages, such as an MPN snapshot. See details.

    -
    overwrite
    +
    overwrite

    Logical (T/F). If TRUE, will overwrite an existing file path if it exists

    @@ -106,15 +109,15 @@

    Details

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/score_pkg.html b/reference/score_pkg.html index ab3bb5f..b88d726 100644 --- a/reference/score_pkg.html +++ b/reference/score_pkg.html @@ -4,7 +4,7 @@ - +
    @@ -32,14 +32,14 @@
    - +
    @@ -67,37 +67,37 @@

    Generate scorecard metrics for package

    Arguments

    -
    pkg
    + + +
    pkg

    a package tarball

    -
    out_dir
    +
    out_dir

    output directory for saving results and json

    -
    pkg_info
    +
    pkg_info

    optional manually filled info

    -
    overwrite
    +
    overwrite

    Logical (T/F). Whether or not to overwrite existing scorecard results

    -
    rcmdcheck_args
    +
    rcmdcheck_args

    list of arguments to pass to rcmdcheck. Note that the tarball path and error_on = "never" are automatically appended to this list.

    -
    covr_timeout
    +
    covr_timeout

    Timeout for covr run to finish. It may be any value accepted by callr::r_safe() and defaults to Inf (no timeout).

    Value

    - - -

    a directory containing json file (contains all scores), and individual results

    +

    a directory containing json file (contains all scores), and individual results

    @@ -112,15 +112,15 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/split_long_rows.html b/reference/split_long_rows.html new file mode 100644 index 0000000..6fc546c --- /dev/null +++ b/reference/split_long_rows.html @@ -0,0 +1,125 @@ + +Split Long Rows in a Data Frame by Newline Count — split_long_rows • mpn.scorecard + + +
    +
    + + + +
    +
    + + +
    +

    This function processes a data frame to split rows where the content in +specific columns exceeds a specified number of newline characters. +Rows with content that spans more than n lines will be split into +multiple rows, with the excess content carried over into continuation +rows. The new rows will be labeled with "(cont.)" to indicate continuation.

    +
    + +
    +
    split_long_rows(exported_func_df, n = 40)
    +
    + +
    +

    Arguments

    + + +
    exported_func_df
    +

    A data frame containing columns code_file, +documentation, and test_files, where the contents are character strings +that may span multiple lines.

    + + +
    n
    +

    An integer specifying the maximum number of newline characters +allowed in each row's content. Default is 40.

    + +
    +
    +

    Value

    +

    A data frame with rows split based on newline character count. +Each original row that exceeds the specified number of lines will be split +into multiple rows with continuation labels.

    +
    +
    +

    Note

    +

    This function assumes the entry_name, a column determined early on in +format_traceability_matrix, is the first column in the dataframe.

    +
    + +
    +

    Examples

    +
    if (FALSE) { # \dontrun{
    +
    +split_df <- split_long_rows(exported_func_df)
    +} # }
    +
    +
    +
    + +
    + + +
    + + + + + + + + diff --git a/reference/summarize_package_results.html b/reference/summarize_package_results.html index 2ff2542..14aeb64 100644 --- a/reference/summarize_package_results.html +++ b/reference/summarize_package_results.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,15 +58,16 @@

    Review important package metrics prior to running

    Arguments

    -
    result_dirs
    -

    A vector of output directories

    + + +
    result_dirs
    +

    A vector of output directories, each one produced by +score_pkg(). external_scores are not supported.

    Value

    - - -

    a dataframe

    +

    a dataframe

    @@ -81,15 +82,15 @@

    Value

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/unpack_tarball.html b/reference/unpack_tarball.html index cedd84a..ea01438 100644 --- a/reference/unpack_tarball.html +++ b/reference/unpack_tarball.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -58,11 +58,13 @@

    Untar package and return installation directory

    Arguments

    -
    pkg_tar
    + + +
    pkg_tar

    path to tarball package

    -
    temp_file_name
    +
    temp_file_name

    name of tempfile

    @@ -79,15 +81,15 @@

    Arguments

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/wrap_text.html b/reference/wrap_text.html index 01d6865..bea2f92 100644 --- a/reference/wrap_text.html +++ b/reference/wrap_text.html @@ -3,7 +3,7 @@ - +
    @@ -31,14 +31,14 @@
    - +
    @@ -64,35 +64,38 @@

    Wrap a vector of strings using specific characters

    Arguments

    -
    str
    + + +
    str

    a string or vector of strings.

    -
    width
    +
    width

    Positive integer giving the target line width (in number of characters).

    -
    wrap_sym
    +
    wrap_sym

    Characters to loop through and attempt to make new lines with. Note that the order you specify these values matters.

    -
    strict
    +
    strict

    logical (T/F). If FALSE, will soft wrap based on the characters specified via wrap_sym. If TRUE, will first soft wrap, and then enforce the specified width.

    -
    indent
    -

    logical (T/F). If TRUE, indent new lines by two spaces.

    +
    indent
    +

    logical (T/F). If TRUE, indent new lines via a markdown tab +('\t')

    Details

    stringr::str_wrap is not strict with the width for word characters, so a helper function was needed. Rather than being 100% strict at following the -cutoff width, we attempt to split at whitespace specific symbols commonly +cutoff width, we attempt to split at white space and specific symbols commonly used in function names and file paths. If this splitting is not sufficient, we then perform a strict operation, whereby we cut the line off at exactly that width.

    @@ -110,15 +113,15 @@

    Details

    -

    Site built with pkgdown 2.0.9.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/sitemap.xml b/sitemap.xml index 53e0db6..53a4839 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1,165 +1,60 @@ - - - - https://metrumresearchgroup.github.io/mpn.scorecard/404.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/LICENSE-text.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/LICENSE.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/authors.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/index.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/news/index.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/add_coverage.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/add_rcmdcheck.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/add_score_minibar.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/build_risk_summary.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/calc_overall_scores.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/check_exists_and_overwrite.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/check_for_comments.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/check_for_traceability.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/check_scores_valid.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/create_extra_notes.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/create_score_list_from_riskmetric.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/filter_symbol_functions.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/flex_stripe.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/flextable_formatted.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/format_appendix.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/format_colnames_to_title.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/format_comments.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/format_metadata.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/format_overall_scores.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/format_package_details.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/format_score_summaries.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/format_scorecard_version.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/format_scores_for_render.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/format_testing_scores.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/format_traceability_matrix.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/get_exports.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/get_flex_caption.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/get_overall_labels.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/get_pkg_desc.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/get_result_path.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/get_testing_dir.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/get_tests.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/get_toplevel_assignments.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/index.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/make_traceability_matrix.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/map_answer.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/map_functions_to_docs.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/map_functions_to_scripts.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/map_risk.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/map_tests_to_functions.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/mpn.scorecard.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/pkg_riskmetric.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/render_scorecard.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/render_scorecard_summary.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/score_pkg.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/summarize_package_results.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/unpack_tarball.html - - - https://metrumresearchgroup.github.io/mpn.scorecard/reference/wrap_text.html - + +https://metrumresearchgroup.github.io/mpn.scorecard/404.html +https://metrumresearchgroup.github.io/mpn.scorecard/LICENSE-text.html +https://metrumresearchgroup.github.io/mpn.scorecard/LICENSE.html +https://metrumresearchgroup.github.io/mpn.scorecard/authors.html +https://metrumresearchgroup.github.io/mpn.scorecard/index.html +https://metrumresearchgroup.github.io/mpn.scorecard/news/index.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/add_coverage.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/add_rcmdcheck.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/add_score_minibar.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/build_risk_summary.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/calc_overall_scores.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/check_exists_and_overwrite.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/check_for_comments.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/check_for_traceability.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/check_missing_artifact.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/check_scores_valid.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/create_extra_notes.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/create_score_list_from_riskmetric.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/external_scores.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/filter_symbol_functions.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/flex_stripe.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/flextable_formatted.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/format_appendix.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/format_colnames_to_title.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/format_comments.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/format_metadata.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/format_overall_scores.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/format_package_details.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/format_score_summaries.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/format_scorecard_version.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/format_scores_for_render.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/format_testing_scores.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/format_traceability_matrix.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/get_exports.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/get_flex_caption.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/get_overall_labels.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/get_pkg_desc.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/get_result_path.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/get_testing_dir.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/get_tests.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/get_toplevel_assignments.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/index.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/make_traceability_matrix.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/map_answer.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/map_functions_to_docs.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/map_functions_to_scripts.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/map_risk.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/map_tests_to_functions.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/mpn.scorecard.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/pkg_riskmetric.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/render_scorecard.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/render_scorecard_summary.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/score_pkg.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/split_long_rows.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/summarize_package_results.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/unpack_tarball.html +https://metrumresearchgroup.github.io/mpn.scorecard/reference/wrap_text.html +