Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Various fixes for Thredds v5 #341

Merged
merged 5 commits into from
Dec 5, 2024
Merged

Various fixes for Thredds v5 #341

merged 5 commits into from
Dec 5, 2024

Conversation

tlvu
Copy link
Contributor

@tlvu tlvu commented Nov 29, 2024

For Thredds v5 upgrade in bird-house/birdhouse-deploy#413.

For the following error and other output changes:

  _______ pavics-sdi-master/docs/source/notebooks/rendering.ipynb::Cell 2 ________
  Notebook cell execution failed
  Cell 2: Cell outputs differ

  Input:
  sorted(wms.contents["tasmax"].styles.keys())

  Traceback:
   mismatch 'text/plain'

   assert reference_output == test_output failed:

    "['boxfill/al...fill/sst_36']" == "['colored_co...ter/default']"

    - ['colored_contours/default',
    -  'contours',
    -  'default-scalar/default',
    -  'raster/default']
    + ['boxfill/alg',
    +  'boxfill/alg2',
    +  'boxfill/ferret',
    +  'boxfill/greyscale',
    +  'boxfill/ncview',
    +  'boxfill/occam',
    +  'boxfill/occam_pastel-30',
    +  'boxfill/rainbow',
    +  'boxfill/redblue',
    +  'boxfill/sst_36']

  _______ pavics-sdi-master/docs/source/notebooks/rendering.ipynb::Cell 3 ________
  Notebook cell execution failed
  Cell 3: Cell execution caused an exception

  Input:
  resp = wms.getmap(
      layers=["tasmax"],
      styles=["boxfill/occam"],
      format="image/png",
      colorscalerange=f"{mn},{mx}",
      size=[256, 256],
      srs="CRS:84",
      bbox=(150, 30, 250, 80),
      time="2006-02-15",
      transparent=True,
  )
  Image(resp.read())

  Traceback:

  ---------------------------------------------------------------------------
  ServiceException                          Traceback (most recent call last)
  Cell In[1], line 1
  ----> 1 resp = wms.getmap(
        2     layers=["tasmax"],
        3     styles=["boxfill/occam"],
        4     format="image/png",
        5     colorscalerange=f"{mn},{mx}",
        6     size=[256, 256],
        7     srs="CRS:84",
        8     bbox=(150, 30, 250, 80),
        9     time="2006-02-15",
       10     transparent=True,
       11 )
       12 Image(resp.read())

  File /opt/conda/envs/birdy/lib/python3.11/site-packages/owslib/map/wms130.py:309, in WebMapService_1_3_0.getmap(self, layers, styles, srs, bbox, format, size, time, elevation, dimensions, transparent, bgcolor, exceptions, method, timeout, **kwargs)
      305 data = urlencode(request)
      307 self.request = bind_url(base_url) + data
  --> 309 u = openURL(base_url, data, method, timeout=timeout or self.timeout, auth=self.auth, headers=self.headers)
      311 # need to handle casing in the header keys
      312 headers = {}

  File /opt/conda/envs/birdy/lib/python3.11/site-packages/owslib/util.py:210, in openURL(url_base, data, method, cookies, username, password, timeout, headers, verify, cert, auth)
      207 req = requests.request(method.upper(), url_base, headers=headers, **rkwargs)
      209 if req.status_code in [400, 401]:
  --> 210     raise ServiceException(req.text)
      212 if req.status_code in [404, 500, 502, 503, 504]:    # add more if needed
      213     req.raise_for_status()

  ServiceException: <ServiceExceptionReport version="1.3.0"
                          xmlns="http://www.opengis.net/ogc"
                          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                          xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd">
      <ServiceException code="StyleNotDefined">
          The layer tasmax does not support the style boxfill
      </ServiceException>
  </ServiceExceptionReport>

Output change:

  _ pavics-sdi-fix-for-Thredds-v5/docs/source/notebooks/CaSR_basic.ipynb::Cell 4 _
  Notebook cell execution failed
  Cell 4: Cell outputs differ

  Input:
  bbox.rotated_pole

  Traceback:
   mismatch 'text/plain'

   assert reference_output == test_output failed:

    '<xarray.Data...itude:    0.0' == '<xarray.Data...itude:    0.0'

    Skipping 138 identical leading characters in diff, use -v to show
    Skipping 67 identical trailing characters in diff, use -v to show
      utes:
    -     long_name:                    coordinates of the rotated North Pole
          earth_radius:                 6371220.0
          grid_mapping_name:            rotated_latitude_longitude
          grid_north_pole_latitude:     31.758316040039062
          grid_north_pole_longitude:    87.59703063964844
    +     long_name:                    coordinates of the rotated North Pole
          long

For the following error:
```
  _______ pavics-sdi-master/docs/source/notebooks/rendering.ipynb::Cell 2 ________
  Notebook cell execution failed
  Cell 2: Cell outputs differ

  Input:
  sorted(wms.contents["tasmax"].styles.keys())

  Traceback:
   mismatch 'text/plain'

   assert reference_output == test_output failed:

    "['boxfill/al...fill/sst_36']" == "['colored_co...ter/default']"

    - ['colored_contours/default',
    -  'contours',
    -  'default-scalar/default',
    -  'raster/default']
    + ['boxfill/alg',
    +  'boxfill/alg2',
    +  'boxfill/ferret',
    +  'boxfill/greyscale',
    +  'boxfill/ncview',
    +  'boxfill/occam',
    +  'boxfill/occam_pastel-30',
    +  'boxfill/rainbow',
    +  'boxfill/redblue',
    +  'boxfill/sst_36']

  _______ pavics-sdi-master/docs/source/notebooks/rendering.ipynb::Cell 3 ________
  Notebook cell execution failed
  Cell 3: Cell execution caused an exception

  Input:
  resp = wms.getmap(
      layers=["tasmax"],
      styles=["boxfill/occam"],
      format="image/png",
      colorscalerange=f"{mn},{mx}",
      size=[256, 256],
      srs="CRS:84",
      bbox=(150, 30, 250, 80),
      time="2006-02-15",
      transparent=True,
  )
  Image(resp.read())

  Traceback:

  ---------------------------------------------------------------------------
  ServiceException                          Traceback (most recent call last)
  Cell In[1], line 1
  ----> 1 resp = wms.getmap(
        2     layers=["tasmax"],
        3     styles=["boxfill/occam"],
        4     format="image/png",
        5     colorscalerange=f"{mn},{mx}",
        6     size=[256, 256],
        7     srs="CRS:84",
        8     bbox=(150, 30, 250, 80),
        9     time="2006-02-15",
       10     transparent=True,
       11 )
       12 Image(resp.read())

  File /opt/conda/envs/birdy/lib/python3.11/site-packages/owslib/map/wms130.py:309, in WebMapService_1_3_0.getmap(self, layers, styles, srs, bbox, format, size, time, elevation, dimensions, transparent, bgcolor, exceptions, method, timeout, **kwargs)
      305 data = urlencode(request)
      307 self.request = bind_url(base_url) + data
  --> 309 u = openURL(base_url, data, method, timeout=timeout or self.timeout, auth=self.auth, headers=self.headers)
      311 # need to handle casing in the header keys
      312 headers = {}

  File /opt/conda/envs/birdy/lib/python3.11/site-packages/owslib/util.py:210, in openURL(url_base, data, method, cookies, username, password, timeout, headers, verify, cert, auth)
      207 req = requests.request(method.upper(), url_base, headers=headers, **rkwargs)
      209 if req.status_code in [400, 401]:
  --> 210     raise ServiceException(req.text)
      212 if req.status_code in [404, 500, 502, 503, 504]:    # add more if needed
      213     req.raise_for_status()

  ServiceException: <ServiceExceptionReport version="1.3.0"
                          xmlns="http://www.opengis.net/ogc"
                          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                          xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd">
      <ServiceException code="StyleNotDefined">
          The layer tasmax does not support the style boxfill
      </ServiceException>
  </ServiceExceptionReport>
```
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

tlvu added 2 commits December 5, 2024 15:54
```
  _ pavics-sdi-fix-for-Thredds-v5/docs/source/notebooks/CaSR_basic.ipynb::Cell 4 _
  Notebook cell execution failed
  Cell 4: Cell outputs differ

  Input:
  bbox.rotated_pole

  Traceback:
   mismatch 'text/plain'

   assert reference_output == test_output failed:

    '<xarray.Data...itude:    0.0' == '<xarray.Data...itude:    0.0'

    Skipping 138 identical leading characters in diff, use -v to show
    Skipping 67 identical trailing characters in diff, use -v to show
      utes:
    -     long_name:                    coordinates of the rotated North Pole
          earth_radius:                 6371220.0
          grid_mapping_name:            rotated_latitude_longitude
          grid_north_pole_latitude:     31.758316040039062
          grid_north_pole_longitude:    87.59703063964844
    +     long_name:                    coordinates of the rotated North Pole
          long
tlvu added a commit to bird-house/birdhouse-deploy that referenced this pull request Dec 5, 2024
## Overview

Unidata has dropped support for TDS versions < 5.x. This updates Thredds
to version 5.5.

Requires matching update:
* Ouranosinc/pavics-sdi#341
* Ouranosinc/pavics-sdi#342
* Ouranosinc/PAVICS-landing#101

## Changes

**Non-breaking changes**
- Adds...
- New component version
pavics/thredds-docker:5.5-unidata-2024-11-19-with-tds-plugin-jar-with-dependencies.jar

**Breaking changes**
- None

## Related Issue / Discussion

- Resolves #168 

## Additional Information

Links to other issues or sources.

<!--
The test suite can be run using a different DACCS config with
``birdhouse_daccs_configs_branch: branch_name`` in the PR description.
To globally skip the test suite regardless of the commit message use
``birdhouse_skip_ci: true`` in the PR description.
-->

birdhouse_daccs_configs_branch: master
birdhouse_skip_ci: false
@tlvu tlvu merged commit 80564e5 into master Dec 5, 2024
2 checks passed
@tlvu tlvu deleted the fix-for-Thredds-v5 branch December 5, 2024 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant