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

pre-commit #103

Merged
merged 3 commits into from
Jan 30, 2023
Merged

pre-commit #103

merged 3 commits into from
Jan 30, 2023

Conversation

norlandrhagen
Copy link
Contributor

cc @brian-rose

@github-actions
Copy link

github-actions bot commented Jan 18, 2023

👋 Thanks for opening this PR! The Cookbook will be automatically built with GitHub Actions. To see the status of your deployment, click below.
🔍 Git commit SHA: b82a470
✅ Deployment Preview URL: https://ProjectPythia.github.io/cookbook-template/_preview/103

@norlandrhagen norlandrhagen marked this pull request as ready for review January 18, 2023 18:09
Copy link
Member

@brian-rose brian-rose left a comment

Choose a reason for hiding this comment

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

This looks great @norlandrhagen, thanks for putting it together!

My only hesitation against merging now is that we've had a lot of bother in other repos with pre-commit autoupdate PRs. The problem is with prettier, which has a series of 3.0.0-alpha.* releases. We aren't interested in using pre-release versions of these tools, but the auto-update tool keeps trying to increment prettier to the latest alpha release.

So for months now we've been manually editing the auto-update PRs to strip away the prettier update. It's been tedious, and I worry about spreading that tedium around to all the Cookbook repos...

I see three potential solutions:

  1. We just wait on merging this until prettier 3.0.0 is released
  2. We figure out a solution to prevent alpha releases from being included in the auto-update
  3. We change the frequency of auto-update. Currently it's weekly. If we reduced to monthly, that would ease the tedium quite a bit.

I don't know how to do 2 or 3! Any ideas?

@norlandrhagen
Copy link
Contributor Author

Hey there @brian-rose, thanks for the feedback!

I'm fine with any of those. Waiting until prettier 3.0.0 seem fine, definitely don't want to create more tedious cleanup work!

As for exploring option #2, I'm not sure if it works, but can we pin the prettier version?
Something like is mentioned in this issue: pre-commit/pre-commit-hooks#332

  - repo: https://github.com/pre-commit/mirrors-prettier
    rev: v2.7.1
    hooks:
      - id: prettier
        additional_dependencies: [prettier@v2.7.1]

@brian-rose
Copy link
Member

As for exploring option #2, I'm not sure if it works, but can we pin the prettier version?

I don't know if it will work either, but let's give it a try! We can try it out here in the template repo for a week or so and see what autoupdates get generated. If we're happy these changes, then we can migrate them to all the existing cookbook repos.

@brian-rose brian-rose merged commit 38db2ac into ProjectPythia:main Jan 30, 2023
github-actions bot pushed a commit that referenced this pull request Jan 30, 2023
@brian-rose
Copy link
Member

Thanks for your contribution @norlandrhagen !

@norlandrhagen
Copy link
Contributor Author

Thanks @brian-rose! Not sure if it'll work, but fingers crossed.

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.

None yet

3 participants