Skip to content
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

Moved so many docs out of HelpDB. More examples. #18041

Merged
merged 3 commits into from
Sep 3, 2016
Merged

Conversation

kshyatt
Copy link
Contributor

@kshyatt kshyatt commented Aug 15, 2016

I'm sorry this is so huge. Once I started, I couldn't stop. Doctests passed locally.

@kshyatt kshyatt added the domain:docs This change adds or pertains to documentation label Aug 15, 2016
splice!(a::Vector, index::Integer, [replacement]) -> item

Remove the item at the given index, and return the removed item. Subsequent items are
shifted down to fill the resulting gap. If specified, replacement values from an ordered
Copy link
Contributor

Choose a reason for hiding this comment

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

which way is "down"?

@kshyatt
Copy link
Contributor Author

kshyatt commented Aug 16, 2016

Doctests again passed locally.

cd(f::Function, dir::AbstractString=homedir())

Temporarily changes the current working directory and applies function `f` before returning.
""" ->
Copy link
Member

Choose a reason for hiding this comment

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

Probably simpler to put the docs that have OS-specific definitions after the if blocks using the same syntax that was being used in the helpdb. Same with the other ones further down. That would avoid having to always check whether all the duplicates get updated when changes are made to one of them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in latest. Anything else I should look after?

Copy link
Member

Choose a reason for hiding this comment

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

There's a couple more duplicated @docs that can get the same treatment as cd, but other than that I didn't notice anything else out of place.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm still double-checking this, so may be good to wait for another set of eyes since backporting this might allow migration of the manual to be done in an automated way on both master and 0.5.

Copy link
Member

Choose a reason for hiding this comment

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

good to wait for another set of eyes

Yes, definitely.

might allow migration of the manual to be done in an automated way on both master and 0.5.

At the moment the translation scripts I'm using do seem to work fine against master and 0.5, though keeping things in sync as much as possible would be greatly appreciated.

@kshyatt
Copy link
Contributor Author

kshyatt commented Aug 19, 2016

@MichaelHatherly if you can point out specific spots I don't need to @doc I would be super grateful but if you're too busy/don't feel like it I can also just grep the diff.

@MichaelHatherly
Copy link
Member

if you can point out specific spots I don't need to @doc I would be super grateful

Sure, can do. Would you rather have inline comments here pointing out the spots, or I can make a quick diff of the changes that you can just apply?

@kshyatt
Copy link
Contributor Author

kshyatt commented Aug 19, 2016

The diff option sounds like a way to learn something new, so let's go with that!

@MichaelHatherly
Copy link
Member

https://gist.github.com/MichaelHatherly/cc9f1ce532e9f851ff6906815e517775

I've not yet compiled those changes since LLVM decided it was a good time to need recompiling... but I think the changes should be good.

@kshyatt
Copy link
Contributor Author

kshyatt commented Aug 19, 2016

Thanks, @MichaelHatherly. make docs && make -C doc doctest passed happily.

@ViralBShah
Copy link
Member

ViralBShah commented Aug 20, 2016

This is impressive work! @tkelman What's the right strategy here? Merge and backport, or hold out until the 0.5 release is out and leave this on master?

After this is merged, future doc improvements will be difficult to backport to 0.5, and perhaps for that reason, backport is desirable. Just thinking out aloud.

@tkelman
Copy link
Contributor

tkelman commented Aug 20, 2016

Finish double-checking it then merge and backport.

@MichaelHatherly
Copy link
Member

For functions that are just aliases of other functions, such as ÷, the docs should be added to the "real" definition rather than the const ... def. This is because the docsystem can easily find the "real" function given any alias of it, but it can't go the other way since a function might have several aliases.

For example on this branch searching for docs on ÷ and div don't return the same thing, whereas on master they do.

(This is probably worth mentioning in the docsystem docs. I'll write something up for the docs later today or tomorrow.)

The aliases that should be changed are:

  • % to rem;
  • .≠ to .!=;
  • .≤ to .<=;
  • ÷ to div;
  • to in;
  • to is.


.. Docstring generated from Julia source

Replace ``STDOUT`` by stream for all C and Julia level output to ``STDOUT``\ . Note that ``stream`` must be a TTY, a ``Pipe`` or a ``TCPSocket``\ .
Create a pipe to which all C and Julia level :obj:`STDOUT` output will be redirected. Returns a tuple ``(rd, wr)`` representing the pipe ends. Data written to :obj:`STDOUT` may now be read from the ``rd`` end of the pipe. The ``wr`` end is given for convenience in case the old :obj:`STDOUT` object was cached by the user and needs to be replaced elsewhere.
Copy link
Member

Choose a reason for hiding this comment

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

Duplicate redirect_stdout signatures here.

MichaelHatherly added a commit to MichaelHatherly/julia that referenced this pull request Aug 20, 2016
As mentioned in JuliaLang#18041 (comment)
docstrings attached to aliases of functions should be avoided where possible.
tkelman pushed a commit that referenced this pull request Aug 21, 2016
As mentioned in #18041 (comment)
docstrings attached to aliases of functions should be avoided where possible.
tkelman pushed a commit that referenced this pull request Aug 21, 2016
As mentioned in #18041 (comment)
docstrings attached to aliases of functions should be avoided where possible.
(cherry picked from commit 3ed55a4)
@kshyatt
Copy link
Contributor Author

kshyatt commented Aug 23, 2016

Doctests passed locally. I took CI skip off since I rebased. @MichaelHatherly is this ok assuming lights turn green?

@tkelman
Copy link
Contributor

tkelman commented Aug 23, 2016

I only got a small way through reviewing this before backporting got in the way. planning on doing the rest tomorrow.

"""
readlink(path::AbstractString) -> AbstractString

