-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing "Examples" headings and a few more actual examples #27340
Conversation
base/math.jl
Outdated
-2.0 will only return a complex result if called with a complex argument. Try -2.0(Complex(x)). | ||
Stacktrace: | ||
[1] throw_complex_domainerror(::Float64, ::Symbol) at ./math.jl:31 | ||
... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the doctest pass with this? I think it should be [...]
to be recognized by Documenter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, to make this doctest more resilient to line changes you can use a doctest-filter. You can use the same as here:
Line 447 in 22590d5
```jldoctest; filter = r"Stacktrace:(\\n \\[[0-9]+\\].*)*" |
base/math.jl
Outdated
-3.0 will only return a complex result if called with a complex argument. Try -3.0(Complex(x)). | ||
Stacktrace: | ||
[1] throw_complex_domainerror(::Float64, ::Symbol) at ./math.jl:31 | ||
... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[...]
@@ -534,8 +536,9 @@ end | |||
""" | |||
haskey(collection, key) -> Bool | |||
|
|||
Determine whether a collection has a mapping for a given key. | |||
Determine whether a collection has a mapping for a given `key`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read this sentence as "key" beeing a general term, not specifically the argument key
, but Idk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like it works as either.
base/math.jl
Outdated
NaN result for non-NaN input. | ||
Stacktrace: | ||
[1] nan_dom_err at ./math.jl:325 [inlined] | ||
... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[...]
and add a stacktrace filter.
base/math.jl
Outdated
NaN result for non-NaN input. | ||
Stacktrace: | ||
[1] nan_dom_err at ./math.jl:325 [inlined] | ||
... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[...]
and add a stacktrace filter.
base/math.jl
Outdated
-2.0 will only return a complex result if called with a complex argument. Try -2.0(Complex(x)). | ||
Stacktrace: | ||
[1] throw_complex_domainerror(::Float64, ::Symbol) at ./math.jl:31 | ||
... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[...]
and add a stacktrace filter.
base/math.jl
Outdated
NaN result for non-NaN input. | ||
Stacktrace: | ||
[1] sqrt(::BigFloat) at ./mpfr.jl:501 | ||
... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[...]
and add a stacktrace filter.
Are we happy with this? Good to sq&m? |
I get some doctest failure on this branch. |
#27109 on Travis 64-bit |
Pretty minimal changes for the most part, some doctests were missing their headings! I added a few more examples to simple math functions where the docstring mentioned a behaviour that wasn't shown in the doctest. This passed
make docs
locally, be sure to edit out theci skip
whoever merges.