Skip to content

Commit

Permalink
chore(weave): Add py313 to tests (#2614)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtruong authored Oct 10, 2024
1 parent 544ee02 commit 4f210f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
Expand All @@ -203,6 +203,7 @@ jobs:
'10',
'11',
'12',
'13',
#
]
nox-shard:
Expand Down Expand Up @@ -246,7 +247,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version-major }}.${{ matrix.python-version-minor }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version-major }}.${{ matrix.python-version-minor }}
- name: Install dependencies
Expand All @@ -272,7 +273,8 @@ jobs:
WF_CLICKHOUSE_HOST: weave_clickhouse
WEAVE_SERVER_DISABLE_ECOSYSTEM: 1
run: |
nox -e "tests-${{ matrix.python-version-major }}.${{ matrix.python-version-minor }}(shard='${{ matrix.nox-shard }}')" -- -n4
nox -e "tests-${{ matrix.python-version-major }}.${{ matrix.python-version-minor }}(shard='${{ matrix.nox-shard }}')" -- \
-n4
trace-tests-matrix-check: # This job does nothing and is only used for the branch protection
if: always()

Expand Down
7 changes: 5 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

nox.options.default_venv_backend = "uv"

SUPPORTED_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12"]
SUPPORTED_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13"]
PY313_INCOMPATIBLE_SHARDS = ["anthropic", "cohere", "dspy", "langchain", "litellm"]


@nox.session
Expand Down Expand Up @@ -32,6 +33,9 @@ def lint(session):
],
)
def tests(session, shard):
if session.python.startswith("3.13") and shard in PY313_INCOMPATIBLE_SHARDS:
session.skip(f"Skipping {shard=} as it is not compatible with Python 3.13")

session.install("-e", f".[{shard},test]")
session.chdir("tests")

Expand Down Expand Up @@ -64,6 +68,5 @@ def tests(session, shard):


# Configure pytest
# nox.options.sessions = ["tests", "lint", "integration_tests"]
nox.options.reuse_existing_virtualenvs = True
nox.options.stop_on_first_error = True

0 comments on commit 4f210f8

Please sign in to comment.