Skip to content

Commit

Permalink
Replace poetry with uv
Browse files Browse the repository at this point in the history
  • Loading branch information
iurisilvio committed Feb 24, 2024
1 parent 8a6a5a3 commit e408d5d
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 23 deletions.
1 change: 0 additions & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ jobs:
- name: Build and publish to pypi
uses: JRubics/poetry-publish@v1.15
with:
plugins: poetry_dynamic_versioning[plugin]
pypi_token: ${{ secrets.PYPI_API_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
__pycache__/
.tox/
*.egg-info/

.coverage
coverage*.xml
Expand Down
38 changes: 19 additions & 19 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,38 +1,36 @@
[tool.poetry]
[project]
name = "pytest-ruff"
version = "0.0.0"
description = "pytest plugin to check ruff requirements."
authors = ["Iuri de Silvio <iurisilvio@gmail.com>"]
authors = [{"name" = "Iuri de Silvio", "email" = "iurisilvio@gmail.com"}]
readme = "README.md"
classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Operating System :: OS Independent", "Framework :: Pytest", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Libraries :: Python Modules"]
dynamic = ["version"]
dependencies = [
"ruff>=0.0.242"
]

[tool.poetry.urls]
[project.urls]
Homepage = "https://github.com/businho/pytest-ruff"

[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"
requires = ["setuptools", "setuptools_scm"]
build-backend = "setuptools.build_meta"

[tool.poetry.dependencies]
python = "^3.8"
ruff = ">=0.0.242"

[tool.poetry.group.dev.dependencies]
pytest = "^7.2.0"
pytest-mock = "^3.10.0"
pytest-cov = "^4.1.0"

[tool.poetry-dynamic-versioning]
enable = true
[project.optional-dependencies]
test = [
"pytest>=7.2.0",
"pytest-mock>=3.10.0",
"pytest-cov>=4.1.0",
]

[tool.pytest.ini_options]
addopts = "--capture=no --cov --cov-report term --cov-report xml"

[tool.ruff]
line-length = 88

[tool.poetry.plugins]
pytest11 = { ruff = "pytest_ruff" }
[pytest11]
ruff = "pytest_ruff"

[tool.coverage.run]
branch = true
Expand All @@ -41,3 +39,5 @@ branch = true
precision = 2
show_missing = true
skip_covered = true

[tool.setuptools_scm]
23 changes: 23 additions & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This file was autogenerated by uv via the following command:
# uv pip compile pyproject.toml --extra test
coverage==7.4.3
# via pytest-cov
exceptiongroup==1.2.0
# via pytest
iniconfig==2.0.0
# via pytest
packaging==23.2
# via pytest
pluggy==1.4.0
# via pytest
pytest==8.0.1
# via
# pytest-cov
# pytest-mock
pytest-cov==4.1.0
pytest-mock==3.12.0
ruff==0.2.2
tomli==2.0.1
# via
# coverage
# pytest
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This file was autogenerated by uv via the following command:
# uv pip compile pyproject.toml
ruff==0.2.2
10 changes: 7 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ isolated_build = true
envlist = py{38,39,310,311,312}

[testenv]
allowlist_externals = poetry
allowlist_externals =
pip
pytest
uv
commands =
poetry install --no-root --with dev
poetry run pytest -vvv {posargs}
pip install uv
uv pip install -r requirements-test.txt
pytest -vvv {posargs}

[testenv:lint]
description = lint source code
Expand Down

0 comments on commit e408d5d

Please sign in to comment.