Skip to content

Conversation

@strengejacke
Copy link
Member

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @strengejacke, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request, titled 'Style with air', is a comprehensive code formatting and styling update. It introduces consistent whitespace and line breaks across numerous R files to improve readability. Key changes include reformatting function arguments, breaking down long function calls and complex logical conditions, and adjusting the layout of various code blocks. No functional changes or new features are introduced; the focus is entirely on code aesthetics and maintainability.

Highlights

  • Code Formatting and Readability: This pull request primarily focuses on enhancing code readability and maintainability across numerous R files. The changes involve extensive reformatting of function definitions, function calls, logical conditions, and complex expressions to introduce more whitespace and break down long lines. This aligns with the PR title 'Style with air', indicating a focus on code aesthetics rather than functional changes.
  • Consistent Styling: The changes apply a consistent styling approach throughout the codebase. This includes placing function arguments on separate lines, breaking down long function calls (e.g., insight::format_alert, sprintf, switch statements), splitting complex if conditions, and reformatting long vector and list definitions. This consistency improves visual parsing and makes the code easier to understand and review.
  • No Functional Changes: The pull request does not introduce any new features, fix any bugs, or alter the functional behavior of the existing code. All modifications are purely stylistic, aimed at improving the code's presentation and adherence to a consistent style guide.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a lot of stylistic changes, presumably from an automated tool like styler. While most changes improve readability by breaking long lines, there are several inconsistencies where function definitions or calls are collapsed into a single line, contrasting with the general trend of expanding them. I've pointed out these inconsistencies to help maintain a uniform code style across the project.

method = "zscore_robust",
threshold = NULL,
...) {
check_outliers.numeric <- function(x, method = "zscore_robust", threshold = NULL, ...) {
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This function definition has been collapsed to a single line, which is inconsistent with the multi-line formatting applied to other function definitions in this pull request (e.g., check_outliers.data.frame on line 1029). To maintain a consistent style, please consider expanding it.

This inconsistency is also present for other function definitions in this file, such as:

  • check_outliers.gls
  • .check_outliers_iqr
  • .check_outliers_ci
  • .check_outliers_cook
  • .check_outliers_ics
  • .check_outliers_optics
  • .check_outliers_lof
check_outliers.numeric <- function(
  x,
  method = "zscore_robust",
  threshold = NULL,
  ...
) {

metrics = "all",
verbose = TRUE,
...) {
model_performance.mixor <- function(model, metrics = "all", verbose = TRUE, ...) {
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This function definition has been collapsed to a single line, which is inconsistent with the multi-line formatting applied to other function definitions in this pull request (e.g., model_performance.merMod on line 42). To maintain a consistent style, please consider expanding it.

model_performance.mixor <- function(
  model,
  metrics = "all",
  verbose = TRUE,
  ...
) {

ci = 0.95,
method = "Herron",
verbose = TRUE) {
performance_pcp <- function(model, ci = 0.95, method = "Herron", verbose = TRUE) {
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This function definition has been collapsed to a single line, which is inconsistent with the multi-line formatting applied to other function definitions in this pull request (e.g., performance_accuracy on line 38). To maintain a consistent style, please consider expanding it.

performance_pcp <- function(
  model,
  ci = 0.95,
  method = "Herron",
  verbose = TRUE
) {

data = dat,
weights = tot
)
mod <- glm(prop ~ x1, family = binomial, data = dat, weights = tot)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This function call has been collapsed to a single line, which is inconsistent with the multi-line formatting applied to other function calls in this pull request (e.g., the binned_residuals call on line 34). To maintain a consistent style, please consider expanding it.

  mod <- glm(
    prop ~ x1,
    family = binomial,
    data = dat,
    weights = tot
  )

family = binomial,
data = dat
)
mod1 <- glm(cbind(suc, tot - suc) ~ 1, family = binomial, data = dat)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This function call has been collapsed to a single line, which is inconsistent with the multi-line formatting applied to other function calls in this pull request. To maintain a consistent style, please consider expanding it.

This also applies to mod2, mod3, and mod4 in this file.

  mod1 <- glm(
    cbind(suc, tot - suc) ~ 1,
    family = binomial,
    data = dat
  )

@strengejacke strengejacke merged commit bcfc470 into main Oct 8, 2025
20 of 21 checks passed
@strengejacke strengejacke deleted the use_air branch October 8, 2025 11:38
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