From 5829eaed98764b2037cc77b9fb9c9e0304c1310d Mon Sep 17 00:00:00 2001 From: Dominik Voigt Date: Sun, 4 Oct 2020 18:36:57 +0200 Subject: [PATCH] Fix/arxiv test (#6980) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Squashed 'src/main/resources/csl-styles/' changes from bf698acec7..827b986621 827b986621 add DOI preprint to american-society-for-microbiology.csl (#4946) 7cab2f7d8a Create depro-ufs.csl (#4947) 2fcda1fe03 Create journal-of-sport-science-and-medicine.csl (#4949) cd457d4bce Update american-marketing-association.csl (#4945) cacc4eefbd Create nejm-catalyst.csl (#4943) bd769b91da Update and rename dependent/chinese-medical-journal.csl to chinese-me… (#4941) 1f706cda6c Update health-services-research.csl (#4939) 76bcd1d9d7 Update journal-of-the-royal-society-of-western-australia.csl (#4932) e79640e74d Create afro-asia.csl (#4934) c601aa4e0f Update lancaster-university-harvard.csl (#4938) 184fd90210 Update collection-du-centre-jean-berard.csl (#4936) 82f9aec90f fix et-al & add DOI thyroid.csl (#4937) 4af169fc11 Create universidade-estadual-de-alagoas-uneal-abnt (#4885) 47165b3d5a Update and rename medical-physics.csl to dependent/medical-physics.csl (AMA) (#4905) 3cab27dc1a Update thieme-german.csl (#4931) eb2c9776e0 Create zeitschrift-fur-zahnarztliche-implantologie.csl (#4925) 4adb1ea0be Create karstenia.csl (#4929) 530a136786 Fix author substitute in Universita Cattolica git-subtree-dir: src/main/resources/csl-styles git-subtree-split: 827b986621348627f8e894d1b7f11191f905a8e2 * Squashed 'src/main/resources/csl-styles/' changes from 827b986621..eb0d37e0ff eb0d37e0ff Create natbib-plainnat-author-dat.csl (#4967) fb1592a1cd Update journal-of-fish-biology.csl (#4969) f6876cbe0f Update .travis.yml (#4970) d6d400b207 Create london-review-of-international-law.csl (#4966) d2a5ae1b16 Update harvard-stellenbosch-university.csl (#4965) 9c62141a40 Create phytopathologia-mediterranea.csl (#4964) 8ca2ea1a9c Update historical-materialism.csl (#4960) 80456dc749 Update historical-materialism.csl be2d91090c Update historical-materialism.csl 1d1cf095a6 Create atlande.csl (#4930) 89f41d404d Create juristische-zitierweise-oeffentliches-recht.csl (#4944) 8c677a08c5 Create korean-journal-of-gastroenterology.csl (#4954) eadb9508dd Create historical-materialism.csl (#4955) 5553dcdc9c Create revista-materia.csl (#4957) d23a3abd79 Bug fix in APA 6 original publication macro (#4959) 66f9974980 Always print publisher in APA 6th edition (#4899) 868809c063 Create agora.csl (#4940) 99c19c397e Update anthropologie-et-societes.csl (#4952) ee17423a93 Create critical-reviews-in-solid-state-and-materials-science.csl (#4951) 7a13a7d59e Create korean-journal-of-internal-medicine.csl (#4953) git-subtree-dir: src/main/resources/csl-styles git-subtree-split: eb0d37e0ff253e7c6d256b619e4831af306a28cf * Adapt arxiv phrase test Co-authored-by: github actions --- .../logic/importer/fetcher/ArXivTest.java | 44 ++++++++++++------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/src/test/java/org/jabref/logic/importer/fetcher/ArXivTest.java b/src/test/java/org/jabref/logic/importer/fetcher/ArXivTest.java index cb578025ad5..20b0b6e401e 100644 --- a/src/test/java/org/jabref/logic/importer/fetcher/ArXivTest.java +++ b/src/test/java/org/jabref/logic/importer/fetcher/ArXivTest.java @@ -249,29 +249,39 @@ public String getTestJournal() { return "\"Journal of Geometry and Physics (2013)\""; } + /** + * A phrase is a sequence of terms wrapped in quotes. + * Only documents that contain exactly this sequence are returned. + */ @Test public void supportsPhraseSearch() throws Exception { + List resultWithPhraseSearch = fetcher.performSearch("ti:\"Taxonomy of Distributed\""); + List resultWithOutPhraseSearch = fetcher.performSearch("ti:Taxonomy AND ti:of AND ti:Distributed"); + // Phrase search result has to be subset of the default search result + assertTrue(resultWithOutPhraseSearch.containsAll(resultWithPhraseSearch)); + } + + /** + * A phrase is a sequence of terms wrapped in quotes. + * Only documents that contain exactly this sequence are returned. + */ + @Test + public void supportsPhraseSearchAndMatchesExact() throws Exception { BibEntry expected = new BibEntry(StandardEntryType.Article) - .withField(StandardField.AUTHOR, "Tobias Büscher and Angel L. Diez and Gerhard Gompper and Jens Elgeti") - .withField(StandardField.TITLE, "Instability and fingering of interfaces in growing tissue") - .withField(StandardField.DATE, "2020-03-10") - .withField(StandardField.ABSTRACT, "Interfaces in tissues are ubiquitous, both between tissue and environment as well as between populations of different cell types. The propagation of an interface can be driven mechanically. % e.g. by a difference in the respective homeostatic stress of the different cell types. Computer simulations of growing tissues are employed to study the stability of the interface between two tissues on a substrate. From a mechanical perspective, the dynamics and stability of this system is controlled mainly by four parameters of the respective tissues: (i) the homeostatic stress (ii) cell motility (iii) tissue viscosity and (iv) substrate friction. For propagation driven by a difference in homeostatic stress, the interface is stable for tissue-specific substrate friction even for very large differences of homeostatic stress; however, it becomes unstable above a critical stress difference when the tissue with the larger homeostatic stress has a higher viscosity. A small difference in directed bulk motility between the two tissues suffices to result in propagation with a stable interface, even for otherwise identical tissues. Larger differences in motility force, however, result in a finite-wavelength instability of the interface. Interestingly, the instability is apparently bound by nonlinear effects and the amplitude of the interface undulations only grows to a finite value in time.") - .withField(StandardField.DOI, "10.1088/1367-2630/ab9e88") - .withField(StandardField.EPRINT, "2003.04601") - .withField(StandardField.DOI, "10.1088/1367-2630/ab9e88") - .withField(StandardField.FILE, ":http\\://arxiv.org/pdf/2003.04601v1:PDF") + .withField(StandardField.AUTHOR, "Fauzi Adi Rafrastara and Qi Deyu") + .withField(StandardField.TITLE, "A Survey and Taxonomy of Distributed Data Mining Research Studies: A Systematic Literature Review") + .withField(StandardField.DATE, "2020-09-14") + .withField(StandardField.ABSTRACT, "Context: Data Mining (DM) method has been evolving year by year and as of today there is also the enhancement of DM technique that can be run several times faster than the traditional one, called Distributed Data Mining (DDM). It is not a new field in data processing actually, but in the recent years many researchers have been paying more attention on this area. Problems: The number of publication regarding DDM in high reputation journals and conferences has increased significantly. It makes difficult for researchers to gain a comprehensive view of DDM that require further research. Solution: We conducted a systematic literature review to map the previous research in DDM field. Our objective is to provide the motivation for new research by identifying the gap in DDM field as well as the hot area itself. Result: Our analysis came up with some conclusions by answering 7 research questions proposed in this literature review. In addition, the taxonomy of DDM research area is presented in this paper. Finally, this systematic literature review provides the statistic of development of DDM since 2000 to 2015, in which this will help the future researchers to have a comprehensive overview of current situation of DDM.") + .withField(StandardField.EPRINT, "2009.10618") + .withField(StandardField.FILE, ":http\\://arxiv.org/pdf/2009.10618v1:PDF") .withField(StandardField.EPRINTTYPE, "arXiv") - .withField(StandardField.EPRINTCLASS, "q-bio.TO") - .withField(StandardField.KEYWORDS, "q-bio.TO"); + .withField(StandardField.EPRINTCLASS, "cs.DC") + .withField(StandardField.KEYWORDS, "cs.DC, cs.LG"); - List resultWithPhraseSearch = fetcher.performSearch("au:\"Tobias Diez\""); - List resultWithOutPhraseSearch = fetcher.performSearch("au:Tobias Diez"); - // Ensure that phrase search result is just a subset of the default search result - assertTrue(resultWithOutPhraseSearch.containsAll(resultWithPhraseSearch)); - resultWithOutPhraseSearch.removeAll(resultWithPhraseSearch); + List resultWithPhraseSearch = fetcher.performSearch("ti:\"Taxonomy of Distributed\""); - // There is only a single paper found by searching for Tobias Diez as author that is not authored by "Tobias Diez". - assertEquals(Collections.singletonList(expected), resultWithOutPhraseSearch); + // There is only a single paper found by searching that contains the exact sequence "Taxonomy of Distributed" in the title. + assertEquals(Collections.singletonList(expected), resultWithPhraseSearch); } @Test