Ouranosinc / pavics-sdi

Power Analytics and Visualization for Climate Science - Spatial Data Infrastructure
https://pavics-sdi.readthedocs.io
6 stars 2 forks source link

esgf-dap.ipynb: output change due to content change on server (CanESM5-1 added to query result) #287

Closed tlvu closed 1 year ago

tlvu commented 1 year ago

Fix this Jenkins failure:

  ________ pavics-sdi-master/docs/source/notebooks/esgf-dap.ipynb::Cell 0 ________
  Notebook cell execution failed
  Cell 0: Cell outputs differ

  Input:
  from pyesgf.search import SearchConnection

  # Create a connection for search on ESGF nodes. Note that setting `distrib=True` can lead to weird failures.
  conn = SearchConnection("https://esgf-node.llnl.gov/esg-search/", distrib=False)

  # Launch a search query.
  # Here we're looking for any variable related to humidity within the CMIP6 SSP2-4.5 experiment.
  # Results will be stored in a dictionary with keys defined by the `facets` argument.
  ctx = conn.new_context(
      project="CMIP6",
      experiment_id="ssp245",
      query="humidity",
      facets="variable_id,source_id",
  )

  print("Number of results: ", ctx.hit_count)
  print("Variables related to humidity: ")
  ctx.facet_counts["variable_id"]

  Traceback:
   mismatch 'stdout'

   assert reference_output == test_output failed:

    'Number of re... humidity: \n' == 'Number of re... humidity: \n'
    - Number of results:  10284
    ?                       ^
    + Number of results:  10084
    ?                       ^
      Variables related to humidity:

  ________ pavics-sdi-master/docs/source/notebooks/esgf-dap.ipynb::Cell 1 ________
  Notebook cell execution failed
  Cell 1: Cell outputs differ

  Input:
  # Now let's look for simulations that have the `hurs` variable and pick the first member.
  ctx.constrain(variable_id="hurs", ensemble="r1i1p1f1")
  ctx.facet_counts["source_id"]

  Traceback:
   mismatch 'text/plain'

   assert reference_output == test_output failed:

    "{'UKESM1-0-L...ESS-CM2': 57}" == "{'UKESM1-0-L...ESS-CM2': 57}"
    Skipping 650 identical leading characters in diff, use -v to show

    -  'CanESM5-1': 200,
       'CanESM5': 1033,
       'CNRM-ESM2-1': 108,
       'CNRM-CM6-1-HR': 19,
       'CNRM-CM6-1': 78,
       'CMCC-ESM2': 20,
       'CMCC-CM2-SR5': 18,
       'CIESM': 9,
       'CESM2-WACCM': 168,
       'CESM2': 184,
       'CAS-ESM2-0': 20,
       'CAMS-CSM1-0': 6,
       'BCC-CSM2-MR': 20,
       'AWI-CM-1-1-MR': 19,
       'ACCESS-ESM1-5': 406,
       'ACCESS-CM2': 57}
review-notebook-app[bot] commented 1 year ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

tlvu commented 1 year ago

Error below not related to my change:

From https://readthedocs.org/projects/pavics-sdi/builds/20377162/:

 python -m pip install --upgrade --upgrade-strategy eager --no-cache-dir .[docs]
Processing /home/docs/checkouts/readthedocs.org/user_builds/pavics-sdi/checkouts/287
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details. 
tlvu commented 1 year ago

Error below not related to my change:

From https://readthedocs.org/projects/pavics-sdi/builds/20377162/:

 python -m pip install --upgrade --upgrade-strategy eager --no-cache-dir .[docs]
Processing /home/docs/checkouts/readthedocs.org/user_builds/pavics-sdi/checkouts/287
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details. 

This makes no sense that "setuptools is not available in the build environment", 2 lines above we see this

python -m pip install --upgrade --no-cache-dir pip setuptools

Requirement already satisfied: pip in /home/docs/checkouts/readthedocs.org/user_builds/pavics-sdi/envs/287/lib/python3.7/site-packages (23.1.2)
Requirement already satisfied: setuptools in /home/docs/checkouts/readthedocs.org/user_builds/pavics-sdi/envs/287/lib/python3.7/site-packages (67.7.2)

I am going to merge anyways, since the error is either deeper or problem with ReadTheDocs itself.