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

Use Astral uv #12402

Merged
merged 6 commits into from
Dec 5, 2024
Merged

Use Astral uv #12402

merged 6 commits into from
Dec 5, 2024

Conversation

cclauss
Copy link
Member

@cclauss cclauss commented Dec 2, 2024

Describe your change:

https://docs.astral.sh/uv

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Add or change doctests? -- Note: Please avoid changing both code and tests in a single pull request.
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms include at least one URL that points to Wikipedia or another similar explanation.
  • If this pull request resolves one or more open issues then the description above includes the issue number(s) with a closing keyword: "Fixes #ISSUE-NUMBER".

@cclauss cclauss requested a review from dhruvmanila December 2, 2024 11:49
@cclauss
Copy link
Member Author

cclauss commented Dec 2, 2024

pre-commit.ci run

@cclauss cclauss marked this pull request as ready for review December 2, 2024 13:09
@algorithms-keeper algorithms-keeper bot added awaiting reviews This PR is ready to be reviewed enhancement This PR modified some existing files labels Dec 2, 2024
Comment on lines -15 to +16
- run: pip install --user ruff
- run: ruff check --output-format=github .
- uses: astral-sh/setup-uv@v4
- run: uvx ruff check --output-format=github .
Copy link
Member

Choose a reason for hiding this comment

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

This is unrelated to this PR but maybe we should combine the "ruff.yml" workflow into a more general "lint.yml" where there are other linters as well in addition to Ruff and they can utilize the "lint" dependency group.

Copy link
Member Author

@cclauss cclauss Dec 3, 2024

Choose a reason for hiding this comment

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

So... This is a good question. Ruff is run both here and in pre-commit.ci with the other "lint" jobs. Here it is run with --output-format=github to give contributors clear GH annotations and in pre-commit without --output-format. Is there a way to run it just once on each PR but give GitHub Annotations on the GitHub UI but not on localhost?

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, that's a good point. Does pre-commit support the GitHub annotation output format? If it does, we could just utilize that otherwise I'm not sure what to do. You might be interested in the new astral-sh/ruff-action@v2 which is a complete rewrite.

@algorithms-keeper algorithms-keeper bot added the tests are failing Do not merge until tests pass label Dec 3, 2024
@algorithms-keeper algorithms-keeper bot removed the tests are failing Do not merge until tests pass label Dec 3, 2024
@cclauss cclauss enabled auto-merge (squash) December 3, 2024 10:04
@cclauss cclauss requested a review from dhruvmanila December 3, 2024 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting reviews This PR is ready to be reviewed enhancement This PR modified some existing files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants