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

Are these differences expected? #227

Closed
maurolepore opened this issue Nov 19, 2020 · 2 comments · Fixed by #230
Closed

Are these differences expected? #227

maurolepore opened this issue Nov 19, 2020 · 2 comments · Fixed by #230

Comments

@maurolepore
Copy link
Contributor

The intended release of r2dii.data 0.1.5 exposed problems with reverse dependencies: r2dii.match and r2dii.analysis.
The problems in r2dii.match seems related to changes in the column borderline

subset(
  r2dii.data::data_dictionary, 
  subset = column == "borderline", 
  select = c("dataset", "column")
)
#>                   dataset     column
#> 14     cnb_classification borderline
#> 30    gics_classification borderline
#> 38    isic_classification borderline
#> 63    nace_classification borderline
#> 68   naics_classification borderline
#> 91 sector_classifications borderline
#> 95     sic_classification borderline

Created on 2020-11-19 by the reprex package (v0.3.0)

Here I see many differences and I need help to decide if updating the regression references is the right thing to do.

image

image

image

image

@maurolepore
Copy link
Contributor Author

@jdhoffa please comment.

@jdhoffa
Copy link
Member

jdhoffa commented Nov 23, 2020

The cause for these differences is not immediately clear to me, and somewhat unexpected. I will explore and open a PR if I figure anything out

maurolepore referenced this issue in RMI-PACTA/r2dii.match Nov 27, 2020
Closes #326
Closes #327 -- this is a simpler/safer way to solve it.
Relates to:
* https://github.com/2DegreesInvesting/r2dii.analysis/pull/227
* https://github.com/2DegreesInvesting/r2dii.analysis/pull/230

This change is internal, and motivated by our need to break the
dependency between r2dii.data and its reverse dependencies. The
problem we are trying to solve is this:

r2dii.data provides data that is used in some functions if its
reverse dependencies -- like r2dii.match. Concretely, changes in
the sector classification dataset (in r2dii.data) make tests to
fail in reverse dependencies like r2dii.match that store a
snapshot of expected output (e.g. of match_name()).

This commit allows us to use generate such snaphsots with a
frozen loanbook, and thus make r2dii packages less prone to
meaningless errors when CRAN checks for reverse dependencies.
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 a pull request may close this issue.

2 participants