From ac7e1275770ba86e0b0dd77962a2489b83910efe Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Thu, 15 Aug 2024 09:26:06 +0000 Subject: [PATCH] ci: add release please to the workflow --- .github/workflows/ci.yml | 67 ++++++-- .release-please-manifest.json | 3 + poetry.lock | 276 +-------------------------------- pyproject.toml | 13 +- release-please-config.json | 9 ++ supabase/__init__.py | 8 +- supabase/__version__.py | 1 - supabase/client.py | 6 +- supabase/lib/client_options.py | 2 +- supabase/version.py | 1 + 10 files changed, 73 insertions(+), 313 deletions(-) create mode 100644 .release-please-manifest.json create mode 100644 release-please-config.json delete mode 100644 supabase/__version__.py create mode 100644 supabase/version.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a8f8cad..055f2360 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,11 +39,43 @@ jobs: - name: Upload Coverage uses: codecov/codecov-action@v4 - publish: + release-please: needs: test - if: ${{ !startsWith(github.event.head_commit.message, 'bump') && !startsWith(github.event.head_commit.message, 'chore') && github.ref == 'refs/heads/main' && github.event_name == 'push' && github.repository_owner == 'supabase' }} runs-on: ubuntu-latest - name: "Bump version, create changelog and publish" + name: "Bump version and create changelog" + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing + contents: write # needed for github actions bot to write to repo + pull-requests: write + steps: + - uses: googleapis/release-please-action@v4 + id: release + with: + target-branch: ${{ github.ref_name }} + + - if: ${{ steps.release.outputs }} + id: versions + run: | + set -ex + + MAIN_RELEASE_VERSION=${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} + RELEASE_VERSION="$MAIN_RELEASE_VERSION" + RELEASE_NAME="v$RELEASE_VERSION" + RELEASE_CREATED='${{ steps.release.outputs.release_created }}' + PRS_CREATED='${{ steps.release.outputs.prs_created }}' + PR_TITLE='${{ github.event.head_commit.message }}' + + echo "MAIN_RELEASE_VERSION=${MAIN_RELEASE_VERSION}" >> "${GITHUB_OUTPUT}" + echo "RELEASE_VERSION=${RELEASE_VERSION}" >> "${GITHUB_OUTPUT}" + echo "RELEASE_CREATED=${RELEASE_CREATED}" >> "${GITHUB_OUTPUT}" + echo "RELEASE_NAME=${RELEASE_NAME}" >> "${GITHUB_OUTPUT}" + echo "PRS_CREATED=${PRS_CREATED}" >> "${GITHUB_OUTPUT}" + echo "PR_TITLE=${PR_TITLE}" >> "${GITHUB_OUTPUT}" + publish: + needs: release-please + if: ${{ startsWith(github.event.head_commit.message, 'chore(main)') && github.ref == 'refs/heads/main' && github.event_name == 'push' && github.repository_owner == 'supabase' }} + runs-on: ubuntu-latest + name: "Publish to PyPi" environment: name: pypi url: https://pypi.org/p/supabase @@ -51,26 +83,27 @@ jobs: id-token: write # IMPORTANT: this permission is mandatory for trusted publishing contents: write # needed for github actions bot to write to repo steps: + - name: Set up Python 3.11 + uses: actions/setup-python@v5 + with: + python-version: 3.11 + - name: Clone Repository uses: actions/checkout@v4 with: ref: ${{ github.ref }} fetch-depth: 0 - token: ${{ secrets.SILENTWORKS_PAT }} - - name: Python Semantic Release - id: release - uses: python-semantic-release/python-semantic-release@v9.8.6 + + - name: Set up Poetry + uses: abatilo/actions-poetry@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} + poetry-version: 1.8.3 + + - name: Install dependencies + run: poetry install + + - name: Build package dist directory + run: poetry build - name: Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - # NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true. - # See https://github.com/actions/runner/issues/1173 - if: steps.release.outputs.released == 'true' - - - name: Publish package distributions to GitHub Releases - uses: python-semantic-release/upload-to-gh-release@main - if: steps.release.outputs.released == 'true' - with: - github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 00000000..69e82f12 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "2.6.0" +} diff --git a/poetry.lock b/poetry.lock index ccec7214..ae9aaecc 100644 --- a/poetry.lock +++ b/poetry.lock @@ -231,25 +231,6 @@ files = [ [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} -[[package]] -name = "click-option-group" -version = "0.5.6" -description = "Option groups missing in Click" -optional = false -python-versions = ">=3.6,<4" -files = [ - {file = "click-option-group-0.5.6.tar.gz", hash = "sha256:97d06703873518cc5038509443742b25069a3c7562d1ea72ff08bfadde1ce777"}, - {file = "click_option_group-0.5.6-py3-none-any.whl", hash = "sha256:38a26d963ee3ad93332ddf782f9259c5bdfe405e73408d943ef5e7d0c3767ec7"}, -] - -[package.dependencies] -Click = ">=7.0,<9" - -[package.extras] -docs = ["Pallets-Sphinx-Themes", "m2r2", "sphinx"] -tests = ["pytest"] -tests-cov = ["coverage", "coveralls", "pytest", "pytest-cov"] - [[package]] name = "colorama" version = "0.4.6" @@ -388,17 +369,6 @@ files = [ {file = "distlib-0.3.8.tar.gz", hash = "sha256:1530ea13e350031b6312d8580ddb6b27a104275a31106523b8f123787f494f64"}, ] -[[package]] -name = "dotty-dict" -version = "1.3.1" -description = "Dictionary wrapper for quick access to deeply nested keys." -optional = false -python-versions = ">=3.5,<4.0" -files = [ - {file = "dotty_dict-1.3.1-py3-none-any.whl", hash = "sha256:5022d234d9922f13aa711b4950372a06a6d64cb6d6db9ba43d0ba133ebfce31f"}, - {file = "dotty_dict-1.3.1.tar.gz", hash = "sha256:4b016e03b8ae265539757a53eba24b9bfda506fb94fbce0bee843c6f05541a15"}, -] - [[package]] name = "exceptiongroup" version = "1.2.0" @@ -445,38 +415,6 @@ mccabe = ">=0.7.0,<0.8.0" pycodestyle = ">=2.9.0,<2.10.0" pyflakes = ">=2.5.0,<2.6.0" -[[package]] -name = "gitdb" -version = "4.0.11" -description = "Git Object Database" -optional = false -python-versions = ">=3.7" -files = [ - {file = "gitdb-4.0.11-py3-none-any.whl", hash = "sha256:81a3407ddd2ee8df444cbacea00e2d038e40150acfa3001696fe0dcf1d3adfa4"}, - {file = "gitdb-4.0.11.tar.gz", hash = "sha256:bf5421126136d6d0af55bc1e7c1af1c397a34f5b7bd79e776cd3e89785c2b04b"}, -] - -[package.dependencies] -smmap = ">=3.0.1,<6" - -[[package]] -name = "gitpython" -version = "3.1.43" -description = "GitPython is a Python library used to interact with Git repositories" -optional = false -python-versions = ">=3.7" -files = [ - {file = "GitPython-3.1.43-py3-none-any.whl", hash = "sha256:eec7ec56b92aad751f9912a73404bc02ba212a23adb2c7098ee668417051a1ff"}, - {file = "GitPython-3.1.43.tar.gz", hash = "sha256:35f314a9f878467f5453cc1fee295c3e18e52f1b99f10f6cf5b1682e968a9e7c"}, -] - -[package.dependencies] -gitdb = ">=4.0.1,<5" - -[package.extras] -doc = ["sphinx (==4.3.2)", "sphinx-autodoc-typehints", "sphinx-rtd-theme", "sphinxcontrib-applehelp (>=1.0.2,<=1.0.4)", "sphinxcontrib-devhelp (==1.0.2)", "sphinxcontrib-htmlhelp (>=2.0.0,<=2.0.1)", "sphinxcontrib-qthelp (==1.0.3)", "sphinxcontrib-serializinghtml (==1.1.5)"] -test = ["coverage[toml]", "ddt (>=1.1.1,!=1.4.3)", "mock", "mypy", "pre-commit", "pytest (>=7.3.1)", "pytest-cov", "pytest-instafail", "pytest-mock", "pytest-sugar", "typing-extensions"] - [[package]] name = "gotrue" version = "2.6.1" @@ -630,24 +568,6 @@ doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linke perf = ["ipython"] test = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-perf (>=0.9.2)", "pytest-ruff (>=0.2.1)"] -[[package]] -name = "importlib-resources" -version = "6.4.0" -description = "Read resources from Python packages" -optional = false -python-versions = ">=3.8" -files = [ - {file = "importlib_resources-6.4.0-py3-none-any.whl", hash = "sha256:50d10f043df931902d4194ea07ec57960f66a80449ff867bfe782b4c486ba78c"}, - {file = "importlib_resources-6.4.0.tar.gz", hash = "sha256:cdb2b453b8046ca4e3798eb1d84f3cce1446a0e8e7b5ef4efb600f19fc398145"}, -] - -[package.dependencies] -zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["jaraco.test (>=5.4)", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-ruff (>=0.2.1)", "zipp (>=3.17)"] - [[package]] name = "iniconfig" version = "2.0.0" @@ -690,30 +610,6 @@ MarkupSafe = ">=2.0" [package.extras] i18n = ["Babel (>=2.7)"] -[[package]] -name = "markdown-it-py" -version = "3.0.0" -description = "Python port of markdown-it. Markdown parsing, done right!" -optional = false -python-versions = ">=3.8" -files = [ - {file = "markdown-it-py-3.0.0.tar.gz", hash = "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb"}, - {file = "markdown_it_py-3.0.0-py3-none-any.whl", hash = "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1"}, -] - -[package.dependencies] -mdurl = ">=0.1,<1.0" - -[package.extras] -benchmarking = ["psutil", "pytest", "pytest-benchmark"] -code-style = ["pre-commit (>=3.0,<4.0)"] -compare = ["commonmark (>=0.9,<1.0)", "markdown (>=3.4,<4.0)", "mistletoe (>=1.0,<2.0)", "mistune (>=2.0,<3.0)", "panflute (>=2.3,<3.0)"] -linkify = ["linkify-it-py (>=1,<3)"] -plugins = ["mdit-py-plugins"] -profiling = ["gprof2dot"] -rtd = ["jupyter_sphinx", "mdit-py-plugins", "myst-parser", "pyyaml", "sphinx", "sphinx-copybutton", "sphinx-design", "sphinx_book_theme"] -testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] - [[package]] name = "markupsafe" version = "2.1.5" @@ -794,17 +690,6 @@ files = [ {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, ] -[[package]] -name = "mdurl" -version = "0.1.2" -description = "Markdown URL utilities" -optional = false -python-versions = ">=3.7" -files = [ - {file = "mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"}, - {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"}, -] - [[package]] name = "mypy-extensions" version = "1.0.0" @@ -1063,21 +948,6 @@ files = [ {file = "pyflakes-2.5.0.tar.gz", hash = "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3"}, ] -[[package]] -name = "pygments" -version = "2.17.2" -description = "Pygments is a syntax highlighting package written in Python." -optional = false -python-versions = ">=3.7" -files = [ - {file = "pygments-2.17.2-py3-none-any.whl", hash = "sha256:b27c2826c47d0f3219f29554824c30c5e8945175d888647acd804ddd04af846c"}, - {file = "pygments-2.17.2.tar.gz", hash = "sha256:da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367"}, -] - -[package.extras] -plugins = ["importlib-metadata"] -windows-terminal = ["colorama (>=0.4.6)"] - [[package]] name = "pytest" version = "8.3.2" @@ -1146,57 +1016,6 @@ files = [ [package.extras] cli = ["click (>=5.0)"] -[[package]] -name = "python-gitlab" -version = "4.4.0" -description = "A python wrapper for the GitLab API" -optional = false -python-versions = ">=3.8.0" -files = [ - {file = "python-gitlab-4.4.0.tar.gz", hash = "sha256:1d117bf7b433ae8255e5d74e72c660978f50ee85eb62248c9fb52ef43c3e3814"}, - {file = "python_gitlab-4.4.0-py3-none-any.whl", hash = "sha256:cdad39d016f59664cdaad0f878f194c79cb4357630776caa9a92c1da25c8d986"}, -] - -[package.dependencies] -requests = ">=2.25.0" -requests-toolbelt = ">=0.10.1" - -[package.extras] -autocompletion = ["argcomplete (>=1.10.0,<3)"] -yaml = ["PyYaml (>=6.0.1)"] - -[[package]] -name = "python-semantic-release" -version = "9.8.6" -description = "Automatic Semantic Versioning for Python projects" -optional = false -python-versions = ">=3.8" -files = [ - {file = "python_semantic_release-9.8.6-py3-none-any.whl", hash = "sha256:018729c09edbb1d4ad8b08af81bc2a42d002d54e37f87ed4b706fa283636ce3f"}, - {file = "python_semantic_release-9.8.6.tar.gz", hash = "sha256:6e2e4626112bdbf43e86aac4535557e8c0a9274a4ea5352f14623cbabbfe498a"}, -] - -[package.dependencies] -click = ">=8.0,<9.0" -click-option-group = ">=0.5,<1.0" -dotty-dict = ">=1.3,<2.0" -gitpython = ">=3.0,<4.0" -importlib-resources = ">=6.0,<7.0" -jinja2 = ">=3.1,<4.0" -pydantic = ">=2.0,<3.0" -python-gitlab = ">=4.0,<5.0" -requests = ">=2.25,<3.0" -rich = ">=13.0,<14.0" -shellingham = ">=1.5,<2.0" -tomlkit = ">=0.11,<1.0" - -[package.extras] -build = ["build (>=1.2,<2.0)"] -dev = ["pre-commit (>=3.5,<4.0)", "ruff (==0.5.0)", "tox (>=4.11,<5.0)"] -docs = ["Sphinx (>=6.0,<7.0)", "furo (>=2024.1,<2025.0)", "sphinx-autobuild (==2024.2.4)", "sphinxcontrib-apidoc (==0.5.0)"] -mypy = ["mypy (==1.10.1)", "types-requests (>=2.32.0,<2.33.0)"] -test = ["coverage[toml] (>=7.0,<8.0)", "pytest (>=7.0,<8.0)", "pytest-clarity (>=1.0,<2.0)", "pytest-cov (>=5.0,<6.0)", "pytest-env (>=1.0,<2.0)", "pytest-lazy-fixture (>=0.6.3,<0.7.0)", "pytest-mock (>=3.0,<4.0)", "pytest-pretty (>=1.2,<2.0)", "pytest-xdist (>=3.0,<4.0)", "requests-mock (>=1.10,<2.0)", "responses (>=0.25.0,<0.26.0)", "types-pytest-lazy-fixture (>=0.6.3,<0.7.0)"] - [[package]] name = "pyyaml" version = "6.0.1" @@ -1287,60 +1106,6 @@ python-dateutil = ">=2.8.1,<3.0.0" typing-extensions = ">=4.12.2,<5.0.0" websockets = ">=11,<13" -[[package]] -name = "requests" -version = "2.32.0" -description = "Python HTTP for Humans." -optional = false -python-versions = ">=3.8" -files = [ - {file = "requests-2.32.0-py3-none-any.whl", hash = "sha256:f2c3881dddb70d056c5bd7600a4fae312b2a300e39be6a118d30b90bd27262b5"}, - {file = "requests-2.32.0.tar.gz", hash = "sha256:fa5490319474c82ef1d2c9bc459d3652e3ae4ef4c4ebdd18a21145a47ca4b6b8"}, -] - -[package.dependencies] -certifi = ">=2017.4.17" -charset-normalizer = ">=2,<4" -idna = ">=2.5,<4" -urllib3 = ">=1.21.1,<3" - -[package.extras] -socks = ["PySocks (>=1.5.6,!=1.5.7)"] -use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] - -[[package]] -name = "requests-toolbelt" -version = "1.0.0" -description = "A utility belt for advanced users of python-requests" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -files = [ - {file = "requests-toolbelt-1.0.0.tar.gz", hash = "sha256:7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6"}, - {file = "requests_toolbelt-1.0.0-py2.py3-none-any.whl", hash = "sha256:cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06"}, -] - -[package.dependencies] -requests = ">=2.0.1,<3.0.0" - -[[package]] -name = "rich" -version = "13.7.1" -description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" -optional = false -python-versions = ">=3.7.0" -files = [ - {file = "rich-13.7.1-py3-none-any.whl", hash = "sha256:4edbae314f59eb482f54e9e30bf00d33350aaa94f4bfcd4e9e3110e64d0d7222"}, - {file = "rich-13.7.1.tar.gz", hash = "sha256:9be308cb1fe2f1f57d67ce99e95af38a1e2bc71ad9813b0e247cf7ffbcc3a432"}, -] - -[package.dependencies] -markdown-it-py = ">=2.2.0" -pygments = ">=2.13.0,<3.0.0" -typing-extensions = {version = ">=4.0.0,<5.0", markers = "python_version < \"3.9\""} - -[package.extras] -jupyter = ["ipywidgets (>=7.5.1,<9)"] - [[package]] name = "setuptools" version = "58.5.3" @@ -1356,17 +1121,6 @@ files = [ docs = ["furo", "jaraco.packaging (>=8.2)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx", "sphinx-inline-tabs", "sphinxcontrib-towncrier"] testing = ["flake8-2020", "jaraco.envs", "jaraco.path (>=3.2.0)", "mock", "paver", "pip (>=19.1)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-flake8", "pytest-mypy", "pytest-virtualenv (>=1.2.7)", "pytest-xdist", "sphinx", "virtualenv (>=13.0.0)", "wheel"] -[[package]] -name = "shellingham" -version = "1.5.4" -description = "Tool to Detect Surrounding Shell" -optional = false -python-versions = ">=3.7" -files = [ - {file = "shellingham-1.5.4-py2.py3-none-any.whl", hash = "sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686"}, - {file = "shellingham-1.5.4.tar.gz", hash = "sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de"}, -] - [[package]] name = "six" version = "1.16.0" @@ -1378,17 +1132,6 @@ files = [ {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] -[[package]] -name = "smmap" -version = "5.0.1" -description = "A pure Python implementation of a sliding window memory map manager" -optional = false -python-versions = ">=3.7" -files = [ - {file = "smmap-5.0.1-py3-none-any.whl", hash = "sha256:e6d8668fa5f93e706934a62d7b4db19c8d9eb8cf2adbb75ef1b675aa332b69da"}, - {file = "smmap-5.0.1.tar.gz", hash = "sha256:dceeb6c0028fdb6734471eb07c0cd2aae706ccaecab45965ee83f11c8d3b1f62"}, -] - [[package]] name = "sniffio" version = "1.3.1" @@ -1540,23 +1283,6 @@ setuptools = ">=58.2.0,<59.0.0" typer = ">=0.4.0,<0.5.0" unasync = ">=0.5.0,<0.6.0" -[[package]] -name = "urllib3" -version = "2.2.2" -description = "HTTP library with thread-safe connection pooling, file post, and more." -optional = false -python-versions = ">=3.8" -files = [ - {file = "urllib3-2.2.2-py3-none-any.whl", hash = "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472"}, - {file = "urllib3-2.2.2.tar.gz", hash = "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168"}, -] - -[package.extras] -brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] -h2 = ["h2 (>=4,<5)"] -socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] -zstd = ["zstandard (>=0.18.0)"] - [[package]] name = "virtualenv" version = "20.25.1" @@ -1687,4 +1413,4 @@ test = ["big-O", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-it [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "081d7ac8a911817b3250d1999f25e6ec271e2725ba1d54ec005eb9323747a667" +content-hash = "7b7c60f4af3c7bd75a34415a79d98f992638b10adebec5cf7abbc5d51189890e" diff --git a/pyproject.toml b/pyproject.toml index 1181a932..c5cc79ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "supabase" -version = "2.6.0" +version = "2.6.0" # {x-release-please-version} description = "Supabase client for Python." authors = ["Joel Lee ", "Leon Fedden ", "Daniel Reinón García ", "Leynier Gutiérrez González ", "Anand", "Andrew Smith "] homepage = "https://github.com/supabase/supabase-py" @@ -31,7 +31,6 @@ flake8 = "^5.0.4" isort = "^5.10.1" pytest-cov = "^5.0.0" commitizen = "^3.28.0" -python-semantic-release = "^9.8.6" python-dotenv = "^1.0.1" [tool.poetry.scripts] @@ -40,16 +39,6 @@ tests = 'poetry_scripts:run_tests' [tool.poetry.group.dev.dependencies] unasync-cli = "^0.0.9" -[tool.semantic_release] -version_variables = ["supabase/__version__.py:__version__"] -version_toml = ["pyproject.toml:tool.poetry.version"] -major_on_zero = false -commit_message = "chore(release): bump version to v{version}" -build_command = "curl -sSL https://install.python-poetry.org | python - --preview && export PATH=\"/github/home/.local/bin:$PATH\" && poetry install && poetry build" -upload_to_vcs_release = true -branch = "main" -changelog_components = "semantic_release.changelog.changelog_headers,semantic_release.changelog.compare_url" - [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 00000000..14e52cca --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,9 @@ +{ + "last-release-sha": "7236ed62c37fb57c3feac23b416fc6d9d153dd68", + "packages": { + ".": { + "changelog-path": "CHANGELOG.md", + "release-type": "python" + } + } +} diff --git a/supabase/__init__.py b/supabase/__init__.py index 28ad49f1..49625e1a 100644 --- a/supabase/__init__.py +++ b/supabase/__init__.py @@ -2,9 +2,6 @@ from postgrest import APIResponse as PostgrestAPIResponse from storage3.utils import StorageException -# Version -from .__version__ import __version__ - # Async Client from ._async.auth_client import AsyncSupabaseAuthClient as ASupabaseAuthClient from ._async.client import AsyncClient as AClient @@ -22,6 +19,9 @@ # Realtime Client from .lib.realtime_client import SupabaseRealtimeClient +# Version +from .version import __version__ + __all__ = [ "acreate_client", "AClient", @@ -35,5 +35,5 @@ "PostgrestAPIError", "PostgrestAPIResponse", "StorageException", - "__version__", + "version", ] diff --git a/supabase/__version__.py b/supabase/__version__.py deleted file mode 100644 index e5e59e38..00000000 --- a/supabase/__version__.py +++ /dev/null @@ -1 +0,0 @@ -__version__ = "2.6.0" diff --git a/supabase/client.py b/supabase/client.py index 543a2ce3..97c45442 100644 --- a/supabase/client.py +++ b/supabase/client.py @@ -2,9 +2,6 @@ from postgrest import APIResponse as PostgrestAPIResponse from storage3.utils import StorageException -# Version -from .__version__ import __version__ - # Async Client from ._async.auth_client import AsyncSupabaseAuthClient from ._async.client import AsyncClient @@ -21,6 +18,9 @@ from .lib.client_options import ClientOptions from .lib.realtime_client import SupabaseRealtimeClient +# Version +from .version import __version__ + __all__ = [ "AsyncSupabaseAuthClient", "create_async_client", diff --git a/supabase/lib/client_options.py b/supabase/lib/client_options.py index d0191f2c..4ff86589 100644 --- a/supabase/lib/client_options.py +++ b/supabase/lib/client_options.py @@ -7,7 +7,7 @@ from storage3.constants import DEFAULT_TIMEOUT as DEFAULT_STORAGE_CLIENT_TIMEOUT from supafunc.utils import DEFAULT_FUNCTION_CLIENT_TIMEOUT -from supabase import __version__ +from ..version import __version__ DEFAULT_HEADERS = {"X-Client-Info": f"supabase-py/{__version__}"} diff --git a/supabase/version.py b/supabase/version.py new file mode 100644 index 00000000..f9135622 --- /dev/null +++ b/supabase/version.py @@ -0,0 +1 @@ +__version__ = "2.6.0" # {x-release-please-version}