Skip to content

Commit cd0a319

Browse files
authored
UV packaging (#33)
1 parent 5033f08 commit cd0a319

File tree

5 files changed

+408
-47
lines changed

5 files changed

+408
-47
lines changed

.github/workflows/check.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,22 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- uses: actions/checkout@v3
9+
- name: Install uv
10+
uses: astral-sh/setup-uv@v3
11+
912
- name: Install Python (3.11)
10-
uses: actions/setup-python@v4
13+
uses: actions/setup-python@v5
1114
with:
1215
python-version: 3.11
13-
- name: Install poetry
14-
uses: snok/install-poetry@v1
15-
with:
16-
version: 1.7.1
17-
virtualenvs-create: true
18-
virtualenvs-in-project: true
19-
- name: Install dependencies
20-
run: poetry install --no-root
16+
17+
- name: Install the project
18+
run: uv sync --all-extras --dev --no-install-project
19+
2120
- name: Ruff check
22-
run: poetry run ruff check --diff
21+
run: uv run ruff check --diff
22+
2323
- name: Ruff format
24-
run: poetry run ruff format --diff
24+
run: uv run ruff format --diff
25+
2526
- name: Mypy
26-
run: poetry run mypy .
27+
run: uv run mypy .

.github/workflows/ci.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,24 @@ jobs:
88
matrix:
99
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
1010
steps:
11-
- uses: actions/checkout@v3
11+
- uses: actions/checkout@v4
12+
13+
- name: Install uv
14+
uses: astral-sh/setup-uv@v3
15+
1216
- name: Install Python ${{ matrix.python-version }}
13-
uses: actions/setup-python@v4
17+
uses: actions/setup-python@v5
1418
with:
1519
python-version: ${{ matrix.python-version }}
16-
- name: Install poetry
17-
uses: snok/install-poetry@v1
18-
with:
19-
version: 1.7.1
20-
virtualenvs-create: true
21-
virtualenvs-in-project: true
22-
- name: Install packages
23-
run: poetry install
20+
21+
- name: Install the project
22+
run: uv sync --all-extras --dev
23+
2424
- name: Run tests with pytest
25-
run: poetry run pytest
25+
run: uv run pytest
26+
2627
- name: Downgrade to pytest 7
27-
run: poetry run pip install pytest==7.4.4
28+
run: uv pip install "pytest<8"
29+
2830
- name: Run tests with pytest 7
29-
run: poetry run pytest
31+
run: uv run pytest

pyproject.toml

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,34 @@
1-
[tool.poetry]
1+
[project]
22
name = "pytest-markdown-docs"
3-
version = "0.5.1"
3+
version = "0.6.0"
44
description = "Run markdown code fences through pytest"
55
readme = "README.md"
6-
authors = ["Modal Labs", "Elias Freider <[email protected]>"]
6+
authors = [
7+
{ name = "Modal Labs"},
8+
{ name = "Elias Freider", email = "[email protected]" }
9+
]
710
license = "MIT"
8-
classifiers = ["Framework :: Pytest"]
9-
repository = "https://github.com/modal-com/pytest-markdown-docs"
11+
requires-python = ">=3.8"
12+
dependencies = [
13+
"markdown-it-py>=2.2.0,<4.0",
14+
"pytest>=7.0.0",
15+
]
1016
include = ["LICENSE"]
1117

12-
[tool.poetry.dependencies]
13-
python = "^3.8"
14-
markdown-it-py = ">=2.2.0, <4.0"
15-
pytest = ">=7.0.0"
16-
17-
[tool.poetry.plugins]
18+
[project.entry-points.pytest11]
19+
pytest_markdown_docs = "pytest_markdown_docs.plugin"
1820

19-
[tool.poetry.plugins."pytest11"]
20-
"pytest_markdown_docs" = "pytest_markdown_docs.plugin"
21+
[build-system]
22+
requires = ["hatchling"]
23+
build-backend = "hatchling.build"
2124

22-
[tool.poetry.group.dev.dependencies]
23-
ruff = "^0.2.1"
24-
mypy = "^1.8"
25-
pre-commit = [
26-
{version="*", python=">=3.9.0"} # pre-commit only available for Python >= 3.9
25+
[tool.uv]
26+
package=true
27+
dev-dependencies = [
28+
"mypy>=1.12.1",
29+
"pre-commit>=3.5.0",
30+
"pytest~=8.1.0",
31+
"ruff>=0.7.0",
2732
]
28-
pytest = "^8.1.0"
2933

30-
[build-system]
31-
requires = ["poetry-core>=1.1.0"]
32-
build-backend = "poetry.core.masonry.api"
34+

src/pytest_markdown_docs/py.typed

Whitespace-only changes.

0 commit comments

Comments
 (0)