Skip to content

Replace styler with air#31

Open
Moohan wants to merge 3 commits intomainfrom
test_air
Open

Replace styler with air#31
Moohan wants to merge 3 commits intomainfrom
test_air

Conversation

@Moohan
Copy link
Copy Markdown
Member

@Moohan Moohan commented May 19, 2025

https://posit-dev.github.io/air/formatter.html
https://www.tidyverse.org/blog/2025/02/air/
https://yohann-data.fr/posts/airformatter/

Note this PR will probably wait until v1 is released - https://github.com/posit-dev/air/releases

This pull request refactors and improves the GitHub Actions workflows for automatic code formatting and documentation. The main changes include splitting the previous combined style and documentation workflow into two separate workflows (phs_style.yaml and phs_document.yaml), updating the style tool from styler to air, and updating dependencies and workflow references to reflect these changes. This makes the automation more modular and easier to maintain.

Workflow refactoring and modularisation:

  • The original .github/workflows/phs_style_and_document.yaml workflow was split into two separate workflows: .github/workflows/phs_style.yaml for code styling and .github/workflows/phs_document.yaml for documentation. The style job now uses the air formatter instead of styler, and the documentation job focuses on roxygen2-based documentation. [1] [2]

Tooling updates:

  • Removed all steps and dependencies related to styler from the documentation workflow, and replaced them with the installation and use of air in the new style workflow. [1] [2]

Workflow dependency and job updates:

  • Updated .github/workflows/phs_package_checks.yaml to call the new separate workflows for styling and documentation, and updated job dependencies so that documentation runs after styling, and downstream jobs (R-CMD-check, pkgdown) depend on documentation instead of the previous combined job. [1] [2] [3]

Branch and naming consistency:

  • Changed branch names and workflow/job names in documentation-related steps from auto-style-code to auto-document-code to reflect the new separation of concerns.

These changes improve maintainability, clarity, and flexibility of the CI workflows for code style and documentation.

This comment was marked as outdated.

@Moohan Moohan requested a review from Copilot September 3, 2025 08:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR replaces the styler R package with air for code formatting in GitHub Actions workflows. The change involves separating the previously combined styling and documentation workflow into two distinct workflows and updating the setup to use the new air formatter.

  • Removes styler dependencies and caching logic from the documentation workflow
  • Adds a new dedicated styling workflow using posit-dev/air instead of styler
  • Updates workflow dependencies to run styling and documentation sequentially

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/phs_style.yaml New workflow for code styling using air formatter
.github/workflows/phs_package_checks.yaml Updates job dependencies to use separate Style and Document workflows
.github/workflows/phs_document.yaml Removes styler-related code and focuses solely on documentation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Moohan Moohan force-pushed the test_air branch 4 times, most recently from b8898c6 to ecf9a8d Compare September 22, 2025 11:22
@Moohan Moohan force-pushed the test_air branch 2 times, most recently from 9aac5a9 to 31fe048 Compare September 29, 2025 16:03
@Moohan Moohan force-pushed the test_air branch 3 times, most recently from c8d58e6 to 25a28f0 Compare October 15, 2025 08:56
@Moohan Moohan force-pushed the test_air branch 2 times, most recently from 55d8573 to f3e9218 Compare January 13, 2026 10:14
Moohan and others added 3 commits April 7, 2026 09:13
https://posit-dev.github.io/air/formatter.html
https://www.tidyverse.org/blog/2025/02/air/
https://yohann-data.fr/posts/airformatter/

Update phs_style_and_document.yaml
Split the style and document actions

Remove automatic documentation job from workflow

Removed the phs_document job for automatic documentation generation and its dependencies.
Update phs_package_checks.yaml
Update phs_style.yaml to add default air.toml
Update phs_style.yaml
Update phs_document.yaml
Update phs_document.yaml
Update phs_style.yaml
Update phs_style.yaml
Update phs_document.yaml
Update phs_package_checks.yaml
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