Returns the value of a symbolic link `path`.
Copy link
Contributor

Choose a reason for hiding this comment

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

(readlink docstring) is "the value of a symbolic link" unambiguous? maybe worth rewording to say something like "the target location a symbolic link points to" ?


.. Docstring generated from Julia source

Display an informational message. Argument ``msg`` is a string describing the information to be displayed.
Display an informational message. Argument ``msg`` is a string describing the information to be displayed. The ``prefix`` kwarg can be used to override the default prepending of ``msg``\ .
Copy link
Contributor

Choose a reason for hiding this comment

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

(info docstring) spell out kwarg ?

@kshyatt
Copy link
Contributor Author

kshyatt commented Sep 3, 2016

@tkelman thoughts?

@tkelman
Copy link
Contributor

tkelman commented Sep 3, 2016

Let's get it merged. Did you want to do a rebase to clean up the history?

@kshyatt
Copy link
Contributor Author

kshyatt commented Sep 3, 2016

Will do when I get home

On Sat, Sep 3, 2016, 8:38 AM Tony Kelman notifications@github.com wrote:

Let's get it merged. Did you want to do a rebase to clean up the history?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#18041 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAyk47DThcmzwZ4Z27u6Pk9ZYEZC_HeXks5qmZSRgaJpZM4Jk0zM
.

@tkelman
Copy link
Contributor

tkelman commented Sep 3, 2016

do the honors?

@kshyatt kshyatt merged commit 06c0ba6 into master Sep 3, 2016
@kshyatt kshyatt deleted the ksh/docamputation branch September 3, 2016 17:33
@kshyatt
Copy link
Contributor Author

kshyatt commented Sep 3, 2016

🎉

mfasi pushed a commit to mfasi/julia that referenced this pull request Sep 5, 2016
As mentioned in JuliaLang#18041 (comment)
docstrings attached to aliases of functions should be avoided where possible.
@tkelman tkelman added this to the 0.5.x milestone Sep 7, 2016
@waldyrious waldyrious mentioned this pull request Sep 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants