hanny 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 34769d604cbf8f16dad0e31abbfd8fc27d8a3d80fcd48d27d6344b3abb2abd47
4
- data.tar.gz: 95917273a1a476ecd6c582f0e4955ef88b8b214d59baf0f0d5d5ef3267a2a92d
3
+ metadata.gz: d39024d595c701feff9aec387768b7c9c6341b3131073f1c9cfad3d42cc8910f
4
+ data.tar.gz: 5c05ce7a494a3eec292289248a01dacc6cfaa845517ac7a18648e734245a365f
5
5
  SHA512:
6
- metadata.gz: 635dd1e38cca2b611c0b56d89d93567fc082a649bcf7746d72995cb940400e55cb441b8db264d8d14ed3d1e95b78e0894ab8e00c7c03ade845ead9558f68617d
7
- data.tar.gz: c17cc97c2883b9fb17c028ea3aadba4a8dde203220d4c952b8726258c5740d756beee1e2f10b6907555c420a0802febf48db12fd6c40bbe247145ad13a048a49
6
+ metadata.gz: 7ac234dc0f6305bb4bd877506bd30a086baf3a009d443a6e91100d8c33aecfe6138c8c9359f9e3e4d29b7a42fd588bae2682b70e53441e9ffca65da2e3a0620d
7
+ data.tar.gz: d779d5ad1434366d9b603aa5acea3bba4150fbdeb587d0bcbf057f45ef58ce2c8289d0117d4e15295f07ceabfdd47b1a4829fe1c3d2a4ca65f70d3b57c9a3df1
@@ -6,17 +6,15 @@ jobs:
6
6
  build:
7
7
  runs-on: ubuntu-latest
8
8
  strategy:
9
+ fail-fast: false
9
10
  matrix:
10
- ruby: [ '2.6', '2.7', '3.0' ]
11
+ ruby: [ '2.7', '3.0', '3.1' ]
11
12
  steps:
12
- - uses: actions/checkout@v2
13
+ - uses: actions/checkout@v3
13
14
  - name: Set up Ruby ${{ matrix.ruby }}
14
15
  uses: ruby/setup-ruby@v1
15
16
  with:
16
17
  ruby-version: ${{ matrix.ruby }}
17
18
  bundler-cache: true
18
19
  - name: Build and test with Rake
19
- run: |
20
- gem install --no-document bundler
21
- bundle install --jobs 4 --retry 3
22
- bundle exec rake
20
+ run: bundle exec rake
@@ -10,17 +10,14 @@ jobs:
10
10
  coverage:
11
11
  runs-on: ubuntu-20.04
12
12
  steps:
13
- - uses: actions/checkout@v2
13
+ - uses: actions/checkout@v3
14
14
  - name: Set up Ruby 2.7
15
15
  uses: ruby/setup-ruby@v1
16
16
  with:
17
17
  ruby-version: '2.7'
18
18
  bundler-cache: true
19
19
  - name: Build and test with Rake
20
- run: |
21
- gem install bundler
22
- bundle install
23
- bundle exec rake
20
+ run: bundle exec rake
24
21
  - name: Coveralls GitHub Action
25
22
  uses: coverallsapp/github-action@v1.1.2
26
23
  with:
data/.rubocop.yml CHANGED
@@ -1,43 +1,56 @@
1
1
  require:
2
2
  - rubocop-performance
3
+ - rubocop-rake
3
4
  - rubocop-rspec
4
5
 
5
6
  AllCops:
6
- TargetRubyVersion: 2.5
7
+ NewCops: enable
7
8
  DisplayCopNames: true
8
9
  DisplayStyleGuide: true
9
- NewCops: enable
10
10
  Exclude:
11
- - 'hanny.gemspec'
12
-
13
- Layout/LineLength:
14
- Max: 140
15
- IgnoredPatterns: ['(\A|\s)#']
11
+ - 'tmp/**/*'
12
+ - 'vendor/**/*'
13
+ - 'Steepfile'
16
14
 
17
- Metrics/ModuleLength:
18
- Max: 200
15
+ Gemspec/RequiredRubyVersion:
16
+ Enabled: false
19
17
 
20
- Metrics/ClassLength:
21
- Max: 200
18
+ Layout/LineLength:
19
+ AllowedPatterns: ['(\A|\s)#']
22
20
 
23
- Metrics/MethodLength:
24
- Max: 40
21
+ Lint/AmbiguousOperatorPrecedence:
22
+ Enabled: false
25
23
 
26
24
  Metrics/AbcSize:
27
- Max: 60
25
+ Max: 32
28
26
 
29
27
  Metrics/BlockLength:
30
28
  Exclude:
31
29
  - 'spec/**/*'
32
30
 
31
+ Metrics/ClassLength:
32
+ Max: 128
33
+
34
+ Metrics/MethodLength:
35
+ Max: 24
36
+
33
37
  Metrics/ParameterLists:
34
- Max: 10
38
+ Max: 8
35
39
 
36
- Security/MarshalLoad:
40
+ Naming/AccessorMethodName:
37
41
  Enabled: false
38
42
 
39
43
  Naming/MethodParameterName:
40
44
  Enabled: false
41
45
 
42
- Style/FormatStringToken:
46
+ RSpec/ExampleLength:
47
+ Max: 18
48
+
49
+ RSpec/MultipleMemoizedHelpers:
50
+ Max: 12
51
+
52
+ RSpec/NamedSubject:
43
53
  Enabled: false
