Skip to content

chore: Replace _impl aliases with explicit wrapper functions in R/cliques.R#2363

Merged
krlmlr merged 4 commits intomainfrom
copilot/replace-impl-aliases-in-cliques
Oct 25, 2025
Merged

chore: Replace _impl aliases with explicit wrapper functions in R/cliques.R#2363
krlmlr merged 4 commits intomainfrom
copilot/replace-impl-aliases-in-cliques

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Oct 25, 2025

Replaced 9 direct function aliases (func <- func_impl) with explicit wrapper functions that forward arguments individually. This improves code clarity and makes the function signatures visible in the public API.

Changes

Functions updated:

  • cliques → forwards graph, min, max
  • largest_cliques → forwards graph
  • clique_num → forwards graph
  • weighted_cliques → forwards graph, vertex.weights, min.weight, max.weight, maximal
  • largest_weighted_cliques → forwards graph, vertex.weights
  • weighted_clique_num → forwards graph, vertex.weights
  • is_complete → forwards graph
  • is_clique → forwards graph, candidate, directed
  • is_ivs → forwards graph, candidate

Pattern:

# Before
cliques <- cliques_impl

# After
cliques <- function(graph, min = 0, max = 0) {
  cliques_impl(
    graph = graph,
    min = min,
    max = max
  )
}

Arguments are forwarded explicitly using arg = arg notation. No use of ... as the underlying _impl functions don't use it.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cloud.r-project.org
    • Triggering command: /usr/lib/R/bin/exec/R --no-echo --no-restore -e install.packages(&#34;pak&#34;,~&#43;~repos~&#43;~=~&#43;~&#34;REDACTED&#34;,~&#43;~lib~&#43;~=~&#43;~&#34;~/R/library&#34;) (dns block)
  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Replace _impl aliases in R/cliques.R</issue_title>
<issue_description>Goal
Review the code in R/cliques.R and replace all direct _impl function aliases with explicit wrapper functions.

Functions to update:

  • cliques <- cliques_impl
  • largest_cliques <- largest_cliques_impl
  • clique_num <- clique_number_impl
  • weighted_cliques <- weighted_cliques_impl
  • largest_weighted_cliques <- largest_weighted_cliques_impl
  • weighted_clique_num <- weighted_clique_number_impl
  • is_complete <- is_complete_impl
  • is_clique <- is_clique_impl
  • is_ivs <- is_independent_vertex_set_impl

Instructions

  1. Review the code to understand the function signatures
  2. Create explicit wrapper functions that forward to the _impl functions
  3. Forward each argument individually and explicitly using arg = arg notation
  4. Do not use ... unless the _impl function itself uses ...

Pattern
Replace direct aliasing like:

func_name <- func_name_impl

With an explicit wrapper:

func_name <- function(arg1, arg2, ...) {
  func_name_impl(
    arg1 = arg1,
    arg2 = arg2,
    ...
  )
}

File
R/cliques.R</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.

Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com>
Copilot AI changed the title [WIP] Replace _impl aliases in R/cliques.R with wrapper functions Replace _impl aliases with explicit wrapper functions in R/cliques.R Oct 25, 2025
Copilot AI requested a review from krlmlr October 25, 2025 15:41
@krlmlr krlmlr marked this pull request as ready for review October 25, 2025 16:25
@krlmlr krlmlr changed the title Replace _impl aliases with explicit wrapper functions in R/cliques.R chore: Replace _impl aliases with explicit wrapper functions in R/cliques.R Oct 25, 2025
@krlmlr krlmlr merged commit 60617f8 into main Oct 25, 2025
1 check passed
@krlmlr krlmlr deleted the copilot/replace-impl-aliases-in-cliques branch October 25, 2025 17:33
krlmlr added a commit that referenced this pull request Oct 25, 2025
…cliques.R` (#2363)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com>
Co-authored-by: Kirill Müller <krlmlr@users.noreply.github.com>
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.

Replace _impl aliases in R/cliques.R

2 participants