You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@climate.apache.org by "Cameron Goodale (JIRA)" <ji...@apache.org> on 2013/08/22 16:03:52 UTC
[jira] [Work started] (CLIMATE-274) Make the exception that the
Dataset class throws more descriptive
[ https://issues.apache.org/jira/browse/CLIMATE-274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on CLIMATE-274 started by Cameron Goodale.
> Make the exception that the Dataset class throws more descriptive
> -----------------------------------------------------------------
>
> Key: CLIMATE-274
> URL: https://issues.apache.org/jira/browse/CLIMATE-274
> Project: Apache Open Climate Workbench
> Issue Type: Improvement
> Components: data sources, general
> Affects Versions: 0.2-incubating
> Environment: OS X
> Reporter: Cameron Goodale
> Assignee: Cameron Goodale
> Fix For: 0.3-incubating
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> When a new Dataset Object is initialized the parameters that are required (4 total) are all checked individually as well as together, and if any of these tests fail a ValueError is raised with the following message to the user:
> "Dataset given improperly shaped array during initialization."
> I would like to try and make that error message more specific about which one of the checks raised the error.
> Example Messages:
> --------------------------------
> * Longitude Array is not 1 dimension
> * Latitude Array is not 1 dimension
> * Times Array is not 1 dimension
> * Times Array doesn't contain datetime objects
> * Values Arrays is not 3 dimensional
> * Values Array is out of order. Expected (times, lat, lon) but got ([what ever we discovered] lon, times, lat)
> To some people this amount of check and rigor might seem overkill, but I think this is necessary since the rest of the OCW code depends on have a properly formed OCW Dataset object to work with.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira