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
573573 'https://raw.githubusercontent.com/npm/npm/master/LICENSE'
574574 ], [
575575 'NumPy',
576− '2005-2019 NumPy Developers',
576+ '2005-2020 NumPy Developers',
577577 'BSD',
578578 'https://raw.githubusercontent.com/numpy/numpy/master/LICENSE.txt'
579579 ], [
docs/file-scrapers.md+6−0
@@ -108,6 +108,12 @@ $GS = '/usr/local/opt/ghostscript/bin/gs'; # GhostScript · 107 unmodified lines
108108
109109 ## NumPy
110110
111+```sh
112+mkdir --parent docs/numpy~$VERSION/; \
113+curl https://numpy.org/doc/$VERSION/numpy-html.zip | \
114+bsdtar --extract --file=- --directory=docs/numpy~$VERSION/
115+```
116+
111117 ## OCaml
112118
113119 Download 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
1414 def get_type
1515 nav_items = css('.nav.nav-pills.pull-left > li')
1616
17− if nav_items[3]
18− type = nav_items[3].content
19− elsif nav_items[2] && nav_items[2].content !~ /Manual|Reference/
20− type = nav_items[2].content
17+ if nav_items[5]
18+ type = nav_items[5].content
19+ elsif nav_items[4] && nav_items[4].content !~ /Manual|Reference/
20+ type = nav_items[4].content
2121 else
2222 type = at_css('h1').content.strip
2323 type.remove! "\u{00B6}"
@@ -29,7 +29,7 @@ module Docs · 5 unmodified lines
2929 type = 'Universal functions'
3030 elsif type.start_with?('numpy.nditer.') || type.start_with?('numpy.lib.Arrayterator.') || type.start_with?('numpy.flatiter.')
3131 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.')
3333 type = 'Standard array subclasses'
3434 elsif type.start_with?('numpy.busdaycalendar.')
3535 type = 'Datetime support functions'
@@ -41,9 +41,9 @@ module Docs · 5 unmodified lines
4141 type = 'Data type objects'
4242 elsif type.start_with?('numpy.generic.')
4343 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.')
4545 type = 'String operations'
46− elsif type == 'numpy.memmap.shape'
46+ elsif type.start_with?('numpy.memmap.')
4747 type = 'Input and output'
4848 elsif type == 'numpy.poly1d.variable'
4949 type = 'Polynomials'
lib/docs/scrapers/numpy.rb+12−1
@@ -17,14 +17,25 @@ module Docs · 16 unmodified lines
1717
1818 options[:skip_patterns] = [
1919 /.*(?<!\.html)\z/,
20+ /\Arelease\/.*-notes.html\Z/,
2021 /\Agenerated\/numpy\.chararray\.[\w\-]+.html\z/ # duplicate
2122 ]
2223
2324 options[:attribution] = <<-HTML
24− &copy; 2005&ndash;2019 NumPy Developers<br>
25+ &copy; 2005&ndash;2020 NumPy Developers<br>
2526 Licensed under the 3-clause BSD License.
2627 HTML
2728
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+
2839 version '1.17' do
2940 self.release = '1.17.0'
3041 self.base_url = "https://docs.scipy.org/doc/numpy-#{self.release}/reference/"
public/icons/docs/numpy/SOURCE+1−1
@@ -1 +1 @@
1−https://github.com/numpy/numpy/blob/master/branding/icons/numpylogoicon.svg
1+https://github.com/numpy/numpy/blob/master/doc/source/_static/numpylogo.svg