feat: add JATS default article type to sections and articles#4499
Conversation
ajrbyers
left a comment
There was a problem hiding this comment.
This is looking good. A few comments:
- Can you check that lengths added are PEP8 compliant? Some look like they might be too long
- I have a concern that if the article section is changed this could leave the article's type out of sync.
|
Please hold on this: there's some debate as to which standard we should be using for the controlled vocabulary of this field |
mauromsl
left a comment
There was a problem hiding this comment.
Hey @MartinPaulEve , Thanks for this. I added a couple of comments regarding
a. avoiding de-normalization of the article type data
b. a question around making the article types configurable
mauromsl
left a comment
There was a problem hiding this comment.
Nice, a few minor comments and we are good to go.
| dynamic_choices=get_jats_article_types(), | ||
| choices=tuple(), | ||
| blank=True, null=True, | ||
| help_text="The type of article as per the JATS standard. The initial state of this field is set by the submission section's article type.", |
There was a problem hiding this comment.
This help text needs adjusting now, the initial state is no longer set by the article type.
"An override of the article type when encoding into JATS. If the article has a section, it will use it as its article type"
| 'name', 'plural', 'number_of_reviewers', | ||
| 'is_filterable', 'sequence', 'section_editors', | ||
| 'editors', 'public_submissions', 'indexing', | ||
| 'editors', 'jats_article_type', 'public_submissions', 'indexing', |
There was a problem hiding this comment.
should this be jats_article_type_override now?
There was a problem hiding this comment.
No: this is for the section, which is not an override
This PR adds a field to sections and articles that denotes the JATS article-type.
At submission, the article's JATS article type is set to the same as the section to which it is being submitted. Editors can, then, later change the JATS article type if they so wish, under the "Edit Metadata" pane.
The JATS stub generator then uses this field to generate a JATS "article" element with attribute "article-type" set to the value of the field. If no value is set, then "research-article" is used as the default.
Tests cover this fallback condition and so continue to pass.