Skip to content

we should coerce tag names on search #297

@delgadom

Description

@delgadom
  • DataFS version: 0.7.1

Description

tag names should be coerced on search

What I did

In [2]: list(api.search('SON'))
Out[2]: []

In [3]: list(api.search('son'))
Out[3]:
[u'GCP/climate/SMME/tasmin/grid025/daily/rcp85/pattern4/2034/SON.nc',
 u'GCP/climate/SMME/tasmin/grid025/daily/rcp85/pattern4/2021/SON.nc',
...
 u'GCP/climate/SMME/tasmin/grid025/daily/rcp85/pattern4/2038/SON.nc']

What I want

Instead we should be applying the same coersion methods on tag searches as we do on tag registration. That way, you get the expected behavior:

In [4]: arch = api.create('my/archive', tags=(2))
In [5]: list(api.search(2))
Out[5]: 
['my/archive']

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions