Skip to content

Conversation

@everettVT
Copy link
Contributor

Changes Made

  • Seperates Pages for Functions and Classes/Methods
  • Adds comparison guide with migration and known issues.
  • re-organizes nav with new titles favoring Next Gen.
  • Adds a reference to daft-examples repo in examples index.

Related Issues

None, just needs to get done.

Checklist

  • Documented in API Docs (if applicable)
  • Documented in User Guide (if applicable)
  • If adding a new documentation page, doc is added to docs/mkdocs.yml navigation
  • Documentation builds and is formatted properly

@everettVT everettVT self-assigned this Oct 31, 2025
@everettVT everettVT added documentation Improvements or additions to documentation docs labels Oct 31, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This PR reorganizes and expands the documentation for custom Python code in Daft, separating functions and classes into dedicated pages and adding a comprehensive migration guide.

Key Changes

  • Separated documentation: Split @daft.func and @daft.cls into separate pages (func.md and cls.md) for better clarity
  • New migration guide: Added comparison.md with detailed migration instructions, FAQ, and side-by-side examples comparing legacy @daft.udf to next-gen APIs
  • Reorganized navigation: Renamed section to "Scale Custom Python Code" and reordered pages to prioritize next-gen UDFs over legacy
  • File reorganization: Moved sessions-usage.md to configuration/ directory with updated title "Sessions, Catalogs, and Tables"
  • Examples enhancement: Added reference to the new daft-examples repository at the top of the examples index
  • Updated cross-references: Fixed all internal links to reflect the new file locations

Issues Found

  • Typos in comparison.md: "anda batch" should be "and a batch" (line 7), "re-tunewith" should be "re-tune with" (line 18)
  • Broken reference links: Undefined markdown references [1], [2], and [8] that won't render properly
  • Empty link targets: Two links in the "See also" section have empty () targets

Confidence Score: 4/5

  • This PR is safe to merge after fixing the typos and broken links in comparison.md
  • Score reflects that this is a documentation-only change with good content and organization, but has several typos and broken links that should be fixed before merging. The issues are minor and easily correctable.
  • docs/custom-code/comparison.md requires attention to fix typos and broken reference links

Important Files Changed

File Analysis

Filename Score Overview
docs/custom-code/comparison.md 3/5 New migration guide added with typos and broken reference links that need fixing
docs/custom-code/cls.md 5/5 New documentation for stateful class UDFs - well structured and comprehensive
docs/custom-code/func.md 5/5 Refactored to focus on stateless functions, moved class content to cls.md
docs/custom-code/index.md 5/5 Updated overview page with clear quick example and link to comparison guide
docs/SUMMARY.md 5/5 Navigation restructured with clearer titles and better organization of UDF docs

Sequence Diagram

sequenceDiagram
    participant User
    participant Docs as Documentation Site
    participant Nav as Navigation (SUMMARY.md)
    participant UDF as Custom Code Section
    
    User->>Docs: Navigate to Custom Python Code
    Docs->>Nav: Load navigation structure
    Nav->>UDF: Display "Scale Custom Python Code"
    UDF->>UDF: Show index.md overview
    
    alt User wants Next-Gen UDFs
        User->>UDF: Click "Functions" or "Classes & Methods"
        UDF->>Docs: Load func.md or cls.md
    else User wants to migrate
        User->>UDF: Click "Compare: Next-Gen vs Legacy"
        UDF->>Docs: Load comparison.md
    else User has legacy code
        User->>UDF: Click "Legacy UDFs"
        UDF->>Docs: Load udfs.md
    end
    
    Note over User,Docs: Related content linking
    User->>Docs: Navigate to Sessions
    Docs->>Nav: Load configuration/sessions-usage.md
    User->>Docs: Navigate to Examples
    Docs->>Nav: Load examples/index.md
    Note right of Docs: Links to daft-examples repo
Loading

13 files reviewed, 4 comments

Edit Code Review Agent Settings | Greptile

everettVT and others added 5 commits October 31, 2025 09:39
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Cory Grinstead <[email protected]>
@codecov
Copy link

codecov bot commented Oct 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.95%. Comparing base (741782b) to head (b1b3773).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5475      +/-   ##
==========================================
- Coverage   71.45%   70.95%   -0.50%     
==========================================
  Files        1001     1006       +5     
  Lines      126769   127690     +921     
==========================================
+ Hits        90587    90607      +20     
- Misses      36182    37083     +901     
Files with missing lines Coverage Δ
daft/udf/__init__.py 100.00% <ø> (ø)

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@everettVT
Copy link
Contributor Author

@colin-ho @universalmind303 @universalmind303

We've got 3 failing docstests from a few different docstrings in the new udfs. I recommend to proceed with this docs merge following a final thumbs up from @universalmind303 and make a separate issues for these here: #5476

@everettVT everettVT enabled auto-merge (squash) November 3, 2025 23:27
@everettVT everettVT disabled auto-merge November 4, 2025 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants