-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use rye for package management (#284)
Alternative to #283 --------- Signed-off-by: Mattt Zmuda <mattt@replicate.com>
- Loading branch information
Showing
13 changed files
with
173 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.12.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
from importlib.metadata import version | ||
|
||
__version__ = version(__package__) | ||
__version__ = version(__package__ if __package__ is not None else "replicate") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# generated by rye | ||
# use `rye lock` or `rye sync` to update this lockfile | ||
# | ||
# last locked with the following flags: | ||
# pre: false | ||
# features: [] | ||
# all-features: false | ||
# with-sources: false | ||
|
||
-e file:. | ||
annotated-types==0.6.0 | ||
# via pydantic | ||
anyio==4.3.0 | ||
# via httpx | ||
astroid==3.1.0 | ||
# via pylint | ||
certifi==2024.2.2 | ||
# via httpcore | ||
# via httpx | ||
dill==0.3.8 | ||
# via pylint | ||
h11==0.14.0 | ||
# via httpcore | ||
httpcore==1.0.5 | ||
# via httpx | ||
httpx==0.27.0 | ||
# via replicate | ||
# via respx | ||
idna==3.7 | ||
# via anyio | ||
# via httpx | ||
# via yarl | ||
iniconfig==2.0.0 | ||
# via pytest | ||
isort==5.13.2 | ||
# via pylint | ||
mccabe==0.7.0 | ||
# via pylint | ||
multidict==6.0.5 | ||
# via yarl | ||
nodeenv==1.8.0 | ||
# via pyright | ||
packaging==24.0 | ||
# via pytest | ||
# via replicate | ||
platformdirs==4.2.0 | ||
# via pylint | ||
pluggy==1.4.0 | ||
# via pytest | ||
pydantic==2.7.0 | ||
# via replicate | ||
pydantic-core==2.18.1 | ||
# via pydantic | ||
pylint==3.1.0 | ||
pyright==1.1.358 | ||
pytest==8.1.1 | ||
# via pytest-asyncio | ||
# via pytest-recording | ||
pytest-asyncio==0.23.6 | ||
pytest-recording==0.13.1 | ||
pyyaml==6.0.1 | ||
# via vcrpy | ||
respx==0.21.1 | ||
ruff==0.3.7 | ||
setuptools==69.2.0 | ||
# via nodeenv | ||
sniffio==1.3.1 | ||
# via anyio | ||
# via httpx | ||
tomlkit==0.12.4 | ||
# via pylint | ||
typing-extensions==4.11.0 | ||
# via pydantic | ||
# via pydantic-core | ||
# via replicate | ||
vcrpy==6.0.1 | ||
# via pytest-recording | ||
wrapt==1.16.0 | ||
# via vcrpy | ||
yarl==1.9.4 | ||
# via vcrpy |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# generated by rye | ||
# use `rye lock` or `rye sync` to update this lockfile | ||
# | ||
# last locked with the following flags: | ||
# pre: false | ||
# features: [] | ||
# all-features: false | ||
# with-sources: false | ||
|
||
-e file:. | ||
annotated-types==0.6.0 | ||
# via pydantic | ||
anyio==4.3.0 | ||
# via httpx | ||
certifi==2024.2.2 | ||
# via httpcore | ||
# via httpx | ||
h11==0.14.0 | ||
# via httpcore | ||
httpcore==1.0.5 | ||
# via httpx | ||
httpx==0.27.0 | ||
# via replicate | ||
idna==3.7 | ||
# via anyio | ||
# via httpx | ||
packaging==24.0 | ||
# via replicate | ||
pydantic==2.7.0 | ||
# via replicate | ||
pydantic-core==2.18.1 | ||
# via pydantic | ||
sniffio==1.3.1 | ||
# via anyio | ||
# via httpx | ||
typing-extensions==4.11.0 | ||
# via pydantic | ||
# via pydantic-core | ||
# via replicate |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/bash | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
python -m ruff format . | ||
exec rye fmt . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,28 @@ | ||
#!/bin/bash | ||
#!/bin/sh | ||
|
||
set -e | ||
set -eu | ||
|
||
python -m pip install -r requirements.txt -r requirements-dev.txt . | ||
: "${RYE_INSTALL_OPTION:='--yes'}" | ||
: "${RYE_VERSION:='latest'}" | ||
|
||
if ! command -v rye > /dev/null 2>&1 | ||
then | ||
echo "rye is not installed." | ||
printf "Do you want to install rye? (y/n) " | ||
read -r REPLY | ||
echo # move to a new line | ||
case "$REPLY" in | ||
[yY]) | ||
echo "Installing rye..." | ||
curl -sSf https://rye-up.com/get | sh | ||
echo "rye has been successfully installed." | ||
;; | ||
*) | ||
exit 1 | ||
;; | ||
esac | ||
else | ||
echo "rye is already installed." | ||
fi | ||
|
||
exec rye sync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/bash | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
python -m pytest -v | ||
exec rye test -v |