proj_check: Reproducbility checks

Description Usage Arguments has_tidy_media has_tidy_images has_tidy_code has_tidy_raw_data has_tidy_data has_tidy_scripts has_readme has_proj_root has_no_nested_proj_root has_well_commented_code has_only_used_files has_no_absolute_paths has_only_portable_paths has_no_randomness has_no_lint has_clear_build_chain proj_check proj_check_some proj_check_badge list_checks

View source: R/fertile.R

Description

A laundry list of small checks that help make your project more likely to be reproducible

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
has_tidy_media(path = ".")

has_tidy_images(path = ".")

has_tidy_code(path = ".")

has_tidy_raw_data(path = ".")

has_tidy_data(path = ".")

has_tidy_scripts(path = ".")

has_readme(path = ".")

has_proj_root(path = ".")

has_no_nested_proj_root(path = ".")

has_well_commented_code(path = ".")

has_only_used_files(path = ".")

has_no_absolute_paths(path = ".")

has_only_portable_paths(path = ".")

has_no_randomness(path = ".")

has_no_lint(path = ".")

has_clear_build_chain(path = ".")

proj_check(path = ".")

proj_check_some(path, ...)

proj_check_badge(path = ".", badge)

list_checks()

Arguments

path

Directory you want to check.

Note: For proj_check_some, which does not take a default path, if you want to check your current directory, enter "." as your path.

...

One or more unquoted expressions separated by commas, containing information about the checks you would like to complete. These should be written as if they are being passed to dplyr's select.

An example statement might be:

ends_with("root"), contains("tidy"), -has_tidy_scripts

badge

name of badge to run checks for — "tidy-files", "documentation", "randomness", "structure", "paths", or "style"

has_tidy_media

Checks to make sure no audio/video files are found at the root of your project.

has_tidy_media("your project directory")

has_tidy_images

Checks to make sure no image files are found at the root of your project.

has_tidy_images("your project directory")

has_tidy_code

Checks to make sure no source files are found at the root of your project.

has_tidy_code("your project directory")

has_tidy_raw_data

Checks to make sure no raw data files are found at the root of your project.

has_tidy_raw_data("your project directory")

has_tidy_data

Checks to make sure no .rda files are found at the root of your project.

has_tidy_data("your project directory")

has_tidy_scripts

Checks to make sure no .R script files are found at the root of your project.

has_tidy_scripts("your project directory")

has_readme

Checks to make sure a README file is found at the root of your project.

has_readme("your project directory")

has_proj_root

Checks to make sure a single .Rproj file is found at the root of your project.

has_proj_root("your project directory")

has_no_nested_proj_root

Checks to make sure there are no nested .Rproj files in your project.

has_no_nested_proj_root("your project directory")

has_well_commented_code

Checks to make sure that all code files are at least 10 percent comments has_well_commented_code("your project directory")

has_only_used_files

Checks to make sure that all the files located in your project directory are being used by/in code from that directory.

has_only_used_files("your project directory")

has_no_absolute_paths

Checks to make sure paths referenced in your project code are all written as relative, rather than absolute.

has_no_absolute_paths("your project directory")

has_only_portable_paths

Checks to make sure all paths referenced in your project code are located within the project directory and are written as reltive, rather than absolute.

has_only_portable_paths("your project directory")

has_no_randomness

Checks to make sure that code in your project does not use randomness. Your project will pass this check if randomness is used but a seed is also set.

has_no_randomness("your project directory")

has_no_lint

Checks whether your code conforms to tidyverse style.

has_no_lint("your project directory")

has_clear_build_chain

Checks for a clear order in which to run your R scripts.

has_clear_build_chain("your project directory")

proj_check

Runs all individual checks together and provides a report of which passed, which failed, why they failed, and suggestions for how to work on them.

proj_check("your project directory")

proj_check_some

Complete a specified selection of checks by harnessing tidy evaluation.

proj_check_some("your project directory", contains("tidy"), ends_with("root"), -has_tidy_raw_data)

proj_check_badge

Complete a set of fertile checks that correspond to a particular reproducibility badge

proj_check_some("your project directory", "documentation")

list_checks

Print a list of the available checks provided by fertile for reference purposes


beanumber/fertile documentation built on April 17, 2021, 4:33 a.m.