History

Merge pull request #1356 from simon04/numpy-1.19

Simon Legner committed 5 years ago

Commit 06eba0b2 parents 6d62905 97092835 files · +27 −10Browse files

Unified · Split

5 files
  1. assets/javascripts/templates/pages/about_tmpl.coffee +1 −1
  2. docs/file-scrapers.md +6 −0
  3. lib/docs/filters/numpy/entries.rb +7 −7
  4. lib/docs/scrapers/numpy.rb +12 −1
  5. public/icons/docs/numpy/SOURCE +1 −1
assets/javascripts/templates/pages/about_tmpl.coffee+1−1
@@ -573,7 +573,7 @@ credits = [ · 572 unmodified lines
573 'https://raw.githubusercontent.com/npm/npm/master/LICENSE'573 'https://raw.githubusercontent.com/npm/npm/master/LICENSE'
574 ], [574 ], [
575 'NumPy',575 'NumPy',
576 '2005-2019 NumPy Developers',576 '2005-2020 NumPy Developers',
577 'BSD',577 'BSD',
578 'https://raw.githubusercontent.com/numpy/numpy/master/LICENSE.txt'578 'https://raw.githubusercontent.com/numpy/numpy/master/LICENSE.txt'
579 ], [579 ], [
docs/file-scrapers.md+6−0
@@ -108,6 +108,12 @@ $GS = '/usr/local/opt/ghostscript/bin/gs'; # GhostScript · 107 unmodified lines
108 108
109## NumPy109## NumPy
110 110
111```sh
112mkdir --parent docs/numpy~$VERSION/; \
113curl https://numpy.org/doc/$VERSION/numpy-html.zip | \
114bsdtar --extract --file=- --directory=docs/numpy~$VERSION/
115```
116
111## OCaml117## OCaml
112 118
113Download from https://www.ocaml.org/docs/ the HTML reference:119Download from https://www.ocaml.org/docs/ the HTML reference:
lib/docs/filters/numpy/entries.rb+7−7
@@ -14,10 +14,10 @@ module Docs · 13 unmodified lines
14 def get_type14 def get_type
15 nav_items = css('.nav.nav-pills.pull-left > li')15 nav_items = css('.nav.nav-pills.pull-left > li')
16 16
17 if nav_items[3]17 if nav_items[5]
18 type = nav_items[3].content18 type = nav_items[5].content
19 elsif nav_items[2] && nav_items[2].content !~ /Manual|Reference/19 elsif nav_items[4] && nav_items[4].content !~ /Manual|Reference/
20 type = nav_items[2].content20 type = nav_items[4].content
21 else21 else
22 type = at_css('h1').content.strip22 type = at_css('h1').content.strip
23 type.remove! "\u{00B6}"23 type.remove! "\u{00B6}"
@@ -29,7 +29,7 @@ module Docs · 5 unmodified lines
29 type = 'Universal functions'29 type = 'Universal functions'
30 elsif type.start_with?('numpy.nditer.') || type.start_with?('numpy.lib.Arrayterator.') || type.start_with?('numpy.flatiter.')30 elsif type.start_with?('numpy.nditer.') || type.start_with?('numpy.lib.Arrayterator.') || type.start_with?('numpy.flatiter.')
31 type = 'Indexing routines'31 type = 'Indexing routines'
32 elsif type.start_with?('numpy.record.') || type.start_with?('numpy.recarray.') || type.start_with?('numpy.broadcast.') || type.start_with?('numpy.matrix.')32 elsif type.start_with?('numpy.record.') || type.start_with?('numpy.recarray.') || type.start_with?('numpy.broadcast.') || type.start_with?('numpy.matrix.') || type.start_with?('numpy.ma.')
33 type = 'Standard array subclasses'33 type = 'Standard array subclasses'
34 elsif type.start_with?('numpy.busdaycalendar.')34 elsif type.start_with?('numpy.busdaycalendar.')
35 type = 'Datetime support functions'35 type = 'Datetime support functions'
@@ -41,9 +41,9 @@ module Docs · 5 unmodified lines
41 type = 'Data type objects'41 type = 'Data type objects'
42 elsif type.start_with?('numpy.generic.')42 elsif type.start_with?('numpy.generic.')
43 type = 'Scalars'43 type = 'Scalars'
44 elsif type.start_with?('numpy.char.chararray.') || type.start_with?('numpy.core.defchararray.chararray.')44 elsif type.start_with?('numpy.chararray.') || type.start_with?('numpy.char.chararray.') || type.start_with?('numpy.core.defchararray.chararray.')
45 type = 'String operations'45 type = 'String operations'
46 elsif type == 'numpy.memmap.shape'46 elsif type.start_with?('numpy.memmap.')
47 type = 'Input and output'47 type = 'Input and output'
48 elsif type == 'numpy.poly1d.variable'48 elsif type == 'numpy.poly1d.variable'
49 type = 'Polynomials'49 type = 'Polynomials'
lib/docs/scrapers/numpy.rb+12−1
@@ -17,14 +17,25 @@ module Docs · 16 unmodified lines
17 17
18 options[:skip_patterns] = [18 options[:skip_patterns] = [
19 /.*(?<!\.html)\z/,19 /.*(?<!\.html)\z/,
20 /\Arelease\/.*-notes.html\Z/,
20 /\Agenerated\/numpy\.chararray\.[\w\-]+.html\z/ # duplicate21 /\Agenerated\/numpy\.chararray\.[\w\-]+.html\z/ # duplicate
21 ]22 ]
22 23
23 options[:attribution] = <<-HTML24 options[:attribution] = <<-HTML
24 &copy; 2005&ndash;2019 NumPy Developers<br>25 &copy; 2005&ndash;2020 NumPy Developers<br>
25 Licensed under the 3-clause BSD License.26 Licensed under the 3-clause BSD License.
26 HTML27 HTML
27 28
29 version '1.19' do
30 self.release = '1.19.0'
31 self.base_url = "https://numpy.org/doc/#{self.version}/"
32 end
33
34 version '1.18' do
35 self.release = '1.18.5'
36 self.base_url = "https://numpy.org/doc/#{self.version}/"
37 end
38
28 version '1.17' do39 version '1.17' do
29 self.release = '1.17.0'40 self.release = '1.17.0'
30 self.base_url = "https://docs.scipy.org/doc/numpy-#{self.release}/reference/"41 self.base_url = "https://docs.scipy.org/doc/numpy-#{self.release}/reference/"
public/icons/docs/numpy/SOURCE+1−1
@@ -1 +1 @@
1https://github.com/numpy/numpy/blob/master/branding/icons/numpylogoicon.svg1https://github.com/numpy/numpy/blob/master/doc/source/_static/numpylogo.svg