Skip to content

Commit

Permalink
build based on cd80cd5
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Mar 5, 2024
1 parent 2a6fc60 commit ab4b198
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dev/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-03-05T01:42:33","documenter_version":"1.3.0"}}
{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-03-05T01:58:32","documenter_version":"1.3.0"}}
2 changes: 1 addition & 1 deletion dev/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@

@config default_config function second_call(; a, c)
# some more code
end</code></pre><p>To avoid repetition, <strong>you don&#39;t even have to specify the <code>config</code> argument</strong> on each function. Calling <code>my_config = (; a = 1.0); first_call(my_config)</code> will behave as in the previous code.</p><p>Once again, you are allowed to have extra arguments, type annotations, or default values, as you would in any other Julia function.</p><p>:warning: The code pattern generated by <code>@config</code> allocates some heap memory. This macro should be used for high-level functions that are not performance-critical.</p><h2 id="Function-Documentation"><a class="docs-heading-anchor" href="#Function-Documentation">Function Documentation</a><a id="Function-Documentation-1"></a><a class="docs-heading-anchor-permalink" href="#Function-Documentation" title="Permalink"></a></h2><ul><li><a href="#DefaultKeywordArguments.@config-Tuple{Any, Any}"><code>DefaultKeywordArguments.@config</code></a></li><li><a href="#DefaultKeywordArguments.@default-Tuple{Any, Any}"><code>DefaultKeywordArguments.@default</code></a></li></ul><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="DefaultKeywordArguments.@config-Tuple{Any, Any}" href="#DefaultKeywordArguments.@config-Tuple{Any, Any}"><code>DefaultKeywordArguments.@config</code></a><span class="docstring-category">Macro</span></header><section><div><pre><code class="language-julia hljs">@config default_config my_function(x; a, b) = ...</code></pre><p>This macro creates a function <code>my_function(config, x)</code> which will have access to the variables <code>a</code> and <code>b</code>. The values <code>a</code> and <code>b</code> will be those in <code>config</code>, if they are present, or else those in <code>default_config</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/PdIPS/DefaultKeywordArguments.jl/blob/cd80cd50325f15c6efe06805913f3bd3f50dd93b/src/DefaultKeywordArguments.jl#L24-L31">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="DefaultKeywordArguments.@default-Tuple{Any, Any}" href="#DefaultKeywordArguments.@default-Tuple{Any, Any}"><code>DefaultKeywordArguments.@default</code></a><span class="docstring-category">Macro</span></header><section><div><pre><code class="language-julia hljs">@default default_values my_function(x; a, b) = ...</code></pre><p>This macro assigns the values in <code>default_values</code> as the default values for the keyword arguments <code>a</code> and <code>b</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/PdIPS/DefaultKeywordArguments.jl/blob/cd80cd50325f15c6efe06805913f3bd3f50dd93b/src/DefaultKeywordArguments.jl#L3-L9">source</a></section></article><p><a href="https://github.com/PdIPS/DefaultKeywordArguments.jl"><img src="https://img.shields.io/badge/View%20on%20Github-grey?logo=github" alt="Static Badge"/></a> <a href="https://github.com/PdIPS/DefaultKeywordArguments.jl/actions/workflows/CI.yml?query=branch%3Amain"><img src="https://github.com/PdIPS/DefaultKeywordArguments.jl/actions/workflows/CI.yml/badge.svg?branch=main" alt="Build Status"/></a> <a href="https://codecov.io/gh/PdIPS/DefaultKeywordArguments.jl"><img src="https://codecov.io/gh/PdIPS/DefaultKeywordArguments.jl/branch/main/graph/badge.svg" alt="Coverage"/></a> <a href="https://github.com/JuliaTesting/Aqua.jl"><img src="https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg" alt="Aqua"/></a> <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"/></a></p></article><nav class="docs-footer"><p class="footer-message">Copyright © 2023 <a href="https://rafaelbailo.com/">Dr Rafael Bailo</a>. <a href="https://github.com/PdIPS/DefaultKeywordArguments.jl/blob/main/LICENSE">MIT License</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.3.0 on <span class="colophon-date" title="Tuesday 5 March 2024 01:42">Tuesday 5 March 2024</span>. Using Julia version 1.10.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
end</code></pre><p>To avoid repetition, <strong>you don&#39;t even have to specify the <code>config</code> argument</strong> on each function. Calling <code>my_config = (; a = 1.0); first_call(my_config)</code> will behave as in the previous code.</p><p>Once again, you are allowed to have extra arguments, type annotations, or default values, as you would in any other Julia function.</p><p>:warning: The code pattern generated by <code>@config</code> allocates some heap memory. This macro should be used for high-level functions that are not performance-critical.</p><h2 id="Function-Documentation"><a class="docs-heading-anchor" href="#Function-Documentation">Function Documentation</a><a id="Function-Documentation-1"></a><a class="docs-heading-anchor-permalink" href="#Function-Documentation" title="Permalink"></a></h2><ul><li><a href="#DefaultKeywordArguments.@config-Tuple{Any, Any}"><code>DefaultKeywordArguments.@config</code></a></li><li><a href="#DefaultKeywordArguments.@default-Tuple{Any, Any}"><code>DefaultKeywordArguments.@default</code></a></li></ul><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="DefaultKeywordArguments.@config-Tuple{Any, Any}" href="#DefaultKeywordArguments.@config-Tuple{Any, Any}"><code>DefaultKeywordArguments.@config</code></a><span class="docstring-category">Macro</span></header><section><div><pre><code class="language-julia hljs">@config default_config my_function(x; a, b) = ...</code></pre><p>This macro creates a function <code>my_function(config, x)</code> which will have access to the variables <code>a</code> and <code>b</code>. The values <code>a</code> and <code>b</code> will be those in <code>config</code>, if they are present, or else those in <code>default_config</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/PdIPS/DefaultKeywordArguments.jl/blob/cd80cd50325f15c6efe06805913f3bd3f50dd93b/src/DefaultKeywordArguments.jl#L24-L31">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="DefaultKeywordArguments.@default-Tuple{Any, Any}" href="#DefaultKeywordArguments.@default-Tuple{Any, Any}"><code>DefaultKeywordArguments.@default</code></a><span class="docstring-category">Macro</span></header><section><div><pre><code class="language-julia hljs">@default default_values my_function(x; a, b) = ...</code></pre><p>This macro assigns the values in <code>default_values</code> as the default values for the keyword arguments <code>a</code> and <code>b</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/PdIPS/DefaultKeywordArguments.jl/blob/cd80cd50325f15c6efe06805913f3bd3f50dd93b/src/DefaultKeywordArguments.jl#L3-L9">source</a></section></article><p><a href="https://github.com/PdIPS/DefaultKeywordArguments.jl"><img src="https://img.shields.io/badge/View%20on%20Github-grey?logo=github" alt="Static Badge"/></a> <a href="https://github.com/PdIPS/DefaultKeywordArguments.jl/actions/workflows/CI.yml?query=branch%3Amain"><img src="https://github.com/PdIPS/DefaultKeywordArguments.jl/actions/workflows/CI.yml/badge.svg?branch=main" alt="Build Status"/></a> <a href="https://codecov.io/gh/PdIPS/DefaultKeywordArguments.jl"><img src="https://codecov.io/gh/PdIPS/DefaultKeywordArguments.jl/branch/main/graph/badge.svg" alt="Coverage"/></a> <a href="https://github.com/JuliaTesting/Aqua.jl"><img src="https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg" alt="Aqua"/></a> <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"/></a></p></article><nav class="docs-footer"><p class="footer-message">Copyright © 2023 <a href="https://rafaelbailo.com/">Dr Rafael Bailo</a>. <a href="https://github.com/PdIPS/DefaultKeywordArguments.jl/blob/main/LICENSE">MIT License</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.3.0 on <span class="colophon-date" title="Tuesday 5 March 2024 01:58">Tuesday 5 March 2024</span>. Using Julia version 1.10.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

0 comments on commit ab4b198

Please sign in to comment.