Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix (some) fetcher tests #11073

Merged
merged 7 commits into from
Mar 22, 2024
Merged

Fix (some) fetcher tests #11073

merged 7 commits into from
Mar 22, 2024

Conversation

subhramit
Copy link
Member

@subhramit subhramit commented Mar 22, 2024

This pull request is a collection of inspections and tiny commits in attempt to fix a few failing fetcher tests.

  1. ADS fetcher: On inspection of the error logs, it appears that the mismatch is at the "keywords" field of the BibTeX entry. Our test expects additional values "Lunar and Planetary Exploration; Planets, Earth Science" at the end of the keywords list, while the actual entry does not have these additional keywords (Refer manually retrieved json below):
{
  "msg": "Retrieved 1 abstracts, starting with number 1.",
  "export": "@ARTICLE{1982Icar...52...62I,\n       author = {{Ingersoll}, A.~P. and {Pollard}, D.},\n        title = \"{Motion in the interiors and atmospheres of Jupiter and Saturn: scale analysis, anelastic equations, barotropic stability criterion}\",\n      journal = {\\icarus},\n     keywords = {Atmospheric Circulation, Barotropic Flow, Convective Flow, Flow Stability, Jupiter Atmosphere, Rotating Fluids, Saturn Atmosphere, Adiabatic Flow, Anelasticity, Compressible Fluids, Planetary Rotation, Rotating Cylinders, Scaling Laws, Wind Profiles, PLANETS, JUPITER, SATURN, MOTION, INTERIORS, ATMOSPHERE, ANALYSIS, SCALE, BAROTROPY, CHARACTERISTICS, STRUCTURE, WINDS, VISCOSITY, DATA, CONVECTION, ROTATION, EDDY EFFECTS, ENERGY, ADIABATICITY, DIAGRAMS, REVIEW, LATITUDE, ZONES, VELOCITY, MATHEMATICAL MODELS, HEAT FLOW, EQUATIONS OF MOTION, FLUIDS, DYNAMICS, TEMPERATURE, GRADIENTS},\n         year = 1982,\n        month = oct,\n       volume = {52},\n       number = {1},\n        pages = {62-80},\n     abstract = \"{If Jupiter's and Saturn's fluid interiors were inviscid and adiabatic,\n        any steady zonal motion would take the form of differentially\n        rotating cylinders concentric about the planetary axis of\n        rotation. B. A. Smith et al. [ Science215, 504-537 (1982)]\n        showed that Saturn's observed zonal wind profile extends a\n        significant distance below cloud base. Further extension into\n        the interior occurs if the values of the eddy viscosity and\n        superadiabaticity are small. We estimate these values using a\n        scaling analysis of deep convection in the presence of\n        differential rotation. The differential rotation inhibits the\n        convection and reduces the effective eddy viscosity. Viscous\n        dissipation of zonal mean kinetic energy is then within the\n        bounds set by the internal heat source. The differential\n        rotation increases the superadiabaticity, but not so much as to\n        eliminate the cylindrical structure of the flow. Very large\n        departures from adiabaticity, necessary for decoupling the\n        atmosphere and interior, do not occur. Using our scaling\n        analysis we develop the anelastic equations that describe\n        motions in Jupiter's and Saturn's interiors. A simple problem is\n        solved, that of an adiabatic fluid with a steady zonal wind\n        varying as a function of cylindrical radius. Low zonal\n        wavenumber perturbations are two dimensional (independent of the\n        axial coordinate) and obey a modified barotropic stability\n        equation. The parameter analogous to {\\ensuremath{\\beta}} is\n        negative and is three to four times larger than the\n        {\\ensuremath{\\beta}} for thin atmospheres. Jupiter's and\n        Saturn's observed zonal wind profiles are close to marginal\n        stability according to this deep sphere criterion, but are\n        several times supercritical according to the thin atmosphere\n        criterion.}\",\n          doi = {10.1016/0019-1035(82)90169-5},\n       adsurl = {https://ui.adsabs.harvard.edu/abs/1982Icar...52...62I},\n      adsnote = {Provided by the SAO/NASA Astrophysics Data System}\n}\n\n"
}
  1. DBLP fetcher: On inspection of the error logs, it appears that the only mismatch from what is expected and what is retrieved is at the "url" field, perhaps because the URL for the pdf file has changed since the test was written. The fetcher was retrieving the correct, updated URL, but the test was still expecting the old URL.

  2. Grobid service: On inspection of the same error logs above, it appears that a semicolon is missing in the "address" field value in test file. This too has been fixed.

Mandatory checks

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@subhramit subhramit marked this pull request as ready for review March 22, 2024 04:09
Copy link
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

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

Thank you for workin on this.

Yeah, investigating the test logs and adapting the expected values is mostly the thing to fix fetcher tests. - The reason is that we cannot control the external services what they return. They evolve independently from us.

@koppor koppor added this pull request to the merge queue Mar 22, 2024
Merged via the queue into JabRef:main with commit 6ab9106 Mar 22, 2024
20 of 21 checks passed
@subhramit subhramit deleted the fetcher-test-fix branch March 22, 2024 12:22
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants