Skip to content

Conversation

devmotion
Copy link
Member

@codecov
Copy link

codecov bot commented Mar 3, 2020

Codecov Report

Merging #42 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #42      +/-   ##
==========================================
+ Coverage   88.19%   88.24%   +0.04%     
==========================================
  Files           9        9              
  Lines         720      723       +3     
==========================================
+ Hits          635      638       +3     
  Misses         85       85
Impacted Files Coverage Δ
src/compiler.jl 93.88% <100%> (+0.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7b4e3cd...763f4ff. Read the comment docs.

@@ -588,9 +588,8 @@ function build_output(model_info)
end
end)
end
return esc(quote
# Allows passing arguments as kwargs
$outer_function(;$(args...)) = $outer_function($(arg_syms...))
Copy link
Member

Choose a reason for hiding this comment

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

This is a feature of DPPL and Turing that we can pass only the second argument for example as a kwarg and the first is given its default value.

Copy link
Member Author

@devmotion devmotion Mar 9, 2020

Choose a reason for hiding this comment

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

This PR just checks if args is empty and does not add the duplicate definition in case it is. The function that allows to pass keyword arguments is defined below.

Copy link
Member

@mohamed82008 mohamed82008 left a comment

Choose a reason for hiding this comment

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

Cool looks good to me. Thanks @devmotion !

@mohamed82008 mohamed82008 merged commit 80d8afb into master Mar 11, 2020
@delete-merged-branch delete-merged-branch bot deleted the outer_function branch March 11, 2020 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants