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

Automating dependency handling, platform interop, R CMD check housekeeping, etc #319

Merged
merged 13 commits into from
Oct 10, 2018

Conversation

pegeler
Copy link
Contributor

@pegeler pegeler commented Sep 25, 2018

Hello,

A colleague of mine was attempting to install this R package a few weeks ago. He was having some trouble with dependencies. As a result, I took a look under the hood and have some suggestions. They fall into a few categories, so I have outlined them below:

  • Adjusted the DESCRIPTION file so that devtools can find the GitHub repo.
  • With regard to OhdsiRTools, I moved it from Depends to Suggests since it looks like it is only needed for multithreaded mode. In the case where a user who does not have the necessary package requests multithreaded mode, I just have the function call break and inform the user that this functionality requires additional installation.
  • I also see that a installation instructions recommend removing the CRAN version of a couple of OHDSI R packages in preference for the GitHub versions (SqlRender and DatabaseConnector). I tend to recommend against that practice unless there is a very good reason and so have the package point straight to the CRAN version.
  • Fixed a problem with Achilles.Rd/achilles.Rd that arose from having two roxygen2 documentation blocks that both had the same name.
  • Ran R CMD check and attempted to fix most of the notes/warnings/errors.
  • Made the code slightly more idiomatically R. For example, instead of defining .is_installed() to check whether a package is installed, it's more commonplace to use requireNamespace("package", quietly = TRUE).

So sorry this is such a frenetic PR!!! I'm making no guarantees that I didn't break anything and I apologize that I changed a bunch of styling in only a few corners of the codebase. But I just thought I'd send this PR along since I'm sure other users would at least benefit from the interop fix and the dependency handling.

Thanks,

Pablo

@t-abdul-basser t-abdul-basser self-requested a review September 26, 2018 15:02
@t-abdul-basser
Copy link
Contributor

@pegeler Thanks for this submission. We will review and get back to you with comments and requests for changes.

Copy link
Contributor

@vojtechhuser vojtechhuser left a comment

Choose a reason for hiding this comment

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

return statements replaced slightly
msg replaces writeLines

other minor changes

it should not break anything.

@alondhe
Copy link
Collaborator

alondhe commented Oct 2, 2018

Many thanks @pegeler. I've learned a lot from this PR about how to better conform to good R package standards!

@pegeler
Copy link
Contributor Author

pegeler commented Oct 2, 2018

Hi @alondhe. Glad to help! Although I don't have any direct contact with the OHDSI project right now, I am very interested in it. I will be looking for ways that I can contribute more in the future. Please let me know if there is any specific work an R nerd like myself can do to make the biggest impact.

@vojtechhuser and @t-abdul-basser, Please see my most recent commit. I just realized that I put OhdsiRTools into Suggests so had to remove the import directive from the NAMESPACE file. Otherwise users who try to load the package without OhdsiRTools would get an error. Sorry for the oversight!

@t-abdul-basser t-abdul-basser added this to the 1.6.2 milestone Oct 2, 2018
Copy link
Contributor

@t-abdul-basser t-abdul-basser left a comment

Choose a reason for hiding this comment

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

Thanks but 1.6.1 has been release. I suggest that you change to 1.6.2.

@vojtechhuser
Copy link
Contributor

I propose we merge. Taha?

@t-abdul-basser
Copy link
Contributor

Not yet. I have not finished my review. My expectation is that this will be part of the next minor release, v1.6.2.

Note: that we have not agreed on a date for that release yet but it will almost certainly be post-OHDSI symposium.

Copy link
Contributor

@t-abdul-basser t-abdul-basser left a comment

Choose a reason for hiding this comment

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

Thanks for addressing some of the issues raised by R CMD check @pegeler!

@t-abdul-basser t-abdul-basser merged commit b71c4ec into OHDSI:master Oct 10, 2018
@t-abdul-basser
Copy link
Contributor

Merged in preparation for review of #327 and creation of release candidate branch.

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.

4 participants