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
346346 'https://daringfireball.net/projects/markdown/license'
347347 ], [
348348 'Matplotlib',
349− '2012-2016 Matplotlib Development Team. All rights reserved.',
349+ '2012-2017 Matplotlib Development Team. All rights reserved.',
350350 'Custom',
351351 'https://raw.githubusercontent.com/matplotlib/matplotlib/master/LICENSE/LICENSE'
352352 ], [
lib/docs/filters/matplotlib/entries.rb+8−5
@@ -18,13 +18,16 @@ module Docs · 17 unmodified lines
1818 name.remove! 'mpl_toolkits.'
1919 name.remove! ' API'
2020 name.remove! %r{ \(.*\)}
21− name.downcase!
2221 name
2322 end
2423
2524 def get_type
2625 return TYPE_BY_SLUG[slug] if TYPE_BY_SLUG.key?(slug)
27− name.split('.').first
26+ type = name.split('.').first
27+ type.downcase!
28+ type.remove! ' module'
29+ type.remove! ' class'
30+ type
2831 end
2932
3033 def additional_entries
@@ -32,19 +35,19 @@ module Docs · 1 unmodified line
3235
3336 css('.class > dt[id]', '.exception > dt[id]', '.attribute > dt[id]').each do |node|
3437 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
3639 end
3740
3841 css('.data > dt[id]').each do |node|
3942 if node['id'].split('.').last.upcase! # skip constants
4043 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
4245 end
4346 end
4447
4548 css('.function > dt[id]', '.method > dt[id]', '.classmethod > dt[id]').each do |node|
4649 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
4851 end
4952
5053 entries
lib/docs/scrapers/matplotlib.rb+10−1
@@ -16,10 +16,19 @@ module Docs · 15 unmodified lines
1616 options[:skip] = %w(api_changes.html tutorial.html faq.html)
1717
1818 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>
2020 Licensed under the Matplotlib License Agreement.
2121 HTML
2222
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+
2332 version '1.5' do
2433 self.release = '1.5.3'
2534 self.base_urls = [