wikidata-diff-analyzer 2.0.0 → 2.0.1

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: 3b428ba941c316f6bb6f5eb6b964a070699677ed0d51534e2f2abe40f41e9421
4
- data.tar.gz: 802cc9c1615c7fae714fe8354e8bab1b70bf555e7d3a7ffcd93f2fa4beaddcbf
3
+ metadata.gz: e2582edb55fb495d5256a573a6431eaf2ea628872d85a21591badd0d16ad528b
4
+ data.tar.gz: ac0c0dd70e982f169b6ac52dc882c7f1fbe8c632868ba48368b53f10e530ad60
5
5
  SHA512:
6
- metadata.gz: b80a6c80370ddd1c967acdedd18dde6e73bbfb057de15fc412251ed4c7578ad61ace02456ffc033d8cae776031e8808d569d136f263da6d7fbe1659dc36d9907
7
- data.tar.gz: 0fde4f956bc7ad6f2fda21b420bef6130c32c05c77e397664d9ae39af62db413642ba787122b98bd8f6ef1d49edef5671cc3b6222ec0195becad17e40e5d5f11
6
+ metadata.gz: 554b47cea6fdf10c41760e19c34102ca12607b26e1a09aad9fa82ce595b19593cacac9feae95da553c1a6afb6c62a75cd6ddf73cf5ff5683f36f3e217f0b3ff7
7
+ data.tar.gz: 2dcbd83e6f1a93b1bd3ccfeb7d54d81bd89f4f88c290a1f9384658f2291392fa6b4873f44c82bb2240a8fa5b153334fd48b0656e611cb23187d2ecde2ae25192
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WikidataDiffAnalyzer
4
+ VERSION = "2.0.1"
5
+ end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
- require_relative 'large_batches_analyzer'
3
- require_relative 'revision_analyzer'
4
- require_relative 'total'
2
+ require_relative 'wikidata/diff/large_batches_analyzer'
3
+ require_relative 'wikidata/diff/revision_analyzer'
4
+ require_relative 'wikidata/diff/total'
5
5
 
6
6
  module WikidataDiffAnalyzer
7
7
  class Error < StandardError; end
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "lib/wikidata/diff/analyzer/version"
3
+ require File.expand_path('lib/wikidata-diff-analyzer/version', __dir__)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "wikidata-diff-analyzer"
7
- spec.version = Wikidata::Diff::Analyzer::VERSION
7
+ spec.version = WikidataDiffAnalyzer::VERSION
8
8
  spec.authors = ["Sulagna Saha"]
9
9
  spec.email = ["saha23s@mtholyoke.edu"]
10
10
 
@@ -22,16 +22,22 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  # Specify which files should be added to the gem when it is released.
24
24
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
- spec.files = Dir.chdir(__dir__) do
26
- `git ls-files -z`.split("\x0").reject do |f|
27
- (File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor])
28
- end
29
- end
25
+ spec.files = Dir['README.md', 'LICENSE',
26
+ 'CHANGELOG.md', 'lib/**/*.rb',
27
+ 'lib/**/*.rake',
28
+ 'wikidata-diff-analyzer.gemspec', '.github/*.md',
29
+ 'Gemfile', 'Rakefile']
30
+ spec.extra_rdoc_files = ['README.md']
31
+ spec.require_paths = ['lib']
32
+
30
33
  spec.bindir = "exe"
31
34
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
32
- spec.require_paths = ["lib"]
33
35
  spec.files.reject! { |f| File.extname(f) == '.gem' }
34
36
 
35
37
  # Adding the dependencies
36
38
  spec.add_dependency 'json', '~> 2.1'
39
+ spec.add_dependency 'mediawiki_api', '~> 0.7.0'
40
+ spec.add_dependency 'rspec', '~> 3.0'
41
+ spec.add_dependency 'rubocop', '~> 1.21'
42
+ spec.add_dependency 'rake', '~> 13.0'
37
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wikidata-diff-analyzer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sulagna Saha
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-07-27 00:00:00.000000000 Z
11
+ date: 2023-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -24,25 +24,79 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: mediawiki_api
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.7.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.7.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.21'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.21'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '13.0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '13.0'
27
83
  description: This gem provides tools for analyzing diffs between Wikidata items, including
