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

Simplifies JoinKeys from R6 to S3 list-like object #184

Merged
merged 155 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from 132 commits
Commits
Show all changes
155 commits
Select commit Hold shift + click to select a range
0b1ce12
initial support for list-based JoinKeys
averissimo Oct 30, 2023
863933e
improves on parents and JoinKeys compatibility
averissimo Oct 31, 2023
71f4eca
JoinKeys fully migrated to list-based joinkeys
averissimo Oct 31, 2023
a65cbc5
docs: rename file and improves docs
averissimo Oct 31, 2023
01985f9
docs: update docs to standardize use of join_keys_obj varname
averissimo Oct 31, 2023
6a1441a
docs: hard deprecate get_join_keys
averissimo Oct 31, 2023
aba1aa0
tests use generic getter and setter via join_keys() / join_keys<-()
averissimo Oct 31, 2023
bff7faf
restructure the files and pass all tests
averissimo Nov 2, 2023
e8a47ce
corrects for R CMD checks
averissimo Nov 2, 2023
5ac9174
Migration of R6 -> List. All test ok
averissimo Nov 2, 2023
2980c32
adds some test coverage
averissimo Nov 2, 2023
4326eb2
re-structure files
averissimo Nov 2, 2023
330e6f2
docs: slight improvement on examples
averissimo Nov 2, 2023
b093dd7
docs: missed 1 exported function
averissimo Nov 2, 2023
a5d8a07
remove former tmp class
averissimo Nov 2, 2023
2da33f6
minor change to examples
averissimo Nov 2, 2023
797f9d1
Add [[ and [[<- custom methods for JoinKeys
averissimo Nov 3, 2023
9f4bc33
implement suggestion by @gogonzo on merge function
averissimo Nov 3, 2023
5d9d73a
minor fix to prevent normalization on direct assignment
averissimo Nov 3, 2023
1e7fbfe
add some fallbacks to respect previous tests
averissimo Nov 3, 2023
70e7482
tests: add some test to subsetting operations
averissimo Nov 6, 2023
d471449
fix: bug with previous commit
averissimo Nov 6, 2023
d2af13f
change join_key to have inner representation similar to API
averissimo Nov 6, 2023
fa5b990
fix: r cmd check and pkgdown config
averissimo Nov 7, 2023
57e338b
Apply suggestions from code review
averissimo Nov 7, 2023
1d0e55e
pr: importing `%||%`
averissimo Nov 7, 2023
7ecf895
rename JoinKeySet getters to a sane name
averissimo Nov 7, 2023
debb1f6
pr: keep merge_join_keys internal
averissimo Nov 7, 2023
e193ae1
pr: remove split_join_keys function
averissimo Nov 7, 2023
2ab15c8
clean: minor cleanup after removal of log trace
averissimo Nov 7, 2023
ac182f9
fix: remove tests with recently removed split_join_keys
averissimo Nov 7, 2023
667d4f8
fix: [.JoinKeys returns a JoinKeys as it should
averissimo Nov 7, 2023
066ce46
docs: update documentation
averissimo Nov 7, 2023
c6256a7
pr: remove internal assert/check/test/expect_join_key in favor of che…
averissimo Nov 7, 2023
d6b4d9c
[ returns an object of class JoinKeys
averissimo Nov 7, 2023
5b55df6
clean: fix linter problems
averissimo Nov 7, 2023
978de4c
docs: update NEWS
averissimo Nov 7, 2023
fcb9518
docs: add missing entries to pkgdown
averissimo Nov 7, 2023
300e2ed
feat: convert keys with empty strings to their name or throw error
averissimo Nov 7, 2023
46172dd
small optimization on previous commit
averissimo Nov 7, 2023
a1b825a
fix: bug detected with teal_data and adds extra tests
averissimo Nov 7, 2023
0e09e72
code review: empty string were already dropped
averissimo Nov 8, 2023
43f321f
pr: use only structure to build JoinKeySet
averissimo Nov 8, 2023
0cad9c7
pr: rename parameter to join_key_set_object
averissimo Nov 8, 2023
816fc83
spelling: regenerates WORDLIST
averissimo Nov 8, 2023
2b5d339
feat: use of S3 method for join_keys to support extensions
averissimo Nov 8, 2023
9632762
pr: rename JoinKeySet to join_key_set
averissimo Nov 8, 2023
003467b
pr: rename JoinKeys class to join_keys
averissimo Nov 8, 2023
d9834c8
docs: update news with class rename
averissimo Nov 8, 2023
0e5ca24
pr: reducing wordlist
averissimo Nov 8, 2023
25deae7
adds c method and improves on join_keys getter
averissimo Nov 8, 2023
16cdb9b
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Nov 8, 2023
d1c843e
simplifies getter functions
averissimo Nov 8, 2023
df264e1
fix: corrects linter error
averissimo Nov 8, 2023
07b2604
docs: correct documentation
averissimo Nov 8, 2023
4c97209
prevent update_keys_given_parents from being exported
averissimo Nov 9, 2023
17baef0
feat: remove `mutate_join_keys` method
averissimo Nov 9, 2023
ae267d8
feat: removes double subscript index and better support for [ operations
averissimo Nov 10, 2023
05bc1d3
adds test for cdisc and reorganizes files
averissimo Nov 10, 2023
3e118ed
feat: support logical indices
averissimo Nov 10, 2023
e798836
tests: better comparison of join_keys using testthat 2e
averissimo Nov 10, 2023
9fc728f
docs: adds missing method
averissimo Nov 10, 2023
954ea59
feat: [.join_keys will return symmetrical keys, adds default_cdisc_jo…
averissimo Nov 10, 2023
a1f652a
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Nov 10, 2023
25a4868
docs: adds missing method in pkgdown
averissimo Nov 10, 2023
37703eb
feat: ensures dag in parents
averissimo Nov 10, 2023
3571a0c
remove use of NextMethod inside [[<-.join_keys
averissimo Nov 10, 2023
72427da
feat: adds names<-.join_keys changes names at first and second levels
averissimo Nov 10, 2023
a3c82b7
fix: [.join_keys subset only keeps parent foreign keys
averissimo Nov 13, 2023
033bb49
pr: improve on quality test of default_cdisc_join_keys
averissimo Nov 13, 2023
19f4c8b
pr: break join_key tests into smaller chunks
averissimo Nov 13, 2023
e663b66
pr: move helpers to R folder
averissimo Nov 13, 2023
860018d
fix: join_keys setter for teal_data
averissimo Nov 13, 2023
2922b0e
fix: improve on parents handling (check and subsetting)
averissimo Nov 14, 2023
1efb3ad
cleanup: move cdisc helper fn
averissimo Nov 14, 2023
357da49
cleanup: add missing man page and remove redundant test of private fn
averissimo Nov 14, 2023
0568c08
Apply suggestions from code review
averissimo Nov 14, 2023
1d40996
pr: removes missing check and adds teal_data methods
averissimo Nov 14, 2023
39aec0a
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Nov 14, 2023
918908d
pr: method should never be called directly with empty arguments
averissimo Nov 14, 2023
6ed7904
pr: remove unecessary condition
averissimo Nov 14, 2023
32a9b30
pr: remove unecessary condition
averissimo Nov 14, 2023
6746e5f
pr: joined all assertions on join_keys<- and moved c.join_keys in sou…
averissimo Nov 14, 2023
75cddf1
pr: standardize [-like method arguments and remove empty keys
averissimo Nov 14, 2023
d62b965
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Nov 14, 2023
8f76eed
pr: remove logger from join_keys
averissimo Nov 14, 2023
acc5454
pr: remove support for [<- in favor of individual [[<-
averissimo Nov 14, 2023
32bfbf2
typo: remove hardcoded number
averissimo Nov 14, 2023
cde58f6
tidyup tests
gogonzo Nov 14, 2023
80cb5eb
pr: removes merge_join_keys
averissimo Nov 14, 2023
994e6aa
tidyup tests
gogonzo Nov 14, 2023
6853a27
pr: remove cdisc_join_keys in favor of using default_cdisc_join_keys
averissimo Nov 14, 2023
bcb0637
pr: prevent incompatible keys on [[<- edge case
averissimo Nov 14, 2023
923b251
removing redundant methods
gogonzo Nov 14, 2023
5d4d1a6
various
gogonzo Nov 14, 2023
ac63f64
WIP
gogonzo Nov 14, 2023
9f0fdc2
Revert "WIP"
gogonzo Nov 15, 2023
95ebd6f
WIP
gogonzo Nov 15, 2023
27d5ff3
pr: improve style
averissimo Nov 15, 2023
9e2eb30
pr: remove redundant condition
averissimo Nov 15, 2023
c711296
pr: remove unecessary roxygen tag
averissimo Nov 15, 2023
5fe5e63
Merge branch '78_simplify_joinkeys@main' into WIP_join_keys
gogonzo Nov 15, 2023
c512876
stop overwriting x and value on [[<-
averissimo Nov 15, 2023
2cd7e6a
fixes c.join_keys
averissimo Nov 15, 2023
0c3e876
print
gogonzo Nov 15, 2023
8070739
fix: flattens objects when checking for compatible keys
averissimo Nov 15, 2023
b25ff91
Merge branch 'WIP_join_keys' into 78_simplify_joinkeys@main
gogonzo Nov 15, 2023
c0c07d0
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Nov 15, 2023
0df4984
tests update
gogonzo Nov 15, 2023
5f7509a
feat: support c.join_key_set that behaves just like c.join_keys
averissimo Nov 15, 2023
236c5f7
fix: checks for compatible keys on [[<-
averissimo Nov 15, 2023
db5a578
removes duplicate keys during assignment
averissimo Nov 15, 2023
26eff1b
more test coverage
gogonzo Nov 16, 2023
dc6df6a
fix parents on names<-
gogonzo Nov 16, 2023
ef6832b
fix: R CMD check
averissimo Nov 16, 2023
d72b9b0
docs: improve on some examples
averissimo Nov 16, 2023
82f22e1
docs: adds missing entry to pkgdown
averissimo Nov 16, 2023
b408719
add tests for [[.join_keys
gogonzo Nov 16, 2023
2c41251
fix: linter errors
averissimo Nov 16, 2023
3393eda
remove clause in favor of unique
averissimo Nov 16, 2023
3d07a07
initial support for new getter with single bracket
averissimo Nov 16, 2023
501e79d
fix: update_keys_given_parents with common keys instead of primary key
averissimo Nov 16, 2023
7fc8a12
tests: rename tests
averissimo Nov 16, 2023
364157c
if no common keys then skip adding foreign keys
averissimo Nov 16, 2023
a2cc7ac
feat: add implicit hint on print
averissimo Nov 16, 2023
02b65e9
adds context on fixture
averissimo Nov 16, 2023
92093a4
remove keep_foreign_keys argument
gogonzo Nov 16, 2023
cd1e29b
Merge branch 'WIP_join_keys_single_bracket' into 78_simplify_joinkeys…
gogonzo Nov 17, 2023
491ad61
fix
gogonzo Nov 17, 2023
53d1df6
fix test and redact
gogonzo Nov 17, 2023
a51197b
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Nov 17, 2023
0948118
split files
gogonzo Nov 17, 2023
ee47d5d
split followup
gogonzo Nov 17, 2023
df16d32
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Nov 17, 2023
28292a8
remove length.join_keys
gogonzo Nov 17, 2023
0971e0a
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Nov 17, 2023
5514962
pr: improve on filtering empty entries
averissimo Nov 17, 2023
e525093
docs: cleanup of pkgdown
averissimo Nov 17, 2023
469bc5a
docs: minor correction due to spelling
averissimo Nov 17, 2023
803386d
tests and asserts round 1
gogonzo Nov 17, 2023
31767bc
docs: first pass at join_keys documentation
averissimo Nov 17, 2023
341f938
docs: first pass at parents documentation
averissimo Nov 17, 2023
4fe3597
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Nov 17, 2023
295f972
docs: use Functions/Methods sections just as like @describeIn
averissimo Nov 17, 2023
a62c356
review 1
gogonzo Nov 17, 2023
750e489
lintr
gogonzo Nov 17, 2023
5c375da
docs: documentaion suggestions by @chlebowa
averissimo Nov 17, 2023
6e786eb
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Nov 17, 2023
5d03b9c
docs: better explain inner behavior of join_key
averissimo Nov 17, 2023
54f72b0
cleanup: move error guard inside the if clause
averissimo Nov 17, 2023
935aae4
feat: move compare function to exported all.equal
averissimo Nov 17, 2023
17e23b8
fix: add minor restriction to all.equal
averissimo Nov 17, 2023
fc173ce
fix: add merging of parents and fix test by using equal
averissimo Nov 17, 2023
b3c25eb
docs: fix unquoted code
averissimo Nov 17, 2023
cd4b2ca
fix: brings all.equal back to being private
averissimo Nov 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 25 additions & 12 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
# Generated by roxygen2: do not edit by hand

S3method("[",JoinKeys)
S3method("[<-",JoinKeys)
S3method("get_join_keys<-",JoinKeys)
S3method("get_join_keys<-",teal_data)
S3method("[",join_keys)
S3method("[<-",join_keys)
S3method("[[<-",join_keys)
S3method("join_keys<-",join_keys)
S3method("join_keys<-",teal_data)
S3method("names<-",join_keys)
S3method("parents<-",join_keys)
S3method("parents<-",teal_data)
S3method(as_cdisc,TealDataset)
S3method(as_cdisc,TealDatasetConnector)
S3method(c,join_key_set)
S3method(c,join_keys)
S3method(dataset,MultiAssayExperiment)
S3method(dataset,data.frame)
S3method(format,join_keys)
S3method(get_attrs,TealDataset)
S3method(get_code,TealDataAbstract)
S3method(get_code,TealDataset)
Expand All @@ -26,10 +33,6 @@ S3method(get_datasets,TealDataAbstract)
S3method(get_datasets,TealDataset)
S3method(get_datasets,TealDatasetConnector)
S3method(get_datasets,teal_data)
S3method(get_join_keys,JoinKeys)
S3method(get_join_keys,TealData)
S3method(get_join_keys,default)
S3method(get_join_keys,teal_data)
S3method(get_key_duplicates,TealDataset)
S3method(get_key_duplicates,data.frame)
S3method(get_keys,TealDataAbstract)
Expand All @@ -41,6 +44,11 @@ S3method(get_raw_data,TealDatasetConnector)
S3method(is_pulled,TealDataAbstract)
S3method(is_pulled,TealDataset)
S3method(is_pulled,TealDatasetConnector)
S3method(join_keys,TealData)
S3method(join_keys,default)
S3method(join_keys,join_keys)
S3method(join_keys,teal_data)
S3method(length,join_keys)
S3method(load_dataset,TealDataset)
S3method(load_dataset,TealDatasetConnector)
S3method(load_datasets,TealData)
Expand All @@ -51,8 +59,9 @@ S3method(mutate_data,TealDataAbstract)
S3method(mutate_dataset,TealDataAbstract)
S3method(mutate_dataset,TealDataset)
S3method(mutate_dataset,TealDatasetConnector)
S3method(mutate_join_keys,JoinKeys)
S3method(mutate_join_keys,TealData)
S3method(parents,join_keys)
S3method(parents,teal_data)
S3method(print,join_keys)
S3method(set_args,CallableCode)
S3method(set_args,CallableFunction)
S3method(set_args,TealDatasetConnector)
Expand All @@ -68,6 +77,8 @@ export("col_labels<-")
export("data_label<-")
export("datanames<-")
export("get_join_keys<-")
export("join_keys<-")
export("parents<-")
export(as_cdisc)
export(callable_code)
export(callable_function)
Expand All @@ -78,7 +89,6 @@ export(cdisc_dataset)
export(cdisc_dataset_connector)
export(cdisc_dataset_connector_file)
export(cdisc_dataset_file)
export(cdisc_join_keys)
export(code_cdisc_dataset_connector)
export(code_dataset_connector)
export(col_labels)
Expand All @@ -92,6 +102,7 @@ export(dataset)
export(dataset_connector)
export(dataset_connector_file)
export(dataset_file)
export(default_cdisc_join_keys)
export(example_cdisc_data)
export(fun_cdisc_dataset_connector)
export(fun_dataset_connector)
Expand All @@ -115,7 +126,8 @@ export(load_datasets)
export(mae_dataset)
export(mutate_data)
export(mutate_dataset)
export(mutate_join_keys)
export(parent)
export(parents)
export(python_cdisc_dataset_connector)
export(python_code)
export(python_dataset_connector)
Expand All @@ -135,5 +147,6 @@ import(shiny)
import(teal.code)
importFrom(digest,digest)
importFrom(logger,log_trace)
importFrom(rlang,`%||%`)
importFrom(shinyjs,useShinyjs)
importFrom(stats,setNames)
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@

### Enhancements
* Simplified `join_key` to better support primary keys.
* Added subset and subset-assignment to `JoinKeySet` class to manipulate relationship pair keys _(`[` and `[<-`)_.
* `JoinKey` `R6` object was removed in favor of a list-like object with class name `join_keys`. Subset operators and assignments are supported (`[`, `[[`, `[<-` and `[[<-`)
* `join_keys` function works as a constructor, getter and setter.

### Breaking changes

* Introduced new data class (`teal_data`) which replaces deprecated `TealData`. New data class becomes a standard input for whole `teal` framework.
* Deprecated `teal_data` constructor when `TealDataset`, `TealDatasetConnector` or `TealDataConnector` objects are provided. New delayed data loading functions introduced in `teal` package.
* `JoinKeySet` class was renamed to `join_key_set`.
* `JoinKeys` class was renamed to `join_keys`

### Miscellaneous
* Specified minimal version of package dependencies.

Expand Down
Loading
Loading