Skip to content

Commit

Permalink
Merge pull request #1278 from luarss/topic/disable-update-warn
Browse files Browse the repository at this point in the history
Add update warning opt out
  • Loading branch information
penguine-ip authored Jan 19, 2025
2 parents 05390ee + a881ec6 commit 1ee9da3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
8 changes: 7 additions & 1 deletion deepeval/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import warnings
import re

Expand Down Expand Up @@ -65,4 +66,9 @@ def check_for_update():
pass


check_for_update()
def update_warning_opt_out():
return os.getenv("DEEPEVAL_UPDATE_WARNING_OPT_OUT") == "YES"


if not update_warning_opt_out():
check_for_update()
12 changes: 12 additions & 0 deletions docs/docs/miscellaneous.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
id: miscellaneous
title: Miscellaneous
sidebar_label: Miscellaneous
---

Disable update warnings as follows:

```console
export DEEPEVAL_UPDATE_WARNING_OPT_OUT="YES"
```

5 changes: 4 additions & 1 deletion docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,10 @@ module.exports = {
{
type: "category",
label: "Others",
items: ["data-privacy"],
items: [
"data-privacy",
"miscellaneous",
],
collapsed: false,
},
],
Expand Down

0 comments on commit 1ee9da3

Please sign in to comment.