Commit Graph

3 Commits

Author SHA1 Message Date
Calum Young
6299d2ca23
Update mirror.py to a uv script (#110)
<!--
Thank you for contributing to Ruff! To help us out with reviewing,
please consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

From my reading of the [UV
docs](https://docs.astral.sh/uv/guides/scripts/), `mirror.py` would be a
good example of a standalone script. This PR updates `mirror.py` and the
`main.yml` workflow to be a UV script and makes use of UV in the update
process.

## Test Plan

- Update the uv version (currently 0.8.4) to an older version e.g. 0.8.3
in both `pyproject.toml` and `README.md`
- Run `uv run --no-project mirror.py` to check the update process still
works as expected
2024-12-30 10:48:39 -05:00
CoderJoshDK
53e3b33bd4
feat(workflow): auto release on tag creation (#81)
## Summary

Add a GitHub workflow for creating a new release, automatically, when a
new tag is created.

This solves #78. The code is very similar to the changes added in
https://github.com/astral-sh/uv-pre-commit/pull/6

The primary difference, is that the URL points to ruff and this one
checks for if the tag starts with a `v`, but it is optional. This lets
you change ruff versions to not have a `v` in the future. Although the
`mirror.py` will need to be updated.
Speaking of updates to `mirror.py`, I ran `ruff` on it and updated the
`subprocess` to raise an error on failure.

## Test Plan

Locally tested.
2024-03-30 19:17:08 -04:00
Subin Kim
ba4269e9c6
feat: Update pre-commit mirror script (#53)
<!--
Thank you for contributing to Ruff! To help us out with reviewing,
please consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

<!-- What's the purpose of the change? What does it do, and why? -->

- `pre-commit-mirror-maker` is not suitable for generating multiple
hooks in single `.pre-commit-hooks.yaml` file.
- So replaced the script and github workflows.

## Test Plan

<!-- How was it tested? -->

- Update `pyproject.toml`'s `ruff==0.0.290` into `ruff==0.0.289`, and
run the script.

```sh
$ python3 mirror.py
...
```
2023-09-26 10:38:22 -05:00