Skip to content

Commit

Permalink
Update scikit-learn documentation (1.6.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
simon04 committed Jan 11, 2025
1 parent 264b5cc commit c70878a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions lib/docs/filters/scikit_learn/clean_html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module Docs
class ScikitLearn
class CleanHtmlFilter < Filter
def call
@doc = at_css('main article', 'main')
if root_page?
css('.row').each do |node|
html = '<dl>'
Expand Down
8 changes: 4 additions & 4 deletions lib/docs/scrapers/scikit_learn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ class ScikitLearn < UrlScraper
self.name = 'scikit-learn'
self.slug = 'scikit_learn'
self.type = 'sphinx'
self.release = '1.1.3'
self.base_url = "https://scikit-learn.org/1.1/"
self.release = '1.6.1'
v = self.release[/\d+\.\d+/]
self.base_url = "https://scikit-learn.org/#{v}/"
self.root_path = 'index.html'
self.force_gzip = true
self.links = {
Expand All @@ -14,7 +15,6 @@ class ScikitLearn < UrlScraper

html_filters.push 'scikit_learn/entries', 'scikit_learn/clean_html', 'sphinx/clean_html', 'title'

options[:container] = ->(filter) { filter.root_page? ? 'body > .container' : '#sk-page-content-wrapper > .body' }
options[:skip] = %w(modules/generated/sklearn.experimental.enable_iterative_imputer.html
modules/generated/sklearn.experimental.enable_hist_gradient_boosting.html)
options[:only_patterns] = [/\Amodules/, /\Adatasets/, /\Atutorial/, /\Aauto_examples/]
Expand All @@ -24,7 +24,7 @@ class ScikitLearn < UrlScraper
options[:max_image_size] = 256_000

options[:attribution] = <<-HTML
&copy; 2007&ndash;2022 The scikit-learn developers<br>
&copy; 2007&ndash;2025 The scikit-learn developers<br>
Licensed under the 3-clause BSD License.
HTML

Expand Down

0 comments on commit c70878a

Please sign in to comment.