History

Update scikit-learn documentation (0.23.2)

Phil Scherer committed 5 years ago

Commit 56c32361 parent ee66e4c3 files · +20 −16Browse files

Unified · Split

3 files
  1. assets/javascripts/templates/pages/about_tmpl.coffee +1 −1
  2. lib/docs/filters/scikit_learn/clean_html.rb +8 −7
  3. lib/docs/scrapers/scikit_learn.rb +11 −8
assets/javascripts/templates/pages/about_tmpl.coffee+1−1
@@ -743,7 +743,7 @@ credits = [ · 742 unmodified lines
743743 'http://scikit-image.org/docs/dev/license.html'
744744 ], [
745745 'scikit-learn',
746− '2007-2018 The scikit-learn developers',
746+ '2007-2020 The scikit-learn developers',
747747 'BSD',
748748 'https://raw.githubusercontent.com/scikit-learn/scikit-learn/master/COPYING'
749749 ], [
lib/docs/filters/scikit_learn/clean_html.rb+8−7
@@ -3,22 +3,23 @@ module Docs · 2 unmodified lines
33 class CleanHtmlFilter < Filter
44 def call
55 if root_page?
6− at_css('h1').content = 'scikit-learn'
7−
8− css('.row-fluid').each do |node|
6+ css('.row').each do |node|
97 html = '<dl>'
10− node.css('.span4').each do |n|
11− html += "<dt>#{n.first_element_child.inner_html}</dt>"
12− html += "<dd>#{n.last_element_child.inner_html}</dd>"
8+ node.css('.card-body').each do |n|
9+ html += '<dt>'
10+ html += "<a href='#{n.at_css('a')['href']}'>#{n.at_css('h4').content}</a>"
11+ html += '</dt>'
12+ html += "<dd>#{n.css('.card-text').to_html}</dd>"
1313 end
1414 html += '</dl>'
1515 node.replace(html)
1616 end
1717 end
1818
19+ css('.sphx-glr-signature').remove
20+
1921 doc
2022 end
2123 end
2224 end
2325 end
24−
lib/docs/scrapers/scikit_learn.rb+11−8
@@ -3,25 +3,28 @@ module Docs · 2 unmodified lines
33 self.name = 'scikit-learn'
44 self.slug = 'scikit_learn'
55 self.type = 'sphinx'
6− self.release = '0.20.0'
7− self.base_url = 'http://scikit-learn.org/stable/'
8− self.root_path = 'documentation.html'
6+ self.release = '0.23.2'
7+ self.base_url = 'https://scikit-learn.org/0.23/'
8+ self.root_path = 'index.html'
99 self.force_gzip = true
1010 self.links = {
11− home: 'http://scikit-learn.org/',
11+ home: 'https://scikit-learn.org/',
1212 code: 'https://github.com/scikit-learn/scikit-learn'
1313 }
1414
15− html_filters.push 'scikit_learn/entries', 'scikit_learn/clean_html', 'sphinx/clean_html'
15+ html_filters.push 'scikit_learn/entries', 'scikit_learn/clean_html', 'sphinx/clean_html', 'title'
1616
17− options[:container] = ->(filter) { filter.root_page? ? '.container-index' : '.body' }
18− options[:skip] = %w(tutorial/statistical_inference/finding_help.html)
17+ options[:container] = ->(filter) { filter.root_page? ? 'body > .container' : '.section' }
18+ options[:skip] = %w(modules/generated/sklearn.experimental.enable_iterative_imputer.html
19+ modules/generated/sklearn.experimental.enable_hist_gradient_boosting.html)
1920 options[:only_patterns] = [/\Amodules/, /\Adatasets/, /\Atutorial/, /\Aauto_examples/]
2021 options[:skip_patterns] = [/\Adatasets\/(?!index)/]
22+ options[:title] = false
23+ options[:root_title] = 'scikit-learn'
2124 options[:max_image_size] = 256_000
2225
2326 options[:attribution] = <<-HTML
24− &copy; 2007&ndash;2018 The scikit-learn developers<br>
27+ &copy; 2007&ndash;2020 The scikit-learn developers<br>
2528 Licensed under the 3-clause BSD License.
2629 HTML
2730