Skip to content

Commit

Permalink
Package v0.9.8 cran release
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusKlik committed Feb 8, 2022
2 parents 5f729c5 + b822571 commit 2402fd2
Show file tree
Hide file tree
Showing 156 changed files with 323 additions and 49,129 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
^\.github$
^.*\.Rproj$
^\.Rproj\.user$
\.o$
Expand All @@ -19,3 +20,4 @@ LZ4/LICENSE$
^CRAN-RELEASE$
^revdep$
^\.github$
^CRAN-SUBMISSION$
41 changes: 17 additions & 24 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
#
# NOTE: This workflow is overkill for most R packages and
# check-standard.yaml is likely a better choice.
# usethis::use_github_action("check-standard") will install it.
on:
push:
branches: [develop, release, hotfix, master]
pull_request:
branches: [develop, release, hotfix, master]

name: R-CMD-check

Expand All @@ -19,10 +21,12 @@ jobs:
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: windows-2022, r: 'devel'}
- {os: windows-latest, r: '4.1'}
- {os: windows-latest, r: '3.6'}
- {os: ubuntu-20.04, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-20.04, r: 'release'}
- {os: ubuntu-18.04, r: 'oldrel-4'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -31,28 +35,17 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-pandoc@v1
- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: rcmdcheck
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v1

- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
- uses: r-lib/actions/check-r-package@v2
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

141 changes: 122 additions & 19 deletions CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,129 @@

# Contributor Code of Conduct
# Contributor Covenant Code of Conduct

As contributors and maintainers of this project, we pledge to respect all people who
contribute through reporting issues, posting feature requests, updating documentation,
submitting pull requests or patches, and other activities.
## Our Pledge

We are committed to making participation in this project a harassment-free experience for
everyone, regardless of level of experience, gender, gender identity and expression,
sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

Examples of unacceptable behavior by participants include the use of sexual language or
imagery, derogatory comments or personal attacks, trolling, public or private harassment,
insults, or other unprofessional conduct.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

Project maintainers have the right and responsibility to remove, edit, or reject comments,
commits, code, wiki edits, issues, and other contributions that are not aligned to this
Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed
from the project team.
## Our Standards

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by
opening an issue or contacting one or more of the project maintainers.
Examples of behavior that contributes to a positive environment for our
community include:

This Code of Conduct is adapted from the Contributor Covenant
(http://contributor-covenant.org), version 1.0.0, available at
http://contributor-covenant.org/version/1/0/0/
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[INSERT CONTACT METHOD].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
26 changes: 11 additions & 15 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
Package: fst
Type: Package
Title: Lightning Fast Serialization of Data Frames
Description: Multithreaded serialization of compressed data frames using the
'fst' format. The 'fst' format allows for random access of stored data and
compression with the LZ4 and ZSTD compressors created by Yann Collet. The ZSTD
compression library is owned by Facebook Inc.
Version: 0.9.6
Date: 2022-02-01
Authors@R: c(
person("Mark", "Klik", email = "markklik@gmail.com", role = c("aut", "cre", "cph")),
person("Yann", "Collet", role = c("ctb", "cph"),
comment = "Yann Collet is author of the bundled LZ4 and ZSTD code and copyright holder of LZ4"),
person("Facebook, Inc.", role = "cph", comment = "Bundled ZSTD code"))
Description: Multithreaded serialization of compressed data frames using the 'fst' format. The
'fst' format allows for full random access of stored data and a wide range of compression
settings using the LZ4 and ZSTD compressors.
Version: 0.9.8
Date: 2022-02-07
Authors@R:
person("Mark", "Klik", email = "markklik@gmail.com", role = c("aut", "cre", "cph"))
Depends:
R (>= 3.0.0)
Imports:
fstcore,
Rcpp
LinkingTo: Rcpp
LinkingTo:
Rcpp,
fstcore
SystemRequirements: little-endian platform
RoxygenNote: 7.1.2
Suggests:
Expand All @@ -28,8 +27,5 @@ Suggests:
crayon
License: AGPL-3 | file LICENSE
Encoding: UTF-8
Copyright: This package includes sources from the LZ4 library written
by Yann Collet, sources of the ZSTD library owned by Facebook, Inc.
and sources of the fstlib library owned by Mark Klik
URL: http://www.fstpackage.org
BugReports: https://github.com/fstpackage/fst/issues
3 changes: 2 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export(read_fst)
export(threads_fst)
export(write.fst)
export(write_fst)
importFrom(Rcpp,sourceCpp)
import(Rcpp)
importFrom(fstcore,threads_fstlib)
importFrom(parallel,detectCores)
importFrom(utils,capture.output)
importFrom(utils,packageVersion)
Expand Down
18 changes: 18 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@

# fst 0.9.8

With this release of `fst`, the `fstlib` library is no longer build with the `fst` package, but
imported from package `fstcore`. This allows for better separation of updates of the C++ code underlying the `fst`
format and the R wrapper package. Also, with this setup, other packages can directly use the C++ interface exported
from the fstcore package.

## Bugs solved

* The package had linking problems on ARM macOS systems, preventing a correct build. These problems originated from
minor differences between the xxHash implementations in the LZ4 and ZSTD libraries and incorrect linker parameters.

## Library updates

* Library LZ4 updated to version 1.9.3
* library ZSTD updated to version 1.5.2


# fst 0.9.6

Version 0.9.6 is a minor update to 'hotfix' an issue with the use of `sample.int()`. All calls to `sample.int()` now
Expand Down
12 changes: 4 additions & 8 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

fstlib_version <- function() {
.Call(`_fst_fstlib_version`)
}

fststore <- function(fileName, table, compression, uniformEncoding) {
.Call(`_fst_fststore`, fileName, table, compression, uniformEncoding)
}
Expand Down Expand Up @@ -37,11 +33,11 @@ setnrofthreads <- function(nrOfThreads) {
.Call(`_fst_setnrofthreads`, nrOfThreads)
}

hasopenmp <- function() {
.Call(`_fst_hasopenmp`)
}

restore_after_fork <- function(restore) {
invisible(.Call(`_fst_restore_after_fork`, restore))
}

hasopenmp <- function() {
.Call(`_fst_hasopenmp`)
}

12 changes: 8 additions & 4 deletions R/fst.R
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,15 @@ read_fst <- function(path, columns = NULL, from = 1, to = NULL, as.data.table =
stop(res)
}

nr_of_rows <- 0
if (length(res$resTable) > 0) { # check for NULL tables's
nr_of_rows <- length(res$resTable[[1]])
}

# long vectors are not supported yet with data.table, tibble's or data.frame,
# so return a list instead
nr_of_rows <- length(res$resTable[[1]])
if (nr_of_rows >= 2 ^ 31) {
return(res$resTable)
return(res$resTable)
}

if (as.data.table) {
Expand All @@ -241,10 +245,10 @@ read_fst <- function(path, columns = NULL, from = 1, to = NULL, as.data.table =
# use setters from data.table to improve performance
if (requireNamespace("data.table", quietly = TRUE)) {
data.table::setattr(res_table, "class", "data.frame")
data.table::setattr(res_table, "row.names", seq_len(length(res_table[[1L]])))
data.table::setattr(res_table, "row.names", base::.set_row_names(nr_of_rows))
} else {
class(res_table) <- "data.frame"
attr(res_table, "row.names") <- seq_len(length(res_table[[1L]]))
attr(res_table, "row.names") <- base::.set_row_names(nr_of_rows)
}

res_table
Expand Down
Loading

0 comments on commit 2402fd2

Please sign in to comment.