Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,21 @@
uses: './.github/workflows/testing-unit.yaml'
secrets: inherit

integration-tests:
uses: './.github/workflows/testing-integration.yaml'
secrets: inherit
needs: unit-tests
# integration-tests:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these commented blocks need to come out?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, thanks for flagging. I just put them back. I disabled them temporarily to iterate quicker on some installation tests I just added.

# uses: './.github/workflows/testing-integration.yaml'
# secrets: inherit
# needs: unit-tests

dependency-tests:
uses: './.github/workflows/testing-dependency.yaml'
# dependency-tests:
# uses: './.github/workflows/testing-dependency.yaml'
# secrets: inherit
# needs: unit-tests

testing-install:
uses: './.github/workflows/testing-install.yaml'
secrets: inherit
needs: unit-tests

package:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
name: Check packaging
runs-on: ubuntu-latest
strategy:
Expand Down
52 changes: 47 additions & 5 deletions .github/workflows/testing-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ name: Installation Tests

on:
workflow_call:
workflow_dispatch:
pull_request:

permissions:
contents: read
pull-requests: write

jobs:
test-install:
runs-on: ${{ matrix.os }}
test-install-linux:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python: [3.9]
python: [3.9, 3.10, 3.11, 3.12, 3.13]

steps:
- name: Checkout code
Expand All @@ -32,8 +33,8 @@ jobs:
run: python -m build --sdist --wheel

- name: Install from built artifacts
shell: bash
run: |
# Use the wheel if it's pure-python; fallback to sdist otherwise
pip install dist/*.whl || pip install dist/*.tar.gz

- name: Verify import & version
Expand All @@ -42,3 +43,44 @@ jobs:
import pinecone
print("Imported OK, version:", pinecone.__version__)
EOF

test-install-windows:
runs-on: windows-latest
strategy:
matrix:
python: [3.9, 3.10, 3.11, 3.12, 3.13]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- name: Install build tools
run: |
python -m pip install --upgrade pip setuptools wheel build

- name: Build sdist & wheel
run: python -m build --sdist --wheel

- name: Install from built artifacts
shell: pwsh
run: |
$wheels = Get-ChildItem -Path "dist" -Filter "*.whl"
$sdists = Get-ChildItem -Path "dist" -Filter "*.tar.gz"
if ($wheels) {
pip install $wheels[0].FullName
}
elseif ($sdists) {
pip install $sdists[0].FullName
}
else {
throw "No wheel or sdist found in dist/"
}

- name: Verify import & version
shell: pwsh
run: |
python -c "import pinecone; print('Imported OK, version:', pinecone.__version__)"
56 changes: 0 additions & 56 deletions pinecone/scripts/repl.py

This file was deleted.

23 changes: 0 additions & 23 deletions pinecone/utils/repr_overrides.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import json
from datetime import datetime
import readline
import os
import atexit


def custom_serializer(obj):
Expand All @@ -23,23 +20,3 @@ def install_json_repr_override(klass):
klass.__repr__ = lambda self: json.dumps(
self.to_dict(), indent=4, sort_keys=False, default=custom_serializer
)


def setup_readline_history():
"""Setup readline history for the custom REPL."""
# Create .pinecone directory in user's home if it doesn't exist
history_dir = os.path.expanduser("~/.pinecone")
os.makedirs(history_dir, exist_ok=True)

# Set up history file
history_file = os.path.join(history_dir, "repl_history")

# Load history if it exists
if os.path.exists(history_file):
readline.read_history_file(history_file)

# Set history size
readline.set_history_length(1000)

# Save history on exit
atexit.register(readline.write_history_file, history_file)
Loading