Skip to content

feat: add JATS default article type to sections and articles#4499

Merged
mauromsl merged 11 commits into
masterfrom
b-add-jats-section
Nov 27, 2024
Merged

feat: add JATS default article type to sections and articles#4499
mauromsl merged 11 commits into
masterfrom
b-add-jats-section

Conversation

@MartinPaulEve

Copy link
Copy Markdown
Contributor

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.

@MartinPaulEve MartinPaulEve added the new feature A new thing that doesn't exist yet label Nov 20, 2024
@MartinPaulEve MartinPaulEve self-assigned this Nov 20, 2024

@ajrbyers ajrbyers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/submission/models.py Outdated
@MartinPaulEve

Copy link
Copy Markdown
Contributor Author

Please hold on this: there's some debate as to which standard we should be using for the controlled vocabulary of this field

@mauromsl mauromsl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread docs/source/manager/articlesissues/index.rst Outdated
Comment thread src/submission/views.py Outdated
Comment thread src/submission/models.py Outdated
@mauromsl mauromsl assigned MartinPaulEve and unassigned ajrbyers Nov 26, 2024

@mauromsl mauromsl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, a few minor comments and we are good to go.

Comment thread src/submission/models.py Outdated
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.",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread src/core/forms/forms.py
'name', 'plural', 'number_of_reviewers',
'is_filterable', 'sequence', 'section_editors',
'editors', 'public_submissions', 'indexing',
'editors', 'jats_article_type', 'public_submissions', 'indexing',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be jats_article_type_override now?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No: this is for the section, which is not an override

Comment thread src/core/janeway_global_settings.py
@mauromsl mauromsl merged commit 90c6bc0 into master Nov 27, 2024
@mauromsl mauromsl deleted the b-add-jats-section branch November 27, 2024 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature A new thing that doesn't exist yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants