diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..089114a --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,20 @@ +name: Publish to PyPI + +on: + release: + types: [published] + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + steps: + - uses: actions/checkout@v4 + + - uses: astral-sh/setup-uv@v6 + + - run: uv build + + - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/README.md b/README.md index 3c7c787..2dcfd53 100644 --- a/README.md +++ b/README.md @@ -24,4 +24,9 @@ from baseten.client import AsyncManagementClient async with AsyncManagementClient(api_key="my-api-key") as client: for model in (await client.api.get_models()).models: print(model.name) -``` \ No newline at end of file +``` + +## Upgrading from 0.8.2 and earlier + +Version 0.9.0 is a rewrite and shares no API with the earlier `baseten` releases. +Code written against 0.8.2 or earlier will not work. Pin `baseten<0.9` to keep it. \ No newline at end of file diff --git a/baseten/__init__.py b/baseten/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/baseten/py.typed b/baseten/client/py.typed similarity index 100% rename from baseten/py.typed rename to baseten/client/py.typed diff --git a/pyproject.toml b/pyproject.toml index 4603260..651e247 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,5 +53,11 @@ exclude = ["scripts/e2e_test_bootstrap/"] requires = ["hatchling"] build-backend = "hatchling.build" +# baseten is a PEP 420 namespace package shared across baseten-* distributions +# (e.g. baseten-loops provides baseten.loops). There is intentionally no +# baseten/__init__.py; this names the namespace dir for hatchling to package. +[tool.hatch.build.targets.wheel] +packages = ["baseten"] + [tool.pytest.ini_options] testpaths = ["tests"]