Conversation
|
Since I am going through this process anyway, I thought I'd add in opendap too. Might come in handy. |
|
thanks @kthyng! If you could please add a small test that demonstrates opening the csv from a STAC item here that would be great intake-stac/intake_stac/tests/test_catalog.py Line 148 in e889999 You can add an 'item_csv.json' in this folder https://github.com/intake/intake-stac/tree/main/intake_stac/tests/data/1.0.0 with an accompanying data file. |
|
@scottyhq I added a sample csv file and an accompanying item json file. I tried to set up a test (line 240 in |
|
Apologies for leaving this so long @kthyng! I think we can get it merged soon, just need to resolve the conflicts (click 'Resolve Conflicts' button below and just delete the <<< === >>> lines b/c we want to keep both your new test and the recent changes). For the test, here is an example to confirm the correct driver is used and we get back a pandas: dataframe cat = intake.open_stac_item('item-csv.json')
df = cat['test'].read()
assert cat['test'].metadata['type'] == 'text/csv'
assert isinstance(cat['test'], intake.source.csv.CSVSource)
assert isinstance(df, pandas.dataframe.core.DataFrame) you'll likely have to modify the path to item-csv.json, see other examples at the top of the test script intake-stac/intake_stac/tests/test_catalog.py Lines 20 to 23 in fe1aaa1 |
|
Thanks @scottyhq! I should be able to get back to this later next week if not before. I appreciate your help! |
I have run this successfully in my local version but I am not sure how to best demonstrate that here. Could I get some help with this process and what you'd like to see?