From 7bba97e89d58e5f23a6d8c3a41dbeb67ec1201eb Mon Sep 17 00:00:00 2001 From: Andrew Truong Date: Sun, 9 Feb 2025 17:08:41 -0500 Subject: [PATCH] test --- pyproject.toml | 2 +- tests/conftest.py | 3 --- tools/codegen/README.md | 0 weave/trace/concurrent/futures.py | 4 ---- weave/trace_server_bindings/stainless_http_trace_server.py | 3 +++ 5 files changed, 4 insertions(+), 8 deletions(-) create mode 100644 tools/codegen/README.md diff --git a/pyproject.toml b/pyproject.toml index 6a4705118124..cf1109984f8f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -129,7 +129,7 @@ test = [ [project.scripts] weave = "weave.trace.cli:cli" -generate = "tools.stainless.do_everything:main" +codegen = "tools.codegen.generate:cli" [project.urls] diff --git a/tests/conftest.py b/tests/conftest.py index 2b79734e8181..92b2f3ce1564 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -383,9 +383,6 @@ def get_error_logs(self): ) # (AT): This seems to be the same issue as above, but manifesting as a different error # after integrating Stainless - and not record.msg.startswith( - "Task failed: BadRequestError: Error code: 400 - ***'detail': 'API key must be exactly 40 characters long'***" - ) and not ("API key must be exactly 40 characters long" in record.msg) # Exclude legacy and not record.name.startswith("weave.weave_server") diff --git a/tools/codegen/README.md b/tools/codegen/README.md new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/weave/trace/concurrent/futures.py b/weave/trace/concurrent/futures.py index 46bea08a282d..96b1d610406c 100644 --- a/weave/trace/concurrent/futures.py +++ b/weave/trace/concurrent/futures.py @@ -219,10 +219,6 @@ def _safe_submit(self, f: Callable[..., T], *args: Any, **kwargs: Any) -> Future """ wrapped = self._make_deadlock_safe(f) - print( - f"Submitting function {f.__name__=} to threadpool, with {args=}, {kwargs=}" - ) - if self._executor is None or self._in_thread_context.get(): return self._execute_directly(wrapped, *args, **kwargs) diff --git a/weave/trace_server_bindings/stainless_http_trace_server.py b/weave/trace_server_bindings/stainless_http_trace_server.py index aa7ca46d5a64..6a7f2c1ea29c 100644 --- a/weave/trace_server_bindings/stainless_http_trace_server.py +++ b/weave/trace_server_bindings/stainless_http_trace_server.py @@ -1,3 +1,6 @@ +# This file began as a copy of the remote_http_trace_server.py file in the trace_server_bindings directory. +# It has been modified to use the stainless generated client instead of the remote_http_trace_server. + import io import json import logging