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

Wms default time #676

Merged
merged 8 commits into from
Jul 26, 2021
Merged

Wms default time #676

merged 8 commits into from
Jul 26, 2021

Conversation

SpacemanPaul
Copy link
Contributor

@SpacemanPaul SpacemanPaul commented Jul 26, 2021

Addresses #673

Can now add to layer config:

   "default_time": "latest",    # Default behaviour - use the most recent available date as the default time, OR:
   "default_time": "earliest", # Use the earliest available date as the default time, OR:
   "default_time" : "2020-01-01",   # Use an explicitly defined date as the default time.
                                                # If the explicit date is NOT a valid date for the layer, a warning is raised, and 
                                                # the layer reverts to the default behaviour ("latest").
                                                # Note that this warning will be raised repeatedly on dynamic layers.

The default date is only published in metadata by WMS.

The default also applies to WMTS, and WCS1 requests with no user-selected time, but there is no way for a client to know what the default date is.

WCS2 requests with no dates select ALL available dates, as per the spec.

NB. Also fixes breakages introduced by xarray 0.19.0

@codecov
Copy link

codecov bot commented Jul 26, 2021

Codecov Report

Merging #676 (1c1a7b4) into master (8687c50) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #676      +/-   ##
==========================================
+ Coverage   90.73%   90.76%   +0.02%     
==========================================
  Files          43       43              
  Lines        5691     5708      +17     
==========================================
+ Hits         5164     5181      +17     
  Misses        527      527              
Impacted Files Coverage Δ
datacube_ows/ows_configuration.py 96.79% <100.00%> (+0.05%) ⬆️
datacube_ows/styles/hybrid.py 90.90% <100.00%> (ø)
datacube_ows/styles/ramp.py 74.21% <100.00%> (ø)
datacube_ows/wcs1_utils.py 96.19% <100.00%> (ø)

@SpacemanPaul SpacemanPaul requested a review from pindge July 26, 2021 05:49
@SpacemanPaul SpacemanPaul merged commit 92e9e80 into master Jul 26, 2021
@delete-merged-branch delete-merged-branch bot deleted the wms_default_time branch July 26, 2021 05: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.

2 participants