Skip to content

Add ./task doctest to run Python doctests - #6089

Merged
denik merged 1 commit into
mainfrom
denik/doctests
Sep 1, 2026
Merged

denik merged 1 commit into
mainfrom
denik/doctests

Conversation

@denik

@denik denik commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Why

We have doctests in a handful of Python helpers but nothing runs them. This adds ./task doctest, wired into task test so they run locally and in CI.

@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: bf30cbd

Run: 30381166736

Env ❌​FAIL 🟨​KNOWN 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
❌​ aws linux 3 1 3 4 319 1063 6:06
❌​ aws windows 3 1 3 4 321 1061 8:42
❌​ azure linux 3 1 3 4 319 1062 6:02
❌​ azure windows 3 1 3 4 321 1060 6:41
❌​ gcp linux 3 1 5 318 1064 5:59
❌​ gcp windows 3 1 5 320 1062 8:42
11 interesting tests: 4 SKIP, 3 FAIL, 3 RECOVERED, 1 KNOWN
Test Name aws linux aws windows azure linux azure windows gcp linux gcp windows
🟨​ TestAccept 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K
❌​ TestAccept/bundle/deploy/mlops-stacks ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/deploy/mlops-stacks/DATABRICKS_BUNDLE_ENGINE=direct ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/deploy/mlops-stacks/DATABRICKS_BUNDLE_ENGINE=terraform ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestFetchRepositoryInfoAPI_FromRepo 💚​R 💚​R 💚​R 💚​R 🙈​S 🙈​S
💚​ TestFetchRepositoryInfoAPI_FromRepo/root 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R 💚​R 💚​R

@denik
denik enabled auto-merge July 29, 2026 08:42
Runs the doctest runner over every Python file that contains a `>>>` prompt
(found via git grep). Wired into `task test` so doctests run in CI.

Co-authored-by: Isaac
Comment thread tools/run_doctests.py
Comment on lines +23 to +27
out = subprocess.check_output(
["git", "grep", "-l", "--untracked", "--no-color", "-F", ">>>", "--", "*.py"],
cwd=ROOT,
text=True,
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice, better than keeping an explicit list!

@denik
denik added this pull request to the merge queue Sep 1, 2026
Merged via the queue into main with commit 0a1f4a9 Sep 1, 2026
35 checks passed
@denik
denik deleted the denik/doctests branch September 1, 2026 14:46
denik added a commit that referenced this pull request Sep 1, 2026
#6443 masks a Lakebase oneof member under its group name, and #6089 adds ./task doctest. The first
lands on rows this catalog was already recording as errors: nine of them, across postgres_projects,
postgres_branches and postgres_endpoints, become OK or SUPPRESSED.

Which is the point of the exercise -- those rows named the bug in the API's own words
("Unknown field path in update_mask") and now name its absence.

Co-authored-by: Isaac
janniklasrose pushed a commit that referenced this pull request Sep 15, 2026
## Why
We have doctests in a handful of Python helpers but nothing runs them.
This adds `./task doctest`, wired into `task test` so they run locally
and in CI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants