-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ccd62eb
Showing
33 changed files
with
4,035 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: GitHub Actions CICD Testing Pipeline | ||
run-name: ${{ github.actor }} pushed to ${{ github.ref }} | ||
on: [push] | ||
jobs: | ||
run-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Pythonc | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Install Local Version of synth_sdk | ||
run: | | ||
pip install -e . | ||
- name: Find Tests | ||
id: find_tests | ||
run: | | ||
# Find all files in the 'testing' directory and join them into a space-separated string | ||
# NOTE: Only run pytests on files that end with '_test.py' | ||
TEST_SCRIPTS=$(find testing -type f -name '*_test.py' -print | tr '\n' ' ') | ||
echo "Found test scripts: $TEST_SCRIPTS" | ||
echo "TEST_SCRIPTS=$TEST_SCRIPTS" >> $GITHUB_ENV | ||
env: | ||
SYNTH_API_KEY: ${{ secrets.SYNTH_API_KEY }} | ||
MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }} | ||
MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
DUMMY_SECRET: ${{ secrets.DUMMY_SECRET }} | ||
- name: Run Tests | ||
run: | | ||
# Execute test scripts listed in the TEST_SCRIPTS variable | ||
echo "Running tests: $TEST_SCRIPTS" | ||
for script in $TEST_SCRIPTS; do | ||
echo "Running test $script" | ||
pytest --log-level=WARNING $script | ||
done | ||
env: | ||
SYNTH_API_KEY: ${{ secrets.SYNTH_API_KEY }} | ||
MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }} | ||
MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
DUMMY_SECRET: ${{ secrets.DUMMY_SECRET }} | ||
|
||
|
||
|
||
|
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,165 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
cover/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
.pybuilder/ | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
# For a library or package, you might want to ignore these files since the code is | ||
# intended to run in multiple environments; otherwise, check them in: | ||
# .python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# poetry | ||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. | ||
# This is especially recommended for binary packages to ensure reproducibility, and is more | ||
# commonly ignored for libraries. | ||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control | ||
#poetry.lock | ||
|
||
# pdm | ||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. | ||
#pdm.lock | ||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it | ||
# in version control. | ||
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control | ||
.pdm.toml | ||
.pdm-python | ||
.pdm-build/ | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# pytype static type analyzer | ||
.pytype/ | ||
|
||
# Cython debug symbols | ||
cython_debug/ | ||
|
||
# PyCharm | ||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can | ||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore | ||
# and can be added to the global gitignore or merged into this file. For a more nuclear | ||
# option (not recommended) you can uncomment the following to ignore the entire idea folder. | ||
#.idea/ | ||
|
||
# uv.lock is annoying | ||
uv.lock |
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,6 @@ | ||
# sdk | ||
Python sdk for Synth | ||
|
||
python -m build | ||
twine check dist/* | ||
twine upload dist/* |
Empty file.
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,8 @@ | ||
# Build the distribution files | ||
python -m build | ||
|
||
# Upload to TestPyPI (optional but recommended) | ||
python -m twine upload --repository testpypi dist/* | ||
|
||
# Upload to PyPI | ||
python -m twine upload dist/* |
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,33 @@ | ||
[project] | ||
name = "synth-sdk" | ||
version = "0.2.74" | ||
description = "" | ||
authors = [{name = "Synth AI", email = "[email protected]"}] | ||
license = {text = "MIT"} | ||
readme = "README.md" | ||
requires-python = ">=3.9" | ||
dependencies = [ | ||
"opentelemetry-api", | ||
"opentelemetry-sdk", | ||
"pydantic", | ||
"requests", | ||
"asyncio", | ||
"zyk>=0.2.18", | ||
"build>=1.2.2.post1", | ||
"pypi", | ||
"twine>=4.0.0", | ||
"keyring>=24.0.0", | ||
"python-dotenv>=1.0.1", | ||
"langfuse>=2.53.9", | ||
"pytest>=8.3.3", | ||
] | ||
classifiers = [] | ||
|
||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[tool.uv.sources] | ||
|
||
[tool.hatch.build.targets.wheel] | ||
packages = ["synth_sdk"] |
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,30 @@ | ||
#apropos-ai==0.4.5 | ||
fastapi>=0.115.0 | ||
opentelemetry-api>=1.27.0 | ||
opentelemetry-instrumentation>=0.48b0 | ||
opentelemetry-sdk>=1.27.0 | ||
pydantic>=2.9.2 | ||
asyncpg>=0.24.0 | ||
|
||
supabase>=2.8.1 | ||
uvicorn>=0.15.0 | ||
redis>=4.0.0 | ||
python-dotenv>=0.19.0 | ||
python-jose[cryptography]>=3.3.0 | ||
passlib>=1.7.4 | ||
python-multipart>=0.0.5 | ||
pytest==8.3.3 | ||
pytest-asyncio==0.24.0 | ||
pytest-env==1.1.5 | ||
|
||
|
||
prefect>=3.0.4 | ||
psycopg2-binary==2.9.6 | ||
pydantic-settings>=2.5.2 | ||
argon2-cffi>=23.1.0 | ||
modal>=0.64.159 | ||
loguru>=0.7.2 | ||
alembic>=1.13.3 | ||
zyk>=0.2.10 | ||
#synth_sdk>=0.2.61 | ||
#smallbench>=0.2.11 |
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,21 @@ | ||
from setuptools import find_packages, setup | ||
|
||
setup( | ||
name="synth-sdk", | ||
version="0.2.74", | ||
packages=find_packages(), | ||
install_requires=[ | ||
"opentelemetry-api", | ||
"opentelemetry-sdk", | ||
"pydantic", | ||
"requests", | ||
"asyncio", | ||
], | ||
author="Synth AI", | ||
author_email="[email protected]", | ||
description="", | ||
long_description=open("README.md").read(), | ||
long_description_content_type="text/markdown", | ||
python_requires=">=3.9", | ||
classifiers=[], | ||
) |
Empty file.
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,14 @@ | ||
"""Synth SDK initialization file""" | ||
|
||
# Import version from package metadata | ||
from importlib import metadata | ||
|
||
try: | ||
__version__ = metadata.version("synth-sdk") | ||
except metadata.PackageNotFoundError: | ||
__version__ = "unknown" | ||
# You can also add other package-level imports and initialization here | ||
|
||
from synth_sdk.tracing.decorators import trace_system_sync, trace_system_async, synth_tracker_sync, synth_tracker_async | ||
from synth_sdk.tracing.trackers import SynthTrackerSync, SynthTrackerAsync | ||
from synth_sdk.provider_support.openai_lf import AsyncOpenAI, AsyncAzureOpenAI, OpenAI, AzureOpenAI |
Empty file.
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,5 @@ | ||
"""Load environment variables from .env file""" | ||
|
||
from dotenv import load_dotenv | ||
|
||
load_dotenv() |
Oops, something went wrong.