Skip to content

Commit

Permalink
🌿 Generate v3 SDK (using Fern) (#165)
Browse files Browse the repository at this point in the history
* SDK regeneration

* Update README.md

* copy custom code to prevent breaking changes

* 🌿 introduce sdk modifications

* fix client

* update snippets to use api_key

* use audio_native

* mark properties optional

* update enums

* add additional tests

* update readme and run all tests

* update README

* add test and clone back to README

* Remove CI skip for tests

* Add API key to ci.yaml

* Add ffmpeg to ci.yml

* Fix voice.from_id()

* Change back to Voice.from_id()

* fix files

* fix mypy checks

* dont use ffmpeg or ffplay in github

* fix

* dont play in github

* Adding beta to version

---------

Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Co-authored-by: Deep Singhvi <deep@buildwithfern.com>
Co-authored-by: dsinghvi <dsinghvi@umich.edu>
  • Loading branch information
4 people authored Feb 5, 2024
1 parent 18fceed commit cc3fa5e
Show file tree
Hide file tree
Showing 129 changed files with 6,930 additions and 1,264 deletions.
17 changes: 17 additions & 0 deletions .fernignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Specify files that shouldn't be modified by Fern

src/elevenlabs/__init__.py
src/elevenlabs/model.py
src/elevenlabs/client.py
src/elevenlabs/play.py
src/elevenlabs/tts.py
src/elevenlabs/voice.py
src/elevenlabs/generate.py
src/elevenlabs/clone.py
src/elevenlabs/resources/voices/client.py
.github/workflows/ci.yml

README.md
assets/

tests/
63 changes: 63 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: ci

on: [push]
jobs:
compile:
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
- name: Install dependencies
run: poetry install
- name: Compile
run: poetry run mypy .
test:
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
- name: Install dependencies
run: |
poetry install
- name: Test
run: poetry run pytest .
env:
ELEVEN_API_KEY: ${{ secrets.TEST_API_KEY }}

publish:
needs: [compile, test]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
- name: Install dependencies
run: poetry install
- name: Publish to pypi
run: |
poetry config repositories.remote https://upload.pypi.org/legacy/
poetry --no-interaction -v publish --build --repository remote --username "$PYPI_USERNAME" --password "$PYPI_PASSWORD"
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
39 changes: 0 additions & 39 deletions .github/workflows/python-publish.yml

This file was deleted.

11 changes: 4 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
__pycache__
.mypy_cache
.pytest_cache
.DS_Store
NOTES.md
test.py
*.ipynb
dist/
.mypy_cache/
__pycache__/
poetry.toml
41 changes: 0 additions & 41 deletions .pre-commit-config.yaml

This file was deleted.

Loading

0 comments on commit cc3fa5e

Please sign in to comment.