Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #60 : dups class #63

Merged
merged 11 commits into from
Feb 10, 2020
Merged

fix #60 : dups class #63

merged 11 commits into from
Feb 10, 2020

Conversation

russHyde
Copy link
Owner

@russHyde russHyde commented Jan 30, 2020

See #60

Rewrote dupree, dupree_dir and dupree_package to return an object of class dups (rather than a data.frame).

dups

  • is an S3 class: (presently of form) list(dups_df: data.frame) where the dups_df entry is the results data.frame that was originally returned by dupree et al (ie, file_a, file_b, block_a, block_b, ...)
  • is constructed using as.dups(x: data.frame) as_dups(x: data.frame)
  • can be converted back to df using as_tibble and as.data.frame methods

TODO:

  • add print method (print the tibble form of a dups)
  • check README outputs correctly & recompile it
  • roxygen for as_tibble, as.data.frame
  • rename as.dups -> as_dups
  • pass
    • 'check'
    • gp
    • lint_package
  • run style_package
  • append to NEWS
  • [ ] bump to 0.2.1.9000

R/dups-class.R Outdated Show resolved Hide resolved
R/dups-class.R Outdated Show resolved Hide resolved
tests/testthat/test-dupree_dir_integration.R Outdated Show resolved Hide resolved
tests/testthat/test-dupree_package_integration.R Outdated Show resolved Hide resolved
tests/testthat/test-dupree_package_integration.R Outdated Show resolved Hide resolved
R/dupree.R Outdated Show resolved Hide resolved
R/dups-class.R Outdated Show resolved Hide resolved
@lintr-bot

This comment has been minimized.

@lintr-bot

This comment has been minimized.

But, `expect_silent` and `expect_error` tests should work on
dupree_package() not as.data.frame(dupree_package()) to focus on errors
/ warnings during dupree runs, not conversion of data-structures.
Add tests for:
- `as.data.frame`
- `as_tibble`
- only `data.frame` and `dups` can be converted to `dups`
- as_dups(dups) is an identity map
`as_dups` can construct `dups` class from a `data.frame`

Methods:
- `as.data.frame` and `as_tibble`
- `print`
Also, update docs for dupree()
@russHyde
Copy link
Owner Author

russHyde commented Feb 10, 2020

Chose not to bump the package version to 0.2.1: this is already a development version (0.2.0.9000) and the change that's introduced is a breaking change (so should move us to 0.3). But, many other changes are planned for version 0.3 (see #48 )

@russHyde russHyde mentioned this pull request Feb 10, 2020
11 tasks
@russHyde russHyde merged commit 0056d43 into master Feb 10, 2020
@russHyde russHyde deleted the dups-class2 branch February 10, 2020 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants