Skip to content

Commit

Permalink
uv (#133)
Browse files Browse the repository at this point in the history
* uv

* fix pyproject.toml

* fix gha

* remove unnecessary uv installations

* fix GHA
  • Loading branch information
dorschw authored Dec 26, 2024
1 parent fff7ed5 commit dc88bf7
Show file tree
Hide file tree
Showing 5 changed files with 1,013 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pre-commit/action@v3.0.1
- uses: tox-dev/action-pre-commit-uv@v1
8 changes: 3 additions & 5 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ jobs:
pytest:
runs-on: ubuntu-latest
steps:
- name: Install uv
uses: astral-sh/setup-uv@v4
- uses: actions/checkout@v4
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: poetry install --with dev
- name: Run pytest
run: poetry run pytest .
run: uv run --all-extras pytest .
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Build and publish to PyPi
uses: JRubics/[email protected]
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: uv publish
80 changes: 39 additions & 41 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,45 +1,6 @@
[tool.poetry]
name = "riff"
version = "0.1.9.0"
description = "Run ruff, but only fail on modified lines."
authors = ["dorschw <[email protected]>"]
license = "MIT"
readme = "README.md"
exclude = ["riff/release", "riff/tests"]

[tool.poetry.urls]
"Homepage" = "https://github.com/dorschw/riff"
"Source" = "https://github.com/dorschw/riff"
"Bug Tracker" = "https://github.com/dorschw/riff/issues"

[tool.poetry.dependencies]
python = "^3.10"
typer = ">=0.7.0"
unidiff = "^0.7.5"
loguru = "^0.7.0"
gitpython = "^3.1.27"
packaging = "^23.2"


[tool.poetry.group.dev]
optional = true

[tool.poetry.group.dev.dependencies]
ruff = "^0.8.1"
pre-commit = "^4.0.0"
pytest = "^8.0.0"
ipykernel = "^6.25.1"
toml = "^0.10.2"
types-unidiff = "^0.7.0.20240505"
types-toml = "^0.10.8.20240310"
pytest-mock = "^3.14.0"

[tool.poetry.scripts]
riff = "riff.riff:app"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.ruff]
lint.select = ["ALL"]
Expand All @@ -62,3 +23,40 @@ line-length = 88

[tool.ruff.lint.flake8-tidy-imports.banned-api]
"loguru".msg = "use riff.logger instead"

[project]
name = "riff"
version = "0.1.9.0"
description = "Run ruff, but only fail on modified lines."
authors = [{"name"="dorschw", "email"="[email protected]"},]
license = "MIT"
readme = "README.md"
exclude = ["riff/release", "riff/tests"]
requires-python = ">=3.10"

dependencies = [
"gitpython == 3.1.43",
"loguru == 0.7.3",
"packaging == 23.2",
"typer == 0.15.1",
"unidiff == 0.7.5",
]
[project.scripts]
riff = "riff.riff:app"

[project.optional-dependencies]
dev = [
"ruff == 0.8.3",
"pre-commit == 4.0.1",
"pytest == 8.3.4",
"ipykernel == 6.29.5",
"toml == 0.10.2",
"types-unidiff == 0.7.0.20240505",
"types-toml == 0.10.8.20240310",
"pytest-mock == 3.14.0",
]

[project.urls]
"Homepage" = "https://github.com/dorschw/riff"
"Source" = "https://github.com/dorschw/riff"
"Bug Tracker" = "https://github.com/dorschw/riff/issues"
Loading

0 comments on commit dc88bf7

Please sign in to comment.