From 3e1f0c385ba16f3f01c2e9a10805a801daa2bc9b Mon Sep 17 00:00:00 2001 From: ErnestaP Date: Wed, 10 Jul 2024 12:30:58 +0200 Subject: [PATCH] Springer parser: test parsed and cleaned orcids --- tests/units/springer/test_parser.py | 96 +++- .../test_parser/s10052-024-12692-y.xml | 493 ++++++++++++++++++ 2 files changed, 588 insertions(+), 1 deletion(-) create mode 100644 tests/units/springer/test_parser/s10052-024-12692-y.xml diff --git a/tests/units/springer/test_parser.py b/tests/units/springer/test_parser.py index 257b84b1..1ad2d8d5 100644 --- a/tests/units/springer/test_parser.py +++ b/tests/units/springer/test_parser.py @@ -132,7 +132,7 @@ def test_authors(parsed_articles): for author in authors: for aff in author.get("affiliations", []): - if aff.get("country") is "Korea": + if aff.get("country") == "Korea": aff["country"] = "South Korea" assert Enhancer()("Springer", parsed_article)["authors"] == authors @@ -328,3 +328,97 @@ def test_abstract(parsed_articles): for abstract, article in zip(abstracts, parsed_articles): assert "abstract" in article assert article["abstract"] == abstract + + +@fixture +def article_with_orcid(parser, datadir): + with open(datadir / "s10052-024-12692-y.xml") as file: + yield parser._generic_parsing(parser._publisher_specific_parsing(ET.fromstring(file.read()))) + + +def test_article_with_cleaned_orcid(article_with_orcid): + print(article_with_orcid["authors"]) + expected_output = [ + { + "surname": "Hong", + "given_names": "T.", + "email": "tthong@agu.edu.vn", + "affiliations": [ + { + "value": "An Giang University, Long Xuyen, 880000, Vietnam", + "organization": "An Giang University", + "country": "Vietnam" + }, + { + "value": "Vietnam National University, Ho Chi Minh City, 700000, Vietnam", + "organization": "Vietnam National University", + "country": "Vietnam" + } + ], + "full_name": "Hong, T." + }, + { + "surname": "Tran", + "given_names": "Q.", + "email": "tqduyet@agu.edu.vn", + "affiliations": [ + { + "value": "An Giang University, Long Xuyen, 880000, Vietnam", + "organization": "An Giang University", + "country": "Vietnam" + }, + { + "value": "Vietnam National University, Ho Chi Minh City, 700000, Vietnam", + "organization": "Vietnam National University", + "country": "Vietnam" + } + ], + "full_name": "Tran, Q." + }, + { + "surname": "Nguyen", + "given_names": "T.", + "email": "thanhphong@ctu.edu.vn", + "affiliations": [ + { + "value": "Department of Physics, Can Tho University, 3/2 Street, Can Tho, Vietnam", + "organization": "Can Tho University", + "country": "Vietnam" + } + ], + "full_name": "Nguyen, T." + }, + { + "surname": "Hue", + "given_names": "L.", + "email": "lethohue@vlu.edu.vn", + "affiliations": [ + { + "value": "Subatomic Physics Research Group, Science and Technology Advanced Institute, Van Lang University, Ho Chi Minh City, Vietnam", + "organization": "Van Lang University", + "country": "Vietnam" + } + ], + "full_name": "Hue, L." + }, + { + "orcid": "0009-0005-5993-6895", + "surname": "Nha", + "given_names": "N.", + "email": "nguyenhuathanhnha@vlu.edu.vn", + "affiliations": [ + { + "value": "Subatomic Physics Research Group, Science and Technology Advanced Institute, Van Lang University, Ho Chi Minh City, Vietnam", + "organization": "Van Lang University", + "country": "Vietnam" + }, + { + "value": "Faculty of Applied Technology, School of Technology, Van Lang University, Ho Chi Minh City, Vietnam", + "organization": "Van Lang University", + "country": "Vietnam" + } + ], + "full_name": "Nha, N." + } + ] + assert expected_output == article_with_orcid["authors"] diff --git a/tests/units/springer/test_parser/s10052-024-12692-y.xml b/tests/units/springer/test_parser/s10052-024-12692-y.xml new file mode 100644 index 00000000..c99a7c13 --- /dev/null +++ b/tests/units/springer/test_parser/s10052-024-12692-y.xml @@ -0,0 +1,493 @@ + + + + + Springer Berlin Heidelberg + Berlin/Heidelberg + Springer + + + + 10052 + 10.1007/10052.1434-6052 + 1434-6052 + 30312819 + The European Physical Journal C + Particles and Fields + Eur. Phys. J. C + + Physics + Elementary Particles, + Quantum Field Theory + Nuclear Physics, Heavy + Ions, Hadrons + Quantum Field Theories, + String Theory + Measurement Science and + Instrumentation + Astronomy, Astrophysics + and Cosmology + Nuclear Energy + Physics and Astronomy + + + + + 84 + 84 + 12 + + + + 3 + 3 + 128 + + + 2024 + 5 + 7 + + + 2024 + 3 + + 2024 + + + EDP Sciences, Societa Italiana di Fisica (SIF) and + Springer-Verlag GmbH, DE, part of Springer Nature + 2024 + + +
+ + 12692 + 10.1140/epjc/s10052-024-12692-y + 338 + 125 + + 10.1140/epjc/s10052-024-12783-w + + + + + + + + + ( + g + - + 2 + ) + + + e + , + μ + + + + + + anomalies and decays + + + + + h + + + e + a + + + e + b + + + + + + , + + + + + Z + + + e + a + + + e + b + + + + + , + and + + + + + + e + b + + + + e + a + + γ + + + + + in a two Higgs doublet model with inverse seesaw neutrinos + Regular Article - Theoretical Physics + 1 + 30 + + + 2024 + 3 + 20 + + + 2023 + 12 + 21 + + + 2024 + 3 + 20 + + + 2024 + 3 + 30 + + + + + + 2024 + 5 + 3 + + + An Erratum to this paper has been published: + https://doi.org/10.1140/epjc/s10052-024-12783-w + + + + + + + + + Vietnam National University HoChiMinh City + C2022-16-06 + + + + The Author(s) + 2024 + corrected publication 2024 + + + Open Access This article is licensed + under a Creative Commons Attribution 4.0 International License, which + permits use, sharing, adaptation, distribution and reproduction in any + medium or format, as long as you give appropriate credit to the original + author(s) and the source, provide a link to the Creative Commons licence, + and indicate if changes were made. The images or other third party + material in this article are included in the article’s Creative Commons + licence, unless indicated otherwise in a credit line to the material. If + material is not included in the article’s Creative Commons licence and + your intended use is not permitted by statutory regulation or exceeds the + permitted use, you will need to obtain permission directly from the + copyright holder. To view a copy of this licence, visit + http://creativecommons.org/licenses/by/4.0/ + + . + Funded by SCOAP3. + + + + + + + + + + + + 10052 + 84 + 84 + 3 + 3 + + + + + + + T. + T. + Hong + + + tthong@agu.edu.vn + + + + + Q. + Duyet + Tran + + + tqduyet@agu.edu.vn + + + + + T. + Phong + Nguyen + + + thanhphong@ctu.edu.vn + + + + + L. + T. + Hue + + + lethohue@vlu.edu.vn + + + + + N. + H. + T. + Nha + + + nguyenhuathanhnha@vlu.edu.vn + + + + https://ror.org/023pm6532 + grid.448947.2 + 0000 0000 9828 7134 + An Giang University + + Long Xuyen + 880000 + Vietnam + + + + grid.444808.4 + 0000 0001 2037 434X + Vietnam National University + + Ho Chi Minh City + 700000 + Vietnam + + + + https://ror.org/0071qz696 + grid.25488.33 + 0000 0004 0643 0300 + Department of Physics + Can Tho University + + 3/2 Street + Can Tho + Vietnam + + + + https://ror.org/02ryrf141 + grid.444823.d + 0000 0004 9337 4676 + Subatomic Physics Research Group, Science and Technology + Advanced Institute + Van Lang University + + Ho Chi Minh City + Vietnam + + + + https://ror.org/02ryrf141 + grid.444823.d + 0000 0004 9337 4676 + Faculty of Applied Technology, School of Technology + Van Lang University + + Ho Chi Minh City + Vietnam + + + + + Abstract + The lepton flavor violating decays + + + + + h + + + e + b + ± + + + e + a + + + + + + + , + + + + + Z + + + e + b + ± + + + e + a + + + + + + , + and + + + + + + e + b + + + + e + a + + γ + + + + + will be discussed in the framework of the Two Higgs doublet model with + presence of new inverse seesaw neutrinos and a singly charged Higgs boson + that accommodate both + + + + + 1 + σ + + + + + experimental data of + + + + + ( + g + - + 2 + ) + + + + + anomalies of the muon and electron. Numerical results indicate that there + exist regions of the parameter space supporting all experimental data of + + + + + + ( + g + - + 2 + ) + + + e + , + μ + + + + + + as well as the promising LFV signals corresponding to the future + experimental sensitivities. + + + The original online version of this article was revised: the + affiliation details for Author Nguyen Hua Thanh Nha were incorrectly given + as ‘Faculty of Applied Technology, School of Engineering and Technology, Van + Lang University, Ho Chi Minh City, Vietnam’ but should have been ‘Faculty of + Applied Technology, School of Technology, Van Lang University, Ho Chi Minh + City, Vietnam’. + + + An erratum to this article is available online at + https://doi.org/10.1140/epjc/s10052-024-12783-w + + . + + + +
+
+
+
+
\ No newline at end of file