JuliaDocs / JuliaDocs/DocStringExtensions.jl

Include the defaults for keyword arguments

Open
#19 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Priority: Medium Status: Available Type: Decision Type: Enhancement
Dominant language
Julia
Stars
126
Forks
35
PR merge metrics
No merged PRs in 30d

Description

For example, DocStringExtensions produces the signature

iterate(ivp; solver, opts...)

for the following function definition

function iterate{S<:AbstractSolver}(ivp::IVP;
                                    solver::Type{S} = RKIntegratorAdaptive{:rk45},
                                    opts...)

In some cases this might be enough, but it would be helpful to be able to generate an output including the default value for the keyword arguments like this

iterate(ivp; solver=RKIntegratorAdaptive{:rk45}, opts...)

Possibly with a switch to turn this behavior on or off.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how DocStringExtensions turns Julia function definitions into displayed signatures, focusing on keyword arguments and their defaults. Confirm the existing output for the example, then define how an opt-in or opt-out switch should behave and verify that the generated signature can include solver=RKIntegratorAdaptive{:rk45}.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
documentation
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.