You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to publish a new article (after acceptance), you'll need to have the article metadata file (YAML format) and the corresponding article (PDF format).
Is best practice to take the YAML and PDF and drop them in the same directory as the Python scripts?
Yes, it makes the command line shorter to write but you're actually free to put them anywhere. But you'll have to run the sciprt from the "articles" directory because it will create a local archive of the paper (through some automatic github command).
You have to check the final PDF is ok (DOI, editors, replication (and not editorial)), lnks, etc. If it's fine, you can now publish it on Zeonodo using the script. Note that in cas of problem, you still have the option to edit it directly on Zenodo.
A good thing would be to make very clear which bits the editor needs to do and which the authors and possibly send the authors a link to it (if we don't already?) so they can prep their end as soon as they can... would that be useful?
Yes. One question we had with @khinsen is whether the editor fills up the metadata and make a PR to author's repository or whether the author fills up metadata and rebuild the PDF. Since editor is more experienced, the first solution might be easier.
Another thing is the situation I am in now where I cannot compile the PDF. Is this OK or does it just mean asking the authors to do too much back-and-forth and taking too long?
Also a link to a fully working (toy?) example would be good for the YAML file. Maybe even for the whole article repo? So we can know what it should look like?
Metadata is newer than PDF, probably PDF needs to be rebuild
Apart from the typo which I'll fix now, I don't think it's correct to have this blocking since I can't build the PDF from the Metadata in this case anyway...
(base) olivia@olivia-HP-Z2-Tower-G4-Workstation:~/Code/articles$ python publish.py --sandbox --metadata ../WCSTDehaeneChangeux/Metadata.yaml --pdf ../WCSTDehaeneChangeux/ReScience_Dehaene.pdf
Traceback (most recent call last):
File "publish.py", line 196, in <module>
article = Article(file.read())
File "/home/olivia/Code/articles/article.py", line 135, in __init__
self.parse(data)
File "/home/olivia/Code/articles/article.py", line 170, in parse
document = yaml.safe_load(data)
File "/home/olivia/anaconda3/lib/python3.7/site-packages/yaml/__init__.py", line 162, in safe_load
return load(stream, SafeLoader)
File "/home/olivia/anaconda3/lib/python3.7/site-packages/yaml/__init__.py", line 114, in load
return loader.get_single_data()
File "/home/olivia/anaconda3/lib/python3.7/site-packages/yaml/constructor.py", line 41, in get_single_data
node = self.get_single_node()
File "/home/olivia/anaconda3/lib/python3.7/site-packages/yaml/composer.py", line 36, in get_single_node
document = self.compose_document()
File "/home/olivia/anaconda3/lib/python3.7/site-packages/yaml/composer.py", line 55, in compose_document
node = self.compose_node(None, None)
File "/home/olivia/anaconda3/lib/python3.7/site-packages/yaml/composer.py", line 84, in compose_node
node = self.compose_mapping_node(anchor)
File "/home/olivia/anaconda3/lib/python3.7/site-packages/yaml/composer.py", line 133, in compose_mapping_node
item_value = self.compose_node(node, item_key)
File "/home/olivia/anaconda3/lib/python3.7/site-packages/yaml/composer.py", line 82, in compose_node
node = self.compose_sequence_node(anchor)
File "/home/olivia/anaconda3/lib/python3.7/site-packages/yaml/composer.py", line 111, in compose_sequence_node
node.value.append(self.compose_node(node, index))
File "/home/olivia/anaconda3/lib/python3.7/site-packages/yaml/composer.py", line 84, in compose_node
node = self.compose_mapping_node(anchor)
File "/home/olivia/anaconda3/lib/python3.7/site-packages/yaml/composer.py", line 127, in compose_mapping_node
while not self.check_event(MappingEndEvent):
File "/home/olivia/anaconda3/lib/python3.7/site-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
File "/home/olivia/anaconda3/lib/python3.7/site-packages/yaml/parser.py", line 428, in parse_block_mapping_key
if self.check_token(KeyToken):
File "/home/olivia/anaconda3/lib/python3.7/site-packages/yaml/scanner.py", line 116, in check_token
self.fetch_more_tokens()
File "/home/olivia/anaconda3/lib/python3.7/site-packages/yaml/scanner.py", line 223, in fetch_more_tokens
return self.fetch_value()
File "/home/olivia/anaconda3/lib/python3.7/site-packages/yaml/scanner.py", line 579, in fetch_value
self.get_mark())
yaml.scanner.ScannerError: mapping values are not allowed here
in "<unicode string>", line 62, column 80:
... The Wisconsin Card Sorting Test: Theoretical analysis and model ...
^
Ok, we need to change the title that is wrong anyway. The title of the replication should be "[Re] original title" (this is for search engines to (also) match the replication when people look for the original article).
yaml.scanner.ScannerError: mapping values are not allowed here
in "<unicode string>", line 62, column 80:
... The Wisconsin Card Sorting Test: Theoretical analysis and model ...
So let's use a comma and you can keep the right title in the tex/pdf and change the title later directly on Zenodo. I'll need to fix the problem at some point.
Aaaahhh, I figured it out. I was confusing the line numbers! Both original and current title had colons! OK, I used the standard way of fixing both colons, and it's fine! https://sandbox.zenodo.org/record/416801
Activity
rougier commentedon Nov 28, 2019
Yes, it makes the command line shorter to write but you're actually free to put them anywhere. But you'll have to run the sciprt from the "articles" directory because it will create a local archive of the paper (through some automatic github command).
oliviaguest commentedon Nov 28, 2019
This should be clarified somewhere for people like me who have no idea, I guess. 😆
rougier commentedon Nov 28, 2019
Yes, I realize the procedure needs more explanation. After you finished editing this one, I'll try to update explanation based on your feedback.
oliviaguest commentedon Nov 30, 2019
I added this, but I am not sure how to clarify the rest since I am not sure I understand the rest enough, yet... Sorry! 42fb65e
rougier commentedon Dec 1, 2019
Thanks. I'll try to update by next week based on your (bad) experience. Sorry for all the mess. Did you manage to publish the article finally ?
oliviaguest commentedon Dec 1, 2019
I'm not sure what I'm supposed to do next... is the author meant to take over at some point?
rougier commentedon Dec 1, 2019
You have to check the final PDF is ok (DOI, editors, replication (and not editorial)), lnks, etc. If it's fine, you can now publish it on Zeonodo using the script. Note that in cas of problem, you still have the option to edit it directly on Zenodo.
oliviaguest commentedon Dec 2, 2019
A good thing would be to make very clear which bits the editor needs to do and which the authors and possibly send the authors a link to it (if we don't already?) so they can prep their end as soon as they can... would that be useful?
rougier commentedon Dec 2, 2019
Yes. One question we had with @khinsen is whether the editor fills up the metadata and make a PR to author's repository or whether the author fills up metadata and rebuild the PDF. Since editor is more experienced, the first solution might be easier.
oliviaguest commentedon Dec 2, 2019
Another thing is the situation I am in now where I cannot compile the PDF. Is this OK or does it just mean asking the authors to do too much back-and-forth and taking too long?
oliviaguest commentedon Dec 2, 2019
Also a link to a fully working (toy?) example would be good for the YAML file. Maybe even for the whole article repo? So we can know what it should look like?
oliviaguest commentedon Dec 4, 2019
I'm getting a bug (?):
Apart from the typo which I'll fix now, I don't think it's correct to have this blocking since I can't build the PDF from the Metadata in this case anyway...
oliviaguest commentedon Dec 4, 2019
And now I get this issue — any ideas?
rougier commentedon Dec 5, 2019
Maybe missing quote around the string or maybe you need to escape the
:(→\:)oliviaguest commentedon Dec 9, 2019
OK, but now I get this...
1 remaining item
oliviaguest commentedon Dec 9, 2019
Ah, to test this I need to generate/paste a sandbox DOI and edit the metadata and PDF files?
rougier commentedon Dec 9, 2019
Yes, the DOI you get from sandbox and actual server are not the same and might be the problem.
oliviaguest commentedon Dec 9, 2019
Fixed DOI, etc., now I get this:
oliviaguest commentedon Dec 9, 2019
The line in the metadata is now:
oliviaguest commentedon Dec 9, 2019
I have tried various ways of escaping the colon to no success! 😕 All here have been tested: https://stackoverflow.com/questions/11301650/how-to-escape-indicator-characters-i-e-or-in-yaml
rougier commentedon Dec 9, 2019
Ok, we need to change the title that is wrong anyway. The title of the replication should be "[Re] original title" (this is for search engines to (also) match the replication when people look for the original article).
oliviaguest commentedon Dec 9, 2019
So the title should be, which still has a colon in it:
rougier commentedon Dec 9, 2019
Arrrggg.... Can you try with this
:(unicode fullwidth colon, make sure to copy it), or else, we can use a comma insteadoliviaguest commentedon Dec 9, 2019
Same error(s) with the different combinations of escaping the Unicode colon.
rougier commentedon Dec 9, 2019
Even without escaping it at all ?
oliviaguest commentedon Dec 9, 2019
Yup, the error is then:
oliviaguest commentedon Dec 9, 2019
It doesn't care about the pasted single-space Unicode colon at all. It just replaces it — it seems — with a standard colon.
rougier commentedon Dec 9, 2019
So let's use a comma and you can keep the right title in the tex/pdf and change the title later directly on Zenodo. I'll need to fix the problem at some point.
oliviaguest commentedon Dec 9, 2019
Aaaahhh, I figured it out. I was confusing the line numbers! Both original and current title had colons! OK, I used the standard way of fixing both colons, and it's fine! https://sandbox.zenodo.org/record/416801
oliviaguest commentedon Dec 9, 2019
And: https://zenodo.org/record/3545905 💯