roboneuro 0.1.2 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 78096b7533c92f42eaf738db0ec575a6b41e28af65bd4352cd0187355a6cd509
4
- data.tar.gz: 229efd4a36c74c79d4bd13b049d5fabc490755ba1cfd3c6b4975d7d3a679f6ee
3
+ metadata.gz: 0ae582272abc421d012bce9b43d328adf2b5c50aaf9122c64f3f13b360b1fb2c
4
+ data.tar.gz: 8dffcf7ea86fae1e5edbaf5a99500fe193d51123775762e417dea7d6406ee90e
5
5
  SHA512:
6
- metadata.gz: 1850c4dc81d2678265f2850d3b2e8eb1fe71bdfc88d0e948874ac803e7cd6f539a60c7d2a19a0401cba42e768b60a08d078bdd291320fb858f417f52fce822cd
7
- data.tar.gz: 6bb0ccf1b8a1f58f3217505e05c548bc97efbe1f0151b397a0fabd8e6bd53be1e935ab16329933f27f218e7a369d131881ddd981b557eafe53822189c4548d8d
6
+ metadata.gz: d0e3be3dcfc6a31b9d4a36c9241e4042371b7ec3c4c5bcf6718370e90901c7a55f0fee06287b219f0c878f2582f64b1675766f8a2f06d9a67fa5241fbf101d11
7
+ data.tar.gz: 5d8d2e1719bcf688cbe163d8ed05f22e7fd449c3d973cc0e62fef656bf0a00e5e3f53826e424b23b63d14b183b188236cec4e80fa7171479226d83a36743c4cc
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- roboneuro (0.1.2)
4
+ roboneuro (0.1.5)
5
5
  bibtex-ruby (~> 6.0.0)
6
6
  dotenv
7
7
  github-linguist (~> 5.3)
@@ -102,7 +102,7 @@ GEM
102
102
  rspec-support (~> 3.10.0)
103
103
  rspec-support (3.10.2)
104
104
  ruby2_keywords (0.0.5)
105
- rugged (1.4.2)
105
+ rugged (1.4.3)
106
106
  sawyer (0.8.2)
107
107
  addressable (>= 2.3.5)
108
108
  faraday (> 0.8, < 2.0)
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ Modified for NeuroLibre.
2
+
1
3
  # What is Whedon?
2
4
 
3
5
  Whedon is a collection of command-line utilities to manage JOSS submissions. Whedon is used by the [Whedon-API bot](https://github.com/openjournals/whedon-api) to interact with authors and reviewers during the review process on https://github.com/openjournals/joss-reviews
@@ -14,6 +16,8 @@ Hopefully...
14
16
 
15
17
  [![Build Status](https://github.com/openjournals/whedon/actions/workflows/tests.yml/badge.svg)](https://github.com/openjournals/whedon/actions/workflows/tests.yml)
16
18
 
19
+ [![Gem Version](https://badge.fury.io/rb/roboneuro.svg)](https://badge.fury.io/rb/roboneuro)
20
+
17
21
  ## Installation
18
22
 
19
23
  Depending on how Ruby is installed on your system there might slightly different steps be necessary. Note that Whedon is only tested for reasonably modern versions of Ruby (i.e. > 2.1) [Bundler](http://bundler.io/) is used to install dependencies.
@@ -106,7 +106,6 @@ module Compilers
106
106
  def pdf_from_markdown(custom_branch=nil, draft=true, paper_issue=nil, paper_volume=nil, paper_year=nil)
107
107
  latex_template_path = "#{Whedon.resources}/#{ENV['JOURNAL_ALIAS']}/latex.template"
108
108
  csl_file = "#{Whedon.resources}/#{ENV['JOURNAL_ALIAS']}/apa.csl"
109
- book_exec_icon = "#{Whedon.resources}/#{ENV['JOURNAL_ALIAS']}/logo_link.png"
110
109
 
111
110
  url = "#{ENV['JOURNAL_URL']}/papers/lookup/#{@review_issue_id}"
112
111
  response = RestClient.get(url)
@@ -115,7 +114,7 @@ module Compilers
115
114
  published = parsed['accepted']
116
115
 
117
116
  # TODO - remove this once JOSE has their editors hooked up in the system
118
- if ENV['JOURNAL_ALIAS'] == "joss" && !paper.editor.nil?
117
+ if ENV['JOURNAL_ALIAS'] == "neurolibre" && !paper.editor.nil?
119
118
  editor_lookup_url = "#{ENV['JOURNAL_URL']}/editors/lookup/#{paper.editor}"
120
119
  response = RestClient.get(editor_lookup_url)
121
120
  parsed = JSON.parse(response)
@@ -148,7 +147,6 @@ module Compilers
148
147
  "book_doi" => book_doi,
149
148
  "docker_doi" => docker_doi,
150
149
  "book_exec_url" => book_exec_url,
151
- "book_exec_icon" => book_exec_icon,
152
150
  "paper_url" => paper.pdf_url,
153
151
  "journal_name" => ENV['JOURNAL_NAME'],
154
152
  "review_issue_url" => paper.review_issue_url,
@@ -178,7 +176,6 @@ module Compilers
178
176
  -V book_doi="#{book_doi}" \
179
177
  -V docker_doi="#{docker_doi}" \
180
178
  -V book_exec_url="#{book_exec_url}" \
181
- -V book_exec_icon="#{book_exec_icon}" \
182
179
  -V review_issue_url="#{paper.review_issue_url}" \
183
180
  -V editor_url="#{editor_url}" \
184
181
  -V graphics="true" \
@@ -230,7 +227,7 @@ module Compilers
230
227
  -V paper_url=#{paper.pdf_url} \
231
228
  -V joss_resource_url=#{paper.joss_resource_url} \
232
229
  -V journal_alias=#{ENV['JOURNAL_ALIAS']} \
233
- -V journal_abbrev_title=#{ENV['JOURNAL_ALIAS'].upcase} \
230
+ -V journal_abbrev_title=#{ENV['JOURNAL_ABBRV_TITLE']} \
234
231
  -V journal_url=#{ENV['JOURNAL_URL']} \
235
232
  -V journal_name='#{ENV['JOURNAL_NAME']}' \
236
233
  -V journal_issn=#{ENV['JOURNAL_ISSN']} \
@@ -300,7 +297,7 @@ module Compilers
300
297
  "paper_url" => paper.pdf_url,
301
298
  "joss_resource_url" => paper.joss_resource_url,
302
299
  "journal_alias" => ENV['JOURNAL_ALIAS'],
303
- "journal_abbrev_title" => ENV['JOURNAL_ALIAS'].upcase,
300
+ "journal_abbrev_title" => ENV['JOURNAL_ABBRV_TITLE'],
304
301
  "journal_url" => ENV['JOURNAL_URL'],
305
302
  "journal_name" => ENV['JOURNAL_NAME'],
306
303
  "journal_issn"=> ENV['JOURNAL_ISSN'],
@@ -118,11 +118,13 @@ module Whedon
118
118
  end
119
119
 
120
120
  def deposit
121
- crossref_deposit
121
+ #crossref_deposit
122
122
  joss_deposit
123
123
 
124
124
  puts "p=dat #{@review_issue_id};p.doi='#{paper.formatted_doi}';"\
125
- "p.archive_doi=#{archive_doi};p.accepted_at=Time.now;"\
125
+ "p.repository_doi=#{repository_doi};p.accepted_at=Time.now;"\
126
+ "p.data_doi=#{data_doi};p.book_doi=#{book_doi};"\
127
+ "p.docker_doi=#{docker_doi};p.book_exec_url=#{book_exec_url};"\
126
128
  "p.citation_string='#{citation_string}';"\
127
129
  "p.authors='#{paper.authors_string}';p.title='#{paper.title}';"
128
130
  end
@@ -131,18 +133,24 @@ module Whedon
131
133
  puts "Depositing with JOSS..."
132
134
  request = RestClient::Request.new(
133
135
  :method => :post,
134
- :url => "#{ENV['JOURNAL_URL']}/papers/api_deposit",
136
+ :url => "http://neurolibre.herokuapp.com/papers/api_deposit",
137
+ verify_ssl: false,
135
138
  :payload => {
136
139
  :id => paper.review_issue_id,
137
140
  :metadata => Base64.encode64(paper.deposit_payload.to_json),
138
141
  :doi => paper.formatted_doi,
139
- :archive_doi => archive_doi,
142
+ :repository_doi => repository_doi,
143
+ :data_doi => data_doi,
144
+ :book_doi => book_doi,
145
+ :docker_doi => docker_doi,
146
+ :book_exec_url => book_exec_url,
140
147
  :citation_string => citation_string,
141
148
  :title => paper.plain_title,
142
149
  :secret => ENV['WHEDON_SECRET']
143
150
  })
144
151
 
145
152
  response = request.execute
153
+ puts response.body
146
154
  if response.code == 201
147
155
  puts "Deposit looks good."
148
156
  else
@@ -155,6 +163,7 @@ module Whedon
155
163
  puts "Depositing with Crossref..."
156
164
  request = RestClient::Request.new(
157
165
  :method => :post,
166
+ #:url => "https://test.crossref.org/servlet/deposit",
158
167
  :url => "https://doi.crossref.org/servlet/deposit",
159
168
  :payload => {
160
169
  :multipart => true,
@@ -1,3 +1,3 @@
1
1
  module Whedon
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.5"
3
3
  end
data/lib/whedon.rb CHANGED
@@ -185,6 +185,7 @@ module Whedon
185
185
  payload['paper']['data_doi'] = review_issue_body[ARCHIVE_DATA_REGEX].gsub('"', '')
186
186
  payload['paper']['book_doi'] = review_issue_body[ARCHIVE_BOOK_REGEX].gsub('"', '')
187
187
  payload['paper']['docker_doi'] = review_issue_body[ARCHIVE_DOCKER_REGEX].gsub('"', '')
188
+ payload['paper']['book_exec_url'] = review_issue_body[BOOK_EXEC_REGEX].gsub('"', '')
188
189
  payload['paper']['repository_address'] = review_issue_body[REPO_REGEX].gsub('"', '')
189
190
  payload['paper']['editor'] = "@#{editor}"
190
191
  payload['paper']['reviewers'] = reviewers.collect(&:strip)
@@ -7,14 +7,13 @@
7
7
  <depositor_name>NeuroLibre Admin</depositor_name>
8
8
  <email_address>roboneurolibre@gmail.com</email_address>
9
9
  </depositor>
10
- <registrant>The Open Journal</registrant>
10
+ <registrant>Centre de Recherche de l'Institut Universitaire de Geriatrie de Montreal</registrant>
11
11
  </head>
12
12
  <body>
13
13
  <journal>
14
14
  <journal_metadata>
15
15
  <full_title>$journal_name$</full_title>
16
16
  <abbrev_title>$journal_abbrev_title$</abbrev_title>
17
- <issn media_type="electronic">$journal_issn$</issn>
18
17
  <doi_data>
19
18
  <doi>10.55458/$journal_alias$</doi>
20
19
  <resource>$journal_url$</resource>
@@ -58,7 +57,7 @@
58
57
  </rel:related_item>
59
58
  <rel:related_item>
60
59
  <rel:description>Dataset archive</rel:description>
61
- <rel:inter_work_relation relationship-type="hasPart" identifier-type="doi">$dataset_doi$</rel:inter_work_relation>
60
+ <rel:inter_work_relation relationship-type="hasPart" identifier-type="doi">$data_doi$</rel:inter_work_relation>
62
61
  </rel:related_item>
63
62
  <rel:related_item>
64
63
  <rel:description>Book archive</rel:description>
File without changes
File without changes
@@ -4,9 +4,9 @@ csl: /usr/local/share/openjournals/NeuroLibre/apa.csl
4
4
  variables:
5
5
  joss_resource_url: 'N/A'
6
6
  journal_abbrev_title: 'NeuroLibre'
7
- journal_alias: 'NeuroLibre'
7
+ journal_alias: 'neurolibre'
8
8
  journal_issn: '0000-0000'
9
- journal_name: 'NeuroLibre Executable Preprint Server'
9
+ journal_name: 'NeuroLibre Reproducible Preprint Server'
10
10
  journal_url: 'https://neurolibre.org/'
11
11
 
12
12
  metadata:
@@ -431,29 +431,35 @@ $endif$
431
431
  %\hrule
432
432
  \sffamily\small
433
433
 
434
- \href{$book_exec_url$}{\includegraphics[width=\marginparwidth]{$book_exec_icon$}}
435
-
436
- \vspace{1mm}
434
+ \vspace{-4.5cm}
437
435
 
438
436
  {\bfseries DOI:} \href{https://doi.org/$formatted_doi$}{\color{red}{$formatted_doi$}}
439
437
 
440
438
  \vspace{2mm}
441
439
 
442
- {\bfseries Jupyter Book}
440
+ {\bfseries Reproducible Preprint}
441
+ \begin{itemize}
442
+ \setlength\itemsep{0em}
443
+ \item \href{$book_exec_url$}{\color{red}{Jupyter Book}} \ExternalLink
444
+ \end{itemize}
445
+
446
+ \vspace{2mm}
447
+
448
+ {\bfseries Code}
443
449
  \begin{itemize}
444
450
  \setlength\itemsep{0em}
445
451
  \item \href{$review_issue_url$}{\color{red}{Technical Screening}} \ExternalLink
446
- \item \href{$repository$}{\color{red}{Source}} \ExternalLink
452
+ \item \href{$repository$}{\color{red}{Submitted Repository}} \ExternalLink
447
453
  \end{itemize}
448
454
 
449
455
  \vspace{2mm}
450
456
 
451
- {\bfseries Zenodo Archives}
457
+ {\bfseries Archives}
452
458
  \begin{itemize}
453
459
  \setlength\itemsep{0em}
454
460
  \item \href{$repository_doi$}{\color{red}{Repository}} \ExternalLink
455
461
  \item \href{$data_doi$}{\color{red}{Dataset}} \ExternalLink
456
- \item \href{$book_doi$}{\color{red}{Built Book}} \ExternalLink
462
+ \item \href{$book_doi$}{\color{red}{Jupyter Book}} \ExternalLink
457
463
  \item \href{$docker_doi$}{\color{red}{Container}} \ExternalLink
458
464
  \end{itemize}
459
465
 
@@ -466,7 +472,7 @@ $endif$
466
472
  {\bfseries Editor:} \href{$editor_url$}{\color{red}$editor_name$} \ExternalLink \\
467
473
  \vspace{1mm}
468
474
  $if(reviewers)$
469
- {\bfseries Reviewers:}
475
+ {\bfseries Reviewer(s):}
470
476
  \begin{itemize}
471
477
  \setlength\itemsep{0em}
472
478
  $for(reviewers)$
Binary file
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roboneuro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Agah Karakuzu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-12 00:00:00.000000000 Z
11
+ date: 2022-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bibtex-ruby
@@ -315,12 +315,6 @@ files:
315
315
  - lib/whedon/version.rb
316
316
  - paperdraft.Dockerfile
317
317
  - pkg/roboneuro-0.1.0.gem
318
- - resources/NeuroLibre/aas-logo.png
319
- - resources/NeuroLibre/apa.csl
320
- - resources/NeuroLibre/defaults.yaml
321
- - resources/NeuroLibre/latex.template
322
- - resources/NeuroLibre/logo.png
323
- - resources/NeuroLibre/logo_link.png
324
318
  - resources/apa.csl
325
319
  - resources/crossref.template
326
320
  - resources/docker-defaults.yaml
@@ -337,6 +331,12 @@ files:
337
331
  - resources/joss/latex.template
338
332
  - resources/joss/logo.png
339
333
  - resources/latex.template
334
+ - resources/neurolibre/aas-logo.png
335
+ - resources/neurolibre/apa.csl
336
+ - resources/neurolibre/defaults.yaml
337
+ - resources/neurolibre/latex.template
338
+ - resources/neurolibre/logo.png
339
+ - resources/neurolibre/logo_link.png
340
340
  - resources/time.lua
341
341
  - roboneuro.gemspec
342
342
  - spec/auditor_spec.rb
Binary file