1
0

scikit_learn.rb 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. module Docs
  2. class ScikitLearn < UrlScraper
  3. self.name = 'scikit-learn'
  4. self.slug = 'scikit_learn'
  5. self.type = 'sphinx'
  6. self.release = '0.24.1'
  7. self.base_url = 'https://scikit-learn.org/0.24/'
  8. self.root_path = 'index.html'
  9. self.force_gzip = true
  10. self.links = {
  11. home: 'https://scikit-learn.org/',
  12. code: 'https://github.com/scikit-learn/scikit-learn'
  13. }
  14. html_filters.push 'scikit_learn/entries', 'scikit_learn/clean_html', 'sphinx/clean_html', 'title'
  15. options[:container] = ->(filter) { filter.root_page? ? 'body > .container' : '.section' }
  16. options[:skip] = %w(modules/generated/sklearn.experimental.enable_iterative_imputer.html
  17. modules/generated/sklearn.experimental.enable_hist_gradient_boosting.html)
  18. options[:only_patterns] = [/\Amodules/, /\Adatasets/, /\Atutorial/, /\Aauto_examples/]
  19. options[:skip_patterns] = [/\Adatasets\/(?!index)/]
  20. options[:title] = false
  21. options[:root_title] = 'scikit-learn'
  22. options[:max_image_size] = 256_000
  23. options[:attribution] = <<-HTML
  24. &copy; 2007&ndash;2020 The scikit-learn developers<br>
  25. Licensed under the 3-clause BSD License.
  26. HTML
  27. def get_latest_version(opts)
  28. get_latest_github_release('scikit-learn', 'scikit-learn', opts)
  29. end
  30. end
  31. end