-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add filepath to /metadata response #23
Conversation
7aac381
to
f8aed47
Compare
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.
Looks good to me!
.filter(DataFileVariableDSGTimeSeries.netcdf_variable_name == var) | ||
) | ||
for Table in joins: | ||
q = q.join(Table) |
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.
That's a nice way to do it.
@@ -1,6 +1,7 @@ | |||
import os | |||
from os.path import basename | |||
|
|||
from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound |
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.
Good use of these.
Resolves #22 . Also fixes python-ci test environment.
This PR changes the
/metadata
endpoint in the following ways:min
andmax
include
with the following valid values, specified as a comma-separated list:units
filepath
request
an optional query parameter with the following meanings:request=GetMinMax
: default responserequest=GetMinMaxWithUnits
: includeunits
in responseAn example request to this revised API is
/metadata.json?include=filepath,units
.This change supersedes ("deprecates" is too strong a word) the previous API definition, by effectively replacing the
request
parameter with theinclude
parameter. However, the oldrequest=
style still functions as it did to ensure backward compatibility.This PR also adds the infrastructure for building a Docker image containing an appropriate test environment for this package. It has been exercised and works as advertised. It is a minor variation of the infrastructure established for the same purpose in PyCDS.