Minor changes:
isOrganism
: Added support for full latin with three names, such as
"Canis lupus familiaris"
.Minor changes:
quietly
: Now correctly closes sink
connection on error.New functions:
isAwsS3Uri
: Check if the input contains AWS S3 URIs.isExistingAwsS3Uri
: Check if the input contains AWS S3 URIs that exist.Minor changes:
AcidBase::ram
.Minor changes:
hasDims
, hasRows
, hasCols
: Add edge case support for DFrameList
class, which uses dims
instead of dim
, nrows
instead of nrow
, and
ncols
instead of ncol
.Major changes:
quietly
now uses base R sink
instead of utils::capture.output
.Minor changes:
Major changes:
goalie
class to only accept unnamed input and unnamed
cause attribute. Hardened validity checks to error if names are attempted
to be passed through. This required updating some internal bapply
calls
to set USE.NAMES
as FALSE
.hasCPU
to hasCpu
.hasGitHubPAT
to hasGithubPat
.hasRAM
to hasRam
.isGGScale
to isGgscale
.isMacOS
to isMacos
.isRStudio
to isRstudio
.isExistingURL
to isExistingUrl
, and other variants.isURL
to isUrl
, and other variants.Minor changes:
getNameInParent
approach, which makes functions cleaner.New functions:
isDuplicate
: Variant of base duplicated
that returns TRUE
for all
observed duplicated values in a vector. Differs from base duplicated
,
which only starts to return TRUE
on the second observed value.allAreIntegerish
: Added an additional scalar variant of isIntegerish
.Minor changes:
hasDims
, hasRows
, hasCols
: Now support n
argument for checking
expected dimensions. Note that for hasDims
, this needs to be length 2.
Integerish values (e.g. 1
instead of 1L
) are supported, but direct
input of integer is recommended.isExistingURL
: Now checks for libcurl
support in R session.Minor changes:
isAnExistingURL
: Reworked engine back to use base R via curlGetHeaders
function. Returns FALSE
for status codes >= 400 for both HTTP(S) and FTP.
No longer need to include RCurl as a suggested package.Minor changes:
isAnExistingURL
: Reworked internal code to use RCurl::url.exists instead of
a direct connection check, as this is more reliable for returning FALSE
for
some offline servers, such as the Ensembl FTP server, which has stability
issues.requireNamespaces
instead of requireNamespace
consistently
internally in the package.New functions:
isExistingURL
variants of isURL
, which check if the connection is
active and that the URL actually exists, rather than whether it is merely
formatted correctly. Also added isAnExistingURL
and allAreExistingURLs
variants, similar to the simpler isURL
checks. The internal logic of this
check was ported from the previous hasInternet
function, but speed up
to use a try
call with a faster timeout.Major changes:
hasInternet
has been reworked to simply wrap isAnExistingURL
with a call
to check if the Bioconductor website is up.New functions:
hasCPU
: Does the current machine have a sufficient number of CPU cores?hasRAM
: Does the current machine have sufficient memory (in GB)?Minor changes:
isURL
now returns FALSE
for non-encoded URLs (e.g. containing spaces,
other invalid characters). This helps protect against unwanted input into
httr2 engine for REST API calls. Refer to utils::URLencode
for encoding
checks.New functions:
isTximport
: New check function to perform validity checks on tximport list
return, which isn't currently classed.Minor changes:
New functions:
isTempFile
/ isATempFile
/ allAreTempFiles
: Check functions to determine
if a file exists on disk as a temporary file, defined by tempfile
. Checks
directory path internally against tempdir
return. This function will be
used in pipette update for compressed file cleanup during import
calls.Minor changes:
Minor changes:
compressExtPattern
: Updated to ensure that maching is case insensitive.New functions:
quietly
: Useful expression wrapper that suppresses all warnings, messages,
and console output. Now used internally in requireNamespaces
to suppress
unwanted warnings from some Bioconductor packages, such as AnnotationHub,
which now masks utils in the 3.17 release.Minor changes:
validateClasses
: Improved assert check for input of empty list.New functions:
requireNamespaces
: Migrated this useful base function from AcidBase package
here to goalie instead, as this is often used inside of assert checks.Minor changes:
hasNoDuplicates
: Improve support for Rle handling. Note that S4Vectors
currently doesn't define a duplicated
method for Rle
, so we have to
work around this at the moment.New functions:
isIntegerish
: New check function that will also return true for vector-like
classes, including factor
and S4 Rle
.Minor changes:
hasRownames
: Should now return TRUE
for data.frame
with integer row
names out of order. This is useful for matrix
export method defined in
pipette package.Rle
class handling in isSubset
, areDisjointSets
,
areIntersectingSets
, areSetEqual
.skip_on_docker
test function.New functions:
isVSCode
: Check if R session is running inside of Visual Studio Code.Minor changes:
isSubset
in place of %in%
where possible.isInstalled
: Now calling .packages
internally instead of checking rownames
on installed.packages
return.hasDuplicates
, hasNoDuplicates
: Hardened internal calls to anyDuplicated
to check whether values return non-zero or not.isCleanSystemLibrary
: NAMESPACE fix for installed.packages
call.Minor changes:
isGitRepo
: Return with classed cause in the event that Git is not installed.Minor changes:
Map
internally instead of mapply
, as recommended by lintr.Minor changes:
validateClasses
: Reworked internal code to use isAny
, to allowing "or"
checking for multiple acceptable class types. Currently needed to update
validity checks against sessionInfo
(utils package) vs. session_info
(sessioninfo package) in our S4 classes that extend SummarizedExperiment
.Minor changes:
Major changes:
assert
: Engine will use AcidCLI::abort
if installed, to return richer
error messages in the console. Also improved named message handling, similar
to stopifnot
conventions.Minor changes:
hasClusters
, hasMultipleSamples
, and isBiocParallelParam
.isDark
check here from AcidPlots package.Minor changes:
isDockerEnabled
: Bug fix for properly checking successful status on
internal docker info
call via system2
.Minor changes:
isInstalled
: Added support for lib
argument, which allows the user to
check whether an R package is installed in a specific package library.
Defaults to checking against all libraries, calling installed.packages
internally. This is a non-breaking change.New functions:
isCondaEnabled
: Scalar check to determine if Conda is active inside of the
current R session. Evaluates CONDA_DEFAULT_ENV
and CONDA_SHLVL
system
environment variables internally.isDockerEnabled
: Scalar check to determine if Docker is installed and is
actively running on the current machine.isGitRepo
: Vectorized checks for the existence of Git repositories. This
is a little tricky to check inside of CI, so may need to think of a more
clever approach for code coverage in the future.Minor changes:
assert
, validate
: Improved cause return when attribute is set from
internal falseFromVector
call. This was detected when isSystemCommand
was not returning the expected program name in the assert call.falseFromVector
: Improved internal cause attribute handling for scalars.nocov
, for platform- and configuration-
specific checks.Minor changes:
isAURL
: Improve setting of cause attribute when string is encoded. Bug fix
is applied internally to falseFromVector
, which passes false
to internal
sprintf
call.Minor changes:
Major changes:
setValidity
.Minor changes:
isOrganism
: Added nullOK
argument.New functions:
isOrganism
: New assert check to verify that user precisely entered expected
organism format of <genus>
<species>
(e.g. "Homo sapiens"). Case
sensitivity and spaces are required here.Minor changes:
compressExtPattern
, extPattern
,
printString
, safeDeparse
, shorten
, toNames
.Minor changes:
hasNonzeroRowsAndCols
check function.
DelayedArray can have some HDF5-related build issues on some machines, so
removing it as a suggested package makes goalie easier to install consistently
across platforms.New functions:
isDevel
: Check if session is running inside R-devel.
Internally checks against R.version.string
.isBiocDevel
: Check if Bioconductor installation is under development.
Requires BiocManager and yaml packages, which have been added to "Suggests".New functions:
isCleanSystemLibrary
here from bb8.Minor changes:
New functions:
isPackageVersion
: Migrated check that was previously defined in koopa.isVanilla
: Check if R session is running with --vanilla
flag enabled.Minor changes:
New functions:
isSymlink
, isASymlink
, allAreSymlinks
: Added logical check functions
for symbolic links. Note that these functions won't work on Windows.New functions:
isRStudio
: Checks whether current R session is running inside RStudio.Minor changes:
isLinux
, isMacOS
, isUnix
,
and isWindows
.New functions:
Migrated some functions that were previously defined in the koopa package:
hasGitHubPAT
: Check if the user has a GitHUB personal access token (PAT)
defined as GITHUB_PAT
environment variable.isMacOS
, isLinux
, isUnix
, isWindows
. The Linux, Unix, and Windows
checks are new but inspired by the macOS check from koopa.isSystemCommand
(previously named isCommand
in koopa). This check will
look to see if a system (shell) command is available.Minor changes:
isDocker
: Hardened the check function to look at /proc/1/cgroup
.Minor changes:
Minor changes:
hasRownames
: Improved internal check for integer (sequence) row names for
data.frame
class, which previously returned TRUE
unexpectedly if the rows
are reordered or subset. Now this function uses an internal grepl
check
via allAreMatchingRegex
, which hardens this check, and now should always
return FALSE
for soft NULL row names in data.frame
class.The increase in version number here denotes new import of acidbase package.
Major changes:
New functions:
isCompressedFile
, isACompressedFile
, allAreCompressedFiles
.
These perform similarly to isFile
but also check to see if the file
extension contains a compression format (e.g. bz2, gz, xz, zip).New functions:
isFileSystemCaseSensitive
: Checks whether file system is case sensitive
(TRUE
) or insensitive (FALSE
). Linux tends to default to case sensitive,
where as macOS and Windows default to case insensitive. Note that case
insensitive file systems can lead to issues with Git repos. This check will
be incorporated into a new rename
mode for syntactic naming functions
in a future release.Minor changes:
Minor changes:
toNames
: Bug fix for na.omit
return causing assert check to fail because
class returns FALSE
for is.vector
check but TRUE
for is.atomic
.isIntegerish
now returns logical vector for na.omit
return. This supports
isScalarIntegerish
and isInt
check functions.New functions:
nElements
: Return the number of elements in an object. Previously this was
defined internally in the package but is generally useful.Minor changes:
hasElements
: No longer requiring the n
argument. The function now performs
similarly to hasLength
.isEmpty
and isNonEmpty
are now soft deprecated. isEmpty
is defined in
the Bioconductor S4Vectors package, and we don't want to mask in interactive
scripting sessions.is2
: No longer exported, since this function isn't really intended for use
outside of the package. Refer to isAll
or isAny
checks instead.Minor changes:
isGGScale
: Update aes
argument to support American "color" pass-in in
addition to British "colour" spelling.Minor changes:
Minor changes:
hasInternet
: Now allowing a user to check a specific URL, using the url
argument. Currently defaults to Bioconductor.Updated R dependency to 3.6.
Minor changes:
appendToBody
: Now allowing pass-in of multiple values as a list
. The list
must contains call
elements.hasNonzeroRowsAndCols
: Renamed function, improving consistency with generic
defined in bioverbs. Also added support for DelayedMatrix
, improving
consistency with basejump nonzeroRowsAndCols
function.Minor changes:
isURL
now returns true on url
class input.New functions:
hasMetrics
, hasSubset
: New functions that were previously used internally
in basejump. Requires S4Vectors / SummarizedExperiment.Minor changes:
validNames
: Bug fix and improvement for function, clearly showing position
where names are invalid.New functions:
toNames
, which was previously used internally by the package.
Improved handling in this function for floating points. Also now using
toNames
more consistently internally to sanitize names for cause
return.Minor changes:
standardizeCall
: Now returns with default arguments included. Can disable
using defaults = FALSE
.matchArgsToDoCall
: Tweaked internal code slightly based on standardizeCall
update.cause
return.Minor changes:
Version bump, reflecting start of a new release series.
Minor changes:
hasColnames
, hasDimnames
, hasNames
, hasRownames
,
hasValidDimnames
, and hasValidNames
against invalid objects that don't
return either a value or NULL
. This can happen in rare cases with invalid
SummarizedExperiment objects (e.g. bcb_invalid
object in bcbioRNASeq tests).Minor changes:
New functions:
isDocker
and skip_on_docker
functions for improved conditional
testing inside Docker R images.Major changes:
assert
and validate
to match the
new conventions used in stopifnot
for R 3.6 release. This should be
completely backward compatible and transparency, but file an issue if you run
into any unexpected bugs with this change.n
argument handling in hasElements
checks. Previously this didn't
return scalar consistently and could cause some build check issues to pop up
in R 3.6, which are now fixed.Minor changes:
extractLocal
and hasLocal
. These are currently only
used by MethodDefinition utility functions defined here in the goalie package.Minor changes:
assert
function.Minor changes:
assert
and validate
calls. Now using unname
internally to prevent unexpected errors with named logical vectors.Minor changes:
standardizeCall
: Improved isNonNegative
assert check by wrapping in
unname
call, to keep backward compatibility with R 3.4.Minor changes:
Minor changes:
Minor changes:
isDirectory
, isFile
: Now return with cause
attribute set on failure.Minor changes:
isSubset
: Improved cause message, which would error using internal deparse
call on long vectors.Minor changes:
assignToBody
to fix backports handling of
...elt
for R 3.4.hasAccess
: Needed to add uname
call internally for R 3.4 backward
compatibility, for checks that rely upon isTRUE
to return TRUE
, as
expected. The handling of this situation has changed in R 3.5.Minor changes:
...elt
approach used in assert
isn't
backward compatible with R 3.4. The backports package was added as a
dependency, which provides legacy support for ...elt
in R 3.4. This is
called internally inside .onLoad
specifically for R releases prior to 3.5.Minor changes:
assert
: traceback
argument is disabled by default. Note that this can be
enabled globally using options(goalie.traceback = TRUE)
, which can be useful
for code debugging in some situations.isSubset
: Improved cause message if user attempts to pass in NULL
for
either x
or y
arguments.hasNonZeroRowsAndCols
: Fixed typo in internal code that didn't check using
hasCols
properly.isFlag
: Improved cause message if user passes in NA
.New functions:
printString
from basejump package.Minor changes:
isADirectory
, isAFile
: Added nullOK
argument support.New functions:
allAreDirectories
, allAreFiles
, which return scalar.Minor changes:
New functions:
matchArgsToDoCall
, standardizeCall
, and the
MethodDefinition
family, which includes methodFunction
,
methodFormals
, hasLocal
, extractLocal
. These will get re-exported
in basejump.Minor changes:
base-
prefix.NULL
support where applicable, with nullOK
formal.
Applies to isInt
, isNumber
, isString
, for example.Major changes:
assert
: Added msg
formal. Improved error message when a user inputs
check functions that don't return boolean.capitalize
: Simplified documentation, referring the user to the
documentation provided in syntactic package.falseFromVector
: Newly exported function.isInRange
family: Added scalar variants for all vectorized functions.falseFromVector
internally.Major changes:
stopifnot
, but with
more informative error messages. This approach is inspired by the assertthat
package, but neither assertive or assertthat are working quite right for my
needs.assert
and validate
engines, re-writing the code from
scratch based on the internal code of stopifnot
.goalie
class in addition to logical
.Major changes:
assert*
functions in favor of a simpler, assertthat style
approach using assert
for all checks. The package will export check
functions that return logical
, typically logical(1)
(boolean flag) for
most checks. These checks can then be wrapped in assert
or validate
(for S4 class validity checks) calls.Minor changes:
isDir
and isFile
now import R.utils::isDirectory
and R.utils::isFile
.Minor changes:
areUniqueGeneNames
now returns boolean
as expected.assertAreUniqueGeneNames
.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.