forked from phoenix/litellm-mirror
better pyproject.toml
This commit is contained in:
parent
a36851620f
commit
7bd1395e68
4 changed files with 3 additions and 82 deletions
BIN
.DS_Store
vendored
BIN
.DS_Store
vendored
Binary file not shown.
|
@ -43,8 +43,8 @@ jobs:
|
||||||
- run:
|
- run:
|
||||||
name: PyPI publish
|
name: PyPI publish
|
||||||
command: |
|
command: |
|
||||||
if [ -n "$(git diff --name-only $CIRCLE_SHA1^..$CIRCLE_SHA1 | grep 'setup.py')" ]; then
|
if [ -n "$(git diff --name-only $CIRCLE_SHA1^..$CIRCLE_SHA1 | grep 'pyproject.toml')" ]; then
|
||||||
echo "setup.py modified"
|
echo "pyproject.toml modified"
|
||||||
echo -e "[pypi]\nusername = __token__\npassword = $PYPI_API_TOKEN" > ~/.pypirc
|
echo -e "[pypi]\nusername = __token__\npassword = $PYPI_API_TOKEN" > ~/.pypirc
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install build
|
pip install build
|
||||||
|
@ -60,7 +60,7 @@ jobs:
|
||||||
ls dist/
|
ls dist/
|
||||||
twine upload --verbose dist/*
|
twine upload --verbose dist/*
|
||||||
else
|
else
|
||||||
echo "No changes to setup.py. Skipping PyPI publish."
|
echo "No changes to pyproject.toml. Skipping PyPI publish."
|
||||||
circleci step halt
|
circleci step halt
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
35
.github/workflows/publish_pypi.yml
vendored
35
.github/workflows/publish_pypi.yml
vendored
|
@ -1,35 +0,0 @@
|
||||||
name: Publish to PyPI
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main # You can change this to the branch you want to publish from
|
|
||||||
paths:
|
|
||||||
- 'setup.py'
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: 3.8 # You can change this to the Python version required for your package
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install twine
|
|
||||||
pip install wheel
|
|
||||||
pip install --upgrade setuptools
|
|
||||||
|
|
||||||
- name: Build package
|
|
||||||
run: python setup.py sdist bdist_wheel
|
|
||||||
|
|
||||||
- name: Upload to PyPI
|
|
||||||
env:
|
|
||||||
TWINE_USERNAME: __token__
|
|
||||||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
|
||||||
run: twine upload dist/*
|
|
44
.github/workflows/tests.yml
vendored
44
.github/workflows/tests.yml
vendored
|
@ -1,44 +0,0 @@
|
||||||
name: liteLLM Dev Tests
|
|
||||||
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
env:
|
|
||||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
||||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
||||||
AZURE_API_BASE: ${{ secrets.AZURE_API_BASE }}
|
|
||||||
AZURE_API_VERSION: ${{ secrets.AZURE_API_VERSION }}
|
|
||||||
AZURE_API_KEY: ${{ secrets.AZURE_API_KEY }}
|
|
||||||
REPLICATE_API_TOKEN: ${{ secrets.REPLICATE_API_TOKEN }}
|
|
||||||
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
|
|
||||||
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
|
|
||||||
POSTHOG_API_URL: ${{ secrets.POSTHOG_API_URL }}
|
|
||||||
SLACK_API_TOKEN: ${{ secrets.SLACK_API_TOKEN }}
|
|
||||||
SLACK_API_SECRET: ${{ secrets.SLACK_API_SECRET }}
|
|
||||||
SLACK_API_CHANNEL: ${{ secrets.SLACK_API_CHANNEL }}
|
|
||||||
SENTRY_API_URL: ${{ secrets.SENTRY_API_URL }}
|
|
||||||
SENTRY_API_TRACE_RATE: ${{ secrets.SENTRY_API_TRACE_RATE }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
name: Run Tests
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: 3.8 # Replace 'x' with the desired version (e.g., 3.6, 3.7, 3.8)
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pip install -r requirements.txt
|
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
run: pytest litellm/tests
|
|
||||||
|
|
||||||
- name: Upload coverage reports to Codecov
|
|
||||||
uses: codecov/codecov-action@v3
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
Loading…
Add table
Add a link
Reference in a new issue