Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Unambiguous usage of data source ID and title #299

Closed
forman opened this issue Jul 19, 2017 · 1 comment
Closed

Unambiguous usage of data source ID and title #299

forman opened this issue Jul 19, 2017 · 1 comment
Assignees
Milestone

Comments

@forman
Copy link
Member

forman commented Jul 19, 2017

Expected behavior

DataSource interface should expose a unique ID and a human-readable title.

However: DataSource.matches_filter(self, query=None)!

Actual behavior

We have DataSource.name which is ambiguous.

Specifications

Cate 0.9.0.dev4

@forman forman added this to the IPM6 milestone Jul 19, 2017
@forman forman assigned forman and unassigned kbernat Jul 19, 2017
@forman
Copy link
Member Author

forman commented Jul 20, 2017

Summary of changes:

  • renamed property cate.core.ds.DataSource.name to id
  • renamed property cate.core.ds.DataStore.name to id
  • renamed and changed signature of function cate.core.ds.DataStore.query_data_sources(..., name=None)
    to find_data_sources(..., id=None, query_expr=None)
  • changed signature of method cate.core.ds.DataStore.query(name, ...) to query(id=None, query_expr=None, ...)
  • renamed and changed signature of method cate.core.ds.DataSource.matches_filter(name) to matches(id=None, query_expr=None)
  • added title property to cate.core.ds.DataStore and cate.core.ds.DataSource
  • made use of the new id and title properties of both DataStore and DataSource in their
    JSON representations.

mzuehlke added a commit that referenced this issue Jul 20, 2017
forman added a commit that referenced this issue Jul 20, 2017
forman added a commit that referenced this issue Jul 20, 2017
forman added a commit to CCI-Tools/cate-desktop that referenced this issue Jul 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants