Split Tensorflow into separate Python and C++ docs#1165
Split Tensorflow into separate Python and C++ docs#1165simon04 merged 7 commits intofreeCodeCamp:masterfrom
Conversation
|
It looks like the C++ docs dump everything into a single category. Could you make it more like the Python version, which splits up the entries by category? |
|
Also, it looks like some of the pages in the guide are duplicated. Is it even worth including the guide, since DevDocs doesn’t support full text search. |
j-f1
left a comment
There was a problem hiding this comment.
Finally, can you add '.tfo-notebook-buttons img', '.tfo-notebook-buttons>:first-child' to the list of things to remove in clean_html.rb line 7? This improves the display of the action links, especially in the guide.
|
Sorry for the long wait.
👍 I removed the icons and the broken link in 7c51602
I'd be very happy to remove the guides, I only included them because they were already present. I don't think they add much value and it is not really possible to version them correctly either.
I tried to properly structure the C++ docs, but unfortunately the structure cannot be inferred by the slug, and inferring the structure from the navigation sidebar like it was done before doesn't work for me. I haven't worked with Ruby before, so I am not sure how this can be fixed. Since this problem also exists on master I think this should be solved in a future PR. |
|
I unfortunately won’t be able to merge this in the near future because I don’t have great Internet at my house so it can’t really scrape these giant docs but I’ll keep this in mind for whenever I’m somewhere with good internet. |
No problem, thanks for the heads up. Let me know if there is anything I can help with. Should I remove the guides as part of this PR? This should also make scraping easier. |
|
Sure! I still had trouble scraping the Python and C++ docs though. |
|
👍 I removed the guides in 0e3cdfd |
There was a problem hiding this comment.
The scraper does not run.
SyntaxError: /home/simon/src/devdocs/lib/docs/filters/tensorflow/entries.rb:18: syntax error, unexpected `elsif' elsif slug.start_with?('tf/audio')(easy to fix)index.htmldoes no longer exist →self.root_path = '/tf'-
HTML::Pipeline::Filter::InvalidDocumentException: HTML::Pipeline::Filter::InvalidDocumentException /home/simon/src/devdocs/lib/docs/core/filter.rb:6:in `css' /home/simon/src/devdocs/lib/docs/filters/tensorflow/clean_html.rb:7:in `call'
I'm happy to review and update the docs once we have a working scraper. In the meanwhile, 2.3 has been released.
0e3cdfd to
7fdcee2
Compare
|
@simon04 Thanks for taking a look. I updated the PR to reflect the latest changes on the TF docs website. I wasn't able to check the generated docs yet, but feel free to takeover this PR. I might be able to take a proper look at it next weekend. |
| version '1.15' do | ||
| self.release = '1.15.0' | ||
| self.base_url = "https://www.tensorflow.org/versions/r#{version}/api_docs/python" | ||
| for version in ['2.3', '2.2', '2.1', '2.0', '1.15'] do |
There was a problem hiding this comment.
The statement version '2.3' do … end invokes the method version from lib/docs/core/doc.rb and cannot be replaced by a loop like this. I've fixed this syntax
@j-f1 Thanks for merging #1144
This PR splits the TensorFlow docs into separate Python, C++ and Guides pages which allows to include docs for TensorFlow versions 2.1, 2.0 and 1.15 so we can start to properly version the TensorFlow docs.
Checklist
If you're updating an existing documentation to it's latest version, please ensure that you have:
about_tmpl.coffeematches it's data inself.attributionSOURCEfile inpublic/icons/your_scraper_name/are up-to-date if the documentation has a custom iconself.linkscontains up-to-date urls ifself.linksis defined