JuliaAI / MLJModelInterface.jl

Lightweight package to interface with MLJ
MIT License
37 stars 8 forks source link

Add `augment` option to `doc_header` #168

Closed ablaom closed 1 year ago

ablaom commented 1 year ago

From the new doc string for doc_header:


Variation to augment existing document string

For models that have a native API with separate documentation, one may want to call doc_header(FooRegressor, augment=true) instead. In that case, the output will look like this:

From MLJ, the FooRegressor type can be imported using

FooRegressor = @load FooRegressor pkg=FooRegressorPkg

Construct an instance with default hyper-parameters using the syntax model = FooRegressor(). Provide keyword arguments to override hyper-parameter defaults, as in FooRegressor(a=...).

To prevent an existing document string being replaced instead of augmented, the doc_header declaration must appear in a different module from the original.

codecov-commenter commented 1 year ago

Codecov Report

Merging #168 (97ffecf) into dev (100c477) will increase coverage by 0.03%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              dev     #168      +/-   ##
==========================================
+ Coverage   88.70%   88.73%   +0.03%     
==========================================
  Files           8        8              
  Lines         354      355       +1     
==========================================
+ Hits          314      315       +1     
  Misses         40       40              
Impacted Files Coverage Δ
src/metadata_utils.jl 98.38% <100.00%> (+0.02%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.