Skip to content

Generate docstring signatures with default values - #6263

Open
navidcy wants to merge 11 commits into
mainfrom
ncc/docstringextensions-defaults
Open

navidcy wants to merge 11 commits into
mainfrom
ncc/docstringextensions-defaults

Conversation

@navidcy

@navidcy navidcy commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Bumps to DocStringExtensions = "0.10" and uses $(MethodSignatures(; defaults = true)) (JuliaDocs/DocStringExtensions.jl#194) for 143 docstrings whose signatures were hand-written only to show defaults. Many of those had gone stale (e.g. FT = Float64 instead of Oceananigans.defaults.FloatType, missing keywords).

41 hand-written signatures stay, where the generated one would mislead: methods dispatching on a specific type (set!(model::NonhydrostaticModel; ...)), keywords hidden behind kwargs... (NetCDFWriter), and docstrings attached to a different method (CFL).

The ; in MethodSignatures(; defaults = true) is needed: without it ExplicitImports reads defaults = true as an assignment and flags the import of Oceananigans.defaults as stale.

🤖 Generated with Claude Code

DocStringExtensions 0.10 prints default argument values with
MethodSignatures(; defaults = true). Use it for docstrings whose
signatures were written by hand only to show defaults.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread .claude/rules/docstring-rules.md Resolved
navidcy and others added 2 commits October 16, 2026 10:59
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@navidcy

navidcy commented Oct 16, 2026 •

Copy link
Copy Markdown
Member Author

navidcy and others added 3 commits October 22, 2026 18:39
Keep the generated signatures for ConformalCubedSphereGrid and
TripolarGrid; they pick up the keywords main added to the hand-written ones.

Restore the DocStringExtensions compat to "0.10": the previous merge took
main's "0.8, 0.9, 0.10", which lets 0.9 resolve and breaks precompilation
on MethodSignatures(; defaults = true).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Temporarily source Makie, KernelDensity, FFTA and TiffImages (test and
docs) and Documenter (docs) from branches that allow DocStringExtensions
0.10, so CI can run and build a docs preview. Documenter 1.19 fixes the
regex error that capped it at 1.17. Drop these sources once the
releases are out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.13%. Comparing base (b3ada60) to head (b89d0ea).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6263   +/-   ##
=======================================
  Coverage   76.13%   76.13%           
=======================================
  Files         460      460           
  Lines       29618    29618           
=======================================
+ Hits        22549    22550    +1     
+ Misses       7069     7068    -1     
Flag Coverage Δ
buildkite 72.16% <ø> (+<0.01%) ⬆️
distributed/configuration 20.50% <ø> (ø)
distributed/output_combining 20.50% <ø> (ø)
distributed/tripolar 20.50% <ø> (ø)
julia 72.16% <ø> (+<0.01%) ⬆️
makie 23.62% <ø> (ø)
metal 16.39% <ø> (ø)
reactant 23.62% <ø> (ø)
sharding 23.62% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tomchor

tomchor commented Nov 6, 2026

Copy link
Copy Markdown
Member

Documenter just released their new version, so we're getting closer :)

navidcy and others added 2 commits November 8, 2026 18:02
Resolve conflicts by taking main's explicit import blocks with MethodSignatures
added, and restore $(MethodSignatures(; defaults = true)) in the docstrings
main edited (PartialCellVerticalBoundaries, PartialCellBottom, LagrangianParticles,
JLD2Writer, ScalarDiffusivity). Drop the triad ISSD file that main removed.

Use Documenter 1.20 and drop the Documenter master pin. Pin FFTA to the commit
that allows DocStringExtensions 0.10 at v0.3.1, since the dependabot branch was
deleted and Makie still caps FFTA below 0.3.2. Drop the KernelDensity pin, whose
branch was also deleted; registered KernelDensity no longer depends on
DocStringExtensions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Makie 0.24.17 allows DocStringExtensions 0.10 and no longer depends on FFTA,
so neither needs to be pinned to an unreleased revision.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@navidcy
navidcy marked this pull request as ready for review November 8, 2026 07:07
@navidcy
navidcy requested a review from giordano November 8, 2026 07:07
…DocStringExtensions 0.10

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@navidcy

navidcy commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

This is ready now; all issue with deps have been resolved.

navidcy and others added 2 commits November 9, 2026 12:49
…DocStringExtensions 0.10

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation 📜 The sacred scrolls

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants