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 2929
3030 steps :
3131 - uses : actions/checkout@v4
32- - uses : eifinger /setup-rye@v2
32+ - uses : astral-sh /setup-uv@v5
3333 with :
3434 enable-cache : true
3535
4141
4242 - name : Lint
4343 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 \
8686
8787## Development
8888
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.
9191
9292``` console
9393./script/setup
Original file line number Diff line number Diff line change @@ -21,16 +21,16 @@ dependencies = [
2121homepage = " https://replicate.com"
2222repository = " https://github.com/replicate/replicate-python"
2323
24- [tool ]
25- rye = { dev-dependencies = [
24+ [tool . uv ]
25+ dev-dependencies = [
2626 " pytest>=8.1.1" ,
2727 " pylint>=3.1.0" ,
2828 " pyright>=1.1.358" ,
2929 " pytest-asyncio>=0.23.6" ,
3030 " pytest-recording>=0.13.1" ,
3131 " respx>=0.21.1" ,
3232 " ruff>=0.3.7" ,
33- ] }
33+ ]
3434
3535[tool .pytest .ini_options ]
3636asyncio_mode = " auto"
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22
33set -e
44
5- exec rye fmt .
5+ exec uv run -- ruff format " $@ "
Original file line number Diff line number Diff line change 55STATUS=0
66
77echo " Running pyright"
8- rye run pyright replicate || STATUS=$?
8+ uv run pyright replicate || STATUS=$?
99echo " "
1010
1111echo " Running pylint"
12- rye run pylint --exit-zero replicate || STATUS=$?
12+ uv run pylint --exit-zero replicate || STATUS=$?
1313echo " "
1414
15- echo " Running rye lint "
16- rye lint . || STATUS=$?
15+ echo " Running ruff check "
16+ uv run ruff check . || STATUS=$?
1717echo " "
1818
19- echo " Running rye fmt --check"
20- rye fmt --check || STATUS=$?
19+ echo " Running ruff format --check"
20+ uv run ruff format --check || STATUS=$?
2121echo " "
2222
2323exit $STATUS
Original file line number Diff line number Diff line change 22
33set -eu
44
5- : " ${RYE_INSTALL_OPTION := ' --yes' } "
6- : " ${RYE_VERSION := ' latest' } "
5+ : " ${UV_INSTALL_OPTION := ' --yes' } "
6+ : " ${UV_VERSION := ' latest' } "
77
8- if ! command -v rye > /dev/null 2>&1
8+ if ! command -v uv > /dev/null 2>&1
99then
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) "
1212 read -r REPLY
1313 echo # move to a new line
1414 case " $REPLY " in
1515 [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
1818 echo " rye has been successfully installed."
1919 ;;
2020 * )
2121 exit 1
2222 ;;
2323 esac
2424else
25- echo " rye is already installed."
25+ echo " uv is already installed."
2626fi
2727
28- exec rye sync
28+ exec uv sync
Original file line number Diff line number Diff line change 22
33set -e
44
5- exec rye test -v
5+ exec uv run -- pytest -v " $@ "
You can’t perform that action at this time.
0 commit comments