Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 1, 2025

The autogenerated _impl functions changed their parameter signatures (e.g., loops boolean → allowed_edge_types enum, parameter names using underscores), but wrapper functions and tests weren't updated.

Parameter Type Changes

  • Graph generators: sample_gnp(), sample_gnm(), sbm_game(), rewire_each_edge() now map boolean loops/multiple to allowed_edge_types enum ("simple", "loops", "multi", "all")
  • Centrality functions: strength(), centralization_degree() convert boolean loops to enum ("twice", "none", "once")

Parameter Name Changes (dot → underscore)

Updated wrapper functions and tests:

  • similarity(): vit.from/vit.tofrom/to
  • community_label_propagation(): lpa.variantlpa_variant
  • community_leiden(): vertex_weightsvertex_out_weights/vertex_in_weights
  • community_infomap(): e_weights/v_weightsedge_weights/vertex_weights
  • biadjacency(): incidencebiadjmatrix
  • Cycle functions: bfs.cutoffbfs_cutoff, use.cycle.orderuse_cycle_order

Other Fixes

  • Added UNLIMITED = -1 constant for autogenerated function defaults
  • Fixed graph.isoclass.subgraph() double vertex ID offset (was subtracting 1 twice)
  • Removed sh and details parameters from automorphism_group() (no longer accepted by _impl)
  • Commented out unavailable loops/multiple attribute assignments in static_fitness_game_impl()

Example of typical change pattern:

# Before
sample_gnp(n, p, directed, loops = TRUE)
  → erdos_renyi_game_gnp_impl(n, p, directed, loops = TRUE)  # Error!

# After  
sample_gnp(n, p, directed, loops = TRUE)
  → erdos_renyi_game_gnp_impl(n, p, directed, 
      allowed_edge_types = if (loops) "loops" else "simple")
Original prompt

This section details on the original issue you should resolve

<issue_title>Fix tests on next branch</issue_title>
<issue_description>Run tests only, ensure they pass. Do not worry about examples or devtools::check() as part of this task.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits November 1, 2025 20:16
Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com>
…fix similarity params

Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com>
Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com>
Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix tests on next branch to ensure they pass fix: update wrapper functions for C API parameter changes Nov 1, 2025
Copilot AI requested a review from krlmlr November 1, 2025 20:53
Copilot finished work on behalf of krlmlr November 1, 2025 20:53
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.

2 participants