28
84
  retrieving the JSON representation of an item for a specific revision.
29
85
  email:
30
86
  - saha23s@mtholyoke.edu
31
87
  executables: []
32
88
  extensions: []
33
- extra_rdoc_files: []
89
+ extra_rdoc_files:
90
+ - README.md
34
91
  files:
35
92
  - CHANGELOG.md
36
- - CODE_OF_CONDUCT.md
37
- - CONTRIBUTING.md
38
93
  - Gemfile
39
- - Gemfile.lock
40
94
  - LICENSE
41
95
  - README.md
42
96
  - Rakefile
97
+ - lib/wikidata-diff-analyzer.rb
98
+ - lib/wikidata-diff-analyzer/version.rb
43
99
  - lib/wikidata/diff/alias_analyzer.rb
44
- - lib/wikidata/diff/analyzer.rb
45
- - lib/wikidata/diff/analyzer/version.rb
46
100
  - lib/wikidata/diff/api.rb
47
101
  - lib/wikidata/diff/claim_analyzer.rb
48
102
  - lib/wikidata/diff/comment_analyzer.rb
@@ -60,7 +114,6 @@ files:
60
114
  - lib/wikidata/diff/sense_analyzer.rb
61
115
  - lib/wikidata/diff/sitelink_analyzer.rb
62
116
  - lib/wikidata/diff/total.rb
63
- - sig/wikidata/diff/analyzer.rbs
64
117
  - wikidata-diff-analyzer.gemspec
65
118
  homepage: https://github.com/WikiEducationFoundation/wikidata-diff-analyzer
66
119
  licenses:
