History

Update Matplotlib documentation (2.0.0)

Thibaut Courouble committed 9 years ago

Commit f26e3971 parent 42344883 files · +19 −7Browse files

Unified · Split

3 files
  1. assets/javascripts/templates/pages/about_tmpl.coffee +1 −1
  2. lib/docs/filters/matplotlib/entries.rb +8 −5
  3. lib/docs/scrapers/matplotlib.rb +10 −1
assets/javascripts/templates/pages/about_tmpl.coffee+1−1
@@ -346,7 +346,7 @@ credits = [ · 345 unmodified lines
346 'https://daringfireball.net/projects/markdown/license'346 'https://daringfireball.net/projects/markdown/license'
347 ], [347 ], [
348 'Matplotlib',348 'Matplotlib',
349 '2012-2016 Matplotlib Development Team. All rights reserved.',349 '2012-2017 Matplotlib Development Team. All rights reserved.',
350 'Custom',350 'Custom',
351 'https://raw.githubusercontent.com/matplotlib/matplotlib/master/LICENSE/LICENSE'351 'https://raw.githubusercontent.com/matplotlib/matplotlib/master/LICENSE/LICENSE'
352 ], [352 ], [
lib/docs/filters/matplotlib/entries.rb+8−5
@@ -18,13 +18,16 @@ module Docs · 17 unmodified lines
18 name.remove! 'mpl_toolkits.'18 name.remove! 'mpl_toolkits.'
19 name.remove! ' API'19 name.remove! ' API'
20 name.remove! %r{ \(.*\)}20 name.remove! %r{ \(.*\)}
21 name.downcase!
22 name21 name
23 end22 end
24 23
25 def get_type24 def get_type
26 return TYPE_BY_SLUG[slug] if TYPE_BY_SLUG.key?(slug)25 return TYPE_BY_SLUG[slug] if TYPE_BY_SLUG.key?(slug)
27 name.split('.').first26 type = name.split('.').first
27 type.downcase!
28 type.remove! ' module'
29 type.remove! ' class'
30 type
28 end31 end
29 32
30 def additional_entries33 def additional_entries
@@ -32,19 +35,19 @@ module Docs · 1 unmodified line
32 35
33 css('.class > dt[id]', '.exception > dt[id]', '.attribute > dt[id]').each do |node|36 css('.class > dt[id]', '.exception > dt[id]', '.attribute > dt[id]').each do |node|
34 entry_name = node['id'].remove('matplotlib.').remove('mpl_toolkits.')37 entry_name = node['id'].remove('matplotlib.').remove('mpl_toolkits.')
35 entries << [entry_name, node['id']]38 entries << [entry_name, node['id']] unless entry_name.casecmp(name) == 0
36 end39 end
37 40
38 css('.data > dt[id]').each do |node|41 css('.data > dt[id]').each do |node|
39 if node['id'].split('.').last.upcase! # skip constants42 if node['id'].split('.').last.upcase! # skip constants
40 entry_name = node['id'].remove('matplotlib.').remove('mpl_toolkits.')43 entry_name = node['id'].remove('matplotlib.').remove('mpl_toolkits.')
41 entries << [entry_name, node['id']]44 entries << [entry_name, node['id']] unless entry_name.casecmp(name) == 0
42 end45 end
43 end46 end
44 47
45 css('.function > dt[id]', '.method > dt[id]', '.classmethod > dt[id]').each do |node|48 css('.function > dt[id]', '.method > dt[id]', '.classmethod > dt[id]').each do |node|
46 entry_name = node['id'].remove('matplotlib.').remove('mpl_toolkits.')49 entry_name = node['id'].remove('matplotlib.').remove('mpl_toolkits.')
47 entries << [entry_name + '()', node['id']]50 entries << [entry_name + '()', node['id']] unless entry_name.casecmp(name) == 0
48 end51 end
49 52
50 entries53 entries
lib/docs/scrapers/matplotlib.rb+10−1
@@ -16,10 +16,19 @@ module Docs · 15 unmodified lines
16 options[:skip] = %w(api_changes.html tutorial.html faq.html)16 options[:skip] = %w(api_changes.html tutorial.html faq.html)
17 17
18 options[:attribution] = <<-HTML18 options[:attribution] = <<-HTML
19 &copy; 2012&ndash;2016 Matplotlib Development Team. All rights reserved.<br>19 &copy; 2012&ndash;2017 Matplotlib Development Team. All rights reserved.<br>
20 Licensed under the Matplotlib License Agreement.20 Licensed under the Matplotlib License Agreement.
21 HTML21 HTML
22 22
23 version '2.0' do
24 self.release = '2.0.0'
25 self.base_urls = [
26 "http://matplotlib.org/#{release}/api/",
27 "http://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",
28 "http://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"
29 ]
30 end
31
23 version '1.5' do32 version '1.5' do
24 self.release = '1.5.3'33 self.release = '1.5.3'
25 self.base_urls = [34 self.base_urls = [