Skip to content

Commit d1e9ec2

Browse files
authored
docs: use restructured text to allow publishing to PyPI (#1565)
* docs: use restructured text to avoid PyPI security * change warning to a header * fix link * add space for link
1 parent b4da1cf commit d1e9ec2

File tree

3 files changed

+32
-16
lines changed

3 files changed

+32
-16
lines changed

README.rst

+23-16
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,29 @@ powered by the BigQuery engine.
1212
BigQuery DataFrames is an open-source package. You can run
1313
``pip install --upgrade bigframes`` to install the latest version.
1414

15-
.. raw:: html
16-
17-
<div style="border: 1px solid #f5c6cb;
18-
background-color: #f8d7da; color: #721c24; padding: 15px; margin-bottom: 20px; border-radius: 4px; font-size: 90%;">
19-
<p style="margin-top: 0; font-weight: bold;">⚠️ Breaking Changes in BigQuery DataFrames v2.0</p>
20-
<p>Version 2.0 introduces breaking changes for improved security and performance. Key default behaviors have changed:</p>
21-
<ul>
22-
<li><strong>Large Results (&gt;10GB):</strong> The default value for <code>allow_large_results</code> has changed to False. Methods like <code>to_pandas()</code> will now fail if the query result's compressed data size exceeds 10GB, unless large results are explicitly permitted.</li>
23-
<li><strong>Remote Function Security:</strong>The library no longer automatically lets the Compute Engine default service account become the identity of the Cloud Run functions. If that is desired, it has to be indicated by passing cloud_function_service_account="default". And network ingress now defaults to "internal-only".</li>
24-
<li><strong>@remote_function Argument Passing:</strong> Arguments other than input_types, output_type, and dataset to remote_function must now be passed using keyword syntax, as positional arguments are no longer supported.</li>
25-
<li><strong>Endpoint Connections:</strong> Automatic fallback to locational endpoints in certain regions is removed. </li>
26-
<li><strong>LLM Updates (Gemini Integration):</strong> Integrations now default to the <code>gemini-2.0-flash-001</code> model. PaLM2 support has been removed; please migrate any existing PaLM2 usage to Gemini. Note: The current default model will be removed in Version 3.0.</li>
27-
</ul>
28-
<p><strong>Important:</strong> If you are not ready to adapt to these changes, please pin your dependency to a version less than 2.0 (e.g., <code>bigframes==1.42.0</code>) to avoid disruption.</p>
29-
<p style="margin-bottom: 0;"> To learn about these changes and how to migrate to version 2.0, see: <a href="https://cloud.google.com/bigquery/docs/bigquery-dataframes-introduction" style="color: #842029; text-decoration: underline;">updated introduction guide</a>.</p>
30-
</div>
15+
⚠️ Warning: Breaking Changes in BigQuery DataFrames v2.0
16+
--------------------------------------------------------
17+
18+
Version 2.0 introduces breaking changes for improved security and performance. Key default behaviors have changed, including
19+
20+
* **Large Results (>10GB):** The default value for ``allow_large_results`` has changed to ``False``.
21+
Methods like ``to_pandas()`` will now fail if the query result's compressed data size exceeds 10GB,
22+
unless large results are explicitly permitted.
23+
* **Remote Function Security:** The library no longer automatically lets the Compute Engine default service
24+
account become the identity of the Cloud Run functions. If that is desired, it has to be indicated by passing
25+
``cloud_function_service_account="default"``. And network ingress now defaults to ``"internal-only"``.
26+
* **@remote_function Argument Passing:** Arguments other than ``input_types``, ``output_type``, and ``dataset``
27+
to ``remote_function`` must now be passed using keyword syntax, as positional arguments are no longer supported.
28+
* **Endpoint Connections:** Automatic fallback to locational endpoints in certain regions is removed.
29+
* **LLM Updates (Gemini Integration):** Integrations now default to the ``gemini-2.0-flash-001`` model.
30+
PaLM2 support has been removed; please migrate any existing PaLM2 usage to Gemini. **Note:** The current default
31+
model will be removed in Version 3.0.
32+
33+
**Important:** If you are not ready to adapt to these changes, please pin your dependency to a version less than 2.0
34+
(e.g., ``bigframes==1.42.0``) to avoid disruption.
35+
36+
To learn about these changes and how to migrate to version 2.0, see the
37+
`updated introduction guide <https://cloud.google.com/bigquery/docs/bigquery-dataframes-introduction>`_.
3138

3239
.. |GA| image:: https://img.shields.io/badge/support-GA-gold.svg
3340
:target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#general-availability

noxfile.py

+8
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,14 @@ def lint_setup_py(session):
184184
session.install("docutils", "pygments")
185185
session.run("python", "setup.py", "check", "--restructuredtext", "--strict")
186186

187+
session.install("twine", "wheel")
188+
shutil.rmtree("build", ignore_errors=True)
189+
shutil.rmtree("dist", ignore_errors=True)
190+
session.run("python", "setup.py", "sdist")
191+
session.run(
192+
"python", "-m", "twine", "check", *pathlib.Path("dist").glob("*.tar.gz")
193+
)
194+
187195

188196
def install_unittest_dependencies(session, install_test_extra, *constraints):
189197
standard_deps = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_DEPENDENCIES

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
version=version_id,
118118
description=description,
119119
long_description=readme,
120+
long_description_content_type="text/x-rst",
120121
author="Google LLC",
121122
author_email="[email protected]",
122123
license="Apache 2.0",

0 commit comments

Comments
 (0)