54
+
55
+ RSpec/NestedGroups:
56
+ Max: 5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 0.2.2
2
+ - Refactor codes and configs with RuboCop
3
+
1
4
  # 0.2.1
2
5
  - Remove dependent gem's type declaration file from installation files.
3
6
 
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
@@ -7,8 +9,12 @@ gemspec
7
9
 
8
10
  gem 'bundler', '~> 2.0'
9
11
  gem 'rake', '~> 12.0'
12
+ gem 'rbs', '~> 1.2'
10
13
  gem 'rspec', '~> 3.0'
14
+ gem 'rubocop', '~> 1.35'
15
+ gem 'rubocop-performance', '~> 1.14'
16
+ gem 'rubocop-rake', '~> 0.6.0'
17
+ gem 'rubocop-rspec', '~> 2.12'
11
18
  gem 'simplecov', '~> 0.19'
12
19
  gem 'simplecov-lcov', '~> 0.8'
13
- gem 'rbs', '~> 1.2'
14
20
  gem 'steep', '~> 0.44'
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2017-2021 yoshoku
1
+ Copyright (c) 2017-2022 yoshoku
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without
data/Rakefile CHANGED
@@ -1,6 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rspec/core/rake_task'
3
5
 
4
6
  RSpec::Core::RakeTask.new(:spec)
5
7
 
6
- task default: :spec
8
+ require 'rubocop/rake_task'
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[rubocop spec]
data/hanny.gemspec CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  lib = File.expand_path('lib', __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
@@ -10,17 +11,23 @@ Gem::Specification.new do |spec|
10
11
  spec.email = ['yoshoku@outlook.com']
11
12
 
12
13
  spec.summary = 'Hanny is a Hash-based Approximate Nearest Neighbor search library in Ruby.'
13
- spec.description = <<MSG
14
- Hanny is a Hash-based Approximate Nearest Neighbor (ANN) search library in Ruby.
15
- Hash-based ANN converts vector data into binary codes and builds a hash table by using the binary codes as hash keys.
16
- To build the hash table, Hanny uses Locality Sensitive Hashing (LSH) of approximating cosine similarity.
17
- It is known that if the code length is sufficiently long (ex. greater than 128-bit), LSH can obtain high search performance.
18
- In the experiment, Hanny achieved about twenty times faster search speed than the brute-force search by Euclidean distance.
19
- MSG
14
+ spec.description = <<~MSG
15
+ Hanny is a Hash-based Approximate Nearest Neighbor (ANN) search library in Ruby.
16
+ Hash-based ANN converts vector data into binary codes and builds a hash table by using the binary codes as hash keys.
17
+ To build the hash table, Hanny uses Locality Sensitive Hashing (LSH) of approximating cosine similarity.
18
+ It is known that if the code length is sufficiently long (ex. greater than 128-bit), LSH can obtain high search performance.
19
+ In the experiment, Hanny achieved about twenty times faster search speed than the brute-force search by Euclidean distance.
20
+ MSG
20
21
  spec.homepage = 'https://github.com/yoshoku/hanny'
21
22
  spec.license = 'BSD-2-Clause'
22
23
 
23
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
24
+ spec.metadata['homepage_uri'] = spec.homepage
25
+ spec.metadata['source_code_uri'] = spec.homepage
26
+ spec.metadata['changelog_uri'] = 'https://github.com/yoshoku/hanny/blob/main/CHANGELOG.md'
27
+ spec.metadata['documentation_uri'] = 'https://yoshoku.github.io/hanny/doc/'
28
+ spec.metadata['rubygems_mfa_required'] = 'true'
29
+
30
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
24
31
  f.match(%r{^(test|spec|features|sig-deps)/})
25
32
  end
26
33
  spec.bindir = 'exe'
data/lib/hanny/version.rb CHANGED
@@ -3,5 +3,5 @@
3
3
  # Hanny is a hash-based approximate nearest neighbor search library.
4
4
  module Hanny
5
5
  # The version of Hanny you are using.
6
- VERSION = '0.2.1'
6
+ VERSION = '0.2.2'
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hanny
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - yoshoku
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-10 00:00:00.000000000 Z
11
+ date: 2022-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: numo-narray
@@ -60,8 +60,13 @@ files:
60
60
  homepage: https://github.com/yoshoku/hanny
61
61
  licenses:
62
62
  - BSD-2-Clause
63
- metadata: {}
64
- post_install_message:
63
+ metadata:
64
+ homepage_uri: https://github.com/yoshoku/hanny
65
+ source_code_uri: https://github.com/yoshoku/hanny
66
+ changelog_uri: https://github.com/yoshoku/hanny/blob/main/CHANGELOG.md
67
+ documentation_uri: https://yoshoku.github.io/hanny/doc/
68
+ rubygems_mfa_required: 'true'
69
+ post_install_message:
65
70
  rdoc_options: []
66
71
  require_paths:
67
72
  - lib
@@ -76,8 +81,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
81
  - !ruby/object:Gem::Version
77
82
  version: '0'
78
83
  requirements: []
79
- rubygems_version: 3.2.21
80
- signing_key:
84
+ rubygems_version: 3.2.33
85
+ signing_key:
81
86
  specification_version: 4
82
87
  summary: Hanny is a Hash-based Approximate Nearest Neighbor search library in Ruby.
83
88
  test_files: []