data/CODE_OF_CONDUCT.md DELETED
@@ -1,84 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
-
7
- We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
-
9
- ## Our Standards
10
-
11
- Examples of behavior that contributes to a positive environment for our community include:
12
-
13
- * Demonstrating empathy and kindness toward other people
14
- * Being respectful of differing opinions, viewpoints, and experiences
15
- * Giving and gracefully accepting constructive feedback
16
- * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
- * Focusing on what is best not just for us as individuals, but for the overall community
18
-
19
- Examples of unacceptable behavior include:
20
-
21
- * The use of sexualized language or imagery, and sexual attention or
22
- advances of any kind
23
- * Trolling, insulting or derogatory comments, and personal or political attacks
24
- * Public or private harassment
25
- * Publishing others' private information, such as a physical or email
26
- address, without their explicit permission
27
- * Other conduct which could reasonably be considered inappropriate in a
28
- professional setting
29
-
30
- ## Enforcement Responsibilities
31
-
32
- Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
-
34
- Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
-
36
- ## Scope
37
-
38
- This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
-
40
- ## Enforcement
41
-
42
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at saha23s2mtholyoke.edu. All complaints will be reviewed and investigated promptly and fairly.
43
-
44
- All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
-
46
- ## Enforcement Guidelines
47
-
48
- Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
-
50
- ### 1. Correction
51
-
52
- **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
-
54
- **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
-
56
- ### 2. Warning
57
-
58
- **Community Impact**: A violation through a single incident or series of actions.
59
-
60
- **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
-
62
- ### 3. Temporary Ban
63
-
64
- **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
-
66
- **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
-
68
- ### 4. Permanent Ban
69
-
70
- **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
-
72
- **Consequence**: A permanent ban from any sort of public interaction within the community.
73
-
74
- ## Attribution
75
-
76
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
- available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
-
79
- Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
-
81
- [homepage]: https://www.contributor-covenant.org
82
-
83
- For answers to common questions about this code of conduct, see the FAQ at
84
- https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/CONTRIBUTING.md DELETED
@@ -1,13 +0,0 @@
1
- This file contains information about file structures and how the gem works.
2
-
3
- `analyzer.rb` contains the main function `analyze` which calls functions from `large_batches_analyzer.rb`, `total.rb` and `revision_analyzer.rb`
4
-
5
- `large_batches_analyzer.rb` handles large batches and builds the result containing the current_content, parent_content, model and comment.
6
- `revision_analyzer.rb` calls all the analyzers based on if the revision is item/property/lexeme to analyze the differences between current and parent contents.
7
- `total.rb` sums up the count of all the analyzed revisions.
8
-
9
- `revision_analyzer.rb` calls `claim_analyzer`, `alias_analyzer`, `label_analyzer`, `description_analyzer`, `sitelink_analyzer`, `comment_analyzer`, `lemma_analyzer`, `sense_analyzer`, `form_analyzer` for analyzing the differences
10
-
11
- `claim_analyzer.rb` calls `reference_analyzer` and `qualifier_analyzer`
12
- `form_analyzer.rb` calls `representation_analyzer` and `inside_claim_analyzer`
13
- `sense_analyzer.rb` calls `gloss_analyzer` and `inside_claim_analyzer`
data/Gemfile.lock DELETED
@@ -1,81 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- wikidata-diff-analyzer (0.1.1)
5
- json (~> 2.1)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- ast (2.4.2)
11
- diff-lcs (1.5.0)
12
- domain_name (0.5.20190701)
13
- unf (>= 0.0.5, < 1.0.0)
14
- dotenv (2.8.1)
15
- faraday (0.17.6)
16
- multipart-post (>= 1.2, < 3)
17
- faraday-cookie_jar (0.0.7)
18
- faraday (>= 0.8.0)
19
- http-cookie (~> 1.0.0)
20
- faraday_middleware (0.14.0)
21
- faraday (>= 0.7.4, < 1.0)
22
- http-cookie (1.0.5)
23
- domain_name (~> 0.5)
24
- json (2.6.3)
25
- mediawiki_api (0.7.1)
26
- faraday (~> 0.9, >= 0.9.0)
27
- faraday-cookie_jar (~> 0.0, >= 0.0.6)
28
- faraday_middleware (~> 0.10, >= 0.10.0)
29
- multipart-post (2.3.0)
30
- parallel (1.23.0)
31
- parser (3.2.2.1)
32
- ast (~> 2.4.1)
33
- rainbow (3.1.1)
34
- rake (13.0.6)
35
- regexp_parser (2.8.0)
36
- rexml (3.2.5)
37
- rspec (3.12.0)
38
- rspec-core (~> 3.12.0)
39
- rspec-expectations (~> 3.12.0)
40
- rspec-mocks (~> 3.12.0)
41
- rspec-core (3.12.2)
42
- rspec-support (~> 3.12.0)
43
- rspec-expectations (3.12.3)
44
- diff-lcs (>= 1.2.0, < 2.0)
45
- rspec-support (~> 3.12.0)
46
- rspec-mocks (3.12.5)
47
- diff-lcs (>= 1.2.0, < 2.0)
48
- rspec-support (~> 3.12.0)
49
- rspec-support (3.12.0)
50
- rubocop (1.51.0)
51
- json (~> 2.3)
52
- parallel (~> 1.10)
53
- parser (>= 3.2.0.0)
54
- rainbow (>= 2.2.2, < 4.0)
55
- regexp_parser (>= 1.8, < 3.0)
56
- rexml (>= 3.2.5, < 4.0)
57
- rubocop-ast (>= 1.28.0, < 2.0)
58
- ruby-progressbar (~> 1.7)
59
- unicode-display_width (>= 2.4.0, < 3.0)
60
- rubocop-ast (1.28.1)
61
- parser (>= 3.2.1.0)
62
- ruby-progressbar (1.13.0)
63
- unf (0.1.4)
64
- unf_ext
65
- unf_ext (0.0.8.2)
66
- unicode-display_width (2.4.2)
67
-
68
- PLATFORMS
69
- x86_64-linux
70
-
71
- DEPENDENCIES
72
- dotenv
73
- json
74
- mediawiki_api
75
- rake (~> 13.0)
76
- rspec (~> 3.0)
77
- rubocop (~> 1.21)
78
- wikidata-diff-analyzer!
79
-
80
- BUNDLED WITH
81
- 2.4.8
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wikidata
4
- module Diff
5
- module Analyzer
6
- VERSION = "2.0.0"
7
- end
8
- end
9
- end
@@ -1,8 +0,0 @@
1
- module Wikidata
2
- module Diff
3
- module Analyzer
4
- VERSION: String
5
- # See the writing guide of rbs: https://github.com/ruby/rbs#guides
6
- end
7
- end
8
- end