-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Several changes towards new release 0.3.1, new maintainer
- Loading branch information
1 parent
d9a1171
commit 7100584
Showing
31 changed files
with
357 additions
and
706 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,5 @@ | |
^cran-comments\.md$ | ||
^CRAN-RELEASE$ | ||
^CODE_OF_CONDUCT\.md$ | ||
^.editorconfig | ||
^.github |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# EditorConfig is awesome: http://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
# Matches multiple files with brace expansion notation | ||
# 4 space indentation | ||
[*.{c,cpp,h,hpp,R,r}] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
# Tab indentation (no size specified) | ||
[Makefile] | ||
indent_style = tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Run CI for R using https://eddelbuettel.github.io/r-ci/ | ||
|
||
name: ci | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
env: | ||
_R_CHECK_FORCE_SUGGESTS_: "false" | ||
|
||
jobs: | ||
ci: | ||
strategy: | ||
matrix: | ||
include: | ||
#- {os: macOS-latest} | ||
- {os: ubuntu-latest} | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup | ||
uses: eddelbuettel/github-actions/r-ci-setup@master | ||
|
||
- name: Bootstrap | ||
run: ./run.sh bootstrap | ||
|
||
- name: Dependencies | ||
run: ./run.sh install_deps | ||
|
||
- name: Test | ||
run: ./run.sh run_tests | ||
|
||
#- name: Coverage | ||
# if: ${{ matrix.os == 'ubuntu-latest' }} | ||
# run: ./run.sh coverage |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
2024-03-31 Dirk Eddelbuettel <[email protected]> | ||
|
||
* DESCRIPTION (Authors@R): New maintainer | ||
|
||
* *: A number of files have been removed making the package smaller | ||
and lighter, a few URLs have been updated to the new repo, manual | ||
pages have been aligned, new alias ulid() added |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,32 @@ | ||
Package: ulid | ||
Type: Package | ||
Title: Generate Universally Unique Lexicographically Sortable Identifiers | ||
Version: 0.3.0 | ||
Date: 2019-07-04 | ||
Authors@R: c( person("Bob", "Rudis", email = "[email protected]", role = | ||
c("aut", "cre"), comment = c(ORCID = "0000-0001-5670-2640")), | ||
person("suyash", role = c("aut"), comment = "ULID C++ Port | ||
<https://github.com/suyash/ulid/>") ) | ||
Maintainer: Bob Rudis <[email protected]> | ||
Description: Universally unique identifiers ('UUIDs') can be suboptimal | ||
for many uses-cases because they aren't the most character | ||
efficient way of encoding 128 bits of randomness; v1/v2 versions | ||
are impractical in many environments, as they require access to a | ||
unique, stable MAC address; v3/v5 versions require a unique seed | ||
and produce randomly distributed IDs, which can cause | ||
fragmentation in many data structures; v4 provides no other | ||
information than randomness which can cause fragmentation in many | ||
data structures. 'ULIDs' (<https://github.com/ulid/spec>) have | ||
128-bit compatibility with 'UUID', 1.21e+24 unique 'ULIDs' per | ||
millisecond, are lexicographically sortable, canonically encoded | ||
as a 26 character string, as opposed to the 36 character 'UUID', | ||
use Crockford's 'base32' for better efficiency and readability (5 | ||
bits per character), are case insensitive, have no special | ||
characters (i.e. are 'URL' safe) and have a onotonic sort order | ||
(correctly detects and handles the same millisecond). | ||
URL: https://gitlab.com/hrbrmstr/ulid | ||
BugReports: https://gitlab.com/hrbrmstr/ulid/issues | ||
SystemRequirements: C++11 | ||
Title: Generate Universally Unique 'Lexicographically' 'Sortable' Identifiers | ||
Version: 0.3.0.1 | ||
Date: 2024-03-31 | ||
Authors@R: c( | ||
person("Bob", "Rudis", role = "aut", comment = c(ORCID = "0000-0001-5670-2640")), | ||
person("Suyash", "Verma", role = "aut", comment = "ULID C++ <https://github.com/suyash/ulid/>"), | ||
person("Dirk", "Eddelbuettel", role = "cre", comment = c(ORCID = "0000-0001-6419-907X"), | ||
email = "[email protected]")) | ||
Description: Universally unique identifiers ('UUIDs') can be sub-optimal for many | ||
uses-cases because they are not the most character efficient way of encoding | ||
128 bits of randomness; v1/v2 versions are impractical in many environments, | ||
as they require access to a unique, stable MAC address; v3/v5 versions require | ||
a unique seed and produce randomly distributed IDs, which can cause fragmentation | ||
in many data structures; v4 provides no other information than randomness which | ||
can cause fragmentation in many data structures. Providing an alternative, 'ULIDs' | ||
(<https://github.com/ulid/spec>) have 128-bit compatibility with 'UUID', 1.21e+24 | ||
unique 'ULIDs' per millisecond, support standard (text) sorting, canonically encoded | ||
as a 26 character string, as opposed to the 36 character 'UUID', use 'base32' | ||
encoding for better efficiency and readability (5 bits per character), are case | ||
insensitive, have no special characters (i.e. are 'URL' safe) and have a monotonic | ||
sort order (correctly detects and handles the same millisecond). | ||
URL: https://github.com/eddelbuettel/ulid | ||
BugReports: https://github.com/eddelbuettel/ulid/issues | ||
NeedsCompilation: yes | ||
Encoding: UTF-8 | ||
License: MIT + file LICENSE | ||
Suggests: | ||
covr, | ||
tinytest, | ||
knitr, | ||
rmarkdown | ||
Depends: R (>= 3.2.0) | ||
Suggests: tinytest | ||
Imports: Rcpp | ||
RoxygenNote: 6.1.1 | ||
LinkingTo: Rcpp | ||
VignetteBuilder: knitr | ||
RoxygenNote: 7.3.1 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,48 @@ | ||
# Generated by using Rcpp::compileAttributes() -> do not edit by hand | ||
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 | ||
|
||
#' Generate ULIDs from timestamps | ||
#' | ||
#' This function generates a new [Universally Unique Lexicographically | ||
#' Sortable Identifier](https://github.com/ulid/spec) from a vector of | ||
#' `POSIXct` timestamps. | ||
#' | ||
#' @md | ||
#' @param tsv vector of `POSIXct` values | ||
#' @export | ||
#' @examples | ||
#' ts_generate(as.POSIXct("2017-11-01 15:00:00", origin="1970-01-01")) | ||
ts_generate <- function(tsv) { | ||
.Call(`_ulid_ts_generate`, tsv) | ||
} | ||
|
||
#' Generate ULID | ||
#' | ||
#' [ULIDgenerate()] generates a new [Universally Unique Lexicographically | ||
#' Sortable Identifier](https://github.com/ulid/spec). | ||
#' [generate()] generates a new [Universally Unique Lexicographically | ||
#' Sortable Identifier](https://github.com/ulid/spec). Several aliases are | ||
#' available for convience and backwards-compatibility. | ||
#' | ||
#' @md | ||
#' @param n number of id's to generate (default = `1`) | ||
#' @rdname ulid | ||
#' @export | ||
#' @examples | ||
#' ULIDgenerate() | ||
ULIDgenerate <- function(n = 1L) { | ||
.Call(`_ulid_ULIDgenerate`, n) | ||
generate <- function(n = 1L) { | ||
.Call(`_ulid_generate`, n) | ||
} | ||
|
||
#' Unmarshal a ULID into a data frame with timestamp and random bitstring columns | ||
#' | ||
#' @md | ||
#' @param ulids character ULIDs (e.g. created with [ULIDgenerate()]) | ||
#' @export | ||
#' @rdname ulid | ||
#' @return data frame (tibble) | ||
#' @examples | ||
#' unmarshal(ULIDgenerate()) | ||
unmarshal <- function(ulids) { | ||
.Call(`_ulid_unmarshal`, ulids) | ||
} | ||
|
||
#' Generate ULIDs from timestamps | ||
#' | ||
#' This function generates a new [Universally Unique Lexicographically | ||
#' Sortable Identifier](https://github.com/ulid/spec) from a vector of | ||
#' `POSIXct` timestamps. | ||
#' | ||
#' @md | ||
#' @param tsv vector of `POSIXct` values | ||
#' @export | ||
#' @rdname ulid | ||
#' @examples | ||
#' ts_generate(as.POSIXct("2017-11-01 15:00:00", origin="1970-01-01")) | ||
ts_generate <- function(tsv) { | ||
.Call(`_ulid_ts_generate`, tsv) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.