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

Remove all {#anchor} tags in non-API Markdown docs #660

Merged
merged 1 commit into from Jan 4, 2016

Conversation

Projects
None yet
3 participants
@samjabrahams
Contributor

samjabrahams commented Dec 31, 2015

This commit does two things:

  1. Removes all '{#anchor}' syntax from Markdown header lines in the codebase
  2. Replaces all links that used those #anchors with links conforming to
    Github/Tensorflow website auto-generated anchors

The work is a continuation on #648.

This commit does not change the API docs, as those Markdown files are
auto-generated.

Generated using Python script available here:
https://github.com/samjabrahams/tensorflow_util/blob/master/py/change_header_anchor_links.py

Cross-page links changed by hand using this script to find non-api
anchor links:
https://github.com/samjabrahams/tensorflow_util/blob/master/py/get_anchor_references.py

Run the `configure` script at the root of the tree. The configure script
asks you for the path to your python interpreter and allows (optional)
configuration of the CUDA libraries (see [below](#configure_cuda)).
configuration of the CUDA libraries (see [below](#configure-tensorflow-s-canonical-view-of-cuda-libraries)).

This comment has been minimized.

@samjabrahams

samjabrahams Dec 31, 2015

Contributor

Noticed that apostrophes aren't handled correctly. This should be #configure-tensorflows-canonical-view-of-cuda-libraries

I'll patch this in

@@ -1018,7 +1018,7 @@ returns a list of
output of the op). To register a shape function, apply the
[`tf.RegisterShape` decorator](../../api_docs/python/framework.md#RegisterShape)
to a shape function. For example, the
[`ZeroOut` op defined above](#define_interface) would have a shape function like
[`ZeroOut` op defined above](#define-the-op-s-interface) would have a shape function like

This comment has been minimized.

@samjabrahams

samjabrahams Dec 31, 2015

Contributor

Ditto

@@ -22,7 +22,7 @@ python translate.py --data_dir [your_data_directory]
It will download English-to-French translation data from the
[WMT'15 Website](http://www.statmt.org/wmt15/translation-task.html)
prepare it for training and train. It takes about 20GB of disk space,
and a while to download and prepare (see [later](#run_it) for details),
and a while to download and prepare (see [later](#let-s-run-it) for details),

This comment has been minimized.

@samjabrahams

samjabrahams Dec 31, 2015

Contributor

Ditto

Remove all {#anchor} tags in non-API Markdown docs
This commit does two things:

1. Removes all '{#anchor}' syntax from Markdown header lines in the codebase
2. Replaces all links that used those #anchors with links conforming to
Github/Tensorflow website auto-generated anchors

The work is a continuation on #648.

This commit does not change the API docs, as those Markdown files are
auto-generated.

Generated using Python script available here:
https://github.com/samjabrahams/tensorflow_util/blob/master/py/change_header_anchor_links.py

Cross-page links changed by hand using this script to find non-api
anchor links:
https://github.com/samjabrahams/tensorflow_util/blob/master/py/get_anchor_references.py

@samjabrahams samjabrahams force-pushed the samjabrahams:upstream branch from 49f1531 to 089b0b4 Dec 31, 2015

@samjabrahams

This comment has been minimized.

Contributor

samjabrahams commented Dec 31, 2015

Messed up apostrophes are taken care of.

@martinwicke

This comment has been minimized.

Member

martinwicke commented Jan 4, 2016

I'll test internally to make sure this matches exactly the pipeline other
tools have. I was pretty sure that's true, but the trailing '-' scared me a
little. Worst case, we'll have to include only anchors with a trailing '-',
still a big improvement.

On Sun, Jan 3, 2016 at 7:56 PM Vijay Vasudevan notifications@github.com
wrote:

Assigned #660 #660 to
@martinwicke https://github.com/martinwicke.


Reply to this email directly or view it on GitHub
#660 (comment).

@samjabrahams

This comment has been minimized.

Contributor

samjabrahams commented Jan 4, 2016

From what I've seen, you only end up with a trailing anchor when you do something odd like leaving space between the final punctuation words. Something like "This header trails off ...". The last "create_anchor_from_header" function I posted works for the tests I played around with here

I'm going to reapply the latest function to double check that there aren't any edge cases in the changed files.

@martinwicke

This comment has been minimized.

Member

martinwicke commented Jan 4, 2016

I looked, there aren't, so don't worry. I'll merge once my tests are done.

On Mon, Jan 4, 2016 at 12:08 PM Sam Abrahams notifications@github.com
wrote:

From what I've seen, you only end up with a trailing anchor when you do
something odd like leaving space between the final punctuation words.
Something like "This header trails off ...". The last
"create_anchor_from_header" function I posted works for the tests I played
around with here
https://github.com/samjabrahams/tensorflow_util/blob/master/md/github_header_test.md

I'm going to reapply the latest function to double check that there aren't
any edge cases in the changed files.


Reply to this email directly or view it on GitHub
#660 (comment)
.

@martinwicke

This comment has been minimized.

Member

martinwicke commented Jan 4, 2016

I'm good to merge this -- but this only does os_setup.md, correct? I'll change the title appropriately, or alternative, you could run this on all the files.

@samjabrahams

This comment has been minimized.

Contributor

samjabrahams commented Jan 4, 2016

This should change all non-API docs that have {#anchor} notation, and every link that points to those anchors both internally and from other files. See the 7 changed files.

It looks like most of the documentation stopped using the {#anchor} notation aside from a few files and the auto-generated API docs

martinwicke added a commit that referenced this pull request Jan 4, 2016

Merge pull request #660 from samjabrahams/upstream
Remove all {#anchor} tags in non-API Markdown docs

@martinwicke martinwicke merged commit 2f788c4 into tensorflow:master Jan 4, 2016

1 check passed

cla/google All necessary CLAs are signed
@martinwicke

This comment has been minimized.

Member

martinwicke commented Jan 4, 2016

Great. Thanks a lot for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment