From 6d2c7f3ebe10695f74c601420b670144256c6d4d Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 18 Aug 2024 12:15:46 +0200 Subject: [PATCH] Update NumPy documentation (2.0.1) --- lib/docs/filters/numpy/clean_html.rb | 2 +- lib/docs/scrapers/numpy.rb | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/docs/filters/numpy/clean_html.rb b/lib/docs/filters/numpy/clean_html.rb index 33085662..757dffb5 100644 --- a/lib/docs/filters/numpy/clean_html.rb +++ b/lib/docs/filters/numpy/clean_html.rb @@ -3,7 +3,7 @@ module Docs class CleanHtmlFilter < Filter def call css('.sphinx-bs.container.pb-4.docutils').remove if root_page? - at_css('main > div > section', '#spc-section-body, main > div') + at_css('.bd-article', 'main > div > section', '#spc-section-body, main > div') end end end diff --git a/lib/docs/scrapers/numpy.rb b/lib/docs/scrapers/numpy.rb index a31ba8ed..6ecca0a8 100644 --- a/lib/docs/scrapers/numpy.rb +++ b/lib/docs/scrapers/numpy.rb @@ -22,10 +22,16 @@ module Docs ] options[:attribution] = <<-HTML - © 2005–2022 NumPy Developers
+ © 2005–2024 NumPy Developers
Licensed under the 3-clause BSD License. HTML + version '2.0' do + self.release = '2.0.1' + self.base_url = "https://numpy.org/doc/#{self.version}/" + options[:container] = nil + end + version '1.23' do self.release = '1.23.0' self.base_url = "https://numpy.org/doc/#{self.version}/"