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

updated base/db #2758 #2774

Merged
merged 25 commits into from Mar 8, 2021
Merged

updated base/db #2758 #2774

merged 25 commits into from Mar 8, 2021

Conversation

moki1202
Copy link
Collaborator

fixed tidyverse notes "no visible binding for global variable" for "name, id, created_at, updated_at, pft_id" in clone_pft.R

fixed tidyverse notes "no visible binding for global variable" for "name, id, created_at, updated_at, pft_id" in clone_pft.R
fixed tidyverse notes  "no visible binding for global variable"  for  "container_type, container_id, machine_id, updated_at" in dbfiles.R
@moki1202 moki1202 changed the title updated base/db/R/clone_pft.R #2758 updated base/db #2758 Feb 19, 2021
fixed tidyverse notes "no visible binding for global variable" for "sync_host_id, run_id, id, workflow_id, posix, folder, ensemble_id"
fixed tidyverse notes "no visible binding for global variable" for " pft_id, created_at, stat, trait "
fixed tidyverse notes "no visible binding for global variable" for  "id, name, collect"
ixed tidyverse notes "no visible binding for global variable" for "name, pft_type, name.mt, cultivar_id, specie_id, genus, species, scientificname, name.cv"
fixed tidyverse notes "no visible binding for global variable" for "name"
fixed tidyverse notes "no visible binding for global variable" for  "score, author, author_family, author_given, issued"
removed relevant  "no visible binding for global variable" lines from the file .
@moki1202
Copy link
Collaborator Author

tried my best to update base/db files. cross-checked them multiple times to be sure.

base/db/R/clone_pft.R Outdated Show resolved Hide resolved
base/db/R/clone_pft.R Outdated Show resolved Hide resolved
base/db/R/clone_pft.R Outdated Show resolved Hide resolved
base/db/R/query.dplyr.R Outdated Show resolved Hide resolved
base/db/R/query.dplyr.R Outdated Show resolved Hide resolved
base/db/R/query.dplyr.R Outdated Show resolved Hide resolved
base/db/R/query.pft.R Outdated Show resolved Hide resolved
base/db/R/query.pft.R Outdated Show resolved Hide resolved
base/db/R/query.pft.R Outdated Show resolved Hide resolved
base/db/R/dbfiles.R Outdated Show resolved Hide resolved
base/db/R/dbfiles.R Outdated Show resolved Hide resolved
base/db/R/query.traits.R Outdated Show resolved Hide resolved
Copy link
Member

@ashiklom ashiklom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @moki1202 ! Overall, this looks good, but please see my suggested changes.

Most of them refer to one of two situations where using .data is incorrect:

  • On the lefthand side of assignment (=, but not ==!) expressions. E.g., dplyr::mutate(newvariable = .data$oldvariable) or dplyr::select(new_name = .data$old_name) -- newvariable and new_name are being created inside the data frame, so no ambiguity and therefore no need for the .data pronoun. In fact, it will not work on the left side of expressions.
  • Inside strings. E.g., dplyr::left_join(table1, table2, by = c("t1_col" = "t2_col")) -- strings are evaluated as-is and not treated as variables, so there's no need for the .data pronoun. In fact, it will not work -- ".data$t1_col" will look for a column with that exact name (including the .data$ prefix), which does not exist.

removed/added '.data' pronoun where required.
added '.data' pronoun to 'file_name' and 'file_path'.
fixed by removing ' .data ' at appropriate places.
removed ' .data' from collect() function and added dplyr Namespace.
removed ' .data' pronoun from appropriate places.
removed ' .data' pronoun from appropriate places.
removed ' .data' pronoun from appropriate places.
@infotroph
Copy link
Member

/document

infotroph and others added 2 commits February 21, 2021 22:39
Mostly to trigger a CI rebuild
Co-authored-by: Alexey Shiklomanov <alexey.shiklomanov@gmail.com>
match_dbcols: no visible global function definition for ‘head’
match_dbcols: no visible binding for global variable ‘.’
match_dbcols: no visible binding for global variable ‘as’
query_pfts: no visible binding for global variable ‘name’
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@moki1202 The current CI failure is because this warning hasn't been fixed yet. Confusingly, we have files named both query.pft.R (which you have cleaned up in this PR) and query_pfts.R (which you haven't yet modified). To fix the build error you can either do the updates in query_pfts.R, or re-add this line to Rcheck_reference.log and save the cleanup in query_pfts for another PR -- either way is OK with me.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ill fix this file as soon as my classes are over @infotroph

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@infotroph just updated query_pfts.R, turns out I did forget to update this file. I apologize.

added ' .data ' pronoun to appropriate places.
@infotroph
Copy link
Member

@ashiklom Have all your change requests been resolved here?

@ashiklom ashiklom merged commit a3a02df into PecanProject:develop Mar 8, 2021
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.

None yet

3 participants