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 +4 -4
- data/.github/workflows/build.yml +4 -6
- data/.github/workflows/coverage.yml +2 -5
- data/.rubocop.yml +30 -17
- data/CHANGELOG.md +3 -0
- data/Gemfile +7 -1
- data/LICENSE.txt +1 -1
- data/Rakefile +7 -1
- data/hanny.gemspec +15 -8
- data/lib/hanny/version.rb +1 -1
- metadata +12 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d39024d595c701feff9aec387768b7c9c6341b3131073f1c9cfad3d42cc8910f
|
4
|
+
data.tar.gz: 5c05ce7a494a3eec292289248a01dacc6cfaa845517ac7a18648e734245a365f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ac234dc0f6305bb4bd877506bd30a086baf3a009d443a6e91100d8c33aecfe6138c8c9359f9e3e4d29b7a42fd588bae2682b70e53441e9ffca65da2e3a0620d
|
7
|
+
data.tar.gz: d779d5ad1434366d9b603aa5acea3bba4150fbdeb587d0bcbf057f45ef58ce2c8289d0117d4e15295f07ceabfdd47b1a4829fe1c3d2a4ca65f70d3b57c9a3df1
|
data/.github/workflows/build.yml
CHANGED
@@ -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.
|
11
|
+
ruby: [ '2.7', '3.0', '3.1' ]
|
11
12
|
steps:
|
12
|
-
- uses: actions/checkout@
|
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@
|
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
|
-
|
7
|
+
NewCops: enable
|
7
8
|
DisplayCopNames: true
|
8
9
|
DisplayStyleGuide: true
|
9
|
-
NewCops: enable
|
10
10
|
Exclude:
|
11
|
-
- '
|
12
|
-
|
13
|
-
|
14
|
-
Max: 140
|
15
|
-
IgnoredPatterns: ['(\A|\s)#']
|
11
|
+
- 'tmp/**/*'
|
12
|
+
- 'vendor/**/*'
|
13
|
+
- 'Steepfile'
|
16
14
|
|
17
|
-
|
18
|
-
|
15
|
+
Gemspec/RequiredRubyVersion:
|
16
|
+
Enabled: false
|
19
17
|
|
20
|
-
|
21
|
-
|
18
|
+
Layout/LineLength:
|
19
|
+
AllowedPatterns: ['(\A|\s)#']
|
22
20
|
|
23
|
-
|
24
|
-
|
21
|
+
Lint/AmbiguousOperatorPrecedence:
|
22
|
+
Enabled: false
|
25
23
|
|
26
24
|
Metrics/AbcSize:
|
27
|
-
Max:
|
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:
|
38
|
+
Max: 8
|
35
39
|
|
36
|
-
|
40
|
+
Naming/AccessorMethodName:
|
37
41
|
Enabled: false
|
38
42
|
|
39
43
|
Naming/MethodParameterName:
|
40
44
|
Enabled: false
|
41
45
|
|
42
|
-
|
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
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
data/Rakefile
CHANGED
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 =
|
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.
|
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
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.
|
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:
|
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
|
-
|
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.
|
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: []
|