From cc41db8039002c68c928279821460ec55f7ecf41 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sat, 14 Nov 2020 12:54:44 +0100 Subject: [PATCH] pytorch: update release 1.7.0 --- lib/docs/scrapers/pytorch.rb | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/lib/docs/scrapers/pytorch.rb b/lib/docs/scrapers/pytorch.rb index 4245981b..f370502a 100644 --- a/lib/docs/scrapers/pytorch.rb +++ b/lib/docs/scrapers/pytorch.rb @@ -3,8 +3,6 @@ module Docs self.name = 'PyTorch' self.slug = 'pytorch' self.type = 'sphinx' - self.release = '1.5.0' - self.base_url = 'https://pytorch.org/docs/stable/' self.force_gzip = true self.links = { home: 'https://pytorch.org/', @@ -19,19 +17,16 @@ module Docs options[:attribution] = <<-HTML © 2019 Torch Contributors
- Licensed under the 3-clause BSD License.
- Read the full license. + Licensed under the 3-clause BSD License. HTML + version do + self.release = '1.7.0' + self.base_url = "https://pytorch.org/docs/#{release}/" + end + def get_latest_version(opts) - doc = fetch_doc('https://pytorch.org/docs/versions.html', opts) - doc.css('li.toctree-l1').each do |node| - match = /v(.+?) \(stable release\)/.match(node.content) - if match - return match[1] - end - end + get_latest_github_release('pytorch', 'pytorch', opts) end end end - \ No newline at end of file