Skip to content

Conversation

bockthom
Copy link
Collaborator

@bockthom bockthom commented Feb 2, 2025

Prerequisites

  • I adhere to the coding conventions (described here) in my code.
  • I have updated the copyright headers of the files I have modified.
  • I have written appropriate commit messages, i.e., I have recorded the goal, the need, the needed changes, and the location of my code modifications for each commit. This includes also, e.g., referencing to relevant issues.
  • I have put signed-off tags in all commits.
  • I have updated the changelog file NEWS.md appropriately.
  • I have checked whether I need to adjust the showcase file showcase.R with respect to my changes.
  • The pull request is opened against the branch dev.

Description

Replace deprecated igraph functions in 'util-networks-metrics.R' and remove deprecated scale_name parameter from plotting module. This works towards #260.

Changelog

  • Replace deprecated igraph functions in 'util-networks-metrics.R':
    • erdos.renyi.game of type "gnm" has been replaced by sample_gnm
    • average.path.length has been replaced by mean_distance
    • graph.density has been replaced by edge_density
    • is.simple has been replaced by is_simple
  • As of ggplot2 version 3.5.0, the function discrete_scale, which is used for plot.network in coronet, does not require a scale_name parameter anymore. Even more, this parameter has been deprecated. Therefore, we also don't use it any more in coronet. However, as a consequence of this, the plotting module of coronet requires ggplot2 version 3.5.0 or higher, as of now.

As of `ggplot2` version 3.5.0, the function `discrete_scale`, which is used
for `plot.network` in coronet, does not require a `scale_name` parameter
anymore. Even more, this parameter has been deprecated. Therefore, we also
don't use it any more in coronet. However, as a consequence of this, the
plotting module of coronet requires `ggplot2` version 3.5.0 or higher,
as of now.

Signed-off-by: Thomas Bock <[email protected]>
Signed-off-by: Thomas Bock <[email protected]>
Copy link

codecov bot commented Feb 2, 2025

Codecov Report

Attention: Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Project coverage is 81.69%. Comparing base (4d92c82) to head (e5dd429).
Report is 4 commits behind head on dev.

Files with missing lines Patch % Lines
util-networks-metrics.R 0.00% 8 Missing ⚠️
util-plot.R 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #279      +/-   ##
==========================================
+ Coverage   81.67%   81.69%   +0.01%     
==========================================
  Files          16       16              
  Lines        5147     5146       -1     
==========================================
  Hits         4204     4204              
+ Misses        943      942       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bockthom bockthom merged commit 45964c4 into se-sic:dev Feb 2, 2025
8 of 9 checks passed
@bockthom bockthom mentioned this pull request Feb 2, 2025
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.

1 participant