pymapd icon indicating copy to clipboard operation
pymapd copied to clipboard

Consider deprecating load_table_* methods, have users only use load_table

Open randyzwitch opened this issue 5 years ago • 2 comments

It's a bit confusing that we export all of the different load_table_* methods, yet only load_table has the method for auto-creating table.

Moving the auto-create statements into the individual methods would make it easier for users to call the different methods. Alternatively, we could not export anything other than load_table, have the individual methods be private(-ish)

randyzwitch avatar Mar 28 '19 00:03 randyzwitch

In my mind it's not that confusing, the load_table is a wrapper load function that would be used in the majority of cases, and the others are called by load_table downstream. You can still specify a load type with load_table and also specify whether or not to create the table. The downstream functions assume that the table is already there so it would be a potentially breaking change, and not sure it really removes much / any potential confusion?

jp-harvey avatar Mar 28 '19 01:03 jp-harvey

Yeah, it feels like to me the better route would be to deprecate the other methods, making people always go through load_table. Trade-off between breaking things and cleaning up the API.

randyzwitch avatar Mar 28 '19 01:03 randyzwitch