diff --git a/exportsrv/cslstyles/agu.csl b/exportsrv/cslstyles/agu.csl index d084284..6cdd12f 100644 --- a/exportsrv/cslstyles/agu.csl +++ b/exportsrv/cslstyles/agu.csl @@ -710,8 +710,8 @@ - - + + diff --git a/exportsrv/cslstyles/ams.csl b/exportsrv/cslstyles/ams.csl index 1777f97..694567b 100644 --- a/exportsrv/cslstyles/ams.csl +++ b/exportsrv/cslstyles/ams.csl @@ -235,7 +235,7 @@ - + @@ -249,7 +249,7 @@ - + diff --git a/exportsrv/formatter/cslFormat.py b/exportsrv/formatter/cslFormat.py index 2df23fe..449f399 100755 --- a/exportsrv/formatter/cslFormat.py +++ b/exportsrv/formatter/cslFormat.py @@ -147,6 +147,17 @@ def __update_data(self): for data in self.for_cls: if len(data.get('DOI', '')) > 0: data['DOI'] = data['DOI'].lstrip('doi:') + # make sure the author list has a final period (if there's a given name, it'll get a period when the name is + # converted to initials - this counts as the final period; we need to account for the situation where a + # period is not introduced at that point) + if self.csl_style == 'agu': + for data in self.for_cls: + author = data.get('author') + if author: + last = author[-1] + if "family" in last and "given" not in last: + if not last["family"].endswith("."): + last["family"] += "." # remove MathML markup elif (self.csl_style == 'ieee'): for data in self.for_cls: diff --git a/exportsrv/tests/unittests/stubdata/cslTest.py b/exportsrv/tests/unittests/stubdata/cslTest.py index 4519ce1..e406f76 100755 --- a/exportsrv/tests/unittests/stubdata/cslTest.py +++ b/exportsrv/tests/unittests/stubdata/cslTest.py @@ -18,8 +18,8 @@ data_ieee= {'msg': 'Retrieved 24 abstracts, starting with number 1.', 'export': u"[1]No author, \u201cBook reviews\u201d, Weather, vol. 73, no. 1, pp. 35\u201335, 2018. doi:10.1002/wea.3072.\n[2]Fal'ko, V. and Thomas, C.-W., \u201c2D Materials: maintaining editorial quality\u201d, 2D Materials, vol. 5, no. 1, Art. no. 010201, 2018. doi:10.1088/2053-1583/aa9403.\n[3]Parkin, S., Chantrell, R., and Chang, C.-R., \u201cObituary: In Memoriam Professor Dr. Shoucheng Zhang, Consulting Editor\u201d, Spin, vol. 8, no. 4, Art. no. 1877001, 2018. doi:10.1142/S2010324718770015.\n[4]Dessauges-Zavadsky, M. and Pfenniger, D., \u201cMillimeter Astronomy\u201d, SAAS...38, 2018. doi:10.1007/978-3-662-57546-8.\n[5]Pustilnik, M., van Heck, B., Lutchyn, R. M., and Glazman, L. I., \u201cErratum: Quantum Criticality in Resonant Andreev Conduction [Phys. Rev. Lett. 119, 116802 (2017)]\u201d, Physical Review Letters, vol. 120, no. 2, Art. no. 029901, 2018. doi:10.1103/PhysRevLett.120.029901.\n[6]Carton, D., \u201cResolving Gas-Phase Metallicity In Galaxies\u201d, PhDT, Leiden University, 2017. doi:10.5281/zenodo.581221.\n[7]Kohler, S., \u201cA 3D View of a Supernova Remnant\u201d, AAS Nova Highlights, Art. no. 2388, 2017.\n[8]Green, D. W. E., \u201cPotential New Meteor Shower from Comet C/2015 D4 (Borisov)\u201d, CBET.4403, 2017.\n[9]Casey, A. R., \u201csick: Spectroscopic inference crank\u201d, Astrophysics Source Code Library, Art. no. ascl:1706.009, 2017. ascl:1706.009.\n[10]Siltala, J., \u201cVizieR Online Data Catalog: BM CVn V-band differential light curve (Siltala+, 2017)\u201d, VizieR Online Data Catalog, Art. no. J/AN/338/453, 2017.\n[11]Waagen, E. O., \u201cV694 Mon (MWC 560) spectroscopy requested\u201d, AAVSN.429, 2017.\n[12]Yan, L., \u201cConfirm the Nature of a TDE Candidate in ULIRG F01004-2237 Using Spitzer mid-IR Light Curves\u201d, Spitzer Proposal, p. 13168, 2017.\n[13]Azankpo, S., \u201cSurface Accuracy and Pointing Error Prediction of a 32 m Diameter Class Radio Astronomy Telescope\u201d, MsT, University of Stellenbosch, 2017.\n[14]Rotaru, A., Pteancu, M., and Zaharia, C., \u201cThe penumbral Moon's eclipse form 16 september 2016\u201d, emo6.rept, 2016.\n[15]Velasco, S., \u201cLiving on the edge: Adaptive Optics+Lucky Imaging\u201d, IAC Talks, Astronomy and Astrophysics Seminars from the Instituto de Astrofísica de Canarias, p. 872, 2016.\n[16]Liu, C. W., \u201cThe Diversity of Nuclear Magnetic Resonance Spectroscopy\u201d, in Biophysics and the Challenges of Emerging Threats, J. D. Puglisi, Ed. 2009, p. 65. doi:10.1007/978-90-481-2368-1_5.\n[17]Mahabal, A. A., \u201cTime Domain Exploration with the Palomar-QUEST Sky Survey\u201d, vol. 210, Art. no. 21.04, 2007.\n[18]., S. N. A. and ., E. C. O., \u201cAnalysis of Thermal Losses in the Flat-Plate Collector of a Thermosyphon Solar Water Heater\u201d, Research Journal of Physics, vol. 1, no. 1, pp. 35\u201341, 2007. doi:10.3923/rjp.2007.35.41.\n[19]Miller, J. L., \u201cSpacecraft navigation requirements\u201d, in In AGARD, 1995, pp. 390\u2013405.\n[20]Nayfeh, A. H. and Balachandran, B., Applied nonlinear dynamics: analytical, computational and experimental methods. 1995.\n[21]Ginsparg, P., \u201cApplied Conformal Field Theory\u201d, arXiv e-prints, Art. no. hep-th/9108028, 1988.\n[22]Khatib, A. R., Ellis, J., French, J., Null, G., Yunck, T., and Wu, S., \u201cAutonomous navigation using lunar beacons\u201d, in AIAA, Aerospace Sciences Meeting, 1983.\n[23]Thornton, P. E., “Daymet: Daily surface weather on a 1 km grid for North America, 1980-2008”, Oak Ridge National Laboratory (ORNL) Distributed Active Archive Center for Biogeochemical Dynamics (DAAC, 2012. doi:10.3334/ORNLDAAC/1219.\n[24]Dhaygude, A. and Desai, S., “Generalized Lomb–Scargle analysis of 36Cl decay rate measurements at PTB and BNL”, European Physical Journal C, 2020. doi:10.1140/epjc/s10052-020-7683-610.48550/arXiv.1912.06970.\n"} -data_agu= {'msg': 'Retrieved 24 abstracts, starting with number 1.', 'export': "No author (2018) Book reviews Weather, 73(1), 35–35. https://doi.org/10.1002/wea.3072\nFal'ko, V., & Thomas, C.-W. (2018) 2D Materials: maintaining editorial quality 2D Materials, 5(1), 010201. https://doi.org/10.1088/2053-1583/aa9403\nParkin, S., Chantrell, R., & Chang, C.-R. (2018) Obituary: In Memoriam Professor Dr. Shoucheng Zhang, Consulting Editor Spin, 8(4), 1877001. https://doi.org/10.1142/S2010324718770015\nDessauges-Zavadsky, M., & Pfenniger, D. (2018) Millimeter Astronomy (SAAS...38) Millimeter Astronomy: Saas-Fee Advanced Course 38. Swiss Society for Astrophysics and Astronomy, Saas-Fee Advanced Course, Volume 38. ISBN 978-3-662-57545-1. Springer-Verlag GmbH Germany, part of Springer Nature, 2018 (Vol. 38). https://doi.org/10.1007/978-3-662-57546-8\nPustilnik, M., van Heck, B., Lutchyn, R. M., & Glazman, L. I. (2018) Erratum: Quantum Criticality in Resonant Andreev Conduction [Phys. Rev. Lett. 119, 116802 (2017)] Physical Review Letters, 120(2), 029901. https://doi.org/10.1103/PhysRevLett.120.029901\nCarton, D. (2017) Resolving Gas-Phase Metallicity In Galaxies (PhDT) Ph.D. Thesis, Leiden University. https://doi.org/10.5281/zenodo.581221\nKohler, S. (2017) A 3D View of a Supernova Remnant AAS Nova Highlights (2388).\nGreen, D. W. E. (2017) Potential New Meteor Shower from Comet C/2015 D4 (Borisov) (CBET.4403) Central Bureau Electronic Telegrams (Vol. 4403, p. 2).\nCasey, A. R. (2017) sick: Spectroscopic inference crank Astrophysics Source Code Library. ascl:1706.009\nSiltala, J., Jetsu, L., Hackman, T., Henry, G. W., Immonen, L., Kajatkari, P., et al. (2017) VizieR Online Data Catalog: BM CVn V-band differential light curve (Siltala+, 2017) VizieR Online Data Catalog (J/AN/338/453).\nWaagen, E. O. (2017) V694 Mon (MWC 560) spectroscopy requested (AAVSN.429) AAVSO Special Notice #429 (Vol. 429, p. 1).\nYan, L. (2017) Confirm the Nature of a TDE Candidate in ULIRG F01004-2237 Using Spitzer mid-IR Light Curves Spitzer Proposal, 13168.\nAzankpo, S. (2017) Surface Accuracy and Pointing Error Prediction of a 32 m Diameter Class Radio Astronomy Telescope (MsT) Masters Thesis, University of Stellenbosch.\nRotaru, A., Pteancu, M., & Zaharia, C. (2016) The penumbral Moon's eclipse form 16 september 2016 (emo6.rept) http://www.astronomy.ro/forum/viewtopic.php?p=159287#159287 (Comments in Romanian).\nVelasco, S. (2016) Living on the edge: Adaptive Optics+Lucky Imaging IAC Talks, Astronomy and Astrophysics Seminars from the Instituto de Astrofísica de Canarias, p. 872.\nLiu, C. W., Alekseyev, V. Y., Allwardt, J. R., Bankovich, A. J., Cade-Menun, B. J., Davis, R. W., et al. (2009) The Diversity of Nuclear Magnetic Resonance Spectroscopy In J. D. Puglisi (Ed.), Biophysics and the Challenges of Emerging Threats (p. 65). https://doi.org/10.1007/978-90-481-2368-1_5\nMahabal, A. A., Drake, A. J., Djorgovski, S. G., Donalek, C., Glikman, E., Graham, M. J., et al. (2007) Time Domain Exploration with the Palomar-QUEST Sky Survey American Astronomical Society Meeting Abstracts #210, 210, 21.04.\n., S. N. A., & ., E. C. O. (2007) Analysis of Thermal Losses in the Flat-Plate Collector of a Thermosyphon Solar Water Heater Research Journal of Physics, 1(1), 35–41. https://doi.org/10.3923/rjp.2007.35.41\nMiller, J. L. (1995) Spacecraft navigation requirements In In AGARD (pp. 390–405).\nNayfeh, A. H., & Balachandran, B. (1995) Applied nonlinear dynamics: analytical, computational and experimental methods Wiley series in nonlinear science, New York; Chichester: Wiley, |c1995.\nGinsparg, P. (1988) Applied Conformal Field Theory arXiv e-prints (hep-th/9108028).\nKhatib, A. R., Ellis, J., French, J., Null, G., Yunck, T., & Wu, S. (1983) Autonomous navigation using lunar beacons In AIAA, Aerospace Sciences Meeting.\nThornton, P. E., Thornton, M. M., Mayer, B. W., Wilhelmi, N., Wei, Y., Devarakonda, R., & Cook, R. (2012) Daymet: Daily surface weather on a 1 km grid for North America, 1980-2008 Oak Ridge National Laboratory (ORNL) Distributed Active Archive Center for Biogeochemical Dynamics (DAAC. 10.3334/ORNLDAAC/1219\nDhaygude, A., & Desai, S. (2020) Generalized Lomb–Scargle analysis of 36Cl decay rate measurements at PTB and BNL European Physical Journal C. https://doi.org/10.1140/epjc/s10052-020-7683-610.48550/arXiv.1912.06970\n"} +data_agu= {'msg': 'Retrieved 24 abstracts, starting with number 1.', 'export': "No author. (2018). Book reviews. Weather, 73(1), 35–35. https://doi.org/10.1002/wea.3072\nFal\'ko, V., & Thomas, C.-W. (2018). 2D Materials: maintaining editorial quality. 2D Materials, 5(1), 010201. https://doi.org/10.1088/2053-1583/aa9403\nParkin, S., Chantrell, R., & Chang, C.-R. (2018). Obituary: In Memoriam Professor Dr. Shoucheng Zhang, Consulting Editor. Spin, 8(4), 1877001. https://doi.org/10.1142/S2010324718770015\nDessauges-Zavadsky, M., & Pfenniger, D. (2018). Millimeter Astronomy (SAAS...38). Millimeter Astronomy: Saas-Fee Advanced Course 38. Swiss Society for Astrophysics and Astronomy, Saas-Fee Advanced Course, Volume 38. ISBN 978-3-662-57545-1. Springer-Verlag GmbH Germany, part of Springer Nature, 2018 (Vol. 38). https://doi.org/10.1007/978-3-662-57546-8\nPustilnik, M., van Heck, B., Lutchyn, R. M., & Glazman, L. I. (2018). Erratum: Quantum Criticality in Resonant Andreev Conduction [Phys. Rev. Lett. 119, 116802 (2017)]. Physical Review Letters, 120(2), 029901. https://doi.org/10.1103/PhysRevLett.120.029901\nCarton, D. (2017). Resolving Gas-Phase Metallicity In Galaxies (PhDT). Ph.D. Thesis, Leiden University. https://doi.org/10.5281/zenodo.581221\nKohler, S. (2017). A 3D View of a Supernova Remnant. AAS Nova Highlights (2388).\nGreen, D. W. E. (2017). Potential New Meteor Shower from Comet C/2015 D4 (Borisov) (CBET.4403). Central Bureau Electronic Telegrams (Vol. 4403, p. 2).\nCasey, A. R. (2017). sick: Spectroscopic inference crank. Astrophysics Source Code Library. ascl:1706.009\nSiltala, J., Jetsu, L., Hackman, T., Henry, G. W., Immonen, L., Kajatkari, P., et al. (2017). VizieR Online Data Catalog: BM CVn V-band differential light curve (Siltala+, 2017). VizieR Online Data Catalog (J/AN/338/453).\nWaagen, E. O. (2017). V694 Mon (MWC 560) spectroscopy requested (AAVSN.429). AAVSO Special Notice #429 (Vol. 429, p. 1).\nYan, L. (2017). Confirm the Nature of a TDE Candidate in ULIRG F01004-2237 Using Spitzer mid-IR Light Curves. Spitzer Proposal, 13168.\nAzankpo, S. (2017). Surface Accuracy and Pointing Error Prediction of a 32 m Diameter Class Radio Astronomy Telescope (MsT). Masters Thesis, University of Stellenbosch.\nRotaru, A., Pteancu, M., & Zaharia, C. (2016). The penumbral Moon\'s eclipse form 16 september 2016 (emo6.rept). http://www.astronomy.ro/forum/viewtopic.php?p=159287#159287 (Comments in Romanian).\nVelasco, S. (2016). Living on the edge: Adaptive Optics+Lucky Imaging. IAC Talks, Astronomy and Astrophysics Seminars from the Instituto de Astrofísica de Canarias, p. 872.\nLiu, C. W., Alekseyev, V. Y., Allwardt, J. R., Bankovich, A. J., Cade-Menun, B. J., Davis, R. W., et al. (2009). The Diversity of Nuclear Magnetic Resonance Spectroscopy. In J. D. Puglisi (Ed.), Biophysics and the Challenges of Emerging Threats (p. 65). https://doi.org/10.1007/978-90-481-2368-1_5\nMahabal, A. A., Drake, A. J., Djorgovski, S. G., Donalek, C., Glikman, E., Graham, M. J., et al. (2007). Time Domain Exploration with the Palomar-QUEST Sky Survey. American Astronomical Society Meeting Abstracts #210, 210, 21.04.\n., S. N. A., & ., E. C. O. (2007). Analysis of Thermal Losses in the Flat-Plate Collector of a Thermosyphon Solar Water Heater. Research Journal of Physics, 1(1), 35–41. https://doi.org/10.3923/rjp.2007.35.41\nMiller, J. L. (1995). Spacecraft navigation requirements. In In AGARD (pp. 390–405).\nNayfeh, A. H., & Balachandran, B. (1995). Applied nonlinear dynamics: analytical, computational and experimental methods. Wiley series in nonlinear science, New York; Chichester: Wiley, |c1995.\nGinsparg, P. (1988). Applied Conformal Field Theory. arXiv e-prints (hep-th/9108028).\nKhatib, A. R., Ellis, J., French, J., Null, G., Yunck, T., & Wu, S. (1983). Autonomous navigation using lunar beacons. In AIAA, Aerospace Sciences Meeting.\nThornton, P. E., Thornton, M. M., Mayer, B. W., Wilhelmi, N., Wei, Y., Devarakonda, R., & Cook, R. (2012). Daymet: Daily surface weather on a 1 km grid for North America, 1980-2008. Oak Ridge National Laboratory (ORNL) Distributed Active Archive Center for Biogeochemical Dynamics (DAAC. 10.3334/ORNLDAAC/1219\nDhaygude, A., & Desai, S. (2020). Generalized Lomb–Scargle analysis of 36Cl decay rate measurements at PTB and BNL. European Physical Journal C. https://doi.org/10.1140/epjc/s10052-020-7683-610.48550/arXiv.1912.06970\n"} data_gsa= {'msg': 'Retrieved 24 abstracts, starting with number 1.', 'export': "No author, 2018, Book reviews: Weather, v. 73, p. 35–35, doi:10.1002/wea.3072.\nFal'ko, V., and Thomas, C.-W., 2018, 2D Materials: maintaining editorial quality: 2D Materials, v. 5, 010201, doi:10.1088/2053-1583/aa9403.\nParkin, S., Chantrell, R., and Chang, C.-R., 2018, Obituary: In Memoriam Professor Dr. Shoucheng Zhang, Consulting Editor: Spin, v. 8, 1877001, doi:10.1142/S2010324718770015.\nDessauges-Zavadsky, M., and Pfenniger, D., 2018, Millimeter Astronomy: SAAS...38, doi:10.1007/978-3-662-57546-8.\nPustilnik, M., van Heck, B., Lutchyn, R.M., and Glazman, L.I., 2018, Erratum: Quantum Criticality in Resonant Andreev Conduction [Phys. Rev. Lett. 119, 116802 (2017)]: Physical Review Letters, v. 120, 029901, doi:10.1103/PhysRevLett.120.029901.\nCarton, D., 2017, Resolving Gas-Phase Metallicity In Galaxies [PhDT], doi:10.5281/zenodo.581221.\nKohler, S., 2017, A 3D View of a Supernova Remnant: AAS Nova Highlights, 2388.\nGreen, D.W.E., 2017, Potential New Meteor Shower from Comet C/2015 D4 (Borisov): CBET.4403, 2 p.\nCasey, A.R., 2017, sick: Spectroscopic inference crank: Astrophysics Source Code Library, ascl:1706.009, ascl:1706.009.\nSiltala, J. et al., 2017, VizieR Online Data Catalog: BM CVn V-band differential light curve (Siltala+, 2017): VizieR Online Data Catalog, J/AN/338/453.\nWaagen, E.O., 2017, V694 Mon (MWC 560) spectroscopy requested: AAVSN.429, 1 p.\nYan, L., 2017, Confirm the Nature of a TDE Candidate in ULIRG F01004-2237 Using Spitzer mid-IR Light Curves: Spitzer Proposal, p. 13168.\nAzankpo, S., 2017, Surface Accuracy and Pointing Error Prediction of a 32 m Diameter Class Radio Astronomy Telescope [MsT].\nRotaru, A., Pteancu, M., and Zaharia, C., 2016, The penumbral Moon's eclipse form 16 september 2016: emo6.rept.\nVelasco, S., 2016, Living on the edge: Adaptive Optics+Lucky Imaging: IAC Talks, Astronomy and Astrophysics Seminars from the Instituto de Astrofísica de Canarias, p. 872.\nLiu, C.W. et al., 2009, The Diversity of Nuclear Magnetic Resonance Spectroscopy, in Puglisi, J.D. ed., Biophysics and the Challenges of Emerging Threats, doi:10.1007/978-90-481-2368-1_5.\nMahabal, A.A. et al., 2007, Time Domain Exploration with the Palomar-QUEST Sky Survey: American Astronomical Society Meeting Abstracts #210, v. 210, 21.04.\n., S.N.A., and ., E.C.O., 2007, Analysis of Thermal Losses in the Flat-Plate Collector of a Thermosyphon Solar Water Heater: Research Journal of Physics, v. 1, p. 35–41, doi:10.3923/rjp.2007.35.41.\nMiller, J.L., 1995, Spacecraft navigation requirements, in In AGARD.\nNayfeh, A.H., and Balachandran, B., 1995, Applied nonlinear dynamics: analytical, computational and experimental methods.\nGinsparg, P., 1988, Applied Conformal Field Theory: arXiv e-prints, hep-th/9108028.\nKhatib, A.R., Ellis, J., French, J., Null, G., Yunck, T., and Wu, S., 1983, Autonomous navigation using lunar beacons, in AIAA, Aerospace Sciences Meeting.\nThornton, P.E., Thornton, M.M., Mayer, B.W., Wilhelmi, N., Wei, Y., Devarakonda, R., and Cook, R., 2012, Daymet: Daily surface weather on a 1 km grid for North America, 1980-2008: Oak Ridge National Laboratory (ORNL) Distributed Active Archive Center for Biogeochemical Dynamics (DAAC,, 10.3334/ORNLDAAC/1219.\nDhaygude, A., and Desai, S., 2020, Generalized Lomb–Scargle analysis of 36Cl decay rate measurements at PTB and BNL: European Physical Journal C,, doi:10.1140/epjc/s10052-020-7683-610.48550/arXiv.1912.06970.\n"} -data_ams= {'msg': 'Retrieved 24 abstracts, starting with number 1.', 'export': "No author, 2018: Book reviews 73, 35–35, https://doi.org/10.1002/wea.3072.\nFal'ko, V., and C.-W. Thomas, 2018: 2D Materials: maintaining editorial quality 5, 010201, https://doi.org/10.1088/2053-1583/aa9403.\nParkin, S., R. Chantrell, and C.-R. Chang, 2018: Obituary: In Memoriam Professor Dr. Shoucheng Zhang, Consulting Editor 8, 1877001, https://doi.org/10.1142/S2010324718770015.\nDessauges-Zavadsky, M., and D. Pfenniger, 2018: Millimeter Astronomy 38, https://doi.org/10.1007/978-3-662-57546-8.\nPustilnik, M., B. van Heck, R. M. Lutchyn, and L. I. Glazman, 2018: Erratum: Quantum Criticality in Resonant Andreev Conduction [Phys. Rev. Lett. 119, 116802 (2017)] 120, 029901, https://doi.org/10.1103/PhysRevLett.120.029901.\nCarton, D., 2017: Resolving Gas-Phase Metallicity In Galaxies https://doi.org/10.5281/zenodo.581221.\nKohler, S., 2017: A 3D View of a Supernova Remnant 2388.\nGreen, D. W. E., 2017: Potential New Meteor Shower from Comet C/2015 D4 (Borisov) 4403, 2.\nCasey, A. R., 2017: sick: Spectroscopic inference crank ascl:1706.009, ascl:1706.009.\nSiltala, J., 2017: VizieR Online Data Catalog: BM CVn V-band differential light curve (Siltala+, 2017) J/AN/338/453.\nWaagen, E. O., 2017: V694 Mon (MWC 560) spectroscopy requested 429, 1.\nYan, L., 2017: Confirm the Nature of a TDE Candidate in ULIRG F01004-2237 Using Spitzer mid-IR Light Curves 13168.\nAzankpo, S., 2017: Surface Accuracy and Pointing Error Prediction of a 32 m Diameter Class Radio Astronomy Telescope 2.\nRotaru, A., M. Pteancu, and C. Zaharia, 2016: The penumbral Moon's eclipse form 16 september 2016.\nVelasco, S., 2016: Living on the edge: Adaptive Optics+Lucky Imaging 872.\nLiu, C. W., 2009: The Diversity of Nuclear Magnetic Resonance Spectroscopy. Biophysics and the Challenges of Emerging Threats, J.D. Puglisi, Ed., p. 65, https://doi.org/10.1007/978-90-481-2368-1_5.\nMahabal, A. A., 2007: Time Domain Exploration with the Palomar-QUEST Sky Survey 210, 21.04.\n., S. N. A., and E. C. O. ., 2007: Analysis of Thermal Losses in the Flat-Plate Collector of a Thermosyphon Solar Water Heater 1, 35–41, https://doi.org/10.3923/rjp.2007.35.41.\nMiller, J. L., 1995: Spacecraft navigation requirements. In AGARD, 390–405.\nNayfeh, A. H., and B. Balachandran, 1995: Applied nonlinear dynamics: analytical, computational and experimental methods.\nGinsparg, P., 1988: Applied Conformal Field Theory hep-th/9108028.\nKhatib, A. R., J. Ellis, J. French, G. Null, T. Yunck, and S. Wu, 1983: Autonomous navigation using lunar beacons. AIAA, Aerospace Sciences Meeting.\nThornton, P. E., M. M. Thornton, B. W. Mayer, N. Wilhelmi, Y. Wei, R. Devarakonda, and R. Cook, 2012: Daymet: Daily surface weather on a 1 km grid for North America, 1980-2008, 10.3334/ORNLDAAC/1219.\nDhaygude, A., and S. Desai, 2020: Generalized Lomb–Scargle analysis of 36Cl decay rate measurements at PTB and BNL https://doi.org/10.1140/epjc/s10052-020-7683-610.48550/arXiv.1912.06970.\n"} +data_ams= {'msg': 'Retrieved 24 abstracts, starting with number 1.', 'export': "No author, 2018: Book reviews Weather, 73, 35–35, https://doi.org/10.1002/wea.3072.\nFal\'ko, V., and C.-W. Thomas, 2018: 2D Materials: maintaining editorial quality 2D Materials, 5, 010201, https://doi.org/10.1088/2053-1583/aa9403.\nParkin, S., R. Chantrell, and C.-R. Chang, 2018: Obituary: In Memoriam Professor Dr. Shoucheng Zhang, Consulting Editor Spin, 8, 1877001, https://doi.org/10.1142/S2010324718770015.\nDessauges-Zavadsky, M., and D. Pfenniger, 2018: Millimeter Astronomy Millimeter Astronomy: Saas-Fee Advanced Course 38. Swiss Society for Astrophysics and Astronomy, Saas-Fee Advanced Course, Volume 38. ISBN 978-3-662-57545-1. Springer-Verlag GmbH Germany, part of Springer Nature, 2018, 38, https://doi.org/10.1007/978-3-662-57546-8.\nPustilnik, M., B. van Heck, R. M. Lutchyn, and L. I. Glazman, 2018: Erratum: Quantum Criticality in Resonant Andreev Conduction [Phys. Rev. Lett. 119, 116802 (2017)] Physical Review Letters, 120, 029901, https://doi.org/10.1103/PhysRevLett.120.029901.\nCarton, D., 2017: Resolving Gas-Phase Metallicity In Galaxies Ph.D. Thesis, https://doi.org/10.5281/zenodo.581221.\nKohler, S., 2017: A 3D View of a Supernova Remnant AAS Nova Highlights, 2388.\nGreen, D. W. E., 2017: Potential New Meteor Shower from Comet C/2015 D4 (Borisov) Central Bureau Electronic Telegrams, 4403, 2.\nCasey, A. R., 2017: sick: Spectroscopic inference crank Astrophysics Source Code Library, ascl:1706.009, ascl:1706.009.\nSiltala, J., 2017: VizieR Online Data Catalog: BM CVn V-band differential light curve (Siltala+, 2017) VizieR Online Data Catalog, J/AN/338/453.\nWaagen, E. O., 2017: V694 Mon (MWC 560) spectroscopy requested AAVSO Special Notice #429, 429, 1.\nYan, L., 2017: Confirm the Nature of a TDE Candidate in ULIRG F01004-2237 Using Spitzer mid-IR Light Curves Spitzer Proposal, 13168.\nAzankpo, S., 2017: Surface Accuracy and Pointing Error Prediction of a 32 m Diameter Class Radio Astronomy Telescope Masters Thesis, 2.\nRotaru, A., M. Pteancu, and C. Zaharia, 2016: The penumbral Moon\'s eclipse form 16 september 2016 http://www.astronomy.ro/forum/viewtopic.php?p=159287#159287 (Comments in Romanian),.\nVelasco, S., 2016: Living on the edge: Adaptive Optics+Lucky Imaging IAC Talks, Astronomy and Astrophysics Seminars from the Instituto de Astrofísica de Canarias, 872.\nLiu, C. W., 2009: The Diversity of Nuclear Magnetic Resonance Spectroscopy. Biophysics and the Challenges of Emerging Threats, J.D. Puglisi, Ed., p. 65, https://doi.org/10.1007/978-90-481-2368-1_5.\nMahabal, A. A., 2007: Time Domain Exploration with the Palomar-QUEST Sky Survey American Astronomical Society Meeting Abstracts #210, 210, 21.04.\n., S. N. A., and E. C. O. ., 2007: Analysis of Thermal Losses in the Flat-Plate Collector of a Thermosyphon Solar Water Heater Research Journal of Physics, 1, 35–41, https://doi.org/10.3923/rjp.2007.35.41.\nMiller, J. L., 1995: Spacecraft navigation requirements. In AGARD, 390–405.\nNayfeh, A. H., and B. Balachandran, 1995: Applied nonlinear dynamics: analytical, computational and experimental methods.\nGinsparg, P., 1988: Applied Conformal Field Theory arXiv e-prints, hep-th/9108028.\nKhatib, A. R., J. Ellis, J. French, G. Null, T. Yunck, and S. Wu, 1983: Autonomous navigation using lunar beacons. AIAA, Aerospace Sciences Meeting.\nThornton, P. E., M. M. Thornton, B. W. Mayer, N. Wilhelmi, Y. Wei, R. Devarakonda, and R. Cook, 2012: Daymet: Daily surface weather on a 1 km grid for North America, 1980-2008 Oak Ridge National Laboratory (ORNL) Distributed Active Archive Center for Biogeochemical Dynamics (DAAC,, 10.3334/ORNLDAAC/1219.\nDhaygude, A., and S. Desai, 2020: Generalized Lomb–Scargle analysis of 36Cl decay rate measurements at PTB and BNL European Physical Journal C, https://doi.org/10.1140/epjc/s10052-020-7683-610.48550/arXiv.1912.06970.\n"} diff --git a/exportsrv/tests/unittests/test_export_service.py b/exportsrv/tests/unittests/test_export_service.py index 839ac48..b98438f 100755 --- a/exportsrv/tests/unittests/test_export_service.py +++ b/exportsrv/tests/unittests/test_export_service.py @@ -361,17 +361,18 @@ def test_xml_no_data(self): def test_csl(self): """ test views return_csl_format_export when succeed for each format """ - export_format = 2 + export_format = adsFormatter.unicode journal_macro = 1 for csl_style in ['aastex','icarus','mnras', 'soph', 'aspc', 'apsj', 'aasj', 'ieee', 'agu', 'gsa', 'ams']: response = views.return_csl_format_export(solrdata.data, csl_style, export_format, journal_macro, adsOutputFormat.classic) assert(response._status_code == 200) + assert(response.json['msg'] == "Retrieved 24 abstracts, starting with number 1.") def test_csl_no_data(self): """ test views return_csl_format_export when error for each format """ - export_format = 2 + export_format = adsFormatter.unicode journal_macro = 1 for csl_style in ['aastex','icarus','mnras', 'soph', 'aspc', 'apsj', 'aasj', 'ieee', 'agu', 'gsa', 'ams']: response = views.return_csl_format_export(None, csl_style, export_format, journal_macro, adsOutputFormat.classic) @@ -767,9 +768,9 @@ def test_tmp_bibcode_format(self): 'apsj': u'P. Aharon, (2005). doi:10.1007/s00367-005-0006-y.\n', 'aasj': u'\\bibitem[Aharon(2005)]{2005GML...tmp....1A} Aharon, P.\\ 2005, Geo-Marine Letters. doi:10.1007/s00367-005-0006-y.\n', 'ieee': u'[1]Aharon, P., “Catastrophic flood outbursts in mid-continent left imprints in the Gulf of Mexico”, Geo-Marine Letters, 2005. doi:10.1007/s00367-005-0006-y.\n', - 'agu': u'Aharon, P. (2005) Catastrophic flood outbursts in mid-continent left imprints in the Gulf of Mexico Geo-marine Letters. https://doi.org/10.1007/s00367-005-0006-y\n', + 'agu': u'Aharon, P. (2005). Catastrophic flood outbursts in mid-continent left imprints in the Gulf of Mexico. Geo-marine Letters. https://doi.org/10.1007/s00367-005-0006-y\n', 'gsa': u'Aharon, P., 2005, Catastrophic flood outbursts in mid-continent left imprints in the Gulf of Mexico: Geo-Marine Letters,, doi:10.1007/s00367-005-0006-y.\n', - 'ams': u'Aharon, P., 2005: Catastrophic flood outbursts in mid-continent left imprints in the Gulf of Mexico https://doi.org/10.1007/s00367-005-0006-y.\n', + 'ams': u'Aharon, P., 2005: Catastrophic flood outbursts in mid-continent left imprints in the Gulf of Mexico Geo-Marine Letters, https://doi.org/10.1007/s00367-005-0006-y.\n', } cls_default_formats = [adsFormatter.latex] * 6 + [adsFormatter.unicode] * 5 @@ -791,7 +792,7 @@ def test_encode_doi(self): 'apsj': u'E.~W. Greisen, in {\\bf 285}, 109. doi:10.1007/0-306-48080-8_7.\n', 'aasj': u'\\bibitem[Greisen(2003)]{2003ASSL..285..109G} Greisen, E. W.\\ 2003, Information Handling in Astronomy - Historical Vistas, 109. doi:10.1007/0-306-48080-8\\_7.\n', 'ieee': u'[1]Greisen, E. W., “AIPS, the VLA, and the VLBA”, in Information Handling in Astronomy - Historical Vistas, vol. 285, A. Heck, Ed. 2003, p. 109. doi:10.1007/0-306-48080-8_7.\n', - 'agu': u'Greisen, E. W. (2003) AIPS, the VLA, and the VLBA In A. Heck (Ed.), Information Handling in Astronomy - Historical Vistas (Vol. 285, p. 109). https://doi.org/10.1007/0-306-48080-8_7\n', + 'agu': u'Greisen, E. W. (2003). AIPS, the VLA, and the VLBA. In A. Heck (Ed.), Information Handling in Astronomy - Historical Vistas (Vol. 285, p. 109). https://doi.org/10.1007/0-306-48080-8_7\n', 'gsa': u'Greisen, E.W., 2003, AIPS, the VLA, and the VLBA, in Heck, A. ed., Information Handling in Astronomy - Historical Vistas, doi:10.1007/0-306-48080-8_7.\n', 'ams': u'Greisen, E. W., 2003: AIPS, the VLA, and the VLBA. Information Handling in Astronomy - Historical Vistas, A. Heck, Ed., Vol. 285 of, p. 109, https://doi.org/10.1007/0-306-48080-8_7.\n', }