Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(weave): Move weave python under sdk #2648

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
64 changes: 34 additions & 30 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ jobs:
CI: 1
WANDB_ENABLE_TEST_CONTAINER: true
ports:
- '8080:8080'
- '8083:8083'
- '9015:9015'
- "8080:8080"
- "8083:8083"
- "9015:9015"
options: --health-cmd "curl --fail http://localhost:8080/healthz || exit 1" --health-interval=5s --health-timeout=3s
outputs:
tests_should_run: ${{ steps.test_check.outputs.tests_should_run }}
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
- uses: actions/setup-node@v1
if: steps.check_run.outputs.should_lint_and_compile == 'true'
with:
node-version: '18.x'
node-version: "18.x"
- name: Run WeaveJS Lint and Compile
if: steps.check_run.outputs.should_lint_and_compile == 'true'
run: |
Expand Down Expand Up @@ -189,7 +189,9 @@ jobs:
python -m pip install --upgrade pip
pip install nox uv
- name: Run nox
run: nox -e lint
run: |
cd sdks/python
nox -e lint

trace-docs:
name: Trace docs
Expand All @@ -213,32 +215,32 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version-major: ['3']
python-version-major: ["3"]
python-version-minor: [
'9',
'10',
'11',
'12',
'13',
"9",
"10",
"11",
"12",
"13",
#
]
nox-shard:
[
'trace',
'trace_server',
'anthropic',
'cerebras',
'cohere',
'dspy',
'groq',
'instructor',
'langchain',
'litellm',
'llamaindex',
'mistral0',
'mistral1',
'notdiamond',
'openai',
"trace",
"trace_server",
"anthropic",
"cerebras",
"cohere",
"dspy",
"groq",
"instructor",
"langchain",
"litellm",
"llamaindex",
"mistral0",
"mistral1",
"notdiamond",
"openai",
]
fail-fast: false
services:
Expand All @@ -251,14 +253,14 @@ jobs:
CI: 1
WANDB_ENABLE_TEST_CONTAINER: true
ports:
- '8080:8080'
- '8083:8083'
- '9015:9015'
- "8080:8080"
- "8083:8083"
- "9015:9015"
options: --health-cmd "curl --fail http://localhost:8080/healthz || exit 1" --health-interval=5s --health-timeout=3s
weave_clickhouse:
image: clickhouse/clickhouse-server
ports:
- '8123:8123'
- "8123:8123"
options: --health-cmd "wget -nv -O- 'http://localhost:8123/ping' || exit 1" --health-interval=5s --health-timeout=3s
steps:
- name: Checkout
Expand All @@ -279,6 +281,7 @@ jobs:
WF_CLICKHOUSE_HOST: localhost
WEAVE_SERVER_DISABLE_ECOSYSTEM: 1
run: |
cd sdks/python
nox -e "tests-${{ matrix.python-version-major }}.${{ matrix.python-version-minor }}(shard='${{ matrix.nox-shard }}')" -- \
-m "weave_client and not skip_clickhouse_client" \
--weave-server=clickhouse
Expand All @@ -290,6 +293,7 @@ jobs:
WF_CLICKHOUSE_HOST: weave_clickhouse
WEAVE_SERVER_DISABLE_ECOSYSTEM: 1
run: |
cd sdks/python
nox -e "tests-${{ matrix.python-version-major }}.${{ matrix.python-version-minor }}(shard='${{ matrix.nox-shard }}')"
trace-tests-matrix-check: # This job does nothing and is only used for the branch protection
if: always()
Expand Down
10 changes: 6 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@ repos:
- id: ruff
types_or: [python, pyi, jupyter]
args: [--fix, --exit-non-zero-on-fix]
files: ^sdks/python/
# Run the formatter.
- id: ruff-format
types_or: [python, pyi, jupyter]
files: ^sdks/python/
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.10.0'
rev: "v1.10.0"
hooks:
- id: mypy
additional_dependencies:
[types-pkg-resources==0.1.3, types-all, wandb>=0.15.5]
# Note: You have to update pyproject.toml[tool.mypy] too!
args: ['--config-file=pyproject.toml']
exclude: (.*pyi$)|(weave_query)|(tests)|(examples)
args: ["--config-file=sdks/python/pyproject.toml"]
exclude: (.*pyi$)|(tests)
files: ^sdks/python/
# This is legacy Weave when we were building a notebook product - should be removed
- repo: local
hooks:
Expand Down
201 changes: 0 additions & 201 deletions LICENSE
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is not actually a delete. It was moved to sdks/python and then symlinked back here

This file was deleted.

1 change: 1 addition & 0 deletions LICENSE
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is not actually a delete. It was moved to sdks/python and then symlinked back here

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: docs build

setup-docs-ci:
pip install -e .[docs]
cd sdks/python && pip install -e .[docs]
playwright install

cd docs && \
Expand Down
Loading
Loading