bnlawrence / cfs

Rebooting cfstore, leaner and meaner
0 stars 1 forks source link

VariableInterface.retrieve_by_properties doesn't do what it should #33

Open bnlawrence opened 1 week ago

bnlawrence commented 1 week ago

I don't have a formal unit test for this (yet), but the following on canari live doesn't do what you'd expect:

vars0 = db.variable.all()
vars1 = db.variable.retrieve_by_properties({'standard_name':'eastward_wind'})
vars2 = db.variable.retrieve_by_properties({'frequency':'6hr_pt'})
vars3 = db.variable.retrieve_by_properties({'standard_name':'eastward_wind',
                                                    'frequency':'6hr_pt'})
print(len(vars0), len(vars1), len(vars2), len(vars3))
assert len(vars3) == 4

It prints


1645 23 43 66
``` then raises the assertion error. Right now it can't be filtering properly,