From 729e94ad2ecf30cd0c051f7f1cd28d9f9e5b9165 Mon Sep 17 00:00:00 2001 From: Shobhit Singh Date: Mon, 24 Mar 2025 12:23:22 -0700 Subject: [PATCH 1/6] chore: configure CI for 1.x branch (#1528) --- .github/workflows/docs.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/mypy.yml | 2 +- .github/workflows/unittest.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2833fe98ff..8d3c3e10e2 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,7 +1,7 @@ on: pull_request: branches: - - main + - v1 name: docs jobs: docs: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1051da0bdd..54a39a225a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,7 +1,7 @@ on: pull_request: branches: - - main + - v1 name: lint jobs: lint: diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index e6a79291d0..4a88a14efa 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -1,7 +1,7 @@ on: pull_request: branches: - - main + - v1 name: mypy jobs: mypy: diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index a7805de447..cfd40c733d 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -1,7 +1,7 @@ on: pull_request: branches: - - main + - v1 name: unittest jobs: unit: From 341b499d83a7295869406f2eceb41f9053165e37 Mon Sep 17 00:00:00 2001 From: Shobhit Singh Date: Sat, 5 Apr 2025 00:09:12 +0000 Subject: [PATCH 2/6] chore: test direct push --- tests/data/test.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/data/test.txt diff --git a/tests/data/test.txt b/tests/data/test.txt new file mode 100644 index 0000000000..e69de29bb2 From c9635490e5133736417ee2956aae9c850b908916 Mon Sep 17 00:00:00 2001 From: Shobhit Singh Date: Sat, 5 Apr 2025 00:12:56 +0000 Subject: [PATCH 3/6] chore: test direct push --- tests/data/test.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/data/test.txt diff --git a/tests/data/test.txt b/tests/data/test.txt new file mode 100644 index 0000000000..e69de29bb2 From 11ca80fcd950861f6d440bcb8c5572f5e34d8be3 Mon Sep 17 00:00:00 2001 From: Shobhit Singh Date: Sat, 5 Apr 2025 00:14:20 +0000 Subject: [PATCH 4/6] Revert "chore: test direct push" This reverts commit c9635490e5133736417ee2956aae9c850b908916. --- tests/data/test.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 tests/data/test.txt diff --git a/tests/data/test.txt b/tests/data/test.txt deleted file mode 100644 index e69de29bb2..0000000000 From 58d79689e9b51ca6685204fc7e5916c3d8dc371f Mon Sep 17 00:00:00 2001 From: Shobhit Singh Date: Thu, 17 Apr 2025 23:31:48 +0000 Subject: [PATCH 5/6] docs: note that `udf` is in preview and must be python 3.11 compatible --- bigframes/functions/_function_session.py | 9 ++++++--- bigframes/session/__init__.py | 7 +++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/bigframes/functions/_function_session.py b/bigframes/functions/_function_session.py index b0d3ab81eb..ac15199d81 100644 --- a/bigframes/functions/_function_session.py +++ b/bigframes/functions/_function_session.py @@ -740,9 +740,12 @@ def udf( BigQuery managed function. .. note:: - The udf must be self-contained, i.e. it must not contain any + This feature is in preview. The code in the udf must be + (1) self-contained, i.e. it must not contain any references to an import or variable defined outside the function - body. + body, and + (2) Python 3.11 compatible, as that is the environment + in which the code is executed in the cloud. .. note:: Please have following IAM roles enabled for you: @@ -794,7 +797,7 @@ def udf( https://pip.pypa.io/en/stable/reference/requirements-file-format/. """ - warnings.warn("udf is in preview.", category=bfe.PreviewWarning) + warnings.warn("udf is in preview.", category=bfe.PreviewWarning, stacklevel=6) # Some defaults may be used from the session if not provided otherwise. session = self._resolve_session(session) diff --git a/bigframes/session/__init__.py b/bigframes/session/__init__.py index 72129d594e..a7ec1d4267 100644 --- a/bigframes/session/__init__.py +++ b/bigframes/session/__init__.py @@ -1432,9 +1432,12 @@ def udf( BigQuery managed function. .. note:: - The udf must be self-contained, i.e. it must not contain any + This feature is in preview. The code in the udf must be + (1) self-contained, i.e. it must not contain any references to an import or variable defined outside the function - body. + body, and + (2) Python 3.11 compatible, as that is the environment + in which the code is executed in the cloud. .. note:: Please have following IAM roles enabled for you: From 5a9ccf49f1d778224d4b428ba1ddf1ae09c584b0 Mon Sep 17 00:00:00 2001 From: Shobhit Singh Date: Thu, 17 Apr 2025 23:34:25 +0000 Subject: [PATCH 6/6] Revert "chore: test direct push" This reverts commit 341b499d83a7295869406f2eceb41f9053165e37. --- tests/data/test.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 tests/data/test.txt diff --git a/tests/data/test.txt b/tests/data/test.txt deleted file mode 100644 index e69de29bb2..0000000000