diff --git a/.github/actions/test-data-plane/action.yaml b/.github/actions/test-data-plane/action.yaml index 964f89271..9fafc0d50 100644 --- a/.github/actions/test-data-plane/action.yaml +++ b/.github/actions/test-data-plane/action.yaml @@ -25,6 +25,10 @@ inputs: PINECONE_API_KEY: description: 'The Pinecone API key' required: true + python_version: + description: 'The version of Python to use' + required: false + default: '3.9' outputs: index_name: @@ -37,7 +41,7 @@ runs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: ${{ inputs.python_version }} - name: Setup Poetry uses: ./.github/actions/setup-poetry diff --git a/.github/actions/test-dependency-grpc/action.yaml b/.github/actions/test-dependency-grpc/action.yaml new file mode 100644 index 000000000..66dab01ba --- /dev/null +++ b/.github/actions/test-dependency-grpc/action.yaml @@ -0,0 +1,66 @@ +name: 'Test GRPC Dependencies' +description: 'Runs sanity test with specific gRPC dependencies' + +inputs: + PINECONE_API_KEY: + description: 'The Pinecone API key' + required: true + index_name: + description: 'The name of the index' + required: true + python_version: + description: 'The version of Python to use' + required: false + default: '3.9' + grpcio_version: + description: 'The version of grpcio to install' + required: true + lz4_version: + description: 'The version of lz4 to install' + required: true + protobuf_version: + description: 'The version of protobuf to install' + required: true + googleapis_common_protos_version: + description: 'The version of googleapis-common-protos to install' + required: true + +runs: + using: 'composite' + steps: + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ inputs.python_version }} + + - name: Setup Poetry + uses: ./.github/actions/setup-poetry + with: + include_grpc: true + include_types: false + + - name: Install grpcio ${{ inputs.grpcio_version }} + run: poetry add grpcio==${{ inputs.grpcio_version }} + shell: bash + + - name: Install lz4 ${{ inputs.lz4_version }} + run: poetry add lz4==${{ inputs.lz4_version }} + shell: bash + + - name: Install protobuf ${{ inputs.protobuf_version }} + run: poetry add protobuf==${{ inputs.protobuf_version }} + shell: bash + + - name: Install googleapis-common-protos ${{ inputs.googleapis_common_protos_version }} + run: poetry add googleapis-common-protos==${{ inputs.googleapis_common_protos_version }} + shell: bash + + - uses: nick-fields/retry@v3 + with: + timeout_minutes: 5 + max_attempts: 3 + retry_on: error + command: poetry run pytest tests/dependency/grpc -s -v + env: + PINECONE_API_KEY: ${{ inputs.PINECONE_API_KEY }} + INDEX_NAME: ${{ inputs.index_name }} \ No newline at end of file diff --git a/.github/actions/test-dependency-rest/action.yaml b/.github/actions/test-dependency-rest/action.yaml new file mode 100644 index 000000000..5321b2dbe --- /dev/null +++ b/.github/actions/test-dependency-rest/action.yaml @@ -0,0 +1,45 @@ +name: 'Test REST Dependencies' +description: 'Runs sanity test with specific REST dependencies' + +inputs: + PINECONE_API_KEY: + description: 'The Pinecone API key' + required: true + index_name: + description: 'The name of the index' + required: true + python_version: + description: 'The version of Python to use' + required: false + default: '3.9' + urllib3_version: + description: 'The version of urllib3 to install' + required: true + +runs: + using: 'composite' + steps: + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ inputs.python_version }} + + - name: Setup Poetry + uses: ./.github/actions/setup-poetry + with: + include_grpc: false + include_types: false + + - name: 'Install urllib3 ${{ matrix.urllib3-version }}' + run: 'poetry add urllib3==${{ matrix.urllib3-version }}' + shell: bash + + - uses: nick-fields/retry@v3 + with: + timeout_minutes: 5 + max_attempts: 3 + retry_on: error + command: poetry run pytest tests/dependency/rest -s -v + env: + PINECONE_API_KEY: '${{ inputs.PINECONE_API_KEY }}' + INDEX_NAME: '${{ inputs.index_name }}' \ No newline at end of file diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 9880064b3..e48aa2681 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.8, 3.9, '3.10', 3.11] + python-version: [3.8, 3.12] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/testing-dependency.yaml b/.github/workflows/testing-dependency.yaml index 11422efa4..5ba301067 100644 --- a/.github/workflows/testing-dependency.yaml +++ b/.github/workflows/testing-dependency.yaml @@ -25,15 +25,14 @@ jobs: needs: dependency-matrix-setup runs-on: ubuntu-latest strategy: - max-parallel: 5 + max-parallel: 10 fail-fast: false matrix: - python-version: + python_version: - 3.8 - # - 3.9 - # - "3.10" - # - 3.11 - grpcio-version: + - 3.9 + - "3.10" + grpcio_version: - 1.44.0 # - 1.46.5 # - 1.47.5 @@ -49,94 +48,113 @@ jobs: # - 1.58.0 # - 1.59.3 - 1.60.0 - lz4-version: + lz4_version: - 3.1.3 # - 3.1.10 - 4.0.0 # - 4.0.1 # - 4.1.0 - 4.3.3 - protobuf-version: + protobuf_version: - 3.20.3 - googleapis-common-protos-version: + googleapis_common_protos_version: - 1.53.0 - 1.62.0 - grpc-gateway-protoc-gen-openapiv2-version: + grpc_gateway_protoc_gen_openapiv2_version: - 0.1.0 - steps: - uses: actions/checkout@v4 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Setup Poetry - uses: ./.github/actions/setup-poetry + - uses: ./.github/actions/test-dependency-grpc with: - include_grpc: true - include_types: false - - name: Install grpcio ${{ matrix.grpcio-version }} - run: poetry add grpcio==${{ matrix.grpcio-version }} - - name: Install lz4 ${{ matrix.lz4-version }} - run: poetry add lz4==${{ matrix.lz4-version }} - - name: Install protobuf ${{ matrix.protobuf-version }} - run: poetry add protobuf==${{ matrix.protobuf-version }} - - name: Install googleapis-common-protos ${{ matrix.googleapis-common-protos-version }} - run: poetry add googleapis-common-protos==${{ matrix.googleapis-common-protos-version }} + python_version: '${{ matrix.python_version }}' + index_name: '${{ needs.dependency-matrix-setup.outputs.index_name }}' + PINECONE_API_KEY: '${{ secrets.PINECONE_API_KEY }}' + grpcio_version: '${{ matrix.grpcio_version }}' + lz4_version: '${{ matrix.lz4_version }}' + protobuf_version: '${{ matrix.protobuf_version }}' + googleapis_common_protos_version: '${{ matrix.googleapis_common_protos_version }}' - - uses: nick-fields/retry@v3 + dependency-matrix-grpc-312: + name: Deps (GRPC) + needs: dependency-matrix-setup + runs-on: ubuntu-latest + strategy: + max-parallel: 10 + fail-fast: false + matrix: + python_version: + - 3.11 + - 3.12 + grpcio_version: + - 1.59.3 + - 1.60.0 + lz4_version: + - 3.1.3 + - 4.3.3 + protobuf_version: + - 3.20.3 + googleapis_common_protos_version: + - 1.53.0 + - 1.62.0 + grpc_gateway_protoc_gen_openapiv2_version: + - 0.1.0 + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/test-dependency-grpc with: - timeout_minutes: 5 - max_attempts: 3 - retry_on: error - command: poetry run pytest tests/dependency/grpc -s -v - env: - PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} - INDEX_NAME: ${{ needs.dependency-matrix-setup.outputs.index_name }} - - - + python_version: '${{ matrix.python_version }}' + index_name: '${{ needs.dependency-matrix-setup.outputs.index_name }}' + PINECONE_API_KEY: '${{ secrets.PINECONE_API_KEY }}' + grpcio_version: '${{ matrix.grpcio_version }}' + lz4_version: '${{ matrix.lz4_version }}' + protobuf_version: '${{ matrix.protobuf_version }}' + googleapis_common_protos_version: '${{ matrix.googleapis_common_protos_version }}' dependency-matrix-rest: name: Deps (REST) runs-on: ubuntu-latest needs: dependency-matrix-setup strategy: - max-parallel: 5 + max-parallel: 10 fail-fast: false matrix: - python-version: + python_version: - 3.8 - - 3.9 - - '3.10' - 3.11 - urllib3-version: + urllib3_version: - 1.26.0 - 1.26.18 - 2.0.2 - - 2.0.5 - - 2.1.0 + - 2.2.1 steps: - uses: actions/checkout@v4 - - name: 'Set up Python ${{ matrix.python-version }}' - uses: actions/setup-python@v5 + - uses: ./.github/actions/test-dependency-rest with: - python-version: '${{ matrix.python-version }}' - - name: Setup Poetry - uses: ./.github/actions/setup-poetry - with: - include_grpc: false - include_types: false - - name: 'Install urllib3 ${{ matrix.urllib3-version }}' - run: 'poetry add urllib3==${{ matrix.urllib3-version }}' - - uses: nick-fields/retry@v3 + python_version: '${{ matrix.python_version }}' + index_name: '${{ needs.dependency-matrix-setup.outputs.index_name }}' + PINECONE_API_KEY: '${{ secrets.PINECONE_API_KEY }}' + urllib3_version: '${{ matrix.urllib3_version }}' + + dependency-matrix-rest-312: + name: Deps (REST) + runs-on: ubuntu-latest + needs: dependency-matrix-setup + strategy: + max-parallel: 10 + fail-fast: false + matrix: + python_version: + - 3.12 + urllib3_version: + - 1.26.5 + - 1.26.18 + - 2.0.2 + - 2.2.1 + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/test-dependency-rest with: - timeout_minutes: 5 - max_attempts: 3 - retry_on: error - command: poetry run pytest tests/dependency/rest -s -v - env: + python_version: '${{ matrix.python_version }}' + index_name: '${{ needs.dependency-matrix-setup.outputs.index_name }}' PINECONE_API_KEY: '${{ secrets.PINECONE_API_KEY }}' - INDEX_NAME: '${{ needs.dependency-matrix-setup.outputs.index_name }}' + urllib3_version: '${{ matrix.urllib3_version }}' diff --git a/.github/workflows/testing-integration.yaml b/.github/workflows/testing-integration.yaml index 16675f0a9..ee07e42f8 100644 --- a/.github/workflows/testing-integration.yaml +++ b/.github/workflows/testing-integration.yaml @@ -9,6 +9,7 @@ jobs: strategy: fail-fast: false matrix: + python_version: [3.8, 3.12] use_grpc: [true, false] metric: - cosine @@ -20,6 +21,7 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/test-data-plane with: + python_version: '${{ matrix.python_version }}' use_grpc: '${{ matrix.use_grpc }}' metric: '${{ matrix.metric }}' spec: '${{ matrix.spec }}' @@ -55,7 +57,7 @@ jobs: testConfig: - python-version: 3.8 pod: { environment: 'us-east1-gcp'} - - python-version: 3.11 + - python-version: 3.12 pod: { environment: 'us-east4-gcp'} fail-fast: false steps: @@ -88,9 +90,6 @@ jobs: DIMENSION: 1536 METRIC: 'cosine' - - - control-rest-serverless: name: control plane serverless runs-on: ubuntu-latest @@ -102,7 +101,7 @@ jobs: - python-version: 3.8 # Do one test run with 3.8 for sanity check pod: { environment: 'us-east1-gcp'} serverless: { cloud: 'aws', region: 'us-west-2'} - - python-version: 3.11 + - python-version: 3.12 pod: { environment: 'us-east1-gcp'} serverless: { cloud: 'aws', region: 'us-west-2'} fail-fast: false diff --git a/.github/workflows/testing-unit.yaml b/.github/workflows/testing-unit.yaml index 156f7e27a..3574b1c2c 100644 --- a/.github/workflows/testing-unit.yaml +++ b/.github/workflows/testing-unit.yaml @@ -13,6 +13,7 @@ jobs: - 3.9 - '3.10' - 3.11 + - 3.12 use_grpc: - true - false diff --git a/poetry.lock b/poetry.lock index 299572a5d..eb295655a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "astunparse" @@ -15,24 +15,6 @@ files = [ six = ">=1.6.1,<2.0" wheel = ">=0.23.0,<1.0" -[[package]] -name = "attrs" -version = "23.1.0" -description = "Classes Without Boilerplate" -optional = false -python-versions = ">=3.7" -files = [ - {file = "attrs-23.1.0-py3-none-any.whl", hash = "sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04"}, - {file = "attrs-23.1.0.tar.gz", hash = "sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015"}, -] - -[package.extras] -cov = ["attrs[tests]", "coverage[toml] (>=5.3)"] -dev = ["attrs[docs,tests]", "pre-commit"] -docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope-interface"] -tests = ["attrs[tests-no-zope]", "zope-interface"] -tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] - [[package]] name = "certifi" version = "2023.11.17" @@ -687,8 +669,8 @@ files = [ [package.dependencies] numpy = [ {version = ">=1.20.3", markers = "python_version < \"3.10\""}, - {version = ">=1.23.2", markers = "python_version >= \"3.11\""}, {version = ">=1.21.0", markers = "python_version >= \"3.10\" and python_version < \"3.11\""}, + {version = ">=1.23.2", markers = "python_version >= \"3.11\""}, ] python-dateutil = ">=2.8.2" pytz = ">=2020.1" @@ -828,26 +810,25 @@ plugins = ["importlib-metadata"] [[package]] name = "pytest" -version = "7.2.0" +version = "8.0.0" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pytest-7.2.0-py3-none-any.whl", hash = "sha256:892f933d339f068883b6fd5a459f03d85bfcb355e4981e146d2c7616c21fef71"}, - {file = "pytest-7.2.0.tar.gz", hash = "sha256:c4014eb40e10f11f355ad4e3c2fb2c6c6d1919c73f3b5a433de4708202cade59"}, + {file = "pytest-8.0.0-py3-none-any.whl", hash = "sha256:50fb9cbe836c3f20f0dfa99c565201fb75dc54c8d76373cd1bde06b06657bdb6"}, + {file = "pytest-8.0.0.tar.gz", hash = "sha256:249b1b0864530ba251b7438274c4d251c58d868edaaec8762893ad4a0d71c36c"}, ] [package.dependencies] -attrs = ">=19.2.0" colorama = {version = "*", markers = "sys_platform == \"win32\""} exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" -pluggy = ">=0.12,<2.0" +pluggy = ">=1.3.0,<2.0" tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] +testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" @@ -965,7 +946,6 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, @@ -1194,9 +1174,9 @@ files = [ test = ["pytest (>=6.0.0)", "setuptools (>=65)"] [extras] -grpc = ["googleapis-common-protos", "grpc-gateway-protoc-gen-openapiv2", "grpcio", "lz4", "protobuf"] +grpc = ["googleapis-common-protos", "grpc-gateway-protoc-gen-openapiv2", "grpcio", "grpcio", "lz4", "protobuf"] [metadata] lock-version = "2.0" -python-versions = ">=3.8,<3.13" -content-hash = "8d9297dab7ba94a73c8b104338a4c5508535c50645f6f64da888381df51ff99c" +python-versions = "^3.8" +content-hash = "3f9d76204d6753bdba849cc43cc9827e021e3cbdca7328cc9f411bb6133c6091" diff --git a/pyproject.toml b/pyproject.toml index 0a1ba5c6e..03e96f6d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,6 +39,7 @@ classifiers=[ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Database", "Topic :: Software Development", "Topic :: Software Development :: Libraries", @@ -47,15 +48,21 @@ classifiers=[ ] [tool.poetry.dependencies] -python = ">=3.8,<3.13" +python = "^3.8" typing-extensions = ">=3.7.4" -urllib3 = ">=1.26.0" +urllib3 = [ + { version = ">=1.26.0", python = ">=3.8,<3.12" }, + { version = ">=1.26.5", python = "^3.12" } +] tqdm = ">=4.64.1" # certifi does not follow semver. Should always be # on latest but setting a broad range to have maximum # compatibility with libraries that may pin version. certifi = ">=2019.11.17" -grpcio = { version = ">=1.44.0", optional = true } +grpcio = [ + { version = ">=1.44.0", optional = true, python = "^3.8,<3.11" }, + { version = ">=1.59.0", optional = true, python = "^3.11" } +] grpc-gateway-protoc-gen-openapiv2 = { version = "0.1.0", optional = true } googleapis-common-protos = { version = ">=1.53.0", optional = true } lz4 = { version = ">=3.1.3", optional = true } @@ -82,11 +89,11 @@ numpy = [ ] pandas = ">=1.3.5" pdoc = "^14.1.0" -pytest = "7.2.0" +pytest = "8.0.0" pytest-asyncio = "0.15.1" pytest-cov = "2.10.1" pytest-mock = "3.6.1" -pytest-timeout = ">=1.4.2" +pytest-timeout = "2.2.0" urllib3_mock = "0.3.3" responses = ">=0.8.1"