Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade pre-commit and its hooks #32

Merged
merged 5 commits into from
May 23, 2024
Merged

Conversation

jeancochrane
Copy link
Collaborator

@jeancochrane jeancochrane commented May 22, 2024

In the course of investigating lorenzwalthert/precommit#571, I realized that our pre-commit hooks are outdated, and we're running an old version of pre-commit due to installing from apt instead of PyPi. This PR updates pre-commit and its hooks for the sake of keeping things tidy and ruling out any problems due to package versions.

I also tested these changes as part of ccao-data/model-res-avm#243, to confirm that the R hooks still work.

@jeancochrane jeancochrane changed the title Upgrade pre-commit Upgrade pre-commit and its hooks May 22, 2024
@@ -13,4 +13,4 @@ jobs:
uses: actions/checkout@v4

- name: Run pre-commit checks
uses: ccao-data/actions/pre-commit@main
uses: ./pre-commit
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Switching to a relative path here should make development easier, since we don't need to update the ref to point to the current branch any time we want to test changes to the action.

Comment on lines -22 to -29
- name: Permissions check on R cache (debugging)
run: >
if [ -d /home/runner/.cache/R ]; then
ls -lah /home/runner/.cache/R/R.cache
else
echo "Directory /home/runner/.cache/R/R.cache not exist."
fi
shell: bash
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Based on my investigation in lorenzwalthert/precommit#571, this check is unnecessary, so I'm removing it.

@jeancochrane jeancochrane marked this pull request as ready for review May 22, 2024 21:12
@jeancochrane jeancochrane requested a review from dfsnow May 22, 2024 21:12
Copy link
Member

@dfsnow dfsnow left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@jeancochrane jeancochrane merged commit ea4dfe5 into main May 23, 2024
1 check passed
@jeancochrane jeancochrane deleted the jeancochrane/upgrade-precommit branch May 23, 2024 17:51
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