Skip to content

Commit ddb83df

Browse files
committed
Update and add missing pytorch versions
1 parent 55b0da7 commit ddb83df

File tree

2 files changed

+79
-4
lines changed

2 files changed

+79
-4
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ If the latest [documentation versions report](https://github.com/freeCodeCamp/de
6464
Follow the following steps to update documentations to their latest version:
6565

6666
1. Make version/release changes in the scraper file.
67-
2. Check if the license is still correct. If you update `options[:attribution]`, also update the documentation's entry in the array in [`assets/javascripts/templates/pages/about_tmpl.coffee`](../assets/javascripts/templates/pages/about_tmpl.coffee) to match.
67+
2. Check if the license is still correct. If you update `options[:attribution]`, also update the documentation's entry in the array in [`assets/javascripts/templates/pages/about_tmpl.js`](../assets/javascripts/templates/pages/about_tmpl.js) to match.
6868
3. If the documentation has a custom icon, ensure the icons in <code>public/icons/*your_scraper_name*/</code> are up-to-date. If you pull the updated icon from a place different than the one specified in the `SOURCE` file, make sure to replace the old link with the new one.
6969
4. If `self.links` is defined, check if the urls are still correct.
7070
5. If the scraper inherits from `FileScraper` rather than `URLScraper`, follow the instructions for that scraper in [`file-scrapers.md`](../docs/file-scrapers.md) to obtain the source material for the scraper.

lib/docs/scrapers/pytorch.rb

Lines changed: 78 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,87 @@ class Pytorch < UrlScraper
1616
options[:max_image_size] = 256_000
1717

1818
options[:attribution] = <<-HTML
19-
&copy; 2019 Torch Contributors<br>
19+
&copy; 2019-2024 Torch Contributors<br>
2020
Licensed under the 3-clause BSD License.
2121
HTML
2222

23-
version do
24-
self.release = '1.8.0'
23+
version '2.1' do
24+
self.release = '2.1'
25+
self.base_url = "https://pytorch.org/docs/#{release}/"
26+
end
27+
28+
version '2.0' do
29+
self.release = '2.0'
30+
self.base_url = "https://pytorch.org/docs/#{release}/"
31+
end
32+
33+
version '1.13' do
34+
self.release = '1.13'
35+
self.base_url = "https://pytorch.org/docs/#{release}/"
36+
end
37+
38+
version '1.12' do
39+
self.release = '1.12'
40+
self.base_url = "https://pytorch.org/docs/#{release}/"
41+
end
42+
43+
version '1.11' do
44+
self.release = '1.11'
45+
self.base_url = "https://pytorch.org/docs/#{release}/"
46+
end
47+
48+
version '1.10' do
49+
self.release = '1.10'
50+
self.base_url = "https://pytorch.org/docs/#{release}/"
51+
end
52+
53+
version '1.9' do
54+
self.release = '1.9.1'
55+
self.base_url = "https://pytorch.org/docs/#{release}/"
56+
end
57+
58+
version '1.8' do
59+
self.release = '1.8.1'
60+
self.base_url = "https://pytorch.org/docs/#{release}/"
61+
end
62+
63+
version '1.7' do
64+
self.release = '1.7.1'
65+
self.base_url = "https://pytorch.org/docs/#{release}/"
66+
end
67+
68+
version '1.6' do
69+
self.release = '1.6.0'
70+
self.base_url = "https://pytorch.org/docs/#{release}/"
71+
end
72+
73+
version '1.5' do
74+
self.release = '1.5.1'
75+
self.base_url = "https://pytorch.org/docs/#{release}/"
76+
end
77+
78+
version '1.4' do
79+
self.release = '1.4.0'
80+
self.base_url = "https://pytorch.org/docs/#{release}/"
81+
end
82+
83+
version '1.3' do
84+
self.release = '1.3.1'
85+
self.base_url = "https://pytorch.org/docs/#{release}/"
86+
end
87+
88+
version '1.2' do
89+
self.release = '1.2.0'
90+
self.base_url = "https://pytorch.org/docs/#{release}/"
91+
end
92+
93+
version '1.1' do
94+
self.release = '1.1.0'
95+
self.base_url = "https://pytorch.org/docs/#{release}/"
96+
end
97+
98+
version '1.0' do
99+
self.release = '1.0.1'
25100
self.base_url = "https://pytorch.org/docs/#{release}/"
26101
end
27102

0 commit comments

Comments
 (0)