feat: Implement automated styling on .R
files
#3408
+70,567
−64,655
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.
Optimize R Formatting Script to Target Only Staged
.R
FilesFixes #3280 (Partially)
After reviewing discussion from #3280 and #3407 , I think one should take their time reviewing this. I will finish a review on each aspect of PEcAn to confirm if this script keeps the systems intact as they were previously.
Priority: Medium
Status: Ready for Review
Type: Enhancement
Description
I have optimized the existing R formatting script (
format.sh
) to improve its performance by targeting only the.R
files that are staged for commit in the Git repository.Key Changes:
Motivation and Context
This optimization aligns with best practices for Git hooks by minimizing the impact on commit performance, thereby encouraging team members to maintain code quality without frustration.
This PR addresses where the formatting script was identified as a bottleneck in the commit process.
Review Time Estimate
Types of changes
Checklist:
Additional Notes:
Documentation Update: While this change primarily affects the internal scripting for pre-commit hooks, I WILL updated the
CHANGELOG.md
to reflect the performance improvements if requested. If a more detailed documentation update is required, please let me know, and I can provide further details.Compatibility: This optimization is backward-compatible and should not affect existing workflows other than improving performance.