File tree Expand file tree Collapse file tree 13 files changed +2501
-3102
lines changed Expand file tree Collapse file tree 13 files changed +2501
-3102
lines changed Original file line number Diff line number Diff line change 10
10
runs-on : ubuntu-latest
11
11
steps :
12
12
- name : Checkout
13
- uses : actions/checkout@v1
13
+ uses : actions/checkout@v4
14
14
- name : Release
15
15
uses : softprops/action-gh-release@v1
16
16
with :
@@ -19,18 +19,10 @@ jobs:
19
19
publish-pypi :
20
20
runs-on : ubuntu-latest
21
21
steps :
22
- - uses : actions/checkout@v3
23
- - uses : actions/setup-python@v4
24
- with :
25
- python-version : " 3.9"
26
- - name : Run image
27
-
28
- with :
29
- poetry-version : 1.2.0
30
-
31
- - name : Publish
32
- env :
33
- PYPI_TOKEN : ${{ secrets.PYPI_TOKEN }}
34
- run : |
35
- poetry config pypi-token.pypi $PYPI_TOKEN
36
- poetry publish --build
22
+ - uses : actions/checkout@v4
23
+ - name : Set up uv
24
+ run : curl -LsSf https://astral.sh/uv/install.sh | sh
25
+ - name : Build dist
26
+ run : uvx --from build pyproject-build --installer uv
27
+ - name : Publish package distributions to PyPI
28
+ uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change @@ -41,38 +41,31 @@ jobs:
41
41
python-version : ${{ matrix.python-version }}
42
42
architecture : x64
43
43
44
- - name : Install poetry
45
-
44
+ - name : Set up uv
45
+ run : curl -LsSf https://astral.sh/uv/install.sh | sh
46
+ - name : Restore uv cache
47
+ uses : actions/cache@v4
46
48
with :
47
- poetry-version : 1.2.2
48
-
49
- - name : Set up cache
50
- uses : actions/cache@v3
51
- with :
52
- path : ~/.cache/pypoetry/virtualenvs
53
- key : venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
49
+ path : /tmp/.uv-cache
50
+ key : uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
54
51
restore-keys : |
55
- ${{ runner.os }}-poetry-
52
+ uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
53
+ uv-${{ runner.os }}
56
54
57
55
- name : Install dependencies
58
- run : poetry install -E parse
59
-
60
- - name : Install snowflake
61
- if : ${{ matrix.sqlalchemy-version == '1.4.0' && matrix.python-version != '3.8.0' }}
62
- run : |
63
- poetry run pip install 'snowflake-sqlalchemy'
56
+ run : make install
64
57
65
58
- name : Install specific sqlalchemy version
66
59
run : |
67
- poetry run pip install 'sqlalchemy~=${{ matrix.sqlalchemy-version }}'
60
+ uv pip install 'sqlalchemy~=${{ matrix.sqlalchemy-version }}'
68
61
69
62
- if : ${{ matrix.sqlalchemy-version == '1.4.0' }}
70
- run : poetry run make lint
63
+ run : make lint
71
64
72
65
- env :
73
66
PMR_POSTGRES_DRIVERNAME : ${{ matrix.postgres-drivername }}
74
67
SQLALCHEMY_WARN_20 : 1
75
- run : poetry run make test
68
+ run : make test
76
69
77
70
- name : Store test result artifacts
78
71
uses : actions/upload-artifact@v3
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ version: 2
3
3
build :
4
4
os : ubuntu-20.04
5
5
tools :
6
- python : " 3.9 "
6
+ python : " 3.10 "
7
7
8
8
python :
9
9
install :
Original file line number Diff line number Diff line change 1
- .PHONY : install build test lint format
1
+ .PHONY : install test lint format
2
2
.DEFAULT_GOAL := help
3
3
4
4
WORKER_COUNT ?= 4
5
5
6
6
install :
7
- poetry install -E parse -E alembic
8
-
9
- build :
10
- poetry build
7
+ uv sync --all-extras
11
8
12
9
test :
13
10
SQLALCHEMY_WARN_20=1 \
14
11
COVERAGE_PROCESS_START=" $( PWD) /pyproject.toml" \
12
+ uv run \
15
13
coverage run -m pytest -n $(WORKER_COUNT ) -vv src tests
16
- coverage combine
17
- coverage report -i
18
- coverage xml
14
+ uv run coverage combine
15
+ uv run coverage report -i
16
+ uv run coverage xml
19
17
20
18
lint :
21
- ruff check --fix src tests || exit 1
22
- ruff format -q src tests || exit 1
23
- mypy src tests || exit 1
24
- ruff format --check src tests
19
+ uv run ruff check --fix src tests || exit 1
20
+ uv run ruff format -q src tests || exit 1
21
+ uv run mypy src tests || exit 1
22
+ uv run ruff format --check src tests
25
23
26
24
format :
27
- ruff check src tests --fix
28
- ruff format src tests
25
+ uv run ruff check src tests --fix
26
+ uv run ruff format src tests
Original file line number Diff line number Diff line change @@ -10,14 +10,14 @@ BUILDDIR = build
10
10
11
11
# Put it first so that "make" without argument is like "make help".
12
12
help :
13
- @$(SPHINXBUILD ) -M help " $( SOURCEDIR) " " $( BUILDDIR) " $(SPHINXOPTS ) $(O )
13
+ @uv run $(SPHINXBUILD ) -M help " $( SOURCEDIR) " " $( BUILDDIR) " $(SPHINXOPTS ) $(O )
14
14
15
- .PHONY : help Makefile
15
+ .PHONY : help Makefile autobuild
16
16
17
17
# Catch-all target: route all unknown targets to Sphinx using the new
18
18
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
19
% : Makefile
20
- @$(SPHINXBUILD ) -M $@ " $( SOURCEDIR) " " $( BUILDDIR) " $(SPHINXOPTS ) $(O )
20
+ @uv run $(SPHINXBUILD ) -M $@ " $( SOURCEDIR) " " $( BUILDDIR) " $(SPHINXOPTS ) $(O )
21
21
22
22
autobuild :
23
- sphinx-autobuild source build/html
23
+ uv run --with sphinx-autobuild sphinx-autobuild source build/html
You can’t perform that action at this time.
0 commit comments