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

Do offline uv-lock check in CI, online check manually #943

Merged
merged 2 commits into from
Feb 8, 2025

Conversation

mfisher87
Copy link
Collaborator

@mfisher87 mfisher87 commented Feb 7, 2025

pre-commit.ci fails because there is no internet access in that environment. They should fail based on the validity of uv.lock based on pyproject.toml. This introduces two versions of the hook, one offline and one online (manual).

Resolves #942

Pull Request (PR) draft checklist - click to expand
  • Please review our
    contributing documentation
    before getting started.
  • Populate a descriptive title. For example, instead of "Updated README.md", use a
    title such as "Add testing details to the contributor section of the README".
    Example PRs: #763
  • Populate the body of the pull request with:
  • Update CHANGELOG.md with details about your change in a section titled
    ## Unreleased. If such a section does not exist, please create one. Follow
    Common Changelog for your additions.
    Example PRs: #763
  • Update the documentation and/or the README.md with details of changes to the
    earthaccess interface, if any. Consider new environment variables, function names,
    decorators, etc.

Click the "Ready for review" button at the bottom of the "Conversation" tab in GitHub
once these requirements are fulfilled. Don't worry if you see any test failures in
GitHub at this point!

Pull Request (PR) merge checklist - click to expand

Please do your best to complete these requirements! If you need help with any of these
requirements, you can ping the @nsidc/earthaccess-support team in a comment and we
will help you out!

  • Add unit tests for any new features.
  • Apply formatting and linting autofixes. You can add a GitHub comment in this Pull
    Request containing "pre-commit.ci autofix" to automate this.
  • Ensure all automated PR checks (seen at the bottom of the "conversation" tab) pass.
  • Get at least one approving review.

Copy link

github-actions bot commented Feb 7, 2025

Binder 👈 Launch a binder notebook on this branch for commit d0dc559

I will automatically update this comment whenever this PR is modified

Copy link
Collaborator

@chuckwondo chuckwondo left a comment

Choose a reason for hiding this comment

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

No need to use manual hook. Use this: https://pre-commit.ci/#configuration-skip

@mfisher87
Copy link
Collaborator Author

Since it skips by ID and these two hooks have the same ID, it would skip both and we'd lose our uv-lock check in CI :( Is there a way around that?

@mfisher87 mfisher87 requested a review from chuckwondo February 7, 2025 23:29
@mfisher87 mfisher87 marked this pull request as ready for review February 7, 2025 23:30
@mfisher87
Copy link
Collaborator Author

Docs build fixed by #941

@mfisher87 mfisher87 dismissed chuckwondo’s stale review February 7, 2025 23:31

I think this would disable uv-lock check in CI entirely

@chuckwondo
Copy link
Collaborator

Since it skips by ID and these two hooks have the same ID, it would skip both and we'd lose our uv-lock check in CI :( Is there a way around that?

I suppose I misunderstood your intent. So your changes will allow the check in CI, but if there's a failure, it will be because the lock is out of sync rather than because there's no internet access?

@mfisher87
Copy link
Collaborator Author

✔️ Exactly! Sorry for not being clear :)

@mfisher87 mfisher87 merged commit 3f5d17c into main Feb 8, 2025
13 of 14 checks passed
@mfisher87 mfisher87 deleted the fix-pre-commit-ci branch February 8, 2025 00:30
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.

[BUG] pre-commit.ci uv-lock task failing on every PR
2 participants