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

Files without runs? #109

Open
rod-glover opened this issue Nov 27, 2019 · 3 comments
Open

Files without runs? #109

rod-glover opened this issue Nov 27, 2019 · 3 comments

Comments

@rod-glover
Copy link
Contributor

rod-glover commented Nov 27, 2019

In adding tests for the streamflow/watershed API, I discovered that if a file does not have a run associated with it, then the models API endpoint fails. The key code is this:

{dfv.file.run.model.short_name for dfv in ensemble.data_file_variables}

where ensemble is a pycds.Ensemble object.

Overlooking the fact that there are likely alternative queries more robust to absent links between ensemble and model, there's the question of whether we already do or plan to allow for files without runs. I am not sure how we resolved this question, so this issue may just be a placeholder for retrieving a previous decision that resolves this problem while I continue working on the watershed API.

@corviday
Copy link
Contributor

I think in the past we've specified the "run" for files that are not model output as either "na" or "base", but we've given them runs.

@rod-glover
Copy link
Contributor Author

Thank you, @corviday , working when you are supposed to be resting!

@jameshiebert
Copy link
Contributor

Yeah, I'd argue that we should only be querying files that are linked to the runs table (and that non-model output should at least have something). If you both agree, then this could make a good-first-issue.

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

No branches or pull requests

3 participants