From 6537a09ce754c4657820455cb4be1a77cad42e7b Mon Sep 17 00:00:00 2001 From: Kristian Garza Date: Mon, 19 Aug 2019 14:45:22 +0200 Subject: [PATCH 01/10] count values, not documents --- app/models/event.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/event.rb b/app/models/event.rb index 32861acd4..740b9956d 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -252,7 +252,7 @@ def self.metrics_aggregations views: { filter: views_filter, aggs: { dois: { - terms: { field: 'obj_id', size: 50, min_doc_count: 1 } + terms: { field: 'obj_id', size: 50, min_doc_count: 1} , aggs: { "total_by_type" => { sum: { field: 'total' }}} }} }, views_histogram: { @@ -264,7 +264,7 @@ def self.metrics_aggregations downloads: { filter: downloads_filter, aggs: { dois: { - terms: { field: 'obj_id', size: 50, min_doc_count: 1 } + terms: { field: 'obj_id', size: 50, min_doc_count: 1} , aggs: { "total_by_type" => { sum: { field: 'total' }}} }} }, downloads_histogram: { From 51e33ea1506607af603c0640ae241283e17c3710 Mon Sep 17 00:00:00 2001 From: Kristian Garza Date: Mon, 19 Aug 2019 14:45:33 +0200 Subject: [PATCH 02/10] metrics to meta --- .../dataset_connection_with_meta_type.rb | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/app/graphql/types/dataset_connection_with_meta_type.rb b/app/graphql/types/dataset_connection_with_meta_type.rb index 49bfa1995..36d01652b 100644 --- a/app/graphql/types/dataset_connection_with_meta_type.rb +++ b/app/graphql/types/dataset_connection_with_meta_type.rb @@ -11,6 +11,11 @@ class DatasetConnectionWithMetaType < BaseConnection field :researcher_connection_count, Integer, null: false, cache: true field :funder_connection_count, Integer, null: false, cache: true field :organization_connection_count, Integer, null: false, cache: true + + field :views_connection_count, Integer, null: true, cache: true + field :downloads_connection_count, Integer, null: true, cache: true + field :citations_connection_count, Integer, null: true, cache: true + def total_count args = object.arguments @@ -41,4 +46,44 @@ def funder_connection_count def organization_connection_count Event.query(nil, citation_type: "Dataset-Organization").results.total end + + def aggregation_results args + Event.query(nil, doi: doi_from_url(args[:query]), "page[size]": 0,aggregations: "metrics_aggregations").response.aggregations + end + + # def views_connection_count + # args = object.arguments + # aggregation = Event.query(nil, doi: doi_from_url(args[:query]), "page[size]": 0,aggregations: "metrics_aggregations").response.aggregations + # views = aggregation.views.dois.buckets + # views = views.first.fetch("doc_count", nil) if views.any? + + # downloads = aggregation.downloads.dois.buckets + # downloads = downloads.first.fetch("doc_count", nil) if downloads.any? + + # citations = aggregation.citations.dois.buckets + # citations = citations.first.fetch("unique_citations", {}).fetch("value", nil) if citations.any? + # { + # views: views, + # downloads: downloads, + # citations: citations + # } + # end + + def views_connection_count + args = object.arguments + meta = aggregation_results(args).views.dois.buckets + meta.first.fetch("total_by_type", {}).fetch("value", nil) if meta.any? + end + + def downloads_connection_count + args = object.arguments + meta = aggregation_results(args).downloads.dois.buckets + meta.first.fetch("total_by_type", {}).fetch("value", nil) if meta.any? + end + + def citations_connection_count + args = object.arguments + meta = aggregation_results(args).citations.dois.buckets + meta.first.fetch("unique_citations", {}).fetch("value", nil) if meta.any? + end end From 94b50b9d618be83fd03df72b0e9b0e0e1da8eb71 Mon Sep 17 00:00:00 2001 From: Kristian Garza Date: Mon, 19 Aug 2019 14:45:59 +0200 Subject: [PATCH 03/10] clean code --- .../types/dataset_connection_with_meta_type.rb | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/app/graphql/types/dataset_connection_with_meta_type.rb b/app/graphql/types/dataset_connection_with_meta_type.rb index 36d01652b..7c3654b6d 100644 --- a/app/graphql/types/dataset_connection_with_meta_type.rb +++ b/app/graphql/types/dataset_connection_with_meta_type.rb @@ -51,24 +51,6 @@ def aggregation_results args Event.query(nil, doi: doi_from_url(args[:query]), "page[size]": 0,aggregations: "metrics_aggregations").response.aggregations end - # def views_connection_count - # args = object.arguments - # aggregation = Event.query(nil, doi: doi_from_url(args[:query]), "page[size]": 0,aggregations: "metrics_aggregations").response.aggregations - # views = aggregation.views.dois.buckets - # views = views.first.fetch("doc_count", nil) if views.any? - - # downloads = aggregation.downloads.dois.buckets - # downloads = downloads.first.fetch("doc_count", nil) if downloads.any? - - # citations = aggregation.citations.dois.buckets - # citations = citations.first.fetch("unique_citations", {}).fetch("value", nil) if citations.any? - # { - # views: views, - # downloads: downloads, - # citations: citations - # } - # end - def views_connection_count args = object.arguments meta = aggregation_results(args).views.dois.buckets From 3bb2a8106f26552463723f3ac4571f7daae5869f Mon Sep 17 00:00:00 2001 From: Kristian Garza Date: Thu, 22 Aug 2019 16:40:33 +0200 Subject: [PATCH 04/10] adding metrics attribute to all dois https://github.com/datacite/spitz/issues/2 --- Gemfile | 1 + app/graphql/types/doi_item.rb | 25 ++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index f706b082f..8f8060230 100644 --- a/Gemfile +++ b/Gemfile @@ -79,6 +79,7 @@ group :development do gem 'spring' gem 'spring-watcher-listen', '~> 2.0.0' gem 'spring-commands-rspec' + gem 'meta_request' # gem 'httplog', '~> 1.0' end diff --git a/app/graphql/types/doi_item.rb b/app/graphql/types/doi_item.rb index 3b2bc3513..306315878 100644 --- a/app/graphql/types/doi_item.rb +++ b/app/graphql/types/doi_item.rb @@ -32,7 +32,10 @@ module DoiItem field :url, String, null: true, description: "The URL registered for the resource" field :client, ClientType, null: true, description: "The client account managing this resource" field :provider, ProviderType, null: true, description: "The provider account managing this resource" - + field :views, Integer, null: true, description: "The count of doi views" + field :downloads, Integer, null: true, description: "The count of doi downloads" + field :citations, Integer, null: true, description: "The count of doi events that represents citations" + def creators(first: nil) Array.wrap(object.creators[0...first]).map do |c| Hashie::Mash.new( @@ -52,4 +55,24 @@ def titles(first: nil) def descriptions(first: nil) object.descriptions[0...first] end + + + def aggregation_results id + Event.query(nil, doi: doi_from_url(id), "page[size]": 0,aggregations: "metrics_aggregations").response.aggregations + end + + def views + meta = aggregation_results(object.identifier).views.dois.buckets + meta.first.fetch("total_by_type", {}).fetch("value", nil) if meta.any? + end + + def downloads + meta = aggregation_results(object.identifier).downloads.dois.buckets + meta.first.fetch("total_by_type", {}).fetch("value", nil) if meta.any? + end + + def citations + meta = aggregation_results(object.identifier).citations.dois.buckets + meta.first.fetch("unique_citations", {}).fetch("value", nil) if meta.any? + end end From 93a8de71569541acc6948ff8f8b907d91c869a58 Mon Sep 17 00:00:00 2001 From: Kristian Garza Date: Thu, 22 Aug 2019 18:08:45 +0200 Subject: [PATCH 05/10] re-architec metrics as interface --- .../dataset_connection_with_meta_type.rb | 28 +---------- app/graphql/types/dataset_type.rb | 1 + app/graphql/types/doi_item.rb | 23 --------- app/graphql/types/metric_interface.rb | 48 +++++++++++++++++++ app/graphql/types/publication_type.rb | 1 + app/graphql/types/software_type.rb | 1 + 6 files changed, 52 insertions(+), 50 deletions(-) create mode 100644 app/graphql/types/metric_interface.rb diff --git a/app/graphql/types/dataset_connection_with_meta_type.rb b/app/graphql/types/dataset_connection_with_meta_type.rb index 7c3654b6d..a233d19c2 100644 --- a/app/graphql/types/dataset_connection_with_meta_type.rb +++ b/app/graphql/types/dataset_connection_with_meta_type.rb @@ -2,6 +2,7 @@ class DatasetConnectionWithMetaType < BaseConnection edge_type(DatasetEdgeType) + field_class GraphQL::Cache::Field field :total_count, Integer, null: false, cache: true @@ -11,11 +12,6 @@ class DatasetConnectionWithMetaType < BaseConnection field :researcher_connection_count, Integer, null: false, cache: true field :funder_connection_count, Integer, null: false, cache: true field :organization_connection_count, Integer, null: false, cache: true - - field :views_connection_count, Integer, null: true, cache: true - field :downloads_connection_count, Integer, null: true, cache: true - field :citations_connection_count, Integer, null: true, cache: true - def total_count args = object.arguments @@ -46,26 +42,4 @@ def funder_connection_count def organization_connection_count Event.query(nil, citation_type: "Dataset-Organization").results.total end - - def aggregation_results args - Event.query(nil, doi: doi_from_url(args[:query]), "page[size]": 0,aggregations: "metrics_aggregations").response.aggregations - end - - def views_connection_count - args = object.arguments - meta = aggregation_results(args).views.dois.buckets - meta.first.fetch("total_by_type", {}).fetch("value", nil) if meta.any? - end - - def downloads_connection_count - args = object.arguments - meta = aggregation_results(args).downloads.dois.buckets - meta.first.fetch("total_by_type", {}).fetch("value", nil) if meta.any? - end - - def citations_connection_count - args = object.arguments - meta = aggregation_results(args).citations.dois.buckets - meta.first.fetch("unique_citations", {}).fetch("value", nil) if meta.any? - end end diff --git a/app/graphql/types/dataset_type.rb b/app/graphql/types/dataset_type.rb index 11c86928a..d560defc4 100644 --- a/app/graphql/types/dataset_type.rb +++ b/app/graphql/types/dataset_type.rb @@ -2,6 +2,7 @@ class DatasetType < BaseObject implements DoiItem + implements MetricInterface field :usage_reports, DatasetUsageReportConnectionWithMetaType, null: false, description: "Usage reports for this dataset", connection: true, max_page_size: 100 do argument :first, Int, required: false, default_value: 25 diff --git a/app/graphql/types/doi_item.rb b/app/graphql/types/doi_item.rb index 306315878..00b0e228f 100644 --- a/app/graphql/types/doi_item.rb +++ b/app/graphql/types/doi_item.rb @@ -32,9 +32,6 @@ module DoiItem field :url, String, null: true, description: "The URL registered for the resource" field :client, ClientType, null: true, description: "The client account managing this resource" field :provider, ProviderType, null: true, description: "The provider account managing this resource" - field :views, Integer, null: true, description: "The count of doi views" - field :downloads, Integer, null: true, description: "The count of doi downloads" - field :citations, Integer, null: true, description: "The count of doi events that represents citations" def creators(first: nil) Array.wrap(object.creators[0...first]).map do |c| @@ -55,24 +52,4 @@ def titles(first: nil) def descriptions(first: nil) object.descriptions[0...first] end - - - def aggregation_results id - Event.query(nil, doi: doi_from_url(id), "page[size]": 0,aggregations: "metrics_aggregations").response.aggregations - end - - def views - meta = aggregation_results(object.identifier).views.dois.buckets - meta.first.fetch("total_by_type", {}).fetch("value", nil) if meta.any? - end - - def downloads - meta = aggregation_results(object.identifier).downloads.dois.buckets - meta.first.fetch("total_by_type", {}).fetch("value", nil) if meta.any? - end - - def citations - meta = aggregation_results(object.identifier).citations.dois.buckets - meta.first.fetch("unique_citations", {}).fetch("value", nil) if meta.any? - end end diff --git a/app/graphql/types/metric_interface.rb b/app/graphql/types/metric_interface.rb new file mode 100644 index 000000000..8ca1c062d --- /dev/null +++ b/app/graphql/types/metric_interface.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +module MetricInterface + include GraphQL::Schema::Interface + + field :views, Integer, null: true, description: "The count of doi views" + field :downloads, Integer, null: true, description: "The count of doi downloads" + field :citations, Integer, null: true, description: "The count of doi events that represents citations" + field :crossref_citations, Integer, null: true, description: "The count of doi events that represents citations from Crossref" + field :datacite_citations, Integer, null: true, description: "The count of doi events that represents citations from DataCite" + + def aggregation_results(**args) + Event.query(nil, doi: doi_from_url(args[:id]), "page[size]": 0,aggregations: "metrics_aggregations", source_id: args[:source_id] || nil ).response.aggregations + end + + def views + meta = aggregation_results({id: object.identifier}).views.dois.buckets + meta.first.fetch("total_by_type", {}).fetch("value", nil) if meta.any? + end + + def downloads + meta = aggregation_results({id: object.identifier}).downloads.dois.buckets + meta.first.fetch("total_by_type", {}).fetch("value", nil) if meta.any? + end + + def citations + meta = aggregation_results({id: object.identifier}).citations.dois.buckets + meta.first.fetch("unique_citations", {}).fetch("value", nil) if meta.any? + end + + def crossref_citations + args = { + id: object.identifier, + source_id: "crossref" + } + meta = aggregation_results(args).citations.dois.buckets + meta.first.fetch("unique_citations", {}).fetch("value", nil) if meta.any? + end + + def datacite_citations + args = { + id: object.identifier, + source_id: "datacite" + } + meta = aggregation_results(args).citations.dois.buckets + meta.first.fetch("unique_citations", {}).fetch("value", nil) if meta.any? + end +end diff --git a/app/graphql/types/publication_type.rb b/app/graphql/types/publication_type.rb index d35b4cc81..3aafd88f0 100644 --- a/app/graphql/types/publication_type.rb +++ b/app/graphql/types/publication_type.rb @@ -2,6 +2,7 @@ class PublicationType < BaseObject implements DoiItem + implements MetricInterface field :datasets, PublicationDatasetConnectionWithMetaType, null: false, description: "Referenced datasets", connection: true, max_page_size: 100 do argument :first, Int, required: false, default_value: 25 diff --git a/app/graphql/types/software_type.rb b/app/graphql/types/software_type.rb index 2b9fb82e0..e26c5cedd 100644 --- a/app/graphql/types/software_type.rb +++ b/app/graphql/types/software_type.rb @@ -2,6 +2,7 @@ class SoftwareType < BaseObject implements DoiItem + implements MetricInterface field :datasets, SoftwareDatasetConnectionWithMetaType, null: false, description: "Referenced datasets", connection: true, max_page_size: 100 do argument :first, Int, required: false, default_value: 25 From 643c28debdad31476319d7f6edcf19f0018affe3 Mon Sep 17 00:00:00 2001 From: Kristian Garza Date: Fri, 23 Aug 2019 11:02:09 +0200 Subject: [PATCH 06/10] use _counts and improve descriptions --- app/graphql/types/metric_interface.rb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app/graphql/types/metric_interface.rb b/app/graphql/types/metric_interface.rb index 8ca1c062d..9eefb98b9 100644 --- a/app/graphql/types/metric_interface.rb +++ b/app/graphql/types/metric_interface.rb @@ -3,32 +3,32 @@ module MetricInterface include GraphQL::Schema::Interface - field :views, Integer, null: true, description: "The count of doi views" - field :downloads, Integer, null: true, description: "The count of doi downloads" - field :citations, Integer, null: true, description: "The count of doi events that represents citations" - field :crossref_citations, Integer, null: true, description: "The count of doi events that represents citations from Crossref" - field :datacite_citations, Integer, null: true, description: "The count of doi events that represents citations from DataCite" + field :views_count, Integer, null: true, description: "The count of DOI views according to the COUNTER code of Practice for Research Data" + field :downloads_count, Integer, null: true, description: "The count of DOI dowloands according to the COUNTER code of Practice for Research Data" + field :citations_count, Integer, null: true, description: "The count of DOI events that represents citations" + field :crossref_citations_count, Integer, null: true, description: "The count of DOI events that represents citations from Crossref" + field :datacite_citations_count, Integer, null: true, description: "The count of DOI events that represents citations from DataCite" def aggregation_results(**args) Event.query(nil, doi: doi_from_url(args[:id]), "page[size]": 0,aggregations: "metrics_aggregations", source_id: args[:source_id] || nil ).response.aggregations end - def views + def views_count meta = aggregation_results({id: object.identifier}).views.dois.buckets meta.first.fetch("total_by_type", {}).fetch("value", nil) if meta.any? end - def downloads + def downloads_count meta = aggregation_results({id: object.identifier}).downloads.dois.buckets meta.first.fetch("total_by_type", {}).fetch("value", nil) if meta.any? end - def citations + def citations_count meta = aggregation_results({id: object.identifier}).citations.dois.buckets meta.first.fetch("unique_citations", {}).fetch("value", nil) if meta.any? end - def crossref_citations + def crossref_citations_count args = { id: object.identifier, source_id: "crossref" @@ -37,10 +37,10 @@ def crossref_citations meta.first.fetch("unique_citations", {}).fetch("value", nil) if meta.any? end - def datacite_citations + def datacite_citations_count args = { id: object.identifier, - source_id: "datacite" + source_id: "datacite-related,datacite-crossref" } meta = aggregation_results(args).citations.dois.buckets meta.first.fetch("unique_citations", {}).fetch("value", nil) if meta.any? From c2240da732db8009fd74108a5b435553b7fba88b Mon Sep 17 00:00:00 2001 From: Kristian Garza Date: Tue, 27 Aug 2019 06:46:54 +0200 Subject: [PATCH 07/10] remove meta_request --- Gemfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Gemfile b/Gemfile index 8f8060230..f706b082f 100644 --- a/Gemfile +++ b/Gemfile @@ -79,7 +79,6 @@ group :development do gem 'spring' gem 'spring-watcher-listen', '~> 2.0.0' gem 'spring-commands-rspec' - gem 'meta_request' # gem 'httplog', '~> 1.0' end From 52fad7643a76a2fa03a43944e419334f55f560d8 Mon Sep 17 00:00:00 2001 From: Kristian Garza Date: Tue, 27 Aug 2019 07:08:23 +0200 Subject: [PATCH 08/10] CC suggestions --- app/graphql/types/dataset_connection_with_meta_type.rb | 1 - app/graphql/types/metric_interface.rb | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/graphql/types/dataset_connection_with_meta_type.rb b/app/graphql/types/dataset_connection_with_meta_type.rb index a233d19c2..49bfa1995 100644 --- a/app/graphql/types/dataset_connection_with_meta_type.rb +++ b/app/graphql/types/dataset_connection_with_meta_type.rb @@ -2,7 +2,6 @@ class DatasetConnectionWithMetaType < BaseConnection edge_type(DatasetEdgeType) - field_class GraphQL::Cache::Field field :total_count, Integer, null: false, cache: true diff --git a/app/graphql/types/metric_interface.rb b/app/graphql/types/metric_interface.rb index 9eefb98b9..af4d24444 100644 --- a/app/graphql/types/metric_interface.rb +++ b/app/graphql/types/metric_interface.rb @@ -2,7 +2,7 @@ module MetricInterface include GraphQL::Schema::Interface - + field :views_count, Integer, null: true, description: "The count of DOI views according to the COUNTER code of Practice for Research Data" field :downloads_count, Integer, null: true, description: "The count of DOI dowloands according to the COUNTER code of Practice for Research Data" field :citations_count, Integer, null: true, description: "The count of DOI events that represents citations" @@ -10,21 +10,21 @@ module MetricInterface field :datacite_citations_count, Integer, null: true, description: "The count of DOI events that represents citations from DataCite" def aggregation_results(**args) - Event.query(nil, doi: doi_from_url(args[:id]), "page[size]": 0,aggregations: "metrics_aggregations", source_id: args[:source_id] || nil ).response.aggregations + Event.query(nil, doi: doi_from_url(args[:id]), "page[size]": 0, aggregations: "metrics_aggregations", source_id: args[:source_id] || nil).response.aggregations end def views_count - meta = aggregation_results({id: object.identifier}).views.dois.buckets + meta = aggregation_results(id: object.identifier).views.dois.buckets meta.first.fetch("total_by_type", {}).fetch("value", nil) if meta.any? end def downloads_count - meta = aggregation_results({id: object.identifier}).downloads.dois.buckets + meta = aggregation_results(id: object.identifier).downloads.dois.buckets meta.first.fetch("total_by_type", {}).fetch("value", nil) if meta.any? end def citations_count - meta = aggregation_results({id: object.identifier}).citations.dois.buckets + meta = aggregation_results(id: object.identifier).citations.dois.buckets meta.first.fetch("unique_citations", {}).fetch("value", nil) if meta.any? end From 6992af1bea679a7b80ac35aae0aa02f0af4722f6 Mon Sep 17 00:00:00 2001 From: Kristian Garza Date: Wed, 28 Aug 2019 09:48:28 +0200 Subject: [PATCH 09/10] remove breakdown and rename variables Decide not to show any breakdown in stats in the tooltip https://docs.google.com/document/d/1StRUxV5_nsBQf64H6Os7WsjWw-rVaQAeef9GMAkPezs/edit#bookmark=id.u3lh6pf1zl4h --- app/graphql/types/metric_interface.rb | 32 +++++---------------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/app/graphql/types/metric_interface.rb b/app/graphql/types/metric_interface.rb index af4d24444..7db21d123 100644 --- a/app/graphql/types/metric_interface.rb +++ b/app/graphql/types/metric_interface.rb @@ -3,46 +3,26 @@ module MetricInterface include GraphQL::Schema::Interface - field :views_count, Integer, null: true, description: "The count of DOI views according to the COUNTER code of Practice for Research Data" - field :downloads_count, Integer, null: true, description: "The count of DOI dowloands according to the COUNTER code of Practice for Research Data" - field :citations_count, Integer, null: true, description: "The count of DOI events that represents citations" - field :crossref_citations_count, Integer, null: true, description: "The count of DOI events that represents citations from Crossref" - field :datacite_citations_count, Integer, null: true, description: "The count of DOI events that represents citations from DataCite" + field :view_count, Integer, null: true, description: "The count of DOI views according to the COUNTER code of Practice for Research Data" + field :download_count, Integer, null: true, description: "The count of DOI dowloands according to the COUNTER code of Practice for Research Data" + field :citation_count, Integer, null: true, description: "The count of DOI events that represents citations" def aggregation_results(**args) Event.query(nil, doi: doi_from_url(args[:id]), "page[size]": 0, aggregations: "metrics_aggregations", source_id: args[:source_id] || nil).response.aggregations end - def views_count + def view_count meta = aggregation_results(id: object.identifier).views.dois.buckets meta.first.fetch("total_by_type", {}).fetch("value", nil) if meta.any? end - def downloads_count + def download_count meta = aggregation_results(id: object.identifier).downloads.dois.buckets meta.first.fetch("total_by_type", {}).fetch("value", nil) if meta.any? end - def citations_count + def citation_count meta = aggregation_results(id: object.identifier).citations.dois.buckets meta.first.fetch("unique_citations", {}).fetch("value", nil) if meta.any? end - - def crossref_citations_count - args = { - id: object.identifier, - source_id: "crossref" - } - meta = aggregation_results(args).citations.dois.buckets - meta.first.fetch("unique_citations", {}).fetch("value", nil) if meta.any? - end - - def datacite_citations_count - args = { - id: object.identifier, - source_id: "datacite-related,datacite-crossref" - } - meta = aggregation_results(args).citations.dois.buckets - meta.first.fetch("unique_citations", {}).fetch("value", nil) if meta.any? - end end From ebe445528d923632aa9805b3aa404ce5c259a3f3 Mon Sep 17 00:00:00 2001 From: Kristian Garza Date: Wed, 28 Aug 2019 14:09:11 +0200 Subject: [PATCH 10/10] PR Review: do not include the phrase fo research Data --- app/graphql/types/metric_interface.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/graphql/types/metric_interface.rb b/app/graphql/types/metric_interface.rb index 7db21d123..fa3296b41 100644 --- a/app/graphql/types/metric_interface.rb +++ b/app/graphql/types/metric_interface.rb @@ -3,8 +3,8 @@ module MetricInterface include GraphQL::Schema::Interface - field :view_count, Integer, null: true, description: "The count of DOI views according to the COUNTER code of Practice for Research Data" - field :download_count, Integer, null: true, description: "The count of DOI dowloands according to the COUNTER code of Practice for Research Data" + field :view_count, Integer, null: true, description: "The count of DOI views according to the COUNTER code of Practice" + field :download_count, Integer, null: true, description: "The count of DOI dowloands according to the COUNTER code of Practice" field :citation_count, Integer, null: true, description: "The count of DOI events that represents citations" def aggregation_results(**args)