-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
EDR CoverageJSON conformance fixes: time axis and demo data #1814
base: master
Are you sure you want to change the base?
Changes from 14 commits
5cf2ee3
1b5432c
3fc3b5f
2feee54
d583d32
f0c2dd0
d3c6726
dfce634
00ea4c4
bc7623e
8531e40
baf9c7c
9c0be8b
57fb90f
76fd130
52bec0f
6b91024
83ef1ac
b3a7071
474cb60
d240a82
e736fa3
179c90f
3bdeefe
c38ad33
368fc34
1431963
e6436eb
12f9c5d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be already addressed in upstream pygeoapi |
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -123,7 +123,7 @@ def test_get_collection_edr_query(config, api_): | |||||||
# bounded date range | ||||||||
req = mock_api_request({ | ||||||||
'coords': 'POINT(11 11)', | ||||||||
'datetime': '2000-01-17/2000-06-16' | ||||||||
'datetime': '2000-01-17/2000-08-16' | ||||||||
}) | ||||||||
rsp_headers, code, response = get_collection_edr_query( | ||||||||
api_, req, 'icoads-sst', None, 'position') | ||||||||
|
@@ -132,14 +132,17 @@ def test_get_collection_edr_query(config, api_): | |||||||
data = json.loads(response) | ||||||||
time_dict = data['domain']['axes']['TIME'] | ||||||||
|
||||||||
assert time_dict['start'] == '2000-02-15T16:29:05.999999999' | ||||||||
assert time_dict['stop'] == '2000-06-16T10:25:30.000000000' | ||||||||
assert time_dict['num'] == 5 | ||||||||
assert time_dict['values'] == ['2000-06-16T10:25:30.000000000', | ||||||||
'2000-07-16T20:54:36.000000000', | ||||||||
'2000-08-16T07:23:42.000000000'] | ||||||||
# assert time_dict['start'] == '2000-06-16T10:25:30.000000000' | ||||||||
# assert time_dict['stop'] == '2000-08-16T07:23:42.000000000' | ||||||||
# assert time_dict['num'] == 3 | ||||||||
Comment on lines
+138
to
+140
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
||||||||
# unbounded date range - start | ||||||||
req = mock_api_request({ | ||||||||
'coords': 'POINT(11 11)', | ||||||||
'datetime': '../2000-06-16' | ||||||||
'datetime': '../2000-08-16' | ||||||||
}) | ||||||||
rsp_headers, code, response = get_collection_edr_query( | ||||||||
api_, req, 'icoads-sst', None, 'position') | ||||||||
|
@@ -148,29 +151,36 @@ def test_get_collection_edr_query(config, api_): | |||||||
data = json.loads(response) | ||||||||
time_dict = data['domain']['axes']['TIME'] | ||||||||
|
||||||||
assert time_dict['start'] == '2000-01-16T06:00:00.000000000' | ||||||||
assert time_dict['stop'] == '2000-06-16T10:25:30.000000000' | ||||||||
assert time_dict['num'] == 6 | ||||||||
assert time_dict['values'] == ['2000-06-16T10:25:30.000000000', | ||||||||
'2000-07-16T20:54:36.000000000', | ||||||||
'2000-08-16T07:23:42.000000000'] | ||||||||
# assert time_dict['start'] == '2000-06-16T10:25:30.000000000' | ||||||||
# assert time_dict['stop'] == '2000-08-16T07:23:42.000000000' | ||||||||
# assert time_dict['num'] == 3 | ||||||||
Comment on lines
+157
to
+159
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
||||||||
# unbounded date range - end | ||||||||
req = mock_api_request({ | ||||||||
'coords': 'POINT(11 11)', | ||||||||
'datetime': '2000-06-16/..' | ||||||||
'datetime': '2000-08-16/..' | ||||||||
}) | ||||||||
rsp_headers, code, response = get_collection_edr_query( | ||||||||
api_, req, 'icoads-sst', None, 'position') | ||||||||
assert code == HTTPStatus.OK | ||||||||
|
||||||||
data = json.loads(response) | ||||||||
time_dict = data['domain']['axes']['TIME'] | ||||||||
|
||||||||
assert time_dict['start'] == '2000-06-16T10:25:30.000000000' | ||||||||
assert time_dict['stop'] == '2000-12-16T01:20:05.999999996' | ||||||||
assert time_dict['num'] == 7 | ||||||||
assert time_dict['values'] == ['2000-08-16T07:23:42.000000000', | ||||||||
'2000-09-15T17:52:48.000000000', | ||||||||
'2000-10-16T04:21:54.000000000', | ||||||||
'2000-11-15T14:51:00.000000000', | ||||||||
'2000-12-16T01:20:05.999999996'] | ||||||||
# assert time_dict['start'] == '2000-08-16T07:23:42.000000000' | ||||||||
# assert time_dict['stop'] == '2000-12-16T01:20:05.999999996' | ||||||||
# assert time_dict['num'] == 7 | ||||||||
Comment on lines
+177
to
+179
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
||||||||
# some data | ||||||||
req = mock_api_request({ | ||||||||
'coords': 'POINT(11 11)', 'datetime': '2000-01-16' | ||||||||
'coords': 'POINT(11 11)', 'datetime': '2000-06-16' | ||||||||
}) | ||||||||
rsp_headers, code, response = get_collection_edr_query( | ||||||||
api_, req, 'icoads-sst', None, 'position') | ||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the point of adding this? Can we add a test case that uses this field. Suggest to potentially rename in pygeoapi, but will defer to @tomkralidis. This addition should also be noted in the docs (OACoverages and OAEDR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used it to configure the time axis label (see #1833, coverage schema expect 't' as the time axis) and keep an option for backward compatibility in case the implemented client needs the other one.