Skip to content

Commit 4c613d3

Browse files
committed
Use uv instead of poetry
1 parent 5767280 commit 4c613d3

File tree

14 files changed

+145
-3064
lines changed

14 files changed

+145
-3064
lines changed

.github/workflows/benchmark.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
1717

18-
- name: Set up Python 3.12
19-
uses: actions/setup-python@v5
18+
- name: Set up Python 3.13
19+
uses: actions/setup-python@v6
2020
id: setup-python
2121
with:
22-
python-version: "3.12"
22+
python-version: "3.13"
2323
architecture: x64
2424

25-
- name: Install with poetry
25+
- name: Install tox
2626
run: |
27-
pipx install poetry
28-
poetry env use 3.12
29-
poetry install --with test
27+
python -m pip install --upgrade pip
28+
python -m pip install tox tox-uv uv
3029
3130
- name: Run benchmarks with CodSpeed
32-
uses: CodSpeedHQ/action@v3
31+
uses: CodSpeedHQ/action@v4
3332
with:
33+
mode: instrumentation
3434
token: ${{ secrets.CODSPEED_TOKEN }}
35-
run: poetry run pytest tests --benchmark-enable --codspeed
35+
run: tox -e py313 -- -k benchmarks --benchmark-enable --codspeed

.github/workflows/lint.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ jobs:
88
runs-on: ubuntu-latest
99

1010
steps:
11-
- uses: actions/checkout@v4
11+
- uses: actions/checkout@v5
1212

13-
- name: Set up Python 3.12
14-
uses: actions/setup-python@v5
13+
- name: Set up Python 3.13
14+
uses: actions/setup-python@v6
1515
with:
16-
python-version: '3.12'
16+
python-version: '3.13'
1717

18-
- name: Install dependencies
18+
- name: Install tox
1919
run: |
2020
python -m pip install --upgrade pip
21-
pip install tox
21+
python -m pip install tox uv tox-uv
2222
2323
- name: Run code quality tests with tox
2424
run: tox

.github/workflows/publish.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,18 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v5
1515

16-
- name: Set up Python 3.12
17-
uses: actions/setup-python@v5
16+
- name: Set up Python 3.13
17+
uses: actions/setup-python@v6
1818
with:
19-
python-version: '3.12'
19+
python-version: '3.13'
2020

21-
- name: Build wheel and source tarball
21+
- name: Build wheel and source tarball with uv_build
2222
run: |
23-
pip install poetry
24-
poetry build
23+
python -m pip install --upgrade pip
24+
python -m pip install uv_build
25+
python -m uv_build build
2526
- name: Publish a Python distribution to PyPI
2627
uses: pypa/gh-action-pypi-publish@release/v1
2728
with:

.github/workflows/test.yml

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,16 @@ jobs:
1212
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', 'pypy3.9', 'pypy3.10']
1313

1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v5
1616

1717
- name: Set up Python ${{ matrix.python-version }}
18-
uses: actions/setup-python@v5
18+
uses: actions/setup-python@v6
1919
with:
2020
python-version: ${{ matrix.python-version }}
2121

22-
- name: Install dependencies
22+
- name: Install tox and plugins
2323
run: |
24-
python -m pip install --upgrade pip
25-
pip install "tox>=4.24,<5" "tox-gh-actions>=3.2,<4"
24+
python -m pip install tox tox-gh-actions tox-uv uv
2625
2726
- name: Run unit tests with tox
2827
run: tox
@@ -36,17 +35,24 @@ jobs:
3635
python-version: ['3.7', '3.8']
3736

3837
steps:
39-
- uses: actions/checkout@v4
38+
- uses: actions/checkout@v5
4039

41-
- name: Set up Python ${{ matrix.python-version }}
42-
uses: actions/setup-python@v5
40+
- name: Set up Python 3.13 (tox runner)
41+
uses: actions/setup-python@v6
4342
with:
44-
python-version: ${{ matrix.python-version }}
43+
python-version: '3.13'
4544

46-
- name: Install dependencies
45+
- name: Install tox and plugins (with Python 3.13)
4746
run: |
48-
python -m pip install --upgrade pip
49-
pip install "tox>=3.28,<5" "tox-gh-actions>=3.2,<4"
47+
python3.13 -m pip install tox tox-gh-actions tox-uv uv
5048
51-
- name: Run unit tests with tox
52-
run: tox
49+
- name: Set up target Python ${{ matrix.python-version }}
50+
uses: actions/setup-python@v6
51+
with:
52+
python-version: ${{ matrix.python-version }}
53+
54+
- name: Run unit tests with tox for target
55+
shell: bash
56+
run: |
57+
ENV="py${{ matrix.python-version }}"; ENV=${ENV/./}
58+
python3.13 -m tox -e "$ENV"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ __pycache__/
2424
*.cover
2525
*.egg
2626
*.egg-info
27+
*.lock
2728
*.log
2829
*.py[cod]

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,9 @@ GraphQL-core 3 can be installed from PyPI using the built-in pip command:
5959

6060
python -m pip install graphql-core
6161

62-
You can also use [poetry](https://github.com/python-poetry/poetry) for installation in a
63-
virtual environment:
62+
Or, if you prefer [uv](https://github.com/astral-sh/uv):
6463

65-
poetry install
64+
uv pip install graphql-core
6665

6766

6867
## Usage

docs/conf.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
# add these directories to sys.path here. If the directory is relative to the
1616
# documentation root, use os.path.abspath to make it absolute, like shown here.
1717
#
18-
# import os
19-
# import sys
20-
# sys.path.insert(0, os.path.abspath('.'))
18+
import os
19+
import sys
20+
21+
# Make src layout importable without installation
22+
sys.path.insert(0, os.path.abspath("../src"))
2123

2224
# -- General configuration ------------------------------------------------
2325

docs/intro.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ You can install GraphQL-core 3 using pip_::
3333

3434
pip install graphql-core
3535

36-
You can also install GraphQL-core 3 with poetry_, if you prefer that::
36+
You can also install GraphQL-core 3 with uv_, if you prefer that::
3737

38-
poetry install
38+
uv pip install graphql-core
3939

4040
Now you can start using GraphQL-core 3 by importing from the top-level
4141
:mod:`graphql` package. Nearly everything defined in the sub-packages
@@ -94,4 +94,4 @@ in the current development or want to report issues or send pull requests.
9494
.. _Execution: https://facebook.github.io/graphql/draft/#sec-Execution
9595
.. _Response: https://facebook.github.io/graphql/draft/#sec-Response
9696
.. _pip: https://pip.pypa.io/
97-
.. _poetry: https://github.com/python-poetry/poetry
97+
.. _uv: https://github.com/astral-sh/uv

0 commit comments

Comments
 (0)