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
743 'http://scikit-image.org/docs/dev/license.html'743 'http://scikit-image.org/docs/dev/license.html'
744 ], [744 ], [
745 'scikit-learn',745 'scikit-learn',
746 '2007-2018 The scikit-learn developers',746 '2007-2020 The scikit-learn developers',
747 'BSD',747 'BSD',
748 'https://raw.githubusercontent.com/scikit-learn/scikit-learn/master/COPYING'748 'https://raw.githubusercontent.com/scikit-learn/scikit-learn/master/COPYING'
749 ], [749 ], [
lib/docs/filters/scikit_learn/clean_html.rb+8−7
@@ -3,22 +3,23 @@ module Docs · 2 unmodified lines
3 class CleanHtmlFilter < Filter3 class CleanHtmlFilter < Filter
4 def call4 def call
5 if root_page?5 if root_page?
6 at_css('h1').content = 'scikit-learn'6 css('.row').each do |node|
7
8 css('.row-fluid').each do |node|
9 html = '<dl>'7 html = '<dl>'
10 node.css('.span4').each do |n|8 node.css('.card-body').each do |n|
11 html += "<dt>#{n.first_element_child.inner_html}</dt>"9 html += '<dt>'
12 html += "<dd>#{n.last_element_child.inner_html}</dd>"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>"
13 end13 end
14 html += '</dl>'14 html += '</dl>'
15 node.replace(html)15 node.replace(html)
16 end16 end
17 end17 end
18 18
19 css('.sphx-glr-signature').remove
20
19 doc21 doc
20 end22 end
21 end23 end
22 end24 end
23end25end
24
lib/docs/scrapers/scikit_learn.rb+11−8
@@ -3,25 +3,28 @@ module Docs · 2 unmodified lines
3 self.name = 'scikit-learn'3 self.name = 'scikit-learn'
4 self.slug = 'scikit_learn'4 self.slug = 'scikit_learn'
5 self.type = 'sphinx'5 self.type = 'sphinx'
6 self.release = '0.20.0'6 self.release = '0.23.2'
7 self.base_url = 'http://scikit-learn.org/stable/'7 self.base_url = 'https://scikit-learn.org/0.23/'
8 self.root_path = 'documentation.html'8 self.root_path = 'index.html'
9 self.force_gzip = true9 self.force_gzip = true
10 self.links = {10 self.links = {
11 home: 'http://scikit-learn.org/',11 home: 'https://scikit-learn.org/',
12 code: 'https://github.com/scikit-learn/scikit-learn'12 code: 'https://github.com/scikit-learn/scikit-learn'
13 }13 }
14 14
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'
16 16
17 options[:container] = ->(filter) { filter.root_page? ? '.container-index' : '.body' }17 options[:container] = ->(filter) { filter.root_page? ? 'body > .container' : '.section' }
18 options[:skip] = %w(tutorial/statistical_inference/finding_help.html)18 options[:skip] = %w(modules/generated/sklearn.experimental.enable_iterative_imputer.html
19 modules/generated/sklearn.experimental.enable_hist_gradient_boosting.html)
19 options[:only_patterns] = [/\Amodules/, /\Adatasets/, /\Atutorial/, /\Aauto_examples/]20 options[:only_patterns] = [/\Amodules/, /\Adatasets/, /\Atutorial/, /\Aauto_examples/]
20 options[:skip_patterns] = [/\Adatasets\/(?!index)/]21 options[:skip_patterns] = [/\Adatasets\/(?!index)/]
22 options[:title] = false
23 options[:root_title] = 'scikit-learn'
21 options[:max_image_size] = 256_00024 options[:max_image_size] = 256_000
22 25
23 options[:attribution] = <<-HTML26 options[:attribution] = <<-HTML
24 &copy; 2007&ndash;2018 The scikit-learn developers<br>27 &copy; 2007&ndash;2020 The scikit-learn developers<br>
25 Licensed under the 3-clause BSD License.28 Licensed under the 3-clause BSD License.
26 HTML29 HTML
27 30