- The
loadDataFile()
function now includes apriority
argument so that eitherdataUrl
ordataDir
can be prioritized with the other as a backup if initial loading of data fails.
initializeLogging()
now creates aWARN.log
file to complete the suite ofTRACE
,DEBUG
,INFO
,WARN
andERROR
.
- Addressed CRAN check error.
- Added
precision
argument tocreateLocationID()
.
- Updated dependencies to R 4.0.0 and rlang 1.1.0.
initializeLogging()
now properly usesfilePrefix
argument.- The
timeStamp()
function now defaults tolubridate::now("UTC")
when nodatetime
is provided. This supports common use cases such as:
> timeStamp(unit = "hour")
[1] "2023102618"
> timeStamp(style = "clock")
[1] "2023-10-26T18:25:55"
- Updated imports from futile.logger to avoid error messages like this:
WARN [2023-08-29 14:06:58] Oops: object 'flog.appender' not found
- Added
createLocationMask()
to identify invalid locations. createLocationID()
now defaults toalgorithm = "geohash"
.createLocationID()
now returns the user specifiedinvalidID
for invalid locations rather than stopping with an error message.
- Addressed CRAN package documentation issue.
- `parseDatetime() now supports data formats with UTC offset: "2018-10-16 12:00:00+00:00".
- Added
algorithm
argument tocreateLocationID()
to select between "digest" and "geohash".
The "geohash" algorithm is preferred but the "digest" algorithm is retained (and the default) because several existing databases use the "digest" algorithm as a unique identifier.
- Updated
stopOnError()
function documentation and associated vignette.
- Updated
stopOnError()
with the following additional arguments:prefix
,code
,maxLength
,truncatedLength
,call.
. - Corrected documentation for
timeStamp()
.
- Changed examples in
html_getLinks()
andhtml_getTables()
to explain any errors with:try({ ...}, silent = FALSE)
.
- New functions for managing API keys:
getAPIKey()
,setAPIKey()
,showAPIKeys()
. - Now exporting
futile.logger::flog.layout()
to avoid downstream complaints. - Examples for
html_getLinks()
andhtml_getTables()
now fail gracefully. - Consolidated the
local_~/
directories. (Not part of the R package.)
- Updated R dependency to R (>= 3.5.0).
- Added
filePrefix
andcreateDir
arguments toinitializeLogging()
. - Added location utility functions:
validateLonLat()
,validateLonsLats()
andcreateLocationID()
. - Harmonized error messages to begin with lower case and not include a period.
- Added Zenodo DOI.
- Fixed bug in
dateRange()
when creating single day date ranges. - Added
"ymdThms"
format totimeStamp()
. - Added
"msec"
unit option totimestamp()
. - Renamed default branch from 'master' to 'main'.
- Updated
html_getTable()
to not disregard theindex
parameter.
- Updated
check_~()
functions to usedevtools::check()
manual
andrun_dont_test
arguments.
- Added
header
option tohtml_getLinks()
andhtml_getTables()
functions.
- Added new
html_getLinks()
andhtml_getTables()
functions.
- Now exporting
futile.logger::flog.layout()
to avoid downstream complaints. - Updated documentation for
check_~()
functions.
- Fixed error messaging in
loadDataFile()
. - Added
ceilingStart
argument todateRange()
andtimeRange()
.
- Fixed improper handling of single day date ranges in
dateRange()
.
This version address a few issues encountered while using 0.3.11 in production.
- New
timeStamp()
function creates character timestamps useful for labeling. - New
dateSequence()
function generates a sequence ofPOSIXct
values that align with midnight local time even through the switch to/from daylight savings. - New
loadDataFile()
function supports loading data from local directories or URLs. - Added year-only support to
parseDatetime()
when parsing julian dates. - Renamed
parsDatetime()
argumentjulian
toisJulian
. stopIfNull()
andsetIfNull()
now issuestop(...)
messages withcall. = TRUE
so that the stack information bubbles up.- Now exporting
futile.logger::flog.logger()
to avoid downstream complaints.
- Added this package's own date parsing functions to
timezoneLintrules
.
parseDatetime()
now supports YYYY and YYYYmm formats.
- Added
julian
argument toparseDatetime()
to support Julian day formats.
Added a suite of functions to easily run devtools::check()
with different
arguments:
-
check_fastest()
-
check_faster()
-
check_fast()
-
check()
-
check_slow()
-
check_slower()
-
check_slowest()
-
Added more lubridate functions to
timezoneLintRules
.
- Added
logger.isInitialized()
for programmatic use. logger.setLevel()
now guarantees thatlogger.setup()
has been called, fixing a bug that generated multiple output messages whenlogger.setLevel()
was called beforelogger.setup()
.- Added more lubridate functions to
timezoneLintRules
.
More consistency improvements to dateRange()
. When specified, the days
parameter now takes precedence over ceilingEnd
when no enddate
is specified.
Fully self-consistent package using internal functions wherever possible.
Various improvements after usage in an operational setting:
timezoneLintRules
includes more date related functions.- Added
quiet
argument toparseDateTime()
. timeRange()
function now acceptsunit
andceilingEnd
arguments.dateRange()
function now acceptsceilingEnd
argument.- More unit tests for dates and times.
The ceilingEnd
argument addresses the ambiguity of a phrase like:
"August 1-8". With ceilingEnd = FALSE
(default) this pharse means "through the
beginning of Aug 8". With ceilingEnd = TRUE
it means "through the end of Aug 8".
This version adds new convenience functions for dealing with NULL
values
in pipeline flow control.
setIfNull()
stopIfNull()
In a lot of the data pipelines we build (web services, packages, etc.), we need
to deal with the possibility of NULL
inputs. Setting a default value or
throwing an error are two of the most common ways NUll
values are dealt with.
While the code to handle this is straightforward to write, it is verbose and
repetitive. setIfNull()
and stopIfNull()
are designed to abstract away
boilerplate code, allowing us to focus on more important things.
- Improved documentation for
enddate
in `dateRange().
- Tweak for CRAN.
- Renamed
lintFunctionArgs_directory()
tolintFunctionArgs_dir()
. - Added
fullPath
argument to linting functions. - Added
date-parsing
vignette.
This version focuses on enhancing the time utility capabilities of MazamaCoreUtils.
lintFunctionArgs_file()
lintFunctionArgs_directory()
timeRange()
parseDatetime()
In order to ensure that we are working with timezones consistently, the
functions lintFunctionArgs_file()
and lintFunctionArgs_directory()
were
created to parse R source files and determine if certain functions contained
specific named arguments, based on a set of rules. A set of rules,
timezoneLintRules
, was created to check that all functions that accept a
timezone have that argument explicitly fill, avoiding inconsistent default
behavior.
PWFSLSmoke::parseDatetime()
was moved into MazamaCoreUtils so more packages
can benefit from it without importing the rest of PWFSLSmoke. Also,
timeRange()
was created to work as a function analogous to dateRange()
,
parsing time ranges instead of finding date ranges.
As part of this consolidation, more unit tests were added to the package.
- Reordered arguments to
dateRange()
. dateRange()
no longer provides a default timezone.dateRange()
no longer altersPOSIXct
inputsdateRange()
now has stricter argument checking
- Moved
futile.logger
fromDepends
toImports
. - Version bump.
- Add linter
- Add
Rproj
file - Minor style refactor
- Added
dateRange()
function.
- Added pkgdown documentation.
- New vignettes for
error-handling
andlogging
. - Package now Depends: on futile.logger -- avoids
futile.logger not found
error messages. - Additional logging unit tests.
- Added
maxFileAge
parameter tocacheManagement()
to help with removal of out-of-data products. - New dependencies on magrittr and rlang packages.
- Minor cleanup and documentation improvements.
- Initial functionality.