From c70878abe04bbe8d031a8b8c42def2f2d7712c38 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sat, 11 Jan 2025 15:51:47 +0100 Subject: [PATCH] Update scikit-learn documentation (1.6.1) --- lib/docs/filters/scikit_learn/clean_html.rb | 1 + lib/docs/scrapers/scikit_learn.rb | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/docs/filters/scikit_learn/clean_html.rb b/lib/docs/filters/scikit_learn/clean_html.rb index 530df12dbe..afcd2c2a6b 100644 --- a/lib/docs/filters/scikit_learn/clean_html.rb +++ b/lib/docs/filters/scikit_learn/clean_html.rb @@ -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 = '
' diff --git a/lib/docs/scrapers/scikit_learn.rb b/lib/docs/scrapers/scikit_learn.rb index 45268c4b95..564b5a30a5 100644 --- a/lib/docs/scrapers/scikit_learn.rb +++ b/lib/docs/scrapers/scikit_learn.rb @@ -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 = { @@ -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/] @@ -24,7 +24,7 @@ class ScikitLearn < UrlScraper options[:max_image_size] = 256_000 options[:attribution] = <<-HTML - © 2007–2022 The scikit-learn developers
+ © 2007–2025 The scikit-learn developers
Licensed under the 3-clause BSD License. HTML