File tree Expand file tree Collapse file tree 10 files changed +1844
-148
lines changed Expand file tree Collapse file tree 10 files changed +1844
-148
lines changed Original file line number Diff line number Diff line change 29
29
30
30
steps :
31
31
- uses : actions/checkout@v4
32
- - uses : eifinger /setup-rye@v2
32
+ - uses : astral-sh /setup-uv@v5
33
33
with :
34
34
enable-cache : true
35
35
41
41
42
42
- name : Lint
43
43
run : ./script/lint
44
-
44
+
Original file line number Diff line number Diff line change @@ -86,8 +86,8 @@ git interpret-trailers --if-exists doNothing --trailer \
86
86
87
87
## Development
88
88
89
- The Python project is managed using [ ` rye ` ] ( https://rye .astral.sh ) .
90
- Run the setup script to install Rye and install the project's dependencies.
89
+ The Python project is managed using [ ` uv ` ] ( https://uv .astral.sh ) .
90
+ Run the setup script to install uv and install the project's dependencies.
91
91
92
92
``` console
93
93
./script/setup
Original file line number Diff line number Diff line change @@ -21,16 +21,16 @@ dependencies = [
21
21
homepage = " https://replicate.com"
22
22
repository = " https://github.com/replicate/replicate-python"
23
23
24
- [tool ]
25
- rye = { dev-dependencies = [
24
+ [tool . uv ]
25
+ dev-dependencies = [
26
26
" pytest>=8.1.1" ,
27
27
" pylint>=3.1.0" ,
28
28
" pyright>=1.1.358" ,
29
29
" pytest-asyncio>=0.23.6" ,
30
30
" pytest-recording>=0.13.1" ,
31
31
" respx>=0.21.1" ,
32
32
" ruff>=0.3.7" ,
33
- ] }
33
+ ]
34
34
35
35
[tool .pytest .ini_options ]
36
36
asyncio_mode = " auto"
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2
2
3
3
set -e
4
4
5
- exec rye fmt .
5
+ exec uv run -- ruff format " $@ "
Original file line number Diff line number Diff line change 5
5
STATUS=0
6
6
7
7
echo " Running pyright"
8
- rye run pyright replicate || STATUS=$?
8
+ uv run pyright replicate || STATUS=$?
9
9
echo " "
10
10
11
11
echo " Running pylint"
12
- rye run pylint --exit-zero replicate || STATUS=$?
12
+ uv run pylint --exit-zero replicate || STATUS=$?
13
13
echo " "
14
14
15
- echo " Running rye lint "
16
- rye lint . || STATUS=$?
15
+ echo " Running ruff check "
16
+ uv run ruff check . || STATUS=$?
17
17
echo " "
18
18
19
- echo " Running rye fmt --check"
20
- rye fmt --check || STATUS=$?
19
+ echo " Running ruff format --check"
20
+ uv run ruff format --check || STATUS=$?
21
21
echo " "
22
22
23
23
exit $STATUS
Original file line number Diff line number Diff line change 2
2
3
3
set -eu
4
4
5
- : " ${RYE_INSTALL_OPTION := ' --yes' } "
6
- : " ${RYE_VERSION := ' latest' } "
5
+ : " ${UV_INSTALL_OPTION := ' --yes' } "
6
+ : " ${UV_VERSION := ' latest' } "
7
7
8
- if ! command -v rye > /dev/null 2>&1
8
+ if ! command -v uv > /dev/null 2>&1
9
9
then
10
- echo " rye is not installed."
11
- printf " Do you want to install rye ? (y/n) "
10
+ echo " uv is not installed."
11
+ printf " Do you want to install uv ? (y/n) "
12
12
read -r REPLY
13
13
echo # move to a new line
14
14
case " $REPLY " in
15
15
[yY])
16
- echo " Installing rye ..."
17
- curl -sSf https://rye. astral.sh/get | sh
16
+ echo " Installing uv ..."
17
+ curl -LsSf https://astral.sh/uv/install.sh | sh
18
18
echo " rye has been successfully installed."
19
19
;;
20
20
* )
21
21
exit 1
22
22
;;
23
23
esac
24
24
else
25
- echo " rye is already installed."
25
+ echo " uv is already installed."
26
26
fi
27
27
28
- exec rye sync
28
+ exec uv sync
Original file line number Diff line number Diff line change 2
2
3
3
set -e
4
4
5
- exec rye test -v
5
+ exec uv run -- pytest -v " $@ "
You can’t perform that action at this time.
0 commit comments