Conversation
Contributor
There was a problem hiding this comment.
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.
b8898c6 to
ecf9a8d
Compare
9aac5a9 to
31fe048
Compare
c8d58e6 to
25a28f0
Compare
55d8573 to
f3e9218
Compare
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.yamlandphs_document.yaml), updating the style tool fromstylertoair, and updating dependencies and workflow references to reflect these changes. This makes the automation more modular and easier to maintain.Workflow refactoring and modularisation:
.github/workflows/phs_style_and_document.yamlworkflow was split into two separate workflows:.github/workflows/phs_style.yamlfor code styling and.github/workflows/phs_document.yamlfor documentation. The style job now uses theairformatter instead ofstyler, and the documentation job focuses onroxygen2-based documentation. [1] [2]Tooling updates:
stylerfrom the documentation workflow, and replaced them with the installation and use ofairin the new style workflow. [1] [2]Workflow dependency and job updates:
.github/workflows/phs_package_checks.yamlto 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:
auto-style-codetoauto-document-codeto reflect the new separation of concerns.These changes improve maintainability, clarity, and flexibility of the CI workflows for code style and documentation.