-
Notifications
You must be signed in to change notification settings - Fork 14
Atualizar a lista de tipos de documentos com valores @article-type, DOCTOPIC e novos atributos #203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 3 commits
a007b1b
fc2edc7
fb7eda0
776740c
f556ec4
3135883
0d3fba8
6f0909b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2743,6 +2743,21 @@ def test_invalid_document_type(self): | |||||||||||||||||||||||||||||||
| article.data['article']['v71'] = [{u'_': u'invalid'}] | ||||||||||||||||||||||||||||||||
| self.assertEqual(article.document_type, u'undefined') | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| def test_document_type_from_article_type_attribute(self): | ||||||||||||||||||||||||||||||||
| article = self.article | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| for article_type in [ | ||||||||||||||||||||||||||||||||
| 'addendum', 'article-commentary', 'book-review', 'brief-report', | ||||||||||||||||||||||||||||||||
| 'case-report', 'clinical-instruction', 'correction', | ||||||||||||||||||||||||||||||||
| 'data-article', 'discussion', 'editorial', | ||||||||||||||||||||||||||||||||
| 'expression-of-concern', 'in-brief', 'letter', 'obituary', | ||||||||||||||||||||||||||||||||
| 'oration', 'other', 'partial-retraction', 'rapid-communication', | ||||||||||||||||||||||||||||||||
| 'referee-report', 'reply', 'research-article', 'retraction', | ||||||||||||||||||||||||||||||||
| 'review-article', 'reviewer-report', | ||||||||||||||||||||||||||||||||
| ]: | ||||||||||||||||||||||||||||||||
| article.data['article']['v71'] = [{u'_': article_type}] | ||||||||||||||||||||||||||||||||
| self.assertEqual(article.document_type, article_type) | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
| def test_document_type_from_legacy_v71_values(self): | |
| article = self.article | |
| legacy_mappings = { | |
| u'in': u'other', | |
| u'mt': u'review-article', | |
| u'sc': u'brief-report', | |
| u'up': u'rapid-communication', | |
| } | |
| for legacy_value, expected_type in legacy_mappings.items(): | |
| article.data['article']['v71'] = [{u'_': legacy_value}] | |
| self.assertEqual(article.document_type, expected_type) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,19 +60,43 @@ | |
| 'ct': 'research-article', | ||
| 'ed': 'editorial', | ||
| 'er': 'correction', | ||
| 'in': 'editorial', | ||
| 'in': 'other', | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @copilot in é igual a interview e não other, mt é methodology.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in |
||
| 'le': 'letter', | ||
| 'mt': 'research-article', | ||
| 'mt': 'review-article', | ||
| 'nd': 'undefined', | ||
| 'oa': 'research-article', | ||
| 'pr': 'press-release', | ||
| 'pv': 'editorial', | ||
| 'rc': 'book-review', | ||
| 'rn': 'brief-report', | ||
| 'ra': 'review-article', | ||
| 'sc': 'rapid-communication', | ||
| 'sc': 'brief-report', | ||
| 'tr': 'research-article', | ||
| 'up': 'undefined' | ||
| 'up': 'undefined', | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @copilot considere também esta tabela para conferir os valores
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cross-referenced the legacy codes table with the issue's Legacy code mapping fixes:
Added missing @article-type identity mappings:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @copilot up = rapid-communication
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in |
||
| 'addendum': 'addendum', | ||
| 'article-commentary': 'article-commentary', | ||
| 'book-review': 'book-review', | ||
| 'brief-report': 'brief-report', | ||
| 'case-report': 'case-report', | ||
| 'clinical-instruction': 'clinical-instruction', | ||
| 'correction': 'correction', | ||
| 'data-article': 'data-article', | ||
| 'discussion': 'discussion', | ||
| 'editorial': 'editorial', | ||
| 'expression-of-concern': 'expression-of-concern', | ||
| 'in-brief': 'in-brief', | ||
| 'letter': 'letter', | ||
| 'obituary': 'obituary', | ||
| 'oration': 'oration', | ||
| 'other': 'other', | ||
| 'partial-retraction': 'partial-retraction', | ||
| 'rapid-communication': 'rapid-communication', | ||
| 'referee-report': 'referee-report', | ||
| 'reply': 'reply', | ||
| 'research-article': 'research-article', | ||
| 'retraction': 'retraction', | ||
| 'review-article': 'review-article', | ||
| 'reviewer-report': 'reviewer-report', | ||
| } | ||
|
|
||
| periodicity = { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test name mentions an "article_type attribute", but the test is setting the legacy field v71 directly. Renaming it to reflect what it actually validates (e.g., that document_type accepts JATS
@article-typevalues stored in v71) would avoid confusion for future maintainers.