Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.
Merged
19 changes: 15 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@
# Sessions are executed in the order so putting the smaller sessions
# ahead to fail fast at presubmit running.
nox.options.sessions = [
"unit",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is because it's redundant with GitHub Actions, right?

Doesn't look like

coverage report --show-missing --fail-under=35
actually uses nox for the coverage step, so that's probably okay to just be system tests.

"system-3.9",
"system-3.12",
"cover",
# TODO(b/401609005): remove
"cleanup",
]

Expand Down Expand Up @@ -471,20 +471,31 @@ def cover(session):
session.install("coverage", "pytest-cov")

# Create a coverage report that includes only the product code.
omitted_paths = [
# non-prod, unit tested
"bigframes/core/compile/polars/*",
"bigframes/core/compile/sqlglot/*",
# untested
"bigframes/streaming/*",
# utils
"bigframes/testing/*",
]

session.run(
"coverage",
"report",
"--include=bigframes/*",
# Only unit tested
f"--omit={','.join(omitted_paths)}",
"--show-missing",
"--fail-under=85",
"--fail-under=84",
)

# Make sure there is no dead code in our test directories.
# Make sure there is no dead code in our system test directories.
session.run(
"coverage",
"report",
"--show-missing",
"--include=tests/unit/*",
"--include=tests/system/small/*",
# TODO(b/353775058) resume coverage to 100 when the issue is fixed.
"--fail-under=99",
Expand Down