civisanalytics / civis-python

Civis API Python Client
BSD 3-Clause "New" or "Revised" License
34 stars 26 forks source link

ENH Optional `name` arg in civis.io.file_to_civis #324

Closed jacksonllee closed 5 years ago

jacksonllee commented 5 years ago

This main issue that this PR aims to address is to avoid having to write client code like civis.io.file_to_civis('foobar.txt', 'foobar.txt'), where the second arg name is obligatory currently (as of v1.11.0) but seems unnecessary. I think it'd be perfectly reasonable to allow code like civis.io.file_to_civis('foobar.txt') where name can internally be inferred from the basename of the given file path -- this is what this PR implements.