jack 1 неделя назад
Родитель
Сommit
502283d0f6

+ 3 - 3
py/core/examples/hello_r2r.ipynb

@@ -50,7 +50,7 @@
     "\n",
     "# Ingest the file\n",
     "ingestion_response = client.documents.create(file_path=temp_path)\n",
-    "print(ingestion_response)\n",
+    "#print(ingestion_response)\n",
     "\n",
     "# Clean up the temporary file\n",
     "os.unlink(temp_path)"
@@ -81,12 +81,12 @@
     }
    ],
    "source": [
-    "print(\"Performing RAG...\")\n",
+    "#print(\"Performing RAG...\")\n",
     "rag_response = client.retrieval.rag(\n",
     "    query=\"What is the nature of the soul?\",\n",
     ")\n",
     "\n",
-    "print(rag_response[\"results\"][\"completion\"])"
+    "#print(rag_response[\"results\"][\"completion\"])"
    ]
   }
  ],

+ 2 - 2
py/core/examples/hello_r2r.py

@@ -13,8 +13,8 @@ rag_response = client.rag(
     rag_generation_config={"model": "gpt-4.1-mini", "temperature": 0.0},
 )
 results = rag_response["results"]
-print(f"Search Results:\n{results['search_results']}")
-print(f"Completion:\n{results['completion']}")
+#print(f"Search Results:\n{results['search_results']}")
+#print(f"Completion:\n{results['completion']}")
 
 # RAG Results:
 # Search Results:

+ 2 - 2
py/core/main/services/ingestion_service.py

@@ -471,8 +471,8 @@ class IngestionService:
             
             # Add to our local batch
             vector_batch.append(msg)
-            print(f"vector_batch: {msg}")
-            print(f"vector_batch: {vector_batch}")
+            #print(f"vector_batch: {msg}")
+            #print(f"vector_batch: {vector_batch}")
             document_counts[msg.document_id] = (
                 document_counts.get(msg.document_id, 0) + 1
             )

+ 11 - 11
py/core/parsers/structured/csv_parser.py

@@ -80,7 +80,7 @@ class CSVParserAdvanced(AsyncParser[str | bytes]):
         **kwargs,
     ) -> AsyncGenerator[str, None]:
         """Ingest CSV data and yield text from each row."""
-        #print(data)
+        ##print(data)
         if isinstance(data, bytes):
             try:
                 data = data.decode("utf-8")
@@ -95,24 +95,24 @@ class CSVParserAdvanced(AsyncParser[str | bytes]):
                 else:
                     raise ValueError("Unable to decode the provided byte data with any supported encoding")
         # let the first row be the header
-        print("1")
+        #print("1")
         delimiter = self.get_delimiter(file=self.StringIO(data))
-        print("2")
+        #print("2")
         csv_reader = self.csv.reader(self.StringIO(data), delimiter=delimiter)
-        print("3")
+        #print("3")
         header = next(csv_reader)
-        print("4")
-        #print(header)
+        #print("4")
+        ##print(header)
         #num_cols = len(header.split(delimiter))
         num_cols = len(header)
-        print("5")
+        #print("5")
         num_rows = num_col_times_num_rows // num_cols
-        print("6")
-        print(num_rows)
-        print(row_num)
+        #print("6")
+        #print(num_rows)
+        #print(row_num)
         chunk_rows = []
         for row_num, row in enumerate(csv_reader):
-            print(row)
+            #print(row)
             chunk_rows.append(row)
             #if num_rows > 0 and row_num > 0 and row_num % num_rows == 0:
             if True:

+ 2 - 2
py/core/providers/file/s3.py

@@ -79,8 +79,8 @@ class S3FileProvider(FileProvider):
             # filename.encode("ascii", "backslashreplace").decode()
             # Upload to S3
             file_content.seek(0)  # Reset pointer to beginning
-            print("=======file===============")
-            print(file_name)
+            #print("=======file===============")
+            #print(file_name)
 
             self.s3_client.upload_fileobj(
                 file_content,

+ 1 - 1
py/core/providers/ingestion/unstructured/base.py

@@ -397,7 +397,7 @@ class UnstructuredIngestionProvider(IngestionProvider):
                     f"Sending a request to {self.local_unstructured_url}/partition"
                 )
                 #ingestion_config["strategy"] = "hi_res"
-                print(ingestion_config)
+                #print(ingestion_config)
                 response = await self.client.post(
                     f"{self.local_unstructured_url}/partition",
                     json={

+ 14 - 14
py/migrations/versions/2fac23e4d91b_migrate_to_document_search.py

@@ -57,7 +57,7 @@ async def async_generate_all_summaries():
             "Environment variable `R2R_BASE_URL` must be provided, it must point at the R2R deployment you wish to migrate, e.g. `http://localhost:7272`."
         )
 
-    print(f"Using R2R Base URL: {base_url})")
+    #print(f"Using R2R Base URL: {base_url})")
 
     base_model = os.getenv("R2R_BASE_MODEL")
     if not base_model:
@@ -65,7 +65,7 @@ async def async_generate_all_summaries():
             "Environment variable `R2R_BASE_MODEL` must be provided, e.g. `openai/gpt-4o-mini`, it will be used for generating document summaries during migration."
         )
 
-    print(f"Using R2R Base Model: {base_model}")
+    #print(f"Using R2R Base Model: {base_model}")
 
     client = R2RAsyncClient(base_url)
 
@@ -86,11 +86,11 @@ async def async_generate_all_summaries():
         try:
             with open("document_summaries.json", "r") as f:
                 document_summaries = json.load(f)
-            print(
+            #print(
                 f"Loaded {len(document_summaries)} existing document summaries"
             )
         except json.JSONDecodeError:
-            print(
+            #print(
                 "Existing document_summaries.json was invalid, starting fresh"
             )
             document_summaries = {}
@@ -103,12 +103,12 @@ async def async_generate_all_summaries():
 
         # Skip if document already has a summary
         if doc_id in document_summaries:
-            print(
+            #print(
                 f"Skipping document {title} ({doc_id}) - summary already exists"
             )
             continue
 
-        print(f"Processing document: {title} ({doc_id})")
+        #print(f"Processing document: {title} ({doc_id})")
 
         try:
             document_text = f"Document Title:{title}\n"
@@ -170,10 +170,10 @@ async def async_generate_all_summaries():
             with open("document_summaries.json", "w") as f:
                 json.dump(document_summaries, f)
 
-            print(f"Successfully processed document {doc_id}")
+            #print(f"Successfully processed document {doc_id}")
 
         except Exception as e:
-            print(f"Error processing document {doc_id}: {str(e)}")
+            #print(f"Error processing document {doc_id}: {str(e)}")
             # Continue with next document instead of failing
             continue
 
@@ -193,7 +193,7 @@ def check_if_upgrade_needed():
 
     # First check if the document_info table exists
     if not inspector.has_table("document_info", schema=project_name):
-        print(
+        #print(
             f"Migration not needed: '{project_name}.document_info' table doesn't exist yet"
         )
         return False
@@ -207,11 +207,11 @@ def check_if_upgrade_needed():
     needs_upgrade = "summary" not in existing_columns
 
     if needs_upgrade:
-        print(
+        #print(
             "Migration needed: 'summary' column does not exist in document_info table"
         )
     else:
-        print(
+        #print(
             "Migration not needed: 'summary' column already exists in document_info table"
         )
 
@@ -226,9 +226,9 @@ def upgrade() -> None:
         try:
             with open("document_summaries.json", "r") as f:
                 document_summaries = json.load(f)
-            print(f"Loaded {len(document_summaries)} document summaries")
+            #print(f"Loaded {len(document_summaries)} document summaries")
         except FileNotFoundError:
-            print(
+            #print(
                 "document_summaries.json not found. Continuing without summaries and/or summary embeddings."
             )
             pass
@@ -286,7 +286,7 @@ def upgrade() -> None:
                     WHERE document_id = '{doc_id}'::uuid;
                     """)
         else:
-            print(
+            #print(
                 "No document summaries found, skipping update of existing documents"
             )
 

+ 3 - 3
py/migrations/versions/7eb70560f406_add_limits_overrides_to_users.py

@@ -28,7 +28,7 @@ def check_if_upgrade_needed():
 
     # Check if users table exists
     if not inspector.has_table("users", schema=project_name):
-        print(
+        #print(
             f"Migration not needed: '{project_name}.users' table doesn't exist"
         )
         return False
@@ -39,12 +39,12 @@ def check_if_upgrade_needed():
     }
 
     if "limits_overrides" in users_columns:
-        print(
+        #print(
             "Migration not needed: users table already has limits_overrides column"
         )
         return False
     else:
-        print("Migration needed: users table needs limits_overrides column")
+        #print("Migration needed: users table needs limits_overrides column")
         return True
 
 

+ 3 - 3
py/migrations/versions/8077140e1e99_v3_api_database_revision.py

@@ -39,15 +39,15 @@ def check_if_upgrade_needed():
     # If we find a new column name, we don't need to migrate
     # If we find an old column name, we do need to migrate
     if "id" in collections_columns:
-        print(
+        #print(
             "Migration not needed: collections table already has 'id' column"
         )
         return False
     elif "collection_id" in collections_columns:
-        print("Migration needed: collections table has old column names")
+        #print("Migration needed: collections table has old column names")
         return True
     else:
-        print(
+        #print(
             "Migration not needed: collections table doesn't exist or has different structure"
         )
         return False

+ 2 - 2
py/migrations/versions/c45a9cf6a8a4_add_user_and_document_count_to_.py

@@ -36,12 +36,12 @@ def check_if_upgrade_needed():
     }
 
     if "user_count" in collections_columns:
-        print(
+        #print(
             "Migration not needed: collections table already has count columns"
         )
         return False
     else:
-        print("Migration needed: collections table needs count columns")
+        #print("Migration needed: collections table needs count columns")
         return True
 
 

+ 3 - 3
py/migrations/versions/d342e632358a_migrate_to_asyncpg.py

@@ -41,7 +41,7 @@ def check_if_upgrade_needed():
         old_vector_table_name, schema=project_name
     )
     if not has_old_table:
-        print(
+        #print(
             f"Migration not needed: Original '{old_vector_table_name}' table doesn't exist"
         )
         # Skip this migration since we're starting from a newer state
@@ -52,12 +52,12 @@ def check_if_upgrade_needed():
         new_vector_table_name, schema=project_name
     )
     if has_new_table:
-        print(
+        #print(
             f"Migration not needed: '{new_vector_table_name}' table already exists"
         )
         return False
 
-    print(
+    #print(
         f"Migration needed: Need to migrate from '{old_vector_table_name}' to '{new_vector_table_name}'"
     )
     return True

+ 5 - 5
py/tests/integration/conftest.py

@@ -23,12 +23,12 @@ class RetryableR2RAsyncClient(R2RAsyncClient):
                 if "Request failed" in str(e) and retries < max_retries:
                     retries += 1
                     wait_time = delay * (2 ** (retries - 1))
-                    print(f"Request timed out. Retrying ({retries}/{max_retries}) after {wait_time:.2f}s...")
+                    #print(f"Request timed out. Retrying ({retries}/{max_retries}) after {wait_time:.2f}s...")
                     await asyncio.sleep(wait_time)
                 elif "429" in str(e) and retries < max_retries:
                     retries += 1
                     wait_time = delay * (3 ** (retries - 1))
-                    print(f"Rate limited. Retrying ({retries}/{max_retries}) after {wait_time:.2f}s...")
+                    #print(f"Rate limited. Retrying ({retries}/{max_retries}) after {wait_time:.2f}s...")
                     await asyncio.sleep(wait_time)
                 else:
                     raise
@@ -48,12 +48,12 @@ class RetryableR2RClient(R2RClient):
                 if ("Request failed" in str(e) or "timed out" in str(e)) and retries < max_retries:
                     retries += 1
                     wait_time = delay * (2 ** (retries - 1))
-                    print(f"Request timed out. Retrying ({retries}/{max_retries}) after {wait_time:.2f}s...")
+                    #print(f"Request timed out. Retrying ({retries}/{max_retries}) after {wait_time:.2f}s...")
                     time.sleep(wait_time)
                 elif "429" in str(e) and retries < max_retries:
                     retries += 1
                     wait_time = delay * (3 ** (retries - 1))
-                    print(f"Rate limited. Retrying ({retries}/{max_retries}) after {wait_time:.2f}s...")
+                    #print(f"Rate limited. Retrying ({retries}/{max_retries}) after {wait_time:.2f}s...")
                     time.sleep(wait_time)
                 else:
                     raise
@@ -191,4 +191,4 @@ def test_collection(client: R2RClient, test_document):
         except R2RException:
             pass
     except Exception as e:
-        print(f"Error during test_collection cleanup: {e}")
+        #print(f"Error during test_collection cleanup: {e}")

+ 2 - 2
py/tests/integration/test_agent.py

@@ -84,7 +84,7 @@ def test_agent_rag_tool_usage2(client, test_collection):
 #         research_tools=["python_executor"],
 #         research_generation_config={"stream": False, "max_tokens_to_sample": 200},
 #     )
-#     print(response)
+#     #print(response)
 
 #     assert "41845579776000" in response.results.messages[-1].content.replace(",",""), "Agent should execute Python code and return correct factorial result"
 
@@ -106,7 +106,7 @@ def test_agent_rag_tool_usage2(client, test_collection):
 #         rag_generation_config={"stream": False, "max_tokens_to_sample": 100},
 #     )
 
-#     print('response = ', response)
+#     #print('response = ', response)
 #     assert "declining cases" in response.results.messages[-1].content.lower(), "Agent should use web search tool for recent data"
 
 def test_research_agent_client(client):

+ 1 - 1
py/tests/integration/test_documents.py

@@ -612,7 +612,7 @@ def test_delete_by_version_metadata(client: R2RClient, cleanup_documents):
         # Verify deprecated doc is deleted
         with pytest.raises(R2RException) as exc:
             doc = client.documents.retrieve(id=docs[0])
-            print('doc = ', doc)
+            #print('doc = ', doc)
         assert exc.value.status_code == 404
 
         # Verify current doc still exists

+ 1 - 1
py/tests/integration/test_indices.py

@@ -53,7 +53,7 @@ def test_list_indices(client: R2RClient):
         resp = client.indices.list(limit=5)
         results = resp.results
     except Exception as e:
-        print(f"Error: {e}")
+        #print(f"Error: {e}")
     assert results.indices is not None, "Indices field is None"
     # Just ensure we get a list without error. Detailed checks depend on data availability.
     assert isinstance(results.indices, list), "Indices field is not a list"

+ 4 - 4
py/tests/integration/test_system.py

@@ -167,13 +167,13 @@
 #         await aclient.retrieval.search(
 #             "test query",
 #         )
-#     print('going sleepy sweep now...')
+#     #print('going sleepy sweep now...')
 #     t = datetime.now()
 #     # Wait for reset
 #     # time.sleep(62)
 #     await asyncio.sleep(70)
-#     print('wakey wakey')
-#     print('dt = ', datetime.now() - t)
+#     #print('wakey wakey')
+#     #print('dt = ', datetime.now() - t)
 
 #     # Should be able to make requests again
 #     response = await aclient.retrieval.search(
@@ -208,7 +208,7 @@
 #     await aclient.users.register(test_user, test_pass)
 #     await aclient.users.login(test_user, test_pass)
 #     me = await aclient.users.me()
-#     print("me = ", me)
+#     #print("me = ", me)
 #     # Configure user-specific limits
 #     # SET INSIDE THE CONFIG
 #     # user_id = client.users.me().results.id

+ 2 - 2
py/tests/integration/test_users.py

@@ -778,14 +778,14 @@ def test_document_ownership_filtering(client: R2RClient):
     try:
         client.documents.delete(user1_document_id)
     except Exception as e:
-        print(f"Failed to delete user1's document: {e}")
+        #print(f"Failed to delete user1's document: {e}")
 
     client.users.logout()
     client.users.login(user2_email, user2_password)
     try:
         client.documents.delete(user2_document_id)
     except Exception as e:
-        print(f"Failed to delete user2's document: {e}")
+        #print(f"Failed to delete user2's document: {e}")
 
     client.users.logout()
 

+ 23 - 23
py/tests/scaling/loadTester.py

@@ -51,7 +51,7 @@ class LoadTester:
         self.metrics: list[Metrics] = []
         self.users: list[dict] = []
         self.running = True
-        print("making an async client...")
+        #print("making an async client...")
         self.client = R2RAsyncClient(base_url)
 
     async def safe_call(self, coro, timeout, operation_desc="operation"):
@@ -60,11 +60,11 @@ class LoadTester:
         try:
             return await asyncio.wait_for(coro, timeout=timeout)
         except asyncio.TimeoutError:
-            print(
+            #print(
                 f"[TIMEOUT] {operation_desc} took longer than {timeout} seconds"
             )
         except Exception as e:
-            print(f"[ERROR] Exception during {operation_desc}: {e}")
+            #print(f"[ERROR] Exception during {operation_desc}: {e}")
         return None
 
     async def register_login_ingest_user(self, user_email: str, password: str):
@@ -76,7 +76,7 @@ class LoadTester:
             operation_desc=f"register user {user_email}",
         )
         if reg_result is None:
-            print(
+            #print(
                 f"Registration may have failed or user {user_email} already exists."
             )
 
@@ -110,7 +110,7 @@ class LoadTester:
 
     async def setup_users(self):
         """Initialize users and their documents."""
-        print("Setting up users...")
+        #print("Setting up users...")
         setup_tasks = []
 
         for i in range(NUM_USERS):
@@ -123,7 +123,7 @@ class LoadTester:
         user_results = await asyncio.gather(*setup_tasks)
         self.users = [user for user in user_results if user is not None]
 
-        print(f"Setup complete! Successfully set up {len(self.users)} users")
+        #print(f"Setup complete! Successfully set up {len(self.users)} users")
 
     async def run_user_queries(self, user: dict):
         """Run queries for a single user, with timeouts and error handling."""
@@ -180,25 +180,25 @@ class LoadTester:
             [m for m in self.metrics if m.status == "success"])
         failed_requests = len([m for m in self.metrics if m.status == "error"])
 
-        print("\nTest Results:")
-        print(f"Total Requests: {len(self.metrics)}")
-        print(f"Successful Requests: {successful_requests}")
-        print(f"Failed Requests: {failed_requests}")
+        #print("\nTest Results:")
+        #print(f"Total Requests: {len(self.metrics)}")
+        #print(f"Successful Requests: {successful_requests}")
+        #print(f"Failed Requests: {failed_requests}")
 
         if durations:
-            print("\nLatency Statistics (ms):")
-            print(f"Min: {min(durations) / 1000.0:.2f}")
-            print(f"Max: {max(durations) / 1000.0:.2f}")
-            print(f"Mean: {statistics.mean(durations) / 1000.0:.2f}")
-            print(f"Median: {statistics.median(durations) / 1000.0:.2f}")
+            #print("\nLatency Statistics (ms):")
+            #print(f"Min: {min(durations) / 1000.0:.2f}")
+            #print(f"Max: {max(durations) / 1000.0:.2f}")
+            #print(f"Mean: {statistics.mean(durations) / 1000.0:.2f}")
+            #print(f"Median: {statistics.median(durations) / 1000.0:.2f}")
             try:
-                print(
+                #print(
                     f"95th Percentile: {statistics.quantiles(durations, n=20)[-1] / 1000.0:.2f}"
                 )
             except Exception:
                 pass
 
-        print(
+        #print(
             f"\nRequests per second: {len(self.metrics) / TEST_DURATION_SECONDS:.2f}"
         )
 
@@ -207,13 +207,13 @@ class LoadTester:
         await self.setup_users()
 
         if not self.users:
-            print("No users were successfully set up. Exiting test.")
+            #print("No users were successfully set up. Exiting test.")
             return
 
-        print(f"Starting load test with {len(self.users)} users...")
-        print(f"Ramp up: {RAMP_UP_SECONDS}s")
-        print(f"Steady state: {STEADY_STATE_SECONDS}s")
-        print(f"Ramp down: {RAMP_DOWN_SECONDS}s")
+        #print(f"Starting load test with {len(self.users)} users...")
+        #print(f"Ramp up: {RAMP_UP_SECONDS}s")
+        #print(f"Steady state: {STEADY_STATE_SECONDS}s")
+        #print(f"Ramp down: {RAMP_DOWN_SECONDS}s")
 
         tasks = [
             asyncio.create_task(self.run_user_queries(user))
@@ -228,7 +228,7 @@ class LoadTester:
         try:
             await asyncio.wait_for(asyncio.gather(*tasks), timeout=20)
         except asyncio.TimeoutError:
-            print(
+            #print(
                 "[WARNING] Not all tasks finished promptly after stopping. Cancelling tasks."
             )
             for t in tasks:

+ 3 - 3
py/tests/unit/agent/test_streaming_agent.py

@@ -284,7 +284,7 @@ class TestStreamingAgent:
         citation_events = [e for e in mock_agent.events if e["type"] == "citation"]
 
         # Debug output
-        print(f"Citation events: {citation_events}")
+        #print(f"Citation events: {citation_events}")
 
         # Verify the sanitized IDs
         assert len(citation_events) >= 2, "Not enough citation events were generated"
@@ -319,8 +319,8 @@ class TestStreamingAgent:
         consolidated = consolidate_citations(text, CitationTracker())
 
         # Print actual values for debugging
-        print(f"cite1 spans: {consolidated['cite1']}")
-        print(f"cite2 spans: {consolidated['cite2']}")
+        #print(f"cite1 spans: {consolidated['cite1']}")
+        #print(f"cite2 spans: {consolidated['cite2']}")
 
         # Verify the consolidated map
         assert len(consolidated) == 2  # Two unique citation IDs

+ 2 - 2
py/tests/unit/app/test_routes.py

@@ -187,8 +187,8 @@ def test_all_routes_have_rate_limiting(router):
     import warnings
 
     for route in router.router.routes:
-        print(f"Checking route: {route.path}")
-        print(f"Dependencies: {route.dependencies}")
+        #print(f"Checking route: {route.path}")
+        #print(f"Dependencies: {route.dependencies}")
         has_rate_limit = any(dep.dependency == router.rate_limit_dependency
                              for dep in route.dependencies)
         if not has_rate_limit:

+ 16 - 16
py/tests/unit/database/test_limits.py

@@ -38,13 +38,13 @@ async def test_log_request_and_count(limits_handler):
     }
     limits_handler.config.route_limits = new_route_limits
 
-    print(f"\nTesting with route limits: {new_route_limits}")
-    print(f"Route settings: {limits_handler.config.route_limits[route]}")
+    #print(f"\nTesting with route limits: {new_route_limits}")
+    #print(f"Route settings: {limits_handler.config.route_limits[route]}")
 
     try:
         # Initial check should pass (no requests yet)
         await limits_handler.check_limits(test_user, route)
-        print("Initial check passed (no requests)")
+        #print("Initial check passed (no requests)")
 
         # Log 5 requests (exactly at limit)
         for i in range(5):
@@ -53,17 +53,17 @@ async def test_log_request_and_count(limits_handler):
             one_min_ago = now - timedelta(minutes=1)
             route_count = await limits_handler._count_requests(
                 user_id, route, one_min_ago)
-            print(f"Route count after request {i + 1}: {route_count}")
+            #print(f"Route count after request {i + 1}: {route_count}")
 
             # This should pass for all 5 requests
             await limits_handler.check_limits(test_user, route)
-            print(f"Check limits passed after request {i + 1}")
+            #print(f"Check limits passed after request {i + 1}")
 
         # Log the 6th request (over limit)
         await limits_handler.log_request(user_id, route)
         route_count = await limits_handler._count_requests(
             user_id, route, one_min_ago)
-        print(f"Route count after request 6: {route_count}")
+        #print(f"Route count after request 6: {route_count}")
 
         # This check should fail as we've exceeded route_per_min=5
         with pytest.raises(ValueError,
@@ -101,7 +101,7 @@ async def test_global_limit(limits_handler):
     try:
         # Initial check should pass (no requests)
         await limits_handler.check_limits(test_user, route)
-        print("Initial global check passed (no requests)")
+        #print("Initial global check passed (no requests)")
 
         # Log 10 requests (hits the limit)
         for i in range(11):
@@ -112,7 +112,7 @@ async def test_global_limit(limits_handler):
         one_min_ago = now - timedelta(minutes=1)
         global_count = await limits_handler._count_requests(
             user_id, None, one_min_ago)
-        print(f"Global count after 10 requests: {global_count}")
+        #print(f"Global count after 10 requests: {global_count}")
 
         # This should fail as we've hit global_per_min=10
         with pytest.raises(ValueError,
@@ -148,7 +148,7 @@ async def test_monthly_limit(limits_handler):
     try:
         # Initial check should pass (no requests)
         await limits_handler.check_limits(test_user, route)
-        print("Initial monthly check passed (no requests)")
+        #print("Initial monthly check passed (no requests)")
 
         # Log 20 requests (hits the monthly limit)
         for i in range(21):
@@ -163,7 +163,7 @@ async def test_monthly_limit(limits_handler):
                                      microsecond=0)
         monthly_count = await limits_handler._count_requests(
             user_id, None, first_of_month)
-        print(f"Monthly count after 20 requests: {monthly_count}")
+        #print(f"Monthly count after 20 requests: {monthly_count}")
 
         # This should fail as we've hit monthly_limit=20
         with pytest.raises(ValueError, match="Monthly rate limit exceeded"):
@@ -206,13 +206,13 @@ async def test_user_level_override(limits_handler):
                                                  monthly_limit=20)
 
     # Debug: Print current limits
-    print(f"\nDefault limits: {limits_handler.config.limits}")
-    print(f"User overrides: {test_user.limits_overrides}")
+    #print(f"\nDefault limits: {limits_handler.config.limits}")
+    #print(f"User overrides: {test_user.limits_overrides}")
 
     try:
         # First check limits (should pass as no requests yet)
         await limits_handler.check_limits(test_user, route)
-        print("Initial check passed (no requests yet)")
+        #print("Initial check passed (no requests yet)")
 
         # Log first request
         await limits_handler.log_request(user_id, route)
@@ -224,9 +224,9 @@ async def test_user_level_override(limits_handler):
             user_id, None, one_min_ago)
         route_count = await limits_handler._count_requests(
             user_id, route, one_min_ago)
-        print("\nAfter first request:")
-        print(f"Global count: {global_count}")
-        print(f"Route count: {route_count}")
+        #print("\nAfter first request:")
+        #print(f"Global count: {global_count}")
+        #print(f"Route count: {route_count}")
 
         # Log second request
         await limits_handler.log_request(user_id, route)

+ 1 - 1
py/tests/unit/retrieval/test_retrieval_old.py

@@ -124,7 +124,7 @@ def retrieval_service(mock_providers):
 #         + chunk_handler.semantic_search.call_count
 #         + chunk_handler.full_text_search.call_count
 #     )
-#     print('total_chunk_calls = ', total_chunk_calls)
+#     #print('total_chunk_calls = ', total_chunk_calls)
 
 #     # Check how many times we called embedding
 #     # 1) Possibly the code might embed "Aristotle" once if it re-ranks with user_text (though you might not do that).

+ 1 - 1
py/updatecode/documents_router.py

@@ -119,7 +119,7 @@ class DocumentsRouter(BaseRouterV3):
 
     # TODO - Remove this legacy method
     def _register_workflows(self):
-        print(self.providers.orchestration.config.provider)
+        #print(self.providers.orchestration.config.provider)
         self.providers.orchestration.register_workflows(
             Workflow.INGESTION,
             self.services.ingestion,