diff --git a/client/lib/protos/pkg/pr12er/messages.pb.dart b/client/lib/protos/pkg/pr12er/messages.pb.dart index 2ca1a4c0..91533f30 100644 --- a/client/lib/protos/pkg/pr12er/messages.pb.dart +++ b/client/lib/protos/pkg/pr12er/messages.pb.dart @@ -247,7 +247,7 @@ class Paper extends $pb.GeneratedMessage { ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'paperId') ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'title') ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'arxivId') - ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'absract') + ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'abstract') ..aOM<$1.Timestamp>(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pubDate', subBuilder: $1.Timestamp.create) ..pPS(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'authors') ..pc(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'repositories', $pb.PbFieldType.PM, subBuilder: Repository.create) @@ -260,7 +260,7 @@ class Paper extends $pb.GeneratedMessage { $core.String? paperId, $core.String? title, $core.String? arxivId, - $core.String? absract, + $core.String? abstract, $1.Timestamp? pubDate, $core.Iterable<$core.String>? authors, $core.Iterable? repositories, @@ -276,8 +276,8 @@ class Paper extends $pb.GeneratedMessage { if (arxivId != null) { _result.arxivId = arxivId; } - if (absract != null) { - _result.absract = absract; + if (abstract != null) { + _result.abstract = abstract; } if (pubDate != null) { _result.pubDate = pubDate; @@ -342,13 +342,13 @@ class Paper extends $pb.GeneratedMessage { void clearArxivId() => clearField(3); @$pb.TagNumber(4) - $core.String get absract => $_getSZ(3); + $core.String get abstract => $_getSZ(3); @$pb.TagNumber(4) - set absract($core.String v) { $_setString(3, v); } + set abstract($core.String v) { $_setString(3, v); } @$pb.TagNumber(4) - $core.bool hasAbsract() => $_has(3); + $core.bool hasAbstract() => $_has(3); @$pb.TagNumber(4) - void clearAbsract() => clearField(4); + void clearAbstract() => clearField(4); @$pb.TagNumber(5) $1.Timestamp get pubDate => $_getN(4); diff --git a/client/lib/protos/pkg/pr12er/messages.pbjson.dart b/client/lib/protos/pkg/pr12er/messages.pbjson.dart index 77c772d0..dcaabf6e 100644 --- a/client/lib/protos/pkg/pr12er/messages.pbjson.dart +++ b/client/lib/protos/pkg/pr12er/messages.pbjson.dart @@ -74,7 +74,7 @@ const Paper$json = const { const {'1': 'paper_id', '3': 1, '4': 1, '5': 9, '10': 'paperId'}, const {'1': 'title', '3': 2, '4': 1, '5': 9, '10': 'title'}, const {'1': 'arxiv_id', '3': 3, '4': 1, '5': 9, '10': 'arxivId'}, - const {'1': 'absract', '3': 4, '4': 1, '5': 9, '10': 'absract'}, + const {'1': 'abstract', '3': 4, '4': 1, '5': 9, '10': 'abstract'}, const {'1': 'pub_date', '3': 5, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'pubDate'}, const {'1': 'authors', '3': 6, '4': 3, '5': 9, '10': 'authors'}, const {'1': 'repositories', '3': 7, '4': 3, '5': 11, '6': '.pkg.pr12er.Repository', '10': 'repositories'}, @@ -83,7 +83,7 @@ const Paper$json = const { }; /// Descriptor for `Paper`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List paperDescriptor = $convert.base64Decode('CgVQYXBlchIZCghwYXBlcl9pZBgBIAEoCVIHcGFwZXJJZBIUCgV0aXRsZRgCIAEoCVIFdGl0bGUSGQoIYXJ4aXZfaWQYAyABKAlSB2FyeGl2SWQSGAoHYWJzcmFjdBgEIAEoCVIHYWJzcmFjdBI1CghwdWJfZGF0ZRgFIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSB3B1YkRhdGUSGAoHYXV0aG9ycxgGIAMoCVIHYXV0aG9ycxI6CgxyZXBvc2l0b3JpZXMYByADKAsyFi5wa2cucHIxMmVyLlJlcG9zaXRvcnlSDHJlcG9zaXRvcmllcxIsCgdtZXRob2RzGAggAygLMhIucGtnLnByMTJlci5NZXRob2RSB21ldGhvZHM='); +final $typed_data.Uint8List paperDescriptor = $convert.base64Decode('CgVQYXBlchIZCghwYXBlcl9pZBgBIAEoCVIHcGFwZXJJZBIUCgV0aXRsZRgCIAEoCVIFdGl0bGUSGQoIYXJ4aXZfaWQYAyABKAlSB2FyeGl2SWQSGgoIYWJzdHJhY3QYBCABKAlSCGFic3RyYWN0EjUKCHB1Yl9kYXRlGAUgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIHcHViRGF0ZRIYCgdhdXRob3JzGAYgAygJUgdhdXRob3JzEjoKDHJlcG9zaXRvcmllcxgHIAMoCzIWLnBrZy5wcjEyZXIuUmVwb3NpdG9yeVIMcmVwb3NpdG9yaWVzEiwKB21ldGhvZHMYCCADKAsyEi5wa2cucHIxMmVyLk1ldGhvZFIHbWV0aG9kcw=='); @$core.Deprecated('Use repositoryDescriptor instead') const Repository$json = const { '1': 'Repository', diff --git a/client/lib/widgets/detail/abstract.dart b/client/lib/widgets/detail/abstract.dart index 82ae058f..e07f17c8 100644 --- a/client/lib/widgets/detail/abstract.dart +++ b/client/lib/widgets/detail/abstract.dart @@ -25,7 +25,7 @@ class PaperAbstractWidget extends StatelessWidget { Container( height: 100, child: Text( - paper.absract, + paper.abstract, overflow: TextOverflow.fade, softWrap: true, style: const TextStyle( diff --git a/server/pkg/pr12er/messages.pb.go b/server/pkg/pr12er/messages.pb.go index c0dc7c60..0007c6c9 100644 --- a/server/pkg/pr12er/messages.pb.go +++ b/server/pkg/pr12er/messages.pb.go @@ -321,7 +321,7 @@ type Paper struct { PaperId string `protobuf:"bytes,1,opt,name=paper_id,json=paperId,proto3" json:"paper_id,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` ArxivId string `protobuf:"bytes,3,opt,name=arxiv_id,json=arxivId,proto3" json:"arxiv_id,omitempty"` - Absract string `protobuf:"bytes,4,opt,name=absract,proto3" json:"absract,omitempty"` + Abstract string `protobuf:"bytes,4,opt,name=abstract,proto3" json:"abstract,omitempty"` PubDate *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=pub_date,json=pubDate,proto3" json:"pub_date,omitempty"` Authors []string `protobuf:"bytes,6,rep,name=authors,proto3" json:"authors,omitempty"` Repositories []*Repository `protobuf:"bytes,7,rep,name=repositories,proto3" json:"repositories,omitempty"` @@ -381,9 +381,9 @@ func (x *Paper) GetArxivId() string { return "" } -func (x *Paper) GetAbsract() string { +func (x *Paper) GetAbstract() string { if x != nil { - return x.Absract + return x.Abstract } return "" } @@ -606,63 +606,63 @@ var file_pkg_pr12er_messages_proto_rawDesc = []byte{ 0x70, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x70, 0x72, 0x31, 0x32, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x70, 0x65, 0x72, 0x52, 0x10, 0x73, 0x61, 0x6d, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x50, 0x61, 0x70, 0x65, 0x72, 0x73, 0x22, - 0xa8, 0x02, 0x0a, 0x05, 0x50, 0x61, 0x70, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x70, + 0xaa, 0x02, 0x0a, 0x05, 0x50, 0x61, 0x70, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x70, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x70, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x72, 0x78, 0x69, 0x76, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x72, - 0x78, 0x69, 0x76, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x62, 0x73, 0x72, 0x61, 0x63, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x62, 0x73, 0x72, 0x61, 0x63, 0x74, 0x12, - 0x35, 0x0a, 0x08, 0x70, 0x75, 0x62, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x70, - 0x75, 0x62, 0x44, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x73, - 0x12, 0x3a, 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x70, 0x72, 0x31, - 0x32, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x0c, - 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x07, - 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x70, 0x6b, 0x67, 0x2e, 0x70, 0x72, 0x31, 0x32, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x22, 0xd4, 0x01, 0x0a, 0x0a, 0x52, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, - 0x6f, 0x66, 0x66, 0x69, 0x63, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, - 0x69, 0x73, 0x4f, 0x66, 0x66, 0x69, 0x63, 0x69, 0x61, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, - 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, - 0x65, 0x72, 0x12, 0x33, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x70, 0x72, 0x31, 0x32, - 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x09, 0x66, 0x72, - 0x61, 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x5f, 0x6f, 0x66, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0d, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x53, 0x74, 0x61, 0x72, 0x73, 0x12, - 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x5b, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x82, - 0x01, 0x0a, 0x08, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x14, 0x43, - 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, - 0x59, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x41, - 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x4e, 0x4c, 0x50, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, - 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x4f, 0x43, 0x52, 0x10, 0x03, 0x12, 0x12, - 0x0a, 0x0e, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x41, 0x55, 0x44, 0x49, 0x4f, - 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x52, - 0x53, 0x10, 0x05, 0x2a, 0x6d, 0x0a, 0x09, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6b, - 0x12, 0x19, 0x0a, 0x15, 0x46, 0x52, 0x41, 0x4d, 0x45, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x46, - 0x52, 0x41, 0x4d, 0x45, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x54, 0x45, 0x4e, 0x53, 0x4f, 0x52, 0x46, - 0x4c, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x46, 0x52, 0x41, 0x4d, 0x45, 0x57, 0x4f, - 0x52, 0x4b, 0x5f, 0x50, 0x59, 0x54, 0x4f, 0x52, 0x43, 0x48, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, - 0x46, 0x52, 0x41, 0x4d, 0x45, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x53, - 0x10, 0x03, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x31, 0x32, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x78, 0x69, 0x76, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x12, 0x35, 0x0a, 0x08, 0x70, 0x75, 0x62, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x07, 0x70, 0x75, 0x62, 0x44, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x73, 0x12, 0x3a, 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, + 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x70, + 0x72, 0x31, 0x32, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x2c, + 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x70, 0x72, 0x31, 0x32, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x22, 0xd4, 0x01, 0x0a, + 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x69, + 0x73, 0x5f, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0a, 0x69, 0x73, 0x4f, 0x66, 0x66, 0x69, 0x63, 0x69, 0x61, 0x6c, 0x12, 0x10, 0x0a, 0x03, + 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x14, + 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x77, 0x6f, 0x72, + 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x70, 0x72, + 0x31, 0x32, 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x09, + 0x66, 0x72, 0x61, 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0d, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x53, 0x74, 0x61, 0x72, + 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x5b, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, + 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x2a, 0x82, 0x01, 0x0a, 0x08, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x18, 0x0a, + 0x14, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x41, 0x54, 0x45, 0x47, + 0x4f, 0x52, 0x59, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, + 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x4e, 0x4c, 0x50, 0x10, 0x02, 0x12, 0x10, + 0x0a, 0x0c, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x4f, 0x43, 0x52, 0x10, 0x03, + 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x41, 0x55, 0x44, + 0x49, 0x4f, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, + 0x5f, 0x52, 0x53, 0x10, 0x05, 0x2a, 0x6d, 0x0a, 0x09, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x77, 0x6f, + 0x72, 0x6b, 0x12, 0x19, 0x0a, 0x15, 0x46, 0x52, 0x41, 0x4d, 0x45, 0x57, 0x4f, 0x52, 0x4b, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, + 0x14, 0x46, 0x52, 0x41, 0x4d, 0x45, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x54, 0x45, 0x4e, 0x53, 0x4f, + 0x52, 0x46, 0x4c, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x46, 0x52, 0x41, 0x4d, 0x45, + 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x50, 0x59, 0x54, 0x4f, 0x52, 0x43, 0x48, 0x10, 0x02, 0x12, 0x14, + 0x0a, 0x10, 0x46, 0x52, 0x41, 0x4d, 0x45, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x4f, 0x54, 0x48, 0x45, + 0x52, 0x53, 0x10, 0x03, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x31, 0x32, 0x65, 0x72, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/server/pkg/pr12er/messages.proto b/server/pkg/pr12er/messages.proto index 810e2e58..031c5274 100644 --- a/server/pkg/pr12er/messages.proto +++ b/server/pkg/pr12er/messages.proto @@ -44,7 +44,7 @@ message Paper { string paper_id = 1; string title = 2; string arxiv_id = 3; - string absract = 4; + string abstract = 4; google.protobuf.Timestamp pub_date = 5; repeated string authors = 6; repeated Repository repositories = 7; diff --git a/server/pkg/serv/serv.go b/server/pkg/serv/serv.go index 490248f5..092cdb7f 100644 --- a/server/pkg/serv/serv.go +++ b/server/pkg/serv/serv.go @@ -17,13 +17,17 @@ type Server struct { var _ pr12er.Pr12ErServiceServer = (*Server)(nil) func (s Server) GetDetails(_ context.Context, in *pr12er.GetDetailsRequest) (*pr12er.GetDetailsResponse, error) { + // Returns details of this ID + searchPRID := in.GetPrId() + resp := &pr12er.GetDetailsResponse{ Detail: &pr12er.Detail{ + PrId: searchPRID, Paper: []*pr12er.Paper{ { PaperId: "1", // nolint: lll - Absract: "We propose a new framework for estimating generative models via an adversarial process, in which we simultaneously train two models: a generative model G that captures the data distribution, and a discriminative model D that estimates the probability that a sample came from the training data rather than G. The training procedure for G is to maximize the probability of D making a mistake. This framework corresponds to a minimax two-player game. In the space of arbitrary functions G and D, a unique solution exists, with G recovering the training data distribution and D equal to 1/2 everywhere. In the case where G and D are defined by multilayer perceptrons, the entire system can be trained with backpropagation. There is no need for any Markov chains or unrolled approximate inference networks during either training or generation of samples. Experiments demonstrate the potential of the framework through qualitative and quantitative evaluation of the generated samples.", + Abstract: "We propose a new framework for estimating generative models via an adversarial process, in which we simultaneously train two models: a generative model G that captures the data distribution, and a discriminative model D that estimates the probability that a sample came from the training data rather than G. The training procedure for G is to maximize the probability of D making a mistake. This framework corresponds to a minimax two-player game. In the space of arbitrary functions G and D, a unique solution exists, with G recovering the training data distribution and D equal to 1/2 everywhere. In the case where G and D are defined by multilayer perceptrons, the entire system can be trained with backpropagation. There is no need for any Markov chains or unrolled approximate inference networks during either training or generation of samples. Experiments demonstrate the potential of the framework through qualitative and quantitative evaluation of the generated samples.", Repositories: []*pr12er.Repository{ { Framework: pr12er.Framework_FRAMEWORK_TENSORFLOW, @@ -48,14 +52,14 @@ func (s Server) GetDetails(_ context.Context, in *pr12er.GetDetailsRequest) (*pr { Title: "On distinguishability criteria for estimating generative models", Authors: []string{"Ian J. Goodfellow"}, - PubDate: timestamppb.New(time.Date(2015, 5, 21, 0, 0, 0, 0, time.UTC)), + PubDate: timestamppb.New(newDate(2015, 5, 21)), }, }, RelevantPapers: []*pr12er.Paper{ { Title: "Learning to Efficiently Sample from Diffusion Probabilistic Models", Authors: []string{"Daniel Watson"}, - PubDate: timestamppb.New(time.Date(2021, 6, 7, 0, 0, 0, 0, time.UTC)), + PubDate: timestamppb.New(newDate(2021, 6, 7)), }, }, }, @@ -64,6 +68,11 @@ func (s Server) GetDetails(_ context.Context, in *pr12er.GetDetailsRequest) (*pr return resp, nil } +// A little helper function to create a Ymd. +func newDate(y int, m time.Month, d int) time.Time { + return time.Date(y, m, d, 0, 0, 0, 0, time.UTC) +} + func (s Server) GetHello(_ context.Context, in *pr12er.HelloRequest) (*pr12er.HelloResponse, error) { return &pr12er.HelloResponse{Body: fmt.Sprintf("Hello %s", in.Body)}, nil } diff --git a/server/pkg/serv/serv_test.go b/server/pkg/serv/serv_test.go index fdcad63d..cb3e16b8 100644 --- a/server/pkg/serv/serv_test.go +++ b/server/pkg/serv/serv_test.go @@ -28,3 +28,11 @@ func TestGetVideos(t *testing.T) { t.Log("it should return non empty video list.") assert.Greater(t, len(resp.Videos), 0) } + +func TestServer_GetDetails(t *testing.T) { + s := Server{} + request := pr12er.GetDetailsRequest{PrId: 1} + got, err := s.GetDetails(context.Background(), &request) + assert.NoError(t, err) + assert.Equal(t, int32(1), got.GetDetail().GetPrId